/* Kjørerapport – stil for de vanlige nettsidene (infoside for trafikkskoler og personvern).
   Samme farger og skrift som appen (profil 2.0 «Skilt og vei», 0.19.0; se designprofil/index.html). */
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/overpass-latin.woff2') format('woff2'); unicode-range: U+0000-00B6, U+00B8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/overpass-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #eef2f8; --surface: #ffffff; --ink: #0f1a2b; --muted: #4b586b; --line: #d9e1ec;
  --asphalt: #262c31; --lane: #f5c518; --good: #23784a; --brake: #c0392b; --accel: #0b4cb4;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d17; --surface: #111a28; --ink: #e9eef6; --muted: #a3b0c4; --line: #25314a;
    --asphalt: #3a4248; --lane: #f5c518; --good: #5cc08a; --brake: #f07a66; --accel: #8db8ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080d17; --surface: #111a28; --ink: #e9eef6; --muted: #a3b0c4; --line: #25314a;
  --asphalt: #3a4248; --lane: #f5c518; --good: #5cc08a; --brake: #f07a66; --accel: #8db8ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Overpass', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.55;
}
a { color: var(--accel); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 16px; font-size: 0.95rem; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:hover { filter: brightness(1.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Forsiden */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 24px 0 56px; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.road { height: 10px; border-radius: 5px; background: var(--asphalt) repeating-linear-gradient(90deg, transparent 0 18px, var(--lane) 18px 40px, transparent 40px 58px) center / 100% 3px no-repeat; margin: 0 0 20px; max-width: 220px; }
.phones { display: flex; justify-content: center; gap: 0; position: relative; min-height: 420px; }
.phone { width: 220px; border-radius: 30px; padding: 8px; background: #111; box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.phone img { display: block; width: 100%; border-radius: 23px; }
.phones .phone:nth-child(2) { margin-left: -50px; margin-top: 60px; }

section.block { padding: 48px 0; border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p:last-child { margin-bottom: 0; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 800; margin-bottom: 10px; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check li::before { content: ''; position: absolute; left: 4px; top: 0.45em; width: 14px; height: 8px; border-left: 3px solid var(--good); border-bottom: 3px solid var(--good); transform: rotate(-45deg); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shots figure { margin: 0; }
.shots .phone { width: 100%; max-width: 240px; margin: 0 auto; }
.shots figcaption { text-align: center; margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
.note { border-left: 4px solid var(--lane); padding: 12px 16px; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.cta { text-align: center; }
.cta .btn-row { justify-content: center; }
footer { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Personvern og andre tekstsider */
.doc { padding: 16px 0 48px; }
.doc h2 { font-size: 1.3rem; margin-top: 32px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; }
.table-wrap { overflow-x: auto; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 32px; }
  .phones { min-height: 0; }
  .phone { width: 170px; border-radius: 24px; padding: 6px; }
  .phone img { border-radius: 19px; }
  .phones .phone:nth-child(2) { margin-left: -36px; margin-top: 40px; }
  .grid3, .grid2, .shots { grid-template-columns: 1fr; }
  .topbar nav { display: none; }
  .lead { font-size: 1.08rem; }
}

/* Lisenstekstene (lisenser/): lange tekster, lukket til man åpner dem */
.doc details.license { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 12px; }
.doc details.license summary { cursor: pointer; padding: 14px 16px; font-weight: 700; min-height: 44px; box-sizing: border-box; }
.doc details.license pre { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.8rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.doc details.license .license-text { padding: 0 16px 8px; font-size: 0.85rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.doc details.license .license-text p { margin: 0 0 10px; }
.doc ul.credits { list-style: none; padding: 0; }
.doc ul.credits li { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }

/* Skolesiden og elevsiden (1.0.8): skolen deler ut elevtilganger, eleven får koden sin. Som i appen: ett blått
   skiltkort per side (det viktigste), og gult bare for den ene hovedhandlingen. */
:root { --brand: #0b4cb4; --brand-2: #083b8f; --primary: #f5c518; --on-primary: #0f1a2b; --warn-bg: #fff6d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand: #0e45a8; --brand-2: #0a347f; --warn-bg: #2a2410; } }
:root[data-theme="dark"] { --brand: #0e45a8; --brand-2: #0a347f; --warn-bg: #2a2410; }
.sign-card { position: relative; isolation: isolate; color: #fff; background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%); border-radius: 22px; padding: 24px 22px 20px; margin: 0 0 16px; box-shadow: 0 12px 30px color-mix(in srgb, var(--brand) 30%, transparent); }
.sign-card::before { content: ''; position: absolute; inset: 6px; z-index: -1; border: 2px solid rgba(255, 255, 255, .88); border-radius: 17px; pointer-events: none; }
.sign-card .eyebrow, .sign-card .muted { color: #d3e0f7; }
.sign-card h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
@media (prefers-contrast: more) { .sign-card .eyebrow, .sign-card .muted { color: #fff; } .sign-card::before { border-color: #fff; } }
.btn.yellow { background: var(--primary); color: var(--on-primary); }
.btn.wide { width: 100%; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 0.95rem; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn:focus-visible, .linkbtn:focus-visible, .seg button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accel); outline-offset: 2px; }
.big-num { font-size: clamp(3.2rem, 15vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin: 4px 0 2px; }
.meter { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .22); overflow: hidden; margin: 16px 0 10px; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.stats { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.code { font: 700 1.45rem/1.25 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .04em; overflow-wrap: anywhere; }
.portal > section:not(.sign-card) { margin-top: 28px; }
.portal h2 { font-size: 1.35rem; }
.notice { background: var(--warn-bg); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.msg { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 14px; }
.filters input { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.92rem; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.row-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.row-top .code { font-size: 1.1rem; }
/* 1.2.0: elevens navn over koden på skolesiden */
.row-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
.row-top .code.sub { font-size: 0.95rem; color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; border: 1px solid currentColor; }
.pill.ok { color: var(--good); }
.pill.wait { color: var(--muted); }
.pill.off { color: var(--brake); }
.rows .meta { margin: 6px 0 10px; color: var(--muted); font-size: 0.92rem; }
.rows .actions:empty { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accel); font: inherit; text-decoration: underline; cursor: pointer; }
.steps { padding-left: 22px; margin: 0 0 12px; }
.steps li { margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 10; }
dialog.ask { border: 0; border-radius: 18px; padding: 22px; max-width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog.ask::backdrop { background: rgba(8, 13, 23, .5); }
dialog.ask .actions { justify-content: flex-end; margin-top: 16px; }
select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.field { display: block; margin: 0 0 12px; font-weight: 700; }
.field input { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
.qr-box { background: #fff; padding: 10px; border-radius: 14px; width: min(280px, 100%); margin: 4px auto 12px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.code-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 4px; }
.code-line .code { margin: 0; }
[hidden] { display: none !important; }   /* .btn og andre med egen display skal også kunne skjules */

