:root {
  --navy: #0b3557;
  --navy-deep: #06283f;
  --teal: #0d9496;
  --teal-dark: #087476;
  --aqua: #dff7f4;
  --aqua-soft: #f0faf8;
  --gold: #f4bb49;
  --cream: #fbfaf6;
  --ink: #17364a;
  --muted: #5e7482;
  --line: #d4e3e6;
  --white: #fff;
  --support: #168c91;
  --core: #0b5370;
  --deep: #8b5cbd;
  --danger: #b74c41;
  --shadow: 0 24px 68px rgba(6, 40, 63, .13);
  --shadow-soft: 0 12px 34px rgba(6, 40, 63, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 14px; color: var(--white); background: var(--navy); border-radius: 10px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 100; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 10px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(11, 53, 87, .1); background: rgba(251, 250, 246, .96); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; }
.brand > span { display: grid; }
.brand strong { color: var(--navy); font-size: 1.08rem; line-height: 1.15; }
.brand small { color: var(--teal-dark); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 5px; }
.site-header nav a { padding: 9px 11px; color: #2d4a5d; border-radius: 10px; font-size: .88rem; font-weight: 750; text-decoration: none; }
.site-header nav a:hover { color: var(--teal-dark); background: #edf7f5; }
.site-header .home-link { padding: 10px 15px; margin-left: 6px; color: var(--white); background: var(--navy); border-radius: 999px; }
.site-header .home-link:hover { color: var(--white); background: var(--teal-dark); }

main { width: min(100% - 42px, 1460px); padding: 52px 0 92px; margin: 0 auto; }
.bridge-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .72fr); align-items: end; gap: clamp(38px, 8vw, 130px); padding: 28px 6px 48px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--teal-dark); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow > span { width: 31px; height: 2px; background: currentColor; }
.bridge-intro h1 { margin: 0; color: var(--navy); font-size: clamp(3.4rem, 6.5vw, 7.4rem); letter-spacing: -.065em; line-height: .9; }
.bridge-intro h1 em { color: var(--teal); font-style: normal; }
.intro-copy > p:first-child { margin: 0; color: #38596d; font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.65; }
.local-note { display: flex; align-items: center; gap: 8px; margin: 17px 0 0; color: var(--muted); font-size: .86rem; }
.local-note span { display: grid; width: 21px; height: 21px; place-items: center; color: var(--white); background: var(--teal); border-radius: 50%; font-size: .68rem; font-weight: 950; }

.short-path { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); background: var(--white); border-radius: 18px; box-shadow: var(--shadow-soft); list-style: none; }
.short-path li { position: relative; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; min-height: 76px; padding: 13px 20px; border-right: 1px solid var(--line); }
.short-path li:last-child { border-right: 0; }
.short-path li::after { position: absolute; right: -8px; z-index: 1; color: #9eb1ba; content: "›"; font-size: 1.5rem; }
.short-path li:last-child::after { content: none; }
.short-path li > span { display: grid; width: 36px; height: 36px; place-items: center; color: var(--navy); background: #eef5f5; border-radius: 11px; font-size: .78rem; font-weight: 950; }
.short-path li.is-current > span { background: var(--gold); }
.short-path li div { display: grid; }
.short-path strong { color: var(--navy); font-size: .87rem; }
.short-path small { color: var(--muted); font-size: .72rem; }

.builder-grid { display: grid; grid-template-columns: minmax(390px, .78fr) minmax(520px, 1.22fr); overflow: hidden; border: 1px solid var(--line); background: var(--white); border-radius: 26px; box-shadow: var(--shadow); }
.setup-card, .support-card { display: grid; align-content: start; gap: 19px; padding: clamp(26px, 3.5vw, 48px); }
.support-card { border-left: 1px solid var(--line); background: linear-gradient(145deg, #f5fbfa, #edf8f6); }
.panel-heading { display: flex; align-items: center; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.panel-heading > span { display: grid; width: 44px; height: 44px; place-items: center; color: var(--navy); background: var(--gold); border-radius: 13px; font-size: .76rem; font-weight: 950; }
.panel-heading small { color: var(--teal-dark); font-size: .68rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.panel-heading h2 { margin: 1px 0 0; color: var(--navy); font-size: clamp(1.35rem, 2vw, 1.78rem); line-height: 1.1; }
.handoff-note { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; padding: 12px 14px; color: var(--navy); border: 1px solid #b8dbd7; background: var(--aqua-soft); border-radius: 13px; }
.handoff-note > span { display: grid; width: 36px; height: 36px; place-items: center; color: var(--white); background: var(--teal); border-radius: 10px; font-size: .78rem; font-weight: 950; }
.handoff-note div { display: grid; }
.handoff-note strong { font-size: .86rem; }
.handoff-note small { color: var(--muted); font-size: .73rem; }

.setup-card label, .support-card fieldset { display: grid; gap: 7px; }
.setup-card label > span, .duration-choice legend { color: #355368; font-size: .82rem; font-weight: 850; }
.setup-card label > span small { color: var(--muted); font-weight: 650; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea { width: 100%; border: 1px solid #c8dbe0; background: #fbfdfd; border-radius: 12px; }
input, select { min-height: 48px; padding: 0 13px; }
textarea { min-height: 82px; padding: 12px 13px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 3px solid rgba(13, 148, 150, .14); }
.duration-choice { padding: 0; margin: 0; border: 0; }
.duration-choice > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 7px; }
.duration-choice label { position: relative; }
.duration-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.duration-choice label > span { display: grid; min-height: 47px; place-items: center; padding: 0 6px; color: #486273; border: 1px solid #c8dbe0; background: var(--white); border-radius: 11px; font-size: .78rem; font-weight: 850; cursor: pointer; }
.duration-choice input:checked + span { color: var(--navy); border-color: var(--gold); background: #fff2d3; box-shadow: inset 0 0 0 1px var(--gold); }
.duration-choice input:focus-visible + span { outline: 3px solid rgba(244, 187, 73, .7); outline-offset: 2px; }

.support-intro { margin: -4px 0 0; color: var(--muted); font-size: .88rem; }
.support-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.support-options label { position: relative; }
.support-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.support-options label > span { display: grid; grid-template-columns: 39px 1fr; min-height: 82px; align-items: center; align-content: center; gap: 0 10px; padding: 12px; color: #496374; border: 1px solid #c7dbde; background: rgba(255, 255, 255, .86); border-radius: 14px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.support-options b { display: grid; grid-row: 1 / 3; width: 38px; height: 38px; place-items: center; color: var(--navy); background: #e8f4f3; border-radius: 11px; font-size: .68rem; }
.support-options strong { color: var(--navy); font-size: .83rem; }
.support-options small { font-size: .69rem; line-height: 1.35; }
.support-options input:checked + span { color: var(--teal-dark); border-color: var(--teal); background: #eaf9f6; box-shadow: inset 0 0 0 1px rgba(13, 148, 150, .2); }
.support-options input:checked + span b { color: var(--white); background: var(--teal); }
.support-options label:hover > span { transform: translateY(-1px); }
.support-options input:focus-visible + span { outline: 3px solid rgba(244, 187, 73, .7); outline-offset: 2px; }
.generate-button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 9px; padding: 12px 18px; color: var(--white); border: 0; background: var(--teal); border-radius: 14px; box-shadow: 0 12px 28px rgba(13, 148, 150, .2); font-weight: 900; cursor: pointer; }
.generate-button:hover { background: var(--navy); }
.generate-button span { color: var(--gold); }
.privacy-line { margin: -8px 0 0; color: var(--muted); font-size: .76rem; text-align: center; }

.route-workspace { margin-top: 72px; scroll-margin-top: 92px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; padding: 0 5px; }
.workspace-heading h2 { margin: 0; color: var(--navy); font-size: clamp(2.1rem, 4vw, 4.2rem); letter-spacing: -.05em; line-height: 1; }
.save-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.save-state p { margin: 0; }
.save-state span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--white); background: var(--teal); border-radius: 50%; font-size: .7rem; font-weight: 950; }
.save-state.is-saving span { color: var(--navy); background: var(--gold); }
.save-state.is-error span { background: var(--danger); }

.route-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.route-tabs button { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 12px; min-height: 100px; padding: 15px; color: var(--ink); border: 1px solid var(--line); background: var(--white); border-radius: 16px; box-shadow: var(--shadow-soft); text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.route-tabs button:hover { transform: translateY(-2px); }
.route-tabs button > span { display: grid; width: 44px; height: 44px; place-items: center; color: var(--white); background: var(--route-color, var(--teal)); border-radius: 13px; font-size: .78rem; font-weight: 950; }
.route-tabs button[data-route="studningur"] { --route-color: var(--support); }
.route-tabs button[data-route="kjarni"] { --route-color: var(--core); }
.route-tabs button[data-route="dypkun"] { --route-color: var(--deep); }
.route-tabs button div { min-width: 0; }
.route-tabs small { display: block; color: var(--route-color, var(--teal)); font-size: .63rem; font-weight: 900; letter-spacing: .08em; }
.route-tabs strong { display: block; overflow: hidden; color: var(--navy); font-size: 1.02rem; text-overflow: ellipsis; white-space: nowrap; }
.route-tabs p { margin: 1px 0 0; color: var(--muted); font-size: .73rem; }
.route-tabs button[aria-selected="true"] { color: var(--white); border-color: var(--route-color); background: var(--navy); box-shadow: 0 16px 36px rgba(6, 40, 63, .18); }
.route-tabs button[aria-selected="true"] small { color: #8fe2dc; }
.route-tabs button[aria-selected="true"] strong { color: var(--white); }
.route-tabs button[aria-selected="true"] p { color: #c5d8dd; }

.route-panel { --route-color: var(--core); overflow: hidden; border: 1px solid rgba(11, 53, 87, .15); background: var(--white); border-radius: 25px; box-shadow: var(--shadow); }
.route-panel.route-studningur { --route-color: var(--support); }
.route-panel.route-kjarni { --route-color: var(--core); }
.route-panel.route-dypkun { --route-color: var(--deep); }
.route-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 21px 24px; color: var(--white); background: linear-gradient(130deg, var(--navy-deep), var(--route-color)); background: linear-gradient(130deg, var(--navy-deep), color-mix(in srgb, var(--route-color) 62%, var(--navy))); }
.route-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.route-identity > span { display: grid; flex: 0 0 43px; width: 43px; height: 43px; place-items: center; color: var(--navy); background: var(--gold); border-radius: 12px; font-weight: 950; }
.route-identity div { min-width: 0; }
.route-identity small { color: #9be3de; font-size: .65rem; font-weight: 900; letter-spacing: .09em; }
.route-identity h3 { margin: 1px 0 0; overflow: hidden; font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }
.route-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.route-actions button { min-height: 41px; padding: 9px 12px; color: var(--white); border: 1px solid rgba(255,255,255,.23); background: rgba(255,255,255,.08); border-radius: 11px; font-size: .78rem; font-weight: 850; cursor: pointer; }
.route-actions button:hover { background: rgba(255,255,255,.15); }
.route-actions .edit-route { color: var(--navy); border-color: var(--gold); background: var(--gold); }
.route-actions .student-route { border-color: #77d8d2; background: var(--teal); }

.route-preview { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .58fr); }
.route-main { display: grid; gap: 16px; padding: clamp(28px, 4vw, 54px); }
.shared-goal { padding: 20px 22px; border-left: 5px solid var(--route-color); background: var(--aqua-soft); border-radius: 15px; }
.shared-goal small, .route-instruction small, .route-side small { display: block; margin-bottom: 6px; color: var(--teal-dark); font-size: .68rem; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.shared-goal p { margin: 0; color: var(--navy); font-size: 1.1rem; font-weight: 800; }
.route-instruction { padding: 20px 22px; color: var(--white); background: var(--navy); border-radius: 15px; }
.route-instruction small { color: #8ce0db; }
.route-instruction p { margin: 0; font-size: 1rem; font-weight: 700; }
.route-main > h4 { margin: 7px 0 -3px; color: var(--navy); font-size: 1.16rem; }
.route-step-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; counter-reset: route-step; }
.route-step-list li { display: grid; grid-template-columns: 38px 1fr; align-items: start; gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; }
.route-step-list li::before { counter-increment: route-step; display: grid; width: 36px; height: 36px; place-items: center; color: var(--white); background: var(--route-color); border-radius: 11px; content: counter(route-step); font-size: .78rem; font-weight: 950; }
.route-step-list li p { margin: 5px 0 0; }
.route-side { display: grid; align-content: start; gap: 12px; padding: clamp(28px, 4vw, 48px); border-left: 1px solid var(--line); background: #f4faf9; }
.route-side article { padding: 18px; border: 1px solid #d5e4e4; background: var(--white); border-radius: 15px; }
.route-side p { margin: 0; }
.route-words { display: flex; flex-wrap: wrap; gap: 6px; }
.route-words span { padding: 6px 9px; color: var(--navy); background: #e7f5f3; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.sentence-card { border-left: 4px solid var(--gold) !important; }

.route-editor { display: grid; gap: 18px; padding: clamp(24px, 4vw, 48px); background: #f6faf9; }
.editor-note { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: var(--white); background: var(--navy); border-radius: 15px; }
.editor-note > span { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; color: var(--navy); background: var(--gold); border-radius: 11px; }
.editor-note p { margin: 1px 0 0; color: #c7dce0; font-size: .78rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-grid.two { grid-template-columns: 1fr 1fr; }
.editor-grid label { display: grid; gap: 6px; }
.editor-grid label.wide { grid-column: 1 / -1; }
.editor-grid label > span { color: #345368; font-size: .78rem; font-weight: 850; }
.editor-grid label > span small { color: var(--muted); font-weight: 650; }
.step-editor-section { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); background: var(--white); border-radius: 17px; }
.step-editor-section > div:first-child small { color: var(--teal-dark); font-size: .65rem; font-weight: 900; letter-spacing: .09em; }
.step-editor-section h4 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.step-editor-list { display: grid; gap: 9px; }
.step-editor-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 41px; gap: 8px; align-items: start; }
.step-editor-row > span { display: grid; width: 38px; height: 42px; place-items: center; color: var(--white); background: var(--route-color); border-radius: 10px; font-size: .76rem; font-weight: 950; }
.step-editor-row textarea { min-height: 74px; }
.step-editor-row button { display: grid; width: 41px; height: 41px; place-items: center; color: var(--danger); border: 1px solid #e9cfcc; background: #fff5f3; border-radius: 10px; cursor: pointer; }
.add-step { justify-self: start; padding: 8px 12px; color: var(--teal-dark); border: 1px solid #acd9d5; background: var(--aqua-soft); border-radius: 10px; font-size: .78rem; font-weight: 850; cursor: pointer; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 4px; }
.editor-footer p { margin: 0; color: var(--muted); font-size: .8rem; }
.editor-footer p span { color: var(--teal); font-weight: 950; }
.finish-button { min-height: 48px; padding: 10px 18px; color: var(--white); border: 0; background: var(--teal); border-radius: 12px; font-weight: 900; cursor: pointer; }

.bridge-forward { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px clamp(24px, 4vw, 48px); color: var(--white); background: var(--navy); }
.bridge-forward small { color: #8fe1dc; font-size: .65rem; font-weight: 900; letter-spacing: .09em; }
.bridge-forward strong { display: block; margin: 2px 0; font-size: 1.08rem; }
.bridge-forward p { margin: 0; color: #c7dbe0; font-size: .8rem; }
.bridge-forward button { flex: 0 0 auto; min-height: 48px; padding: 10px 18px; color: var(--navy); border: 0; background: var(--gold); border-radius: 12px; font-weight: 900; cursor: pointer; }

.student-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; padding: 0; margin: 0; border: 0; background: var(--navy-deep); }
.student-dialog::backdrop { background: rgba(2, 22, 35, .87); }
.student-shell { --route-color: var(--core); display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; color: var(--white); background: radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--route-color) 32%, transparent), transparent 28%), linear-gradient(135deg, var(--navy-deep), #0b495b); }
.student-shell.route-studningur { --route-color: var(--support); }
.student-shell.route-kjarni { --route-color: var(--core); }
.student-shell.route-dypkun { --route-color: var(--deep); }
.student-header { display: grid; grid-template-columns: 260px 1fr 52px; align-items: center; gap: 18px; min-height: 82px; padding: 13px clamp(20px, 4vw, 58px); border-bottom: 1px solid rgba(255,255,255,.14); }
.student-brand { display: flex; align-items: center; gap: 10px; }
.student-brand > span { display: grid; width: 43px; height: 43px; place-items: center; color: var(--navy); background: var(--gold); border-radius: 12px; font-weight: 950; }
.student-brand div { display: grid; }
.student-brand small { color: #91dfda; font-size: .72rem; font-weight: 800; }
.student-brand strong { font-size: 1.08rem; }
.student-progress { display: flex; justify-content: center; gap: 8px; }
.student-progress span { width: min(58px, 7vw); height: 7px; background: rgba(255,255,255,.18); border-radius: 99px; }
.student-progress .is-complete { background: #75dcd4; }
.student-progress .is-current { background: var(--gold); }
.student-header > button { display: grid; width: 48px; height: 48px; place-items: center; color: var(--white); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.07); border-radius: 13px; font-size: 1.6rem; cursor: pointer; }
.student-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 390px); align-items: center; gap: clamp(30px, 6vw, 90px); padding: clamp(30px, 5vw, 72px); }
.student-meta { margin: 0 0 6px; color: #8ce0da; font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.student-copy h2 { max-width: 980px; margin: 0; font-size: clamp(2.8rem, 5.8vw, 6.2rem); letter-spacing: -.055em; line-height: .94; overflow-wrap: anywhere; }
.student-goal { max-width: 970px; padding: 15px 18px; margin-top: 25px; color: var(--navy); background: #eaf9f6; border-radius: 14px; }
.student-goal small, .student-opening small, .student-step small, .student-side small, .student-footer small { display: block; margin-bottom: 5px; color: var(--teal-dark); font-size: .68rem; font-weight: 950; letter-spacing: .09em; }
.student-goal p, .student-opening p { margin: 0; font-weight: 750; }
.student-opening { max-width: 970px; padding: 15px 18px; margin-top: 11px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); border-radius: 14px; }
.student-opening small { color: #88deda; }
.student-step { max-width: 970px; padding: clamp(20px, 3vw, 31px); margin-top: 12px; color: var(--navy); border-left: 8px solid var(--gold); background: var(--white); border-radius: 16px; box-shadow: 0 18px 38px rgba(0,0,0,.18); }
.student-step p { margin: 0; font-size: clamp(1.3rem, 2.5vw, 2.3rem); font-weight: 900; line-height: 1.3; }
.student-side { display: grid; gap: 12px; }
.student-side section { padding: 18px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.08); border-radius: 15px; }
.student-side small { color: #8de1dc; }
.student-side p { margin: 0; font-size: 1rem; font-weight: 750; }
#student-words { display: flex; flex-wrap: wrap; gap: 7px; }
#student-words span { padding: 7px 10px; color: var(--navy); background: var(--gold); border-radius: 999px; font-size: .82rem; font-weight: 900; }
.student-step-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.student-step-buttons button { min-height: 50px; color: var(--white); border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.08); border-radius: 12px; font-weight: 900; cursor: pointer; }
.student-step-buttons #next-step { color: var(--navy); border-color: var(--gold); background: var(--gold); }
.student-step-buttons button:disabled { opacity: .4; cursor: not-allowed; }
.student-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 16px clamp(20px, 4vw, 58px); color: var(--navy); background: var(--white); }
.student-footer > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.student-footer p { margin: 0; font-weight: 800; }

.print-sheet { display: none; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: min(390px, calc(100% - 40px)); padding: 13px 17px; color: var(--white); background: var(--navy); border-radius: 12px; box-shadow: var(--shadow); font-weight: 800; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px clamp(22px, 5vw, 72px); color: #cfe1e5; background: var(--navy-deep); font-size: .8rem; }
.site-footer p { margin: 0; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(244, 187, 73, .85); outline-offset: 3px; }

@media (max-width: 1050px) {
  .bridge-intro { grid-template-columns: 1fr; gap: 24px; }
  .intro-copy { max-width: 760px; }
  .builder-grid { grid-template-columns: 1fr; }
  .support-card { border-top: 1px solid var(--line); border-left: 0; }
  .route-preview { grid-template-columns: 1fr; }
  .route-side { grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 0; }
  .route-toolbar { align-items: flex-start; flex-direction: column; }
  .route-actions { justify-content: flex-start; }
  .student-main { grid-template-columns: 1fr; }
  .student-side { grid-template-columns: 1fr 1fr; }
  .student-step-buttons { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-header { min-height: 70px; padding: 9px 15px; }
  .site-header nav a:not(.home-link) { display: none; }
  .brand img { width: 42px; height: 42px; }
  .brand small { font-size: .61rem; }
  main { width: min(100% - 22px, 680px); padding-top: 30px; }
  .bridge-intro { padding: 20px 2px 34px; }
  .bridge-intro h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .short-path { grid-template-columns: 1fr 1fr; }
  .short-path li { border-bottom: 1px solid var(--line); }
  .short-path li:nth-child(2) { border-right: 0; }
  .short-path li:nth-child(n+3) { border-bottom: 0; }
  .short-path li:nth-child(2)::after { content: none; }
  .builder-grid { border-radius: 20px; }
  .setup-card, .support-card { padding: 24px 18px; }
  .support-options { grid-template-columns: 1fr; }
  .route-workspace { margin-top: 58px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .route-tabs { grid-template-columns: 1fr; }
  .route-tabs button { min-height: 82px; }
  .route-toolbar { padding: 18px; }
  .route-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .route-actions button { min-width: 0; }
  .route-main, .route-side, .route-editor { padding: 22px 17px; }
  .route-side { grid-template-columns: 1fr; }
  .editor-grid, .editor-grid.two { grid-template-columns: 1fr; }
  .editor-grid label.wide { grid-column: auto; }
  .bridge-forward { align-items: stretch; flex-direction: column; }
  .bridge-forward button { width: 100%; }
  .student-dialog { overflow: auto; }
  .student-header { grid-template-columns: 1fr auto; }
  .student-progress { grid-column: 1 / -1; grid-row: 2; }
  .student-main { padding: 25px 16px; }
  .student-side { grid-template-columns: 1fr; }
  .student-step-buttons { grid-column: auto; }
  .student-footer { grid-template-columns: 1fr; }
  .student-footer > div + div { padding-top: 12px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .field-grid, .duration-choice > div { grid-template-columns: 1fr 1fr; }
  .short-path li { grid-template-columns: 32px 1fr; padding: 11px; }
  .short-path li > span { width: 31px; height: 31px; }
  .short-path small { display: none; }
  .route-actions { grid-template-columns: 1fr; }
  .route-identity h3 { white-space: normal; }
  .step-editor-row { grid-template-columns: 34px minmax(0, 1fr); }
  .step-editor-row > span { width: 34px; }
  .step-editor-row button { grid-column: 2; justify-self: end; }
  .student-copy h2 { font-size: clamp(2.5rem, 14vw, 4rem); }
}

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

@page { size: A4 portrait; margin: 12mm; }
@media print {
  body > * { display: none !important; }
  body.printing-route #print-sheet { display: block !important; }
  .print-sheet { color: #17364a; font-family: Arial, sans-serif; }
  .print-sheet header { padding: 8mm; color: #fff; background: #0b3557; border-radius: 4mm; }
  .print-sheet header small { color: #9ee5df; font-size: 8pt; font-weight: 900; letter-spacing: .08em; }
  .print-sheet header h1 { margin: 2mm 0 1mm; font-size: 25pt; line-height: 1; }
  .print-sheet header p { margin: 0; font-size: 9pt; }
  .print-sheet section { margin-top: 6mm; padding: 5mm; border: .3mm solid #cedee2; border-radius: 3mm; break-inside: avoid; }
  .print-sheet section small { color: #087476; font-size: 7pt; font-weight: 900; letter-spacing: .07em; }
  .print-sheet section p { margin: 2mm 0 0; font-size: 10pt; line-height: 1.45; }
  .print-sheet ol { display: grid; gap: 3mm; padding: 0; margin: 3mm 0 0; list-style: none; counter-reset: print-step; }
  .print-sheet li { display: grid; grid-template-columns: 8mm 1fr; gap: 3mm; font-size: 9pt; }
  .print-sheet li::before { counter-increment: print-step; display: grid; width: 7mm; height: 7mm; place-items: center; color: #fff; background: #0d9496; border-radius: 2mm; content: counter(print-step); font-weight: 900; }
  .print-sheet .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
  .print-sheet .print-words { display: flex; flex-wrap: wrap; gap: 2mm; }
  .print-sheet .print-words span { padding: 1.5mm 2.5mm; background: #e4f5f2; border-radius: 99mm; font-size: 8pt; font-weight: 800; }
}
