:root {
  --ink: #0a1630;
  --ink-2: #122650;
  --paper: #f4f7fb;
  --white: #ffffff;
  --line: #d9e1ed;
  --muted: #65728a;
  --teal: #16c79a;
  --mint: #3af2b5;
  --blue: #4b7cff;
  --violet: #7d5cff;
  --gold: #ffbe3d;
  --coral: #ff6b6b;
  --shadow: 0 18px 55px rgba(10, 22, 48, .12);
  --radius: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); padding: 12px 16px; border-radius: 10px; background: var(--white); color: var(--ink); font-weight: 800; }
.skip-link:focus { transform: none; }

.topbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; min-height: 78px; padding: 10px clamp(18px, 4vw, 64px); border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(10, 22, 48, .97); color: var(--white); box-shadow: 0 10px 30px rgba(0,0,0,.12); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border: 2px solid var(--mint); border-radius: 14px 14px 14px 4px; background: linear-gradient(145deg, rgba(58,242,181,.22), rgba(75,124,255,.2)); color: var(--white); font-size: 1.15rem; font-weight: 950; box-shadow: inset 0 0 0 4px rgba(255,255,255,.05); }
.brand > span:last-child { display: grid; line-height: 1.2; }
.brand strong { font-size: .98rem; letter-spacing: -.01em; }
.brand small { margin-top: 3px; color: #9cabc4; font-size: .72rem; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav button { border: 0; border-radius: 11px; background: transparent; color: #cbd5e6; padding: 10px 13px; font-size: .88rem; font-weight: 750; cursor: pointer; }
.main-nav button:hover, .main-nav button.active { background: rgba(255,255,255,.09); color: var(--white); }
.main-nav .nav-feature { margin-left: 4px; background: var(--mint); color: var(--ink); }
.main-nav .nav-feature:hover, .main-nav .nav-feature.active { background: #79ffd2; color: var(--ink); }
.age-switch { display: grid; gap: 2px; margin-left: 18px; }
.age-switch label { color: #8fa0bd; font-size: .64rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.age-switch select { width: 148px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: #162a50; color: var(--white); padding: 7px 28px 7px 9px; font-size: .82rem; font-weight: 700; }
.menu-toggle { display: none; }

main { min-height: 75vh; }
.view { max-width: 1500px; margin: 0 auto; padding: 48px clamp(18px, 4vw, 64px) 80px; }
.home-view { padding-top: 0; }
.home-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: clamp(32px, 5vw, 76px); align-items: center; min-height: 570px; margin: 0 calc(clamp(18px, 4vw, 64px) * -1); padding: 74px clamp(18px, 6vw, 96px); overflow: hidden; background: var(--ink); color: var(--white); position: relative; }
.home-intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 11% 9%, rgba(58,242,181,.17), transparent 27%), radial-gradient(circle at 88% 72%, rgba(75,124,255,.2), transparent 30%), linear-gradient(135deg, transparent 0 49%, rgba(255,255,255,.025) 49% 50%, transparent 50% 100%); background-size: auto, auto, 38px 38px; }
.home-copy, .learning-board { position: relative; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #60718c; font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.home-copy .eyebrow { color: #9db0cd; }
.eyebrow span { width: 28px; height: 3px; border-radius: 99px; background: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
.home-copy h1, .section-heading h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 6rem); line-height: .93; letter-spacing: -.065em; }
.home-copy h1 em, .section-heading h1 em { color: var(--mint); font-family: Georgia, serif; font-weight: 500; }
.home-copy > p:not(.eyebrow) { max-width: 780px; margin: 28px 0; color: #bdc9dc; font-size: clamp(1rem, 1.4vw, 1.23rem); }
.home-actions, .quiz-actions, .prediction-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 11px 17px; text-decoration: none; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ffce62; outline-offset: 3px; }
.button.primary { background: var(--mint); color: var(--ink); box-shadow: 0 10px 25px rgba(58,242,181,.16); }
.button.secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.home-copy .button.secondary { border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.07); color: var(--white); }
.button.listen { border: 1px solid rgba(58,242,181,.35); background: #102448; color: var(--white); }
.button.listen span { color: var(--mint); }
.trust-list { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0 0; padding: 0; color: #8fa0bd; list-style: none; font-size: .82rem; font-weight: 750; }
.trust-list li::before { content: "✓"; margin-right: 6px; color: var(--mint); }

.learning-board { max-width: 480px; justify-self: end; width: 100%; border: 1px solid rgba(255,255,255,.13); border-radius: 28px; padding: 24px; background: rgba(17,39,75,.82); box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.learning-board > header { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.1); }
.learning-board > header span { color: #8fa0bd; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.learning-board > header strong { color: var(--mint); font-size: .88rem; }
.score-ring { display: grid; place-items: center; width: 134px; height: 134px; margin: 23px auto 17px; border: 8px solid rgba(58,242,181,.15); border-top-color: var(--mint); border-right-color: var(--blue); border-radius: 50%; transform: rotate(-18deg); }
.score-ring > div { display: grid; place-items: center; transform: rotate(18deg); }
.score-ring strong { font-size: 2.25rem; line-height: 1; }
.score-ring span { color: #93a5c0; font-size: .72rem; }
.progress-copy { display: grid; gap: 8px; color: #a8b6cb; font-size: .78rem; }
.progress-copy b { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.progress-copy i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--blue)); transition: width .3s ease; }
.learning-board ol { display: grid; gap: 7px; margin: 18px 0; padding: 0; list-style: none; }
.learning-board li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 10px 11px; border-radius: 12px; background: rgba(255,255,255,.045); }
.learning-board li > span { color: #607697; font-size: .68rem; font-weight: 900; }
.learning-board li div { display: grid; }
.learning-board li strong { font-size: .84rem; }
.learning-board li small { color: #8d9db6; font-size: .7rem; }
.learning-board li > b { color: #607697; }
.learning-board li.done { background: rgba(58,242,181,.09); }
.learning-board li.done > b { color: var(--mint); }
.learning-board > p { margin: 0; color: #7286a4; font-size: .7rem; }
.learning-board > p span { margin-right: 5px; color: var(--teal); }

.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -34px; position: relative; z-index: 2; }
.module-card { position: relative; display: grid; align-content: start; min-height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; padding: 26px; background: var(--white); text-align: left; box-shadow: 0 13px 38px rgba(10,22,48,.09); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.module-card::after { content: ""; position: absolute; inset: auto -22% -50% 35%; height: 170px; border-radius: 50%; opacity: .11; background: var(--card-accent); transform: rotate(-18deg); }
.module-number { color: #a4afc0; font-size: .72rem; font-weight: 900; }
.module-icon { display: grid; place-items: center; width: 47px; height: 47px; margin: 24px 0 18px; border-radius: 15px; background: color-mix(in srgb, var(--card-accent) 14%, white); color: var(--card-accent); font-weight: 950; }
.module-card small { color: var(--card-accent); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.module-card > strong { margin: 5px 0 9px; font-size: 1.3rem; letter-spacing: -.03em; }
.module-card p { margin-bottom: 20px; color: var(--muted); font-size: .9rem; }
.module-card > b { margin-top: auto; font-size: .83rem; }
.module-teams { --card-accent: #2767d7; }.module-english { --card-accent: #d54d71; }.module-stats { --card-accent: #7a4ed1; }.module-match { --card-accent: #068d70; }
.home-strip { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 1px; margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.home-strip > * { min-height: 88px; padding: 20px; background: var(--white); }
.home-strip div { display: grid; }
.home-strip small { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.home-strip strong { font-size: .9rem; }
.home-strip a { display: flex; align-items: center; color: var(--ink-2); font-size: .85rem; font-weight: 850; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 14px 0 38px; }
.section-heading > div:first-child { max-width: 900px; }
.section-heading h1 { font-size: clamp(2.6rem, 5.2vw, 5.3rem); }
.section-heading h1 em { color: #1c7a65; }
.section-heading > div > p:not(.eyebrow) { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 1.05rem; }
.section-metric { display: grid; min-width: 140px; padding: 16px 20px; border-left: 4px solid var(--teal); }
.section-metric strong { font-size: 2.4rem; line-height: 1; }
.section-metric span { color: var(--muted); font-size: .78rem; }

.team-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 220px; gap: 12px; margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.team-tools label, .table-panel label, .match-picker label, .transfer-fields label, .score-prediction label { display: grid; gap: 6px; }
label > span { color: #53617a; font-size: .73rem; font-weight: 850; letter-spacing: .04em; }
input, select, textarea { width: 100%; border: 1px solid #cfd8e6; border-radius: 10px; background: var(--white); color: var(--ink); padding: 11px 12px; }
textarea { resize: vertical; }
.teams-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .72fr); gap: 22px; align-items: start; }
.result-count { min-height: 24px; margin: 0 0 10px; color: var(--muted); font-size: .8rem; font-weight: 750; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.team-card { --team: #526786; display: grid; grid-template-columns: 44px 1fr auto; gap: 11px; align-items: center; min-height: 82px; border: 1px solid var(--line); border-left: 4px solid var(--team); border-radius: 14px; padding: 12px; background: var(--white); text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.team-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10,22,48,.09); }
.team-initials { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: color-mix(in srgb, var(--team) 13%, white); color: var(--team); font-size: .75rem; font-weight: 950; }
.team-card > span:nth-child(2) { display: grid; min-width: 0; }
.team-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.team-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.team-card > b { color: #9ba7ba; }
.empty-state { grid-column: 1 / -1; padding: 44px; border: 1px dashed #bec9da; border-radius: 16px; color: var(--muted); text-align: center; }
.city-panel { position: sticky; top: 98px; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: var(--white); box-shadow: var(--shadow); }
.city-panel > header { padding: 25px 25px 10px; }
.city-panel header small { color: var(--mint); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.city-panel h2 { margin: 4px 0; font-size: 1.45rem; }
.city-panel header p { color: #92a4bf; font-size: .82rem; }
.city-map { position: relative; height: 430px; margin: 0 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), radial-gradient(circle at 50% 50%, #183766, #0c1b39 72%); background-size: 30px 30px, 30px 30px, auto; }
.city-map::before, .city-map::after { position: absolute; left: 14px; z-index: 1; color: #657a9b; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.city-map::before { content: "NORÐUR"; top: 12px; }.city-map::after { content: "SUÐUR"; bottom: 12px; }
.city-dot { --city: var(--mint); position: absolute; display: grid; place-items: center; width: 18px; height: 18px; border: 3px solid #0d1e3d; border-radius: 50%; background: var(--city); box-shadow: 0 0 0 3px color-mix(in srgb, var(--city) 23%, transparent); cursor: pointer; transform: translate(-50%, -50%); }
.city-dot:hover, .city-dot.active { width: 24px; height: 24px; z-index: 2; }
.city-dot span { position: absolute; left: 22px; width: max-content; max-width: 100px; color: #d8e0ed; font-size: .64rem; font-weight: 800; pointer-events: none; }
.city-dot.label-left span { right: 22px; left: auto; text-align: right; }
.city-detail { margin-top: 20px; padding: 18px 25px 25px; background: rgba(255,255,255,.055); }
.city-detail strong { font-size: 1.05rem; }.city-detail p { margin: 3px 0 0; color: #a8b7cd; font-size: .8rem; }

.challenge-card { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 18px; align-items: center; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; background: var(--white); }
.challenge-card small, .vocab-panel header small, .reading-panel header small, .quiz-card header small, .table-panel header small, .chart-panel header small, .math-lab header small, .prediction-card small, .namsbru-transfer small { color: #13836b; font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.challenge-card h2 { margin: 5px 0; font-size: 1.25rem; }.challenge-card p { margin: 0; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice-grid button { border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: var(--paper); font-size: .78rem; font-weight: 800; cursor: pointer; }
.choice-grid button.correct { border-color: var(--teal); background: #e5fff6; }.choice-grid button.wrong { border-color: var(--coral); background: #fff0f0; }
.feedback { min-height: 24px; margin: 8px 0 0; color: #14765f; font-weight: 800; }
.feedback.error { color: #ad3840; }

.english-layout { display: grid; grid-template-columns: 1.18fr .82fr; gap: 22px; align-items: start; }
.vocab-panel, .reading-panel, .quiz-card, .table-panel, .chart-panel, .math-lab, .prediction-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 13px 35px rgba(10,22,48,.06); }
.vocab-panel { padding: 24px; }
.vocab-panel > header, .table-panel > header, .chart-panel > header, .math-lab > header, .quiz-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.vocab-panel h2, .reading-panel h2, .quiz-card h2, .table-panel h2, .chart-panel h2, .math-lab h2, .prediction-card h2, .namsbru-transfer h2 { margin: 3px 0 0; font-size: 1.35rem; letter-spacing: -.025em; }
.vocab-panel > header > span { border-radius: 99px; padding: 6px 10px; background: #e9f4ff; color: #3264a7; font-size: .67rem; font-weight: 900; }
.vocab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.vocab-card { display: grid; grid-template-columns: 35px 1fr auto; gap: 9px; align-items: center; min-height: 62px; border: 1px solid #e0e6ef; border-radius: 12px; padding: 9px; background: #fbfcfe; }
.vocab-card > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #edf0ff; color: var(--violet); font-size: .68rem; font-weight: 900; }
.vocab-card div { display: grid; }.vocab-card strong { font-size: .84rem; }.vocab-card small { color: var(--muted); font-size: .68rem; }
.vocab-card button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: #e8fff7; color: #08775f; cursor: pointer; }
.reading-panel { position: sticky; top: 98px; overflow: hidden; padding: 26px; }
.reading-panel::before { content: "READ"; position: absolute; top: 58px; right: -8px; color: rgba(20,55,105,.035); font-size: 5.6rem; font-weight: 950; transform: rotate(90deg); }
.reading-panel > header { display: flex; justify-content: space-between; gap: 12px; position: relative; }
.reading-panel > header span { border-radius: 8px; padding: 5px 8px; background: var(--ink); color: var(--white); font-size: .7rem; font-weight: 850; }
.reading-panel h2 { margin: 24px 0 15px; font-size: 1.65rem; }
.reading-text { position: relative; color: #3b4961; font-family: Georgia, serif; font-size: 1.01rem; line-height: 1.75; }
.word-focus { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.word-focus > small { color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .12em; }
.word-focus > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.word-focus button { border: 0; border-radius: 7px; padding: 6px 9px; background: #edf8f5; color: #14705e; font-size: .72rem; font-weight: 800; cursor: pointer; }
.quiz-card { margin-top: 22px; padding: 25px; }
.quiz-card header > span { display: grid; place-items: center; min-width: 68px; height: 38px; border-radius: 10px; background: var(--ink); color: var(--mint); font-weight: 900; }
#english-quiz { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quiz-question { margin: 0; border: 1px solid #e0e6ef; border-radius: 14px; padding: 16px; }
.quiz-question legend { padding: 0 5px; font-weight: 850; }
.quiz-question label { display: flex; gap: 9px; align-items: flex-start; margin-top: 8px; color: #4e5c74; font-size: .86rem; cursor: pointer; }
.quiz-question input { width: auto; margin-top: 4px; }
.quiz-question.correct { border-color: var(--teal); background: #f0fff9; }.quiz-question.wrong { border-color: #e58f94; background: #fff6f6; }
.quiz-actions { margin-top: 17px; }

.data-notice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 18px; border: 1px solid #cad7e9; border-radius: 15px; padding: 13px 16px; background: #edf5ff; }
.data-notice > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2767d7; color: white; font-weight: 900; }
.data-notice p { margin: 0; color: #4d5d75; font-size: .82rem; }.data-notice a { color: #2459a2; font-size: .8rem; font-weight: 850; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; }
.table-panel, .chart-panel, .math-lab { padding: 23px; }
.table-panel label { width: 180px; }.table-panel select { padding: 8px 10px; font-size: .8rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { color: #6a7890; text-align: right; font-size: .68rem; letter-spacing: .04em; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
th, td { border-bottom: 1px solid #e7ebf2; padding: 10px 7px; text-align: right; }
td:first-child { color: #8e9aae; font-weight: 800; }
td:nth-child(2) { font-weight: 850; white-space: nowrap; }
td:last-child { color: #08785f; font-weight: 950; }
.chart-panel { background: var(--ink); color: var(--white); }
.chart-panel header small { color: var(--mint); }
.chart-panel > p { margin: 14px 0 0; color: #8192ad; font-size: .72rem; }
.stats-chart { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 28px; gap: 8px; align-items: center; }
.bar-row > span { overflow: hidden; color: #c4d0e2; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.bar-row b { height: 17px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.08); }
.bar-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--blue)); }
.bar-row strong { color: var(--mint); font-size: .72rem; text-align: right; }
.math-lab { margin-top: 20px; }
.math-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: tasks; padding: 0; list-style: none; }
.math-tasks li { min-height: 155px; border: 1px solid #e0e6ee; border-radius: 14px; padding: 17px; background: #fbfcfe; }
.math-tasks li::before { counter-increment: tasks; content: "0" counter(tasks); display: block; margin-bottom: 18px; color: #9aa6b8; font-size: .7rem; font-weight: 900; }
.math-tasks p { margin: 0; font-weight: 750; }
.math-tasks .answer { display: none; margin-top: 12px; color: #08775f; font-size: .78rem; font-weight: 850; }
.math-tasks.show-answers .answer { display: block; }
.math-tip { margin: 13px 0 0; border-left: 3px solid var(--gold); padding-left: 12px; color: var(--muted); font-size: .8rem; }

.match-heading .save-indicator { display: inline-flex; align-items: center; gap: 7px; color: #61708a; font-size: .76rem; font-weight: 800; }
.save-indicator i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(22,199,154,.12); }
.match-picker { display: grid; grid-template-columns: 1fr 100px 1fr auto; gap: 14px; align-items: end; margin-bottom: 20px; border-radius: 18px; padding: 18px; background: var(--ink); color: white; }
.match-picker label span { color: #9bacc5; }.match-picker select { border-color: rgba(255,255,255,.15); background: #182d54; color: white; }
.versus { display: grid; justify-items: center; align-self: center; color: #8ea1be; }.versus small { font-size: .58rem; letter-spacing: .1em; }.versus strong { color: var(--mint); font-size: 1.45rem; }.versus span { font-size: .58rem; }
.match-workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: white; box-shadow: var(--shadow); }
.match-card-header { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 20px; align-items: center; padding: 30px; background: linear-gradient(135deg, #0b1832, #173865); color: white; text-align: center; }
.match-card-header > article { --team: var(--teal); display: grid; justify-items: center; }
.match-card-header .team-badge { display: grid; place-items: center; width: 66px; height: 66px; border: 3px solid color-mix(in srgb, var(--team) 60%, white); border-radius: 20px; background: color-mix(in srgb, var(--team) 18%, #0b1832); color: white; font-weight: 950; }
.match-card-header article strong { margin-top: 8px; font-size: .87rem; }
.match-card-header > div { display: grid; }.match-card-header > div small { color: var(--mint); font-size: .65rem; font-weight: 900; letter-spacing: .13em; }.match-card-header > div strong { margin: 5px 0; font-size: clamp(1.4rem, 3vw, 2.3rem); line-height: 1.05; }.match-card-header > div span { color: #9cacc4; font-size: .8rem; }
.match-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.match-stat-strip > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px; background: white; text-align: center; }
.match-stat-strip small { color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }.match-stat-strip strong { font-size: 1.05rem; }.match-stat-strip b { color: #adb6c5; font-size: .64rem; }
.journey-tabs { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 20px 25px; border-bottom: 1px solid var(--line); list-style: none; }
.journey-tabs li { display: flex; gap: 9px; align-items: center; position: relative; }
.journey-tabs li:not(:last-child)::after { content: ""; position: absolute; right: 9px; width: 20%; height: 1px; background: #ccd4e0; }
.journey-tabs li > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #edf1f6; color: #7a879b; font-size: .7rem; font-weight: 900; }
.journey-tabs li.active > span { background: var(--ink); color: var(--mint); }
.journey-tabs li div { display: grid; }.journey-tabs strong { font-size: .76rem; }.journey-tabs small { color: var(--muted); font-size: .63rem; }
.match-tasks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; padding: 25px; }
.match-task { border: 1px solid #e0e6ef; border-top: 4px solid var(--task, var(--teal)); border-radius: 13px; padding: 15px; background: #fbfcfe; }
.match-task > span { color: var(--task, #16856c); font-size: .65rem; font-weight: 900; letter-spacing: .08em; }.match-task h3 { margin: 6px 0 9px; font-size: 1rem; }.match-task p { margin: 0; color: #58667d; font-size: .78rem; }.match-task small { display: block; margin-top: 10px; color: #8a96a8; font-size: .65rem; }
.prediction-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; margin: 0 25px 25px; padding: 22px; background: #f6f9fc; box-shadow: none; }
.prediction-options { display: grid; gap: 7px; margin-top: 15px; }
.prediction-options label { display: flex; gap: 8px; align-items: center; border: 1px solid #dce3ed; border-radius: 10px; padding: 9px; background: white; font-size: .8rem; font-weight: 800; cursor: pointer; }
.prediction-options input { width: auto; }
.score-prediction { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 8px; align-items: end; margin-top: 12px; }.score-prediction b { padding-bottom: 11px; text-align: center; }.score-prediction input { text-align: center; font-size: 1.2rem; font-weight: 900; }
.reason-field { display: grid; align-content: start; gap: 6px; }.reason-field > small { color: var(--muted); text-align: right; }
.prediction-actions, .prediction-card > .feedback { grid-column: 1 / -1; }
.namsbru-transfer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; border-top: 1px solid rgba(255,255,255,.1); background: var(--ink); color: white; }
.namsbru-transfer > div:first-child { display: flex; align-items: center; gap: 15px; }.namsbru-transfer > div:first-child > span { display: grid; place-items: center; width: 51px; height: 51px; border: 2px solid var(--mint); border-radius: 15px; color: var(--mint); font-size: 1.25rem; font-weight: 950; }.namsbru-transfer h2 { margin: 2px 0; }.namsbru-transfer p { margin: 0; color: #94a6c1; font-size: .82rem; }.namsbru-transfer > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }.namsbru-transfer .secondary { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: white; }

.modal { width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 24px); border: 0; border-radius: 24px; padding: 0; background: transparent; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(4,10,23,.72); backdrop-filter: blur(5px); }
.modal-shell { position: relative; overflow: auto; max-height: calc(100vh - 24px); border-radius: 24px; padding: 29px; background: white; }
.modal-close { position: absolute; top: 15px; right: 15px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #edf1f6; font-size: 1.35rem; cursor: pointer; }
.team-modal-head { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; padding-right: 35px; }
.team-modal-head .team-initials { width: 72px; height: 72px; border-radius: 22px; font-size: 1.05rem; }.team-modal-head h2 { margin: 0; font-size: 1.75rem; }.team-modal-head p { margin: 2px 0 0; color: var(--muted); }
.team-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 22px 0; }.team-facts div { display: grid; border: 1px solid var(--line); border-radius: 12px; padding: 13px; }.team-facts small { color: var(--muted); font-size: .65rem; font-weight: 850; }.team-facts strong { font-size: .9rem; }
.team-assignment { border-left: 4px solid var(--teal); border-radius: 0 13px 13px 0; padding: 17px; background: #effbf7; }.team-assignment h3 { margin-bottom: 5px; }.team-assignment p { margin: 0; color: #476259; font-size: .86rem; }
.transfer-modal { width: min(720px, calc(100% - 24px)); }.transfer-modal header { display: flex; align-items: center; gap: 13px; padding-right: 35px; }.transfer-modal header > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ink); color: var(--mint); font-weight: 950; }.transfer-modal header small { color: #16856c; font-size: .65rem; font-weight: 900; letter-spacing: .1em; }.transfer-modal h2 { margin: 2px 0; font-size: 1.4rem; }.transfer-summary { margin: 20px 0; border-radius: 14px; padding: 16px; background: #edf8f5; }.transfer-summary p { margin: 3px 0 0; color: #536b63; font-size: .82rem; }.transfer-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }.transfer-note { color: var(--muted); font-size: .78rem; }.transfer-modal footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 360px; border-radius: 13px; padding: 13px 17px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: .84rem; font-weight: 800; }
.toast.error { background: #8f2833; }

.site-footer { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 30px; position: relative; padding: 48px clamp(18px, 5vw, 80px) 65px; background: #071226; color: #a7b4c8; }
.footer-brand { color: white; }.site-footer p { max-width: 530px; margin: 11px 0 0; font-size: .78rem; }.site-footer > div { display: flex; flex-direction: column; align-items: flex-start; }.site-footer > div > strong { margin-bottom: 8px; color: white; font-size: .8rem; }.site-footer > div > a:not(.brand) { margin: 3px 0; color: #b9c6d9; font-size: .76rem; font-weight: 750; }.site-footer .version { position: absolute; right: clamp(18px, 5vw, 80px); bottom: 18px; color: #536682; font-size: .68rem; }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr auto; }
  .main-nav { order: 3; grid-column: 1 / -1; justify-content: center; margin-top: 8px; }
  .age-switch { margin-left: 0; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .home-strip { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }.chart-panel { min-height: auto; }
  .match-tasks { grid-template-columns: repeat(3, 1fr); }
  .match-tasks .match-task:nth-child(4), .match-tasks .match-task:nth-child(5) { grid-column: span 1; }
  .journey-tabs li::after { display: none; }
}

@media (max-width: 860px) {
  .topbar { min-height: 70px; padding: 9px 16px; }
  .brand strong { font-size: .9rem; }.brand small { display: none; }
  .age-switch { display: none; }
  .menu-toggle { display: inline-flex; justify-self: end; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 11px; background: rgba(255,255,255,.07); color: white; font-size: .8rem; font-weight: 800; }
  .main-nav { display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; margin: 9px 0 2px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
  .main-nav.open { display: flex; }.main-nav button { text-align: left; }.main-nav .nav-feature { margin-left: 0; }
  .view { padding: 34px 16px 60px; }
  .home-intro { grid-template-columns: 1fr; min-height: auto; margin: 0 -16px; padding: 55px 20px 72px; }
  .learning-board { justify-self: stretch; max-width: none; }
  .module-grid { margin-top: -35px; }
  .section-heading { align-items: start; }.section-heading .button { flex: 0 0 auto; }
  .teams-layout, .english-layout { grid-template-columns: 1fr; }
  .city-panel, .reading-panel { position: static; }
  .challenge-card { grid-template-columns: 1fr; }
  .math-tasks { grid-template-columns: 1fr; }
  .match-picker { grid-template-columns: 1fr 64px 1fr; }.match-picker > button { grid-column: 1 / -1; }
  .match-tasks { grid-template-columns: repeat(2, 1fr); }
  .prediction-card { grid-template-columns: 1fr; }.reason-field, .prediction-actions, .prediction-card > .feedback { grid-column: auto; }
  .namsbru-transfer { align-items: flex-start; flex-direction: column; }
  .site-footer { grid-template-columns: 1fr 1fr; }.site-footer > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 580px) {
  .brand-mark { width: 38px; height: 38px; }.brand strong { font-size: .8rem; }
  .home-copy h1 { font-size: 3.1rem; }.home-actions .button { width: 100%; }.trust-list { display: grid; gap: 5px; }
  .learning-board { padding: 18px; }
  .module-grid { grid-template-columns: 1fr; }.module-card { min-height: 240px; }
  .home-strip { grid-template-columns: 1fr; }
  .section-heading { display: grid; }.section-heading h1 { font-size: 3rem; }.section-heading > .button { justify-self: start; }
  .team-tools, .transfer-fields { grid-template-columns: 1fr; }.team-grid { grid-template-columns: 1fr; }
  .city-map { height: 390px; }
  .vocab-grid, #english-quiz { grid-template-columns: 1fr; }
  .data-notice { grid-template-columns: auto 1fr; }.data-notice a { grid-column: 2; }
  .table-panel, .chart-panel, .math-lab { padding: 17px; }.table-panel > header { align-items: stretch; flex-direction: column; }.table-panel label { width: 100%; }
  .match-picker { grid-template-columns: 1fr; }.versus { padding: 2px; }.match-picker > button { grid-column: auto; }
  .match-card-header { grid-template-columns: 1fr 1fr; padding: 22px 14px; }.match-card-header > div { grid-column: 1 / -1; grid-row: 1; }.match-card-header > article:first-child { grid-column: 1; grid-row: 2; }.match-card-header > article:last-child { grid-column: 2; grid-row: 2; }
  .match-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .journey-tabs { grid-template-columns: repeat(5, 1fr); padding: 14px 9px; }.journey-tabs li { justify-content: center; }.journey-tabs li div { display: none; }
  .match-tasks { grid-template-columns: 1fr; padding: 15px; }.prediction-card { margin: 0 15px 15px; padding: 16px; }
  .namsbru-transfer { padding: 23px 18px; }.namsbru-transfer > div:last-child, .namsbru-transfer .button { width: 100%; }
  .team-facts { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }.site-footer > div:first-child { grid-column: auto; }
}

@media print {
  body { background: white; }
  .topbar, .home-view, #view-lidin, #view-enska, .section-heading .button, .data-notice a, .table-panel label, .namsbru-transfer, .site-footer, .toast, .modal, .match-picker, .save-indicator, .prediction-actions { display: none !important; }
  .view { max-width: none; padding: 0; }
  #view-tolur:not([hidden]), #view-leikur:not([hidden]) { display: block !important; }
  .stats-grid, .match-tasks { grid-template-columns: 1fr; }
  .table-panel, .chart-panel, .math-lab, .match-workspace, .prediction-card { break-inside: avoid; box-shadow: none; }
  .chart-panel { color: var(--ink); background: white; }.bar-row > span { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
