/* ============================================================
   Crew Portal — design system
   Clean light UI, deep purple chrome, orange for action/attention.
   ============================================================ */
:root {
  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #f8f7fb;
  --line: #e7e5ee;
  --line-2: #d9d6e3;
  --text: #17142a;
  --text-2: #4a4660;
  --muted: #807b95;
  --purple: #4b1d95;
  --purple-ink: #2b1158;
  --purple-50: #f2edfb;
  --purple-100: #e4daf7;
  --orange: #f26a21;
  --orange-50: #fff1e8;
  --green: #12a150;
  --green-50: #e8f7ee;
  --amber: #c98a00;
  --amber-50: #fdf5e1;
  --red: #d93036;
  --red-50: #fdecec;
  --blue: #2563c9;
  --blue-50: #e9f0fc;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 20, 42, .04), 0 2px 8px rgba(23, 20, 42, .04);
  --shadow-lg: 0 10px 40px rgba(23, 20, 42, .16);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.upper { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--muted); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 1000; background: var(--purple-ink); color: #fff; }
.top-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 28px; height: 60px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 750; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #7c4ddb 0 52%, var(--orange) 52%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.brand small { display: block; font-weight: 500; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; margin-top: -2px; }
#nav { display: flex; gap: 2px; flex: 1; height: 100%; }
#nav > a, #nav .dd > span { display: flex; align-items: center; height: 100%; padding: 0 12px; color: rgba(255,255,255,.72); font-weight: 500; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
#nav > a:hover, #nav .dd:hover > span { color: #fff; text-decoration: none; }
#nav > a.on, #nav .dd.on > span { color: #fff; border-bottom-color: var(--orange); }
.dd { position: relative; height: 100%; }
.dd-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
.dd:hover .dd-menu { display: block; }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); }
.dd-menu a:hover { background: var(--purple-50); text-decoration: none; }
.clocks { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap; }
.clocks b { color: #fff; font-weight: 600; }
#who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.who-chip { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 6px 4px 4px; border-radius: 99px; }
.who-chip:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #6a3fc4; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.who-meta { line-height: 1.15; font-size: 12px; } .who-meta span { opacity: .65; display: block; font-size: 11px; }
.loc-chip { font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,.12); color: #fff; padding: 3px 8px; border-radius: 99px; }

/* ---------- layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.card-body { padding: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 18px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- buttons & inputs ---------- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font: 600 13.5px var(--sans); cursor: pointer; background: var(--purple); color: #fff; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover, button:hover { background: #3d1680; text-decoration: none; }
.btn.orange, button.orange { background: var(--orange); } .btn.orange:hover, button.orange:hover { background: #db5a14; }
.btn.ghost, button.ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); } .btn.ghost:hover, button.ghost:hover { background: var(--surface-2); }
.btn.danger, button.danger { background: var(--surface); color: var(--red); border-color: #f2c4c6; } .btn.danger:hover, button.danger:hover { background: var(--red-50); }
.btn.sm, button.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn.lg, button.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn.block, button.block { width: 100%; }
input, select, textarea { height: 38px; width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 9px; padding: 0 12px; font: 14px var(--sans); transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 160px; padding: 10px 12px; font: 12px var(--mono); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-100); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--purple); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
label.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.filterbar { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)) auto; gap: 12px; align-items: end; padding: 16px 20px; }

/* ---------- tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--green-50); color: var(--green); border-color: transparent; }
.tag.warn { background: var(--amber-50); color: var(--amber); border-color: transparent; }
.tag.bad { background: var(--red-50); color: var(--red); border-color: transparent; }
.tag.info { background: var(--blue-50); color: var(--blue); border-color: transparent; }
.tag.purple { background: var(--purple-50); color: var(--purple); border-color: transparent; }
.tag.orange { background: var(--orange-50); color: var(--orange); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfaff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.flt { font-family: var(--mono); font-weight: 650; color: var(--purple-ink); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- stats ---------- */
.stat { padding: 18px 20px; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 22px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; }
.progress { height: 6px; background: var(--purple-50); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--purple), #7c4ddb); border-radius: 99px; }

/* ---------- trip hero ---------- */
.hero { background: linear-gradient(135deg, var(--purple-ink) 0%, #3d1786 60%, #5b25b5 100%); color: #fff; border-radius: 16px; padding: 26px 28px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(242,106,33,.35), transparent 70%); }
.hero .upper { color: rgba(255,255,255,.6); }
.hero-route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin: 18px 0 20px; position: relative; z-index: 1; }
.hero-ap .code { font-size: 40px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.hero-ap .city { color: rgba(255,255,255,.7); font-size: 13px; margin-top: 4px; }
.hero-ap .time { font-family: var(--mono); font-size: 15px; margin-top: 8px; }
.hero-ap.r { text-align: right; }
.hero-path { position: relative; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 6px, transparent 6px 12px); }
.hero-path::after { content: "✈"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); font-size: 20px; color: var(--orange); }
.hero-path span { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.7); white-space: nowrap; }
.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; position: relative; z-index: 1; font-size: 13px; }
.hero-meta div span { display: block; color: rgba(255,255,255,.6); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-meta div b { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.hero .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.countdown { font-family: var(--mono); font-size: 13px; background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 99px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; overflow-x: auto; }
.tabs a { padding: 14px 14px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--purple); border-bottom-color: var(--purple); }

/* ---------- timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin: 6px 0; }
.timeline::before { content: ""; position: absolute; top: 9px; left: 10%; right: 10%; height: 2px; background: var(--line-2); }
.tl { text-align: center; position: relative; }
.tl i { display: block; width: 20px; height: 20px; margin: 0 auto 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.tl.done i { background: var(--purple); border-color: var(--purple); }
.tl.now i { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-50); }
.tl b { display: block; font-family: var(--mono); font-size: 14px; }
.tl span { font-size: 11.5px; color: var(--muted); }

/* ---------- paper documents ---------- */
.paper { background: #fffefb; border: 1px solid var(--line); border-radius: 10px; padding: 28px 32px; font: 12.5px/1.6 var(--mono); color: #1d1a2c; white-space: pre; overflow-x: auto; box-shadow: var(--shadow); }
.paper .h { font-weight: 700; }
.wx { font: 13px/1.6 var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; }

/* ---------- load plan ---------- */
.deck { display: grid; gap: 6px; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 60px 14px 14px 60px; }
.deck.main { grid-template-columns: repeat(var(--cols), 1fr); }
.deck.lower { grid-template-columns: repeat(var(--cols), 1fr); border-radius: 30px 14px 14px 30px; }
.uld { border-radius: 6px; padding: 6px 4px; text-align: center; font: 600 10.5px var(--mono); color: #fff; min-height: 46px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.uld small { font-weight: 500; opacity: .85; font-size: 9.5px; }
.uld.empty { background: transparent; border: 1.5px dashed var(--line-2); color: var(--muted); }
.uld.dg::after { content: "DG"; position: absolute; top: -6px; right: -6px; background: var(--orange); color: #fff; font-size: 8.5px; padding: 1px 4px; border-radius: 4px; }
.notoc { border: 2px solid var(--red); border-radius: 10px; overflow: hidden; }
.notoc-h { background: var(--red); color: #fff; padding: 9px 14px; font-weight: 700; letter-spacing: .08em; font-size: 12px; }

/* ---------- FIDS board ---------- */
.board { background: #120b22; border-radius: 14px; color: #f3effc; overflow: hidden; box-shadow: var(--shadow-lg); }
.board-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #2a1f42; }
.board-h h2 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #ffb27e; }
.board table th { background: #1a1130; color: #9d93b8; border-bottom: 1px solid #2a1f42; }
.board table td { border-bottom: 1px solid #22183a; font-family: var(--mono); font-size: 13.5px; padding: 10px 14px; }
.board tbody tr:hover td { background: #1c1333; }
.board .st { font-weight: 700; }
.st-Scheduled { color: #c9c2dc; } .st-En { color: #ffd166; } .st-Arrived, .st-Departed { color: #5ee08f; } .st-Crew { color: #ff9a5c; }
.board .va { color: #ffb27e; font-family: var(--sans); font-size: 11px; }

/* ---------- auth ---------- */
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 60px); }
body.auth main { max-width: none; padding: 0; }
body.auth .foot { display: none; }
.auth-art { background: radial-gradient(1200px 500px at 20% 110%, rgba(242,106,33,.35), transparent 60%), linear-gradient(160deg, #1a0a3a 0%, #2b1158 45%, #4b1d95 100%); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.03em; max-width: 520px; }
.auth-art p { color: rgba(255,255,255,.72); font-size: 16px; max-width: 460px; }
.runway { position: absolute; left: 0; right: 0; bottom: 90px; height: 4px; display: flex; gap: 38px; padding-left: 20px; opacity: .55; }
.runway i { width: 14px; height: 4px; background: #fff; border-radius: 2px; animation: runlights 2.4s linear infinite; }
@keyframes runlights { 0% { opacity: .15 } 50% { opacity: 1 } 100% { opacity: .15 } }
.auth-stats { display: flex; gap: 40px; position: relative; z-index: 1; }
.auth-stats b { display: block; font-size: 28px; font-family: var(--mono); }
.auth-stats span { color: rgba(255,255,255,.6); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--surface); }
.auth-form form { width: 100%; max-width: 380px; display: grid; gap: 16px; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.docs nav { position: sticky; top: 84px; padding: 10px; }
.docs nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.docs nav a.on { background: var(--purple-50); color: var(--purple); }
.docs nav a:hover { text-decoration: none; background: var(--surface-2); }
.doc { padding: 36px 44px; max-width: 920px; font-size: 15px; line-height: 1.7; }
.doc h1 { font-size: 30px; margin-bottom: 18px; } .doc h2 { font-size: 20px; margin: 34px 0 12px; } .doc h3 { margin: 22px 0 8px; font-size: 15px; }
.doc table { margin: 14px 0; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: table; }
.doc code { font-family: var(--mono); background: var(--purple-50); color: var(--purple-ink); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.doc pre { background: #1a1130; color: #eae4fa; padding: 16px; border-radius: 10px; overflow-x: auto; } .doc pre code { background: none; color: inherit; padding: 0; }
.doc blockquote { margin: 16px 0; padding: 12px 18px; background: var(--orange-50); border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0; color: var(--text-2); font-size: 14px; }
.doc blockquote p { margin: 0; }

/* ---------- misc ---------- */
.map { height: 560px; border-radius: var(--radius); overflow: hidden; }
.bulletin { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bulletin:last-child { border-bottom: 0; padding-bottom: 0; } .bulletin:first-child { padding-top: 0; }
.bulletin .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; }
.bulletin p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.fleet-card { padding: 20px; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
.fleet-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.fleet-sil { height: 70px; display: grid; place-items: center; font-size: 46px; color: var(--purple-100); margin-bottom: 8px; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--line-2); } .copy:hover { color: var(--purple); }
#modal { position: fixed; inset: 0; background: rgba(23,20,42,.45); display: none; align-items: center; justify-content: center; z-index: 3000; padding: 20px; backdrop-filter: blur(2px); }
#modal.open { display: flex; }
#modal .card { width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); }
#toast { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 4000; }
#toast div { background: var(--purple-ink); color: #fff; padding: 12px 16px; border-radius: 10px; max-width: 420px; box-shadow: var(--shadow-lg); font-weight: 500; white-space: pre-wrap; animation: slidein .2s ease-out; }
#toast div.err { background: var(--red); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0 } }
.foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 26px 20px 34px; }
.leaflet-container { font-family: var(--sans); }

@media (max-width: 1100px) {
  .clocks { display: none; } .g4 { grid-template-columns: 1fr 1fr; } .g-main, .g3 { grid-template-columns: 1fr; }
  .filterbar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .top-inner { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 10px; } #nav { order: 3; width: 100%; overflow-x: auto; height: 44px; }
  .g2, .docs, .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } .hero-ap .code { font-size: 30px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 18px; } .timeline::before { display: none; }
  .filterbar { grid-template-columns: 1fr 1fr; }
}

/* ---------- heritage ---------- */
.tag.heritage { background: #f6efe3; color: #8a5a14; border-color: transparent; }
.heritage-hero { background: radial-gradient(900px 400px at 85% 0%, rgba(242,106,33,.28), transparent 60%), linear-gradient(135deg, #1d0f33 0%, #3a1c5c 55%, #5a3a2a 100%); color: #fff; border-radius: 16px; padding: 40px 40px 34px; position: relative; overflow: hidden; }
.heritage-hero h1 { font-size: 38px; letter-spacing: -.02em; max-width: 680px; line-height: 1.1; }
.heritage-hero p { color: rgba(255,255,255,.75); max-width: 640px; font-size: 15.5px; margin: 12px 0 22px; }
.heritage-hero .since { position: absolute; right: 36px; bottom: 10px; font: 700 120px/1 var(--sans); letter-spacing: -.05em; color: rgba(255,255,255,.07); }
.htl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 0; overflow-x: auto; padding: 22px 6px 6px; }
.htl div { position: relative; padding: 18px 14px 0 0; border-top: 2px solid var(--line-2); }
.htl div::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--purple); }
.htl b { display: block; font: 700 18px var(--mono); color: var(--purple-ink); margin-bottom: 4px; }
.htl span { font-size: 12.5px; color: var(--text-2); }
.htype { display: grid; grid-template-columns: 220px 1fr; overflow: hidden; }
.htype-era { background: linear-gradient(160deg, #2b1158, #5a3a2a); color: #fff; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.htype-era .yrs { font: 700 20px var(--mono); }
.htype-era .ic { font-size: 54px; opacity: .25; line-height: 1; }
.htype-body { padding: 22px 24px; }
.htype-body ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); }
.htype-body li { margin: 4px 0; }
@media (max-width: 800px) { .htype { grid-template-columns: 1fr; } .heritage-hero h1 { font-size: 28px; } }

/* ---------- training ---------- */
.steps { display: flex; gap: 0; margin: 4px 0; }
.step { flex: 1; position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-top: 26px; }
.step::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.step:first-child::before { left: 50%; } .step:last-child::before { right: 50%; }
.step i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; font: 700 10px/14px var(--sans); color: #fff; font-style: normal; }
.step.done i { background: var(--green); border-color: var(--green); } .step.done i::after { content: "✓"; }
.step.now i { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-50); } .step.now { color: var(--text); font-weight: 600; }
.hero .step { color: rgba(255,255,255,.6); } .hero .step.now { color: #fff; } .hero .step::before { background: rgba(255,255,255,.25); } .hero .step i { background: transparent; border-color: rgba(255,255,255,.4); }
.hero .step.done i { background: var(--green); border-color: var(--green); }
.dots { display: flex; gap: 5px; } .dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--line-2); } .dots span.on { background: var(--green); } .dots span.cur { background: var(--orange); }
.tcard { padding: 18px; display: flex; flex-direction: column; gap: 10px; color: inherit; }
.tcard:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.tcard.locked { opacity: .6; }
details.mod { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.mod + details.mod { margin-top: 10px; }
details.mod summary { cursor: pointer; padding: 14px 18px; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 10px; }
details.mod summary::-webkit-details-marker { display: none; }
details.mod summary::before { content: "▸"; color: var(--muted); transition: transform .15s; } details.mod[open] summary::before { transform: rotate(90deg); }
details.mod .mod-body { padding: 0 18px 16px 38px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
details.mod table { width: auto; } details.mod td { padding: 6px 18px 6px 0; border: 0; } details.mod td:first-child { color: var(--muted); }
.quiz-q { padding: 20px; } .quiz-q + .quiz-q { border-top: 1px solid var(--line); }
.quiz-q h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; gap: 10px; } .quiz-q h3 span { color: var(--muted); font-family: var(--mono); }
.choice { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; margin-top: 8px; transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--purple-100); background: var(--surface-2); }
.choice input { width: 16px; height: 16px; accent-color: var(--purple); }
.choice:has(input:checked) { border-color: var(--purple); background: var(--purple-50); }
.result-ring { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font: 750 38px var(--sans); margin: 0 auto 14px; }
.mlist label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.mlist label:last-child { border-bottom: 0; } .mlist input { margin-top: 2px; }
.who-meta { max-width: 190px; } .who-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1560px) { .who-meta { display: none; } }
