/* Signed-in app: calm light learning theme with NextTechBuddy blue. Tokens match the landing page. */
:root {
  --bg: #eef1f8; --card: #ffffff; --ink: #0b1233; --muted: #56607f; --line: #dfe4f1; --line-2: #c9d1e6;
  --blue: #3d6bff; --blue-2: #2147d6; --blue-soft: #e7edff; --ok: #1f9d55; --ok-soft: #e3f5ea; --warn: #b46a00;
  --radius: 12px; --font: "Inter Tight", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(61,107,255,.12), transparent 60%); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.muted a { color: var(--blue); }
.eyebrow { font: 500 .7rem var(--mono); letter-spacing: .14em; color: var(--blue); margin-bottom: .35rem; }
h1 { font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.03em; line-height: 1.1; }
h2 { font-weight: 500; font-size: 1.35rem; letter-spacing: -.02em; }
h3 { font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.1rem; border-radius: 8px; border: 1px solid transparent; font-weight: 500; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s; }
.btn span { transition: transform .2s; } .btn:hover span { transform: translateX(3px); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 8px 24px rgba(61,107,255,.3); }
.btn-blue:hover { box-shadow: 0 10px 30px rgba(61,107,255,.45); }
.btn-line { border-color: var(--line-2); background: #fff; }
.btn-line:hover { border-color: var(--blue); }
.btn.sm { padding: .45rem .8rem; font-size: .88rem; }
.btn:disabled { opacity: .45; cursor: default; }
.is-done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 20; height: 62px; display: flex; align-items: center; gap: 2rem; padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: rgba(238,241,248,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; letter-spacing: .08em; font-size: .95rem; }
.brand b { color: var(--blue); font-weight: 600; }
.brand-px { width: 11px; height: 11px; background: var(--blue); box-shadow: 5px 5px 0 -1px #8fb2ff; }
.tabs { display: flex; gap: .3rem; }
.tabs a { padding: .45rem .9rem; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .93rem; }
.tabs a:hover { color: var(--ink); background: #fff; }
.tabs a.on { color: var(--ink); background: #fff; box-shadow: 0 1px 0 var(--line), inset 0 -2px 0 var(--blue); }
.top-right { margin-left: auto; position: relative; }
.profile-chip { display: flex; align-items: center; gap: .55rem; padding: .3rem .7rem .3rem .3rem; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 500; }
.profile-chip i { font-style: normal; color: var(--muted); font-size: .75rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #8fb2ff, var(--blue)); color: #fff; font-weight: 600; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 20px 50px rgba(20,30,80,.15); padding: .35rem; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 6px; background: none; border: 0; font-size: .92rem; }
.menu a:hover, .menu button:hover { background: var(--blue-soft); }
@media (max-width: 640px) { .topbar { gap: .8rem; } .brand span { display: none; } #roleChip { display: none; } .tabs a { padding: .4rem .55rem; font-size: .86rem; } }

main { padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; max-width: 1240px; margin: 0 auto; }
body.focus main { max-width: none; padding: 0; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,30,80,.1); border-color: var(--line-2); }
.tile-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #a7c4ff 0%, #4a7dff 45%, #2147d6 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -5px 10px rgba(10,30,140,.4), 0 10px 22px rgba(33,71,214,.35); }
.tile-ico svg { width: 22px; height: 22px; }
.ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); margin-right: .55rem; vertical-align: middle; }
.ico svg { width: 15px; height: 15px; }

/* ---- onboarding ---- */
.onboard { display: grid; place-items: center; min-height: 100vh; padding: 2rem 0; }
.ob-card { width: min(820px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.4rem, 4vw, 2.6rem); box-shadow: 0 30px 80px rgba(20,30,80,.08); }
.ob-card > .muted { margin: .6rem 0 1.2rem; max-width: 60ch; }
.ob-card h3 { margin: 1.5rem 0 .7rem; font-size: .95rem; }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.role input, .opt input { position: absolute; opacity: 0; pointer-events: none; }
.role span { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; row-gap: .1rem; align-items: center; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.role span .ico { grid-row: span 2; width: 38px; height: 38px; margin: 0; }
.role span small { color: var(--muted); font-size: .82rem; grid-column: 2; }
.role input:checked + span, .opt input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(61,107,255,.15); }
.role input:focus-visible + span, .opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: .6rem; }
.opt span { display: flex; flex-direction: column; padding: .6rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 140px; }
.opt small { color: var(--muted); font-size: .78rem; }
.ob-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 2rem; }
@media (max-width: 640px) { .roles { grid-template-columns: 1fr; } }

/* ---- dashboard ---- */
.hello { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 1.6rem; }
.hello .muted { margin-top: .4rem; }
.ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--blue) calc(var(--p) * 1%), var(--line) 0); }
.ring b { font-size: 1.5rem; font-weight: 500; line-height: 1; } .ring small { font-size: .7rem; color: var(--muted); }
.grid-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-bottom: 2.2rem; }
.continue { display: flex; align-items: center; gap: 1rem; }
.continue h3 { font-size: 1.2rem; }
.continue .go { margin-left: auto; font-size: 1.3rem; color: var(--blue); transition: transform .2s; }
.continue:hover .go { transform: translateX(4px); }
.practice { background: linear-gradient(135deg, #0b1233, #1c2a6b); color: #fff; border: 0; }
.practice .eyebrow { color: #8fb2ff; } .practice .muted { color: #b9c4e6; margin-top: .4rem; font-style: italic; }
@media (max-width: 820px) { .grid-top { grid-template-columns: 1fr; } }

.road-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.select select, .search input { appearance: none; font: 500 .88rem var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: .5rem 2rem .5rem .8rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.search input { background-image: none; padding-right: .8rem; width: min(320px, 70vw); cursor: text; }
.select select:focus, .search input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.roadmap { list-style: none; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--blue), var(--line-2)); }
.stage { position: relative; padding-left: 3.4rem; margin-bottom: 1.4rem; }
.stage-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.stage-head .num { position: absolute; left: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--blue); font: 500 .8rem var(--mono); color: var(--blue); }
.stage.complete .num { background: var(--blue); color: #fff; }
.stage-head .count { margin-left: auto; font: 500 .75rem var(--mono); color: var(--muted); }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.topic { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.topic:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,30,80,.08); }
.topic .check { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: .75rem; color: #fff; }
.topic.done .check { background: var(--ok); border-color: var(--ok); }
.topic.done .t-title { color: var(--muted); }
.topic.next { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,107,255,.12); }
.topic.next .check { border-color: var(--blue); }
.t-title { font-weight: 500; font-size: .96rem; }
.t-meta { font: 500 .72rem var(--mono); color: var(--muted); display: flex; gap: .5rem; align-items: center; }
.tag-i, .tag-p { font-style: normal; font-size: .62rem; padding: .1rem .4rem; border-radius: 3px; letter-spacing: .06em; }
.tag-i { background: var(--blue-soft); color: var(--blue-2); } .tag-p { background: #fff1db; color: var(--warn); }

/* ---- focus mode (topic) ---- */
.focus-view { min-height: 100vh; display: flex; flex-direction: column; }
.focus-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(.8rem, 2vw, 1.5rem); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.focus-title { display: flex; flex-direction: column; min-width: 0; }
.focus-title small { font: 500 .68rem var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.focus-title b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-actions { margin-left: auto; display: flex; gap: .5rem; }
.focus-body { flex: 1; display: flex; }
.lesson-frame { width: 100%; min-height: calc(100vh - 60px); border: 0; background: #f4ebe0; }
.reading { max-width: 760px; margin: 0 auto; padding: 3rem 1.4rem; }
.reading h1 { margin: .3rem 0 1.2rem; }
.reading p { font-size: 1.08rem; color: #2c3554; margin-bottom: 1rem; }
.placeholder { display: flex; gap: 1rem; align-items: center; margin-top: 2rem; padding: 1.4rem; border: 1.5px dashed var(--line-2); border-radius: 12px; color: var(--muted); }
@media (max-width: 640px) { .focus-bar { flex-wrap: wrap; } .focus-actions { margin-left: 0; width: 100%; } .focus-actions .btn { flex: 1; justify-content: center; } }

/* ---- library & interview ---- */
.lib-group { margin-top: 1.8rem; }
.lib-group h3 { display: flex; align-items: center; margin-bottom: .7rem; }
.lib-group h3 em { font-style: normal; font: 500 .65rem var(--mono); background: var(--blue); color: #fff; padding: .15rem .45rem; border-radius: 4px; margin-left: .6rem; letter-spacing: .06em; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.lib-item { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, transform .2s; }
.lib-item:hover { border-color: var(--blue); transform: translateY(-2px); }
.lib-item small { font: 500 .66rem var(--mono); color: var(--blue); letter-spacing: .06em; text-transform: uppercase; }
.lib-item span { font-size: .8rem; color: var(--muted); }
.qs-h { margin: 1rem 0 .8rem; }
.qs { list-style: none; display: grid; gap: .5rem; counter-reset: q; }
.qs li { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; counter-increment: q; }
.qs li::before { content: counter(q, decimal-leading-zero); font: 500 .75rem var(--mono); color: var(--blue); }
.qs li span { flex: 1; }

/* ---- family → role picker ---- */
.search.wide input { width: 100%; }
.hint { color: var(--muted); font-size: .88rem; margin: .8rem 0 .6rem; }
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; margin-top: .8rem; }
.family { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .8rem .9rem; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.family:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,30,80,.08); }
.family .ico { width: 36px; height: 36px; margin: 0; flex: none; }
.family b { display: block; font-weight: 500; font-size: .9rem; line-height: 1.3; }
.family small { color: var(--muted); font: 500 .7rem var(--mono); }
.fam-head { display: flex; align-items: center; gap: .8rem; margin-top: .9rem; }
.link { background: none; border: 0; color: var(--blue); font-weight: 500; padding: 0; cursor: pointer; }
.link.back { display: inline-block; margin-bottom: 1rem; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; max-height: 420px; overflow: auto; padding: 2px; }
.role-btn { display: flex; flex-direction: column; text-align: left; gap: .15rem; padding: .7rem .85rem; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .2s, background .2s; }
.role-btn:hover { border-color: var(--blue); background: var(--blue-soft); }
.role-btn b { font-weight: 500; font-size: .92rem; }
.role-btn small { color: var(--muted); font-size: .76rem; }
.new { font-style: normal; font: 500 .58rem var(--mono); background: #fff1db; color: var(--warn); padding: .05rem .35rem; border-radius: 3px; align-self: flex-start; letter-spacing: .06em; }
.chosen { display: flex; align-items: center; gap: .9rem; margin-top: .9rem; padding: .9rem 1rem; border: 1.5px solid var(--blue); background: var(--blue-soft); border-radius: 12px; }
.chosen .ico { width: 40px; height: 40px; margin: 0; background: #fff; }
.chosen div { display: flex; flex-direction: column; }
.chosen small { font: 500 .68rem var(--mono); color: var(--blue); letter-spacing: .04em; }
.chosen b { font-weight: 500; font-size: 1.1rem; }
.chosen em { font-style: normal; font-size: .82rem; color: var(--muted); }
.chosen .link { margin-left: auto; }
.lib-group h3 .fam-n { margin-left: .5rem; font: 500 .72rem var(--mono); color: var(--muted); }
.lib-item.is-mine { border-color: var(--blue); }
.lib-item em { font-style: normal; font: 500 .62rem var(--mono); color: #fff; background: var(--blue); align-self: flex-start; padding: .1rem .4rem; border-radius: 3px; margin-top: .2rem; }
.brief, .brief-card { border-left: 3px solid var(--blue); }
.brief { background: #fff; padding: .9rem 1rem; border-radius: 8px; margin-bottom: 1.2rem; }
.brief small { font: 500 .66rem var(--mono); color: var(--blue); letter-spacing: .08em; }
.brief-card { margin-bottom: 1.6rem; }
.pill-mine { font: 500 .75rem var(--mono); background: var(--blue); color: #fff; padding: .4rem .8rem; border-radius: 999px; }
.loading { padding: 4rem 0; text-align: center; color: var(--muted); }

/* ---- detailed tracks ---- */
.prio { font-style: normal; font: 500 .6rem var(--mono); letter-spacing: .06em; padding: .1rem .38rem; border-radius: 3px; }
.p-must { background: #ffe1dc; color: #b3361f; } .p-should { background: var(--blue-soft); color: var(--blue-2); } .p-later { background: #eceef4; color: #646d89; }
.track-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.track-intro p { margin-bottom: .4rem; }
.legend-p { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.skip-card ul { padding-left: 1.1rem; color: var(--muted); font-size: .92rem; }
.skip-card li { margin-bottom: .2rem; }
@media (max-width: 820px) { .track-intro { grid-template-columns: 1fr; } }
.reading.track { max-width: 1020px; }
.reading .lead { font-size: 1.15rem; color: #2c3554; }
.reading .eyebrow .prio { vertical-align: 1px; margin-left: .4rem; }
.t-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin: 1.6rem 0; }
.t-side { display: flex; flex-direction: column; gap: 1rem; }
.t-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.t-box h4 { font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .7rem; }
.learn-list { list-style: none; display: grid; gap: .55rem; }
.learn-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: 1rem; }
.learn-list li > span { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; background: #eceef4; color: var(--muted); margin-top: 1px; }
.learn-list li.anim > span { background: linear-gradient(135deg, #a7c4ff, var(--blue)); color: #fff; }
.learn-list small { display: block; font: 500 .66rem var(--mono); color: var(--blue); letter-spacing: .04em; }
.skip-box { background: #fafbfd; } .skip-box h4 { color: #8a6a3a; } .skip-box ul { padding-left: 1.1rem; color: var(--muted); font-size: .94rem; }
.practice-box { border-left: 3px solid var(--blue); } .practice-box p { margin: 0; font-size: .98rem; }
.refs h4 { font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .7rem; }
.ref-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.ref-list a { display: grid; grid-template-columns: 1fr auto; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, transform .2s; }
.ref-list a:hover { border-color: var(--blue); transform: translateY(-2px); }
.ref-list b { font-weight: 500; } .ref-list small { grid-column: 1; color: var(--muted); font: 500 .7rem var(--mono); }
.ref-list span { grid-row: span 2; grid-column: 2; align-self: center; color: var(--blue); }
.ref-note { color: var(--muted); font-size: .85rem; margin-top: .6rem !important; }
@media (max-width: 820px) { .t-grid { grid-template-columns: 1fr; } }
.reading p.eyebrow { font-size: .7rem; margin-bottom: .35rem; }
.reading p.ref-note { font-size: .85rem; color: var(--muted); }

/* ---- owner assets: family images & UI icons ---- */
.ui-ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; vertical-align: -3px;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; }
.tabs a .ui-ico { width: 17px; height: 17px; }
.t-meta .ui-ico.meta { width: 13px; height: 13px; opacity: .7; }
.topic .check .chk { width: 22px; height: 22px; color: #fff; }
.topic.done .check { background: var(--ok); }
.t-box h4 .ui-ico, .refs h4 .ui-ico { width: 14px; height: 14px; margin-right: .3rem; vertical-align: -2px; }
.ref-list span .ui-ico { width: 16px; height: 16px; }
.fam-img { width: 56px; height: 56px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(33,71,214,.18)); transition: transform .3s; }
.fam-img.sm { width: 34px; height: 34px; margin-right: .6rem; }
.family { gap: .8rem; }
.family:hover .fam-img { transform: translateY(-3px) rotate(-4deg) scale(1.06); }
.chosen .fam-img { width: 52px; height: 52px; }
.hello { justify-content: flex-start; }
.hello-img { width: 92px; height: 92px; object-fit: contain; flex: none; filter: drop-shadow(0 12px 18px rgba(33,71,214,.25)); animation: bob 5s ease-in-out infinite; }
.hello .ring, .hello .btn, .hello .pill-mine { margin-left: auto; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (max-width: 640px) { .hello-img { width: 60px; height: 60px; } }
.t-figure { margin: 1.4rem 0 .4rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.t-figure img { display: block; width: 100%; height: auto; }
.t-figure figcaption { padding: .8rem 1.1rem; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .hello-img { animation: none; } }

/* ---- coded visual: HTML page anatomy ---- */
.ha { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2rem; align-items: center; margin: 1.4rem 0 .4rem; padding: 1.4rem;
  background: radial-gradient(ellipse at 40% 30%, #ffffff, #eef2fc 70%); border: 1px solid var(--line); border-radius: 16px; }
.ha-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ha-url { font: 500 9px var(--mono); fill: #9fb2e8; }
.ha-area { transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s; transform-box: fill-box; transform-origin: center; cursor: pointer; }
.ha-area .ha-shadow { transition: transform .35s; }
.ha.play .ha-area { animation: haPop .9s cubic-bezier(.3,1.4,.5,1) var(--d) backwards; }
@keyframes haPop { 0% { opacity: .25; transform: translateY(8px) scale(.98); } 45% { opacity: 1; transform: translateY(-6px) scale(1.015); filter: drop-shadow(0 10px 18px rgba(61,107,255,.35)); } 100% { transform: none; } }
.ha-area.hot { transform: translateY(-5px); filter: drop-shadow(0 12px 20px rgba(61,107,255,.35)); }
.ha-area.hot .ha-box { stroke: #3d6bff; stroke-width: 2.4; }
.ha-labels { display: grid; gap: .5rem; }
.ha-label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; text-align: left; padding: .6rem .8rem; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s, opacity .4s; }
.ha-label code { font: 500 .82rem var(--mono); color: #fff; background: var(--blue); padding: .2rem .5rem; border-radius: 6px; white-space: nowrap; }
.ha-label[data-a="footer"] code { background: #0b1233; }
.ha-label[data-a="article"] code, .ha-label[data-a="aside"] code, .ha-label[data-a="nav"] code { background: #6f8ff2; }
.ha-label span { font-size: .9rem; color: #3a4466; }
.ha.play .ha-label { animation: haIn .55s ease var(--d) backwards; }
@keyframes haIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.ha-label.hot { border-color: var(--blue); transform: translateX(-4px); box-shadow: 0 8px 20px rgba(20,30,80,.1); }
.ha figcaption { grid-column: 1 / -1; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .9rem; }
.ha-replay { margin-left: .5rem; background: none; border: 1px solid var(--line-2); border-radius: 6px; padding: .15rem .5rem; font: inherit; font-size: .82rem; cursor: pointer; color: var(--ink); }
@media (max-width: 820px) { .ha { grid-template-columns: 1fr; padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { .ha.play .ha-area, .ha.play .ha-label { animation: none; } }
.ha-chip-t { font: 500 9.5px var(--mono); fill: #fff; text-anchor: middle; }
