/* ============================================
   LearnAI for Teens — the subway map (/learnai/teens).
   Same app shape as the kids explorer, but darker, calmer, no mascot:
   5 lines, 13 stops, ride in order or hop on anywhere. Self-hosted fonts only.
   ============================================ */
:root { color-scheme: dark; --t-bg: #14161a; --t-card: #1d2026; --t-rule: #2c3038; --t-rule-2: #3a3d44; --t-ink: #f2f0ea; --t-ink-2: #d6d2c8; --t-ink-3: #a9a59a; --t-gold: #f5b94a; --t-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --t-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
html { -webkit-text-size-adjust: 100%; }
body.ts-page { margin: 0; background: var(--t-bg); color: var(--t-ink); font-family: var(--t-sans); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
.ts-page * { box-sizing: border-box; }
.ts-page button { font-family: inherit; }
.ts-page a { color: var(--t-gold); }
.ts-page :focus-visible { outline: 3px solid #7fc8ff; outline-offset: 2px; }
.ts-page h1:focus { outline: none; }
.ts-page .l4k-nav { position: static; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #14161a; padding: 10px 14px; border-radius: 10px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app { max-width: 560px; margin: 0 auto; min-height: 60vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.app.focus { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.app p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.t-h1 { font-family: var(--t-sans); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.t-h2 { font-family: var(--t-sans); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.t-muted { color: var(--t-ink-3); font-size: 14px; }
.t-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.t-line { background: var(--t-card); border: 1.5px solid var(--t-rule); border-radius: 18px; padding: 14px 14px 8px; }
.t-line.featured { border-color: #9fe0a8; background: #18221b; }
.t-stops { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
.t-stops::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 22px; width: 4px; border-radius: 2px; background: var(--lc); opacity: .55; }
.t-stop { display: flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; color: var(--t-ink) !important; font-weight: 600; font-size: 16px; position: relative; border-radius: 10px; }
.t-stop .ring { width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--lc); background: var(--t-bg); flex: none; z-index: 1; display: flex; align-items: center; justify-content: center; }
.t-stop.done .ring { background: var(--lc); }
.t-stop .go { margin-left: auto; color: #8a867c; }
.t-top { display: flex; align-items: center; gap: 10px; padding: 16px 0 10px; flex-wrap: wrap; }
.t-body p { font-size: 16px; line-height: 1.6; color: var(--t-ink-2); margin: 0 0 12px; max-width: 62ch; }
.t-box { background: var(--t-card); border: 1.5px solid var(--t-rule); border-radius: 16px; padding: 14px; margin: 6px 0 16px; }
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: none; background: var(--t-gold); color: #14161a !important; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; }
.t-btn.ghost { background: var(--t-card); color: var(--t-ink) !important; border: 1.5px solid var(--t-rule-2); }
.t-opt { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--t-rule-2); background: var(--t-card); color: var(--t-ink); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; width: 100%; line-height: 1.4; }
.t-opt.on { border-color: var(--t-gold); background: #2a2416; }
.t-opt.right { border-color: #6cc283; background: #17271c; }
.t-opt.nope { border-color: #d98b6c; background: #2a1c17; }
.t-opt[disabled] { cursor: default; }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.t-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--t-rule-2); background: var(--t-card); color: var(--t-ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.t-chip[aria-pressed="true"] { border-color: var(--t-gold); color: var(--t-gold); }
.t-chip[disabled] { opacity: .4; cursor: default; }
.t-token { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 10px; background: #1f2a3a; border: 1.5px solid #7fc8ff; font-family: var(--t-mono); font-size: 22px; font-weight: 600; animation: pop .3s ease both; }
.t-token small { font-family: var(--t-sans); font-size: 11px; color: #a9c8e6; font-weight: 600; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.t-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.t-point { display: flex; gap: 10px; align-items: flex-start; background: var(--t-card); border: 1.5px solid var(--t-rule); border-radius: 14px; padding: 10px 10px 10px 14px; font-size: 15px; line-height: 1.5; }
.t-point span { flex: 1; min-width: 0; }
.t-save { flex: none; min-height: 44px; min-width: 64px; border-radius: 10px; border: 1.5px solid var(--t-rule-2); background: transparent; color: var(--t-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.t-save[aria-pressed="true"] { background: var(--t-gold); color: #14161a; border-color: var(--t-gold); }
.t-copy { display: flex; gap: 10px; align-items: flex-start; }
.t-copy code { flex: 1; min-width: 0; font-family: var(--t-sans); font-size: 15px; line-height: 1.5; color: var(--t-ink); white-space: normal; }
.t-reply { border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.55; }
.t-reply.ai { background: #1f2a3a; border: 1.5px solid #39506b; }
.t-reply.real { background: #18221b; border: 1.5px solid #3e6b4b; margin-top: 8px; }
.t-reply.warn { background: #2a1c17; border: 1.5px solid #6b4537; margin-top: 8px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* subway touches */
.t-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lc); color: #14161a; font-weight: 800; font-size: 16px; flex: none; }
.t-board { display: flex; align-items: center; gap: 12px; background: var(--t-gold); color: #14161a !important; border-radius: 18px; padding: 14px 16px; text-decoration: none; }
.t-board .k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.t-board .n { display: block; font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.t-sign { background: #0b0c0e; border-radius: 12px; padding: 14px 16px; border-top: 6px solid var(--lc); margin: 6px 0 14px; }
.t-sign .t-h1 { font-size: 26px; color: #fff; }
.t-strip { display: flex; align-items: center; margin: 4px 0 2px; }
.t-strip .seg { flex: 1; height: 4px; background: var(--lc); opacity: .35; }
.t-strip .seg.past { opacity: 1; }
.t-strip a, .t-strip span.st { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--lc); background: var(--t-bg); flex: none; display: block; position: relative; }
.t-strip a::after { content: ""; position: absolute; inset: -14px; } /* 44px tap target */
.t-strip .past-st { background: var(--lc); }
.t-strip .here { width: 24px; height: 24px; background: #fff; border-color: var(--lc); box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.t-transfer { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 6px; border-radius: 999px; border: 1.5px solid var(--t-rule-2); background: var(--t-card); color: var(--t-ink) !important; text-decoration: none; font-weight: 600; font-size: 14px; }
.t-transfer .t-badge { width: 26px; height: 26px; font-size: 14px; }
.ridebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #0b0c0e; border-top: 1.5px solid var(--t-rule); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.ridebar-in { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.ridebar .next { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 56px; border-radius: 14px; background: var(--t-gold); color: #14161a !important; text-decoration: none; padding: 6px 14px; }
.ridebar .next .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; display: block; }
.ridebar .next .n { font-weight: 800; font-size: 17px; line-height: 1.15; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ridebar .mapbtn { min-height: 56px; min-width: 64px; border-radius: 14px; border: 1.5px solid var(--t-rule-2); color: var(--t-ink) !important; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; gap: 2px; }
.ridebar .mapbtn svg { width: 22px; height: 22px; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--t-bg); border-top: 1.5px solid var(--t-rule); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.bar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; color: var(--t-ink-3) !important; font-size: 12px; font-weight: 700; text-decoration: none; border-radius: 12px; }
.tab[aria-current="page"] { color: var(--t-gold) !important; background: #22242a; }
.tab svg { width: 24px; height: 24px; }

/* widgets */
.feed { display: flex; flex-direction: column; gap: 8px; }
.feedcard { display: flex; align-items: center; gap: 10px; background: #0f1114; border: 1.5px solid var(--t-rule); border-radius: 12px; padding: 8px 10px; }
.feedcard .e { font-size: 24px; flex: none; width: 32px; text-align: center; }
.feedcard .tt { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.feedcard .tt small { display: block; color: var(--t-ink-3); font-weight: 500; font-size: 12px; }
.feedcard.hot { border-color: #d98b6c; }
.feedcard .t-save { min-width: 70px; }
.redact { font-size: 16px; line-height: 2; }
.redact button { font: inherit; font-weight: 600; color: var(--t-ink); background: #2a2d34; border: 1.5px dashed #6f6c64; border-radius: 6px; padding: 2px 6px; cursor: pointer; min-height: 36px; }
.redact button[aria-pressed="true"] { background: #000; color: #000; border-style: solid; border-color: #000; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.photos figure { margin: 0; }
.photos img, .photo-main { width: 100%; border-radius: 12px; display: block; }
.photo-main { max-width: 280px; }
.photos figcaption { font-size: 12px; color: #ff9b7a; margin-top: 4px; font-weight: 600; }

.ts-footer { max-width: 560px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--t-ink-3); border-top: 1.5px solid var(--t-rule); }
.ts-footer[hidden] { display: none; }
.ts-footer a { color: var(--t-gold); display: inline-flex; align-items: center; min-height: 36px; }
.ts-noscript { max-width: 560px; margin: 20px auto; padding: 0 16px; }

@media (prefers-reduced-motion: reduce) { .ts-page *, .ts-page *::before, .ts-page *::after { animation: none !important; transition: none !important; } }
