:root {
  --navy: #0a2540; --navy-2: #12355b; --navy-line: #1f466f;
  --ink: #0f1d2e; --text: #253447; --muted: #5d6b7c; --rule: #dde4ec; --rule-soft: #ebf0f5; --bar: #f4f7fa; --paper: #ffffff;
  --accent: #1e6fc4; --accent-dark: #165596; --accent-soft: #e8f1fb; --blue: #1e6fc4;
  --green: #1f7a4d; --amber: #9a5a0c; --danger: #b3261e;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bar); color: var(--text); font: 15.5px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body.front { background: #fff; }
a { color: var(--accent); text-underline-offset: 0.16em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #5aa2ee; outline-offset: 2px; border-radius: 3px; }
.ic { flex: none; vertical-align: middle; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* Header: the portal's navy */
.top { background: var(--navy); color: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.top-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.langs.langs-m { display: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.brand:hover { color: #fff; }
.brand img { height: 32px; width: auto; display: block; }
.brand img.brand-logo { height: 38px; width: auto; max-width: 220px; object-fit: contain; display: block; transition: opacity .2s ease; }
.brand:hover img.brand-logo { opacity: .9; }
.brand-logo + .brand-text { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.22); justify-content: center; min-height: 34px; }
.brand-logo + .brand-text .brand-name { display: none; }
.brand-logo + .brand-text .brand-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.handoff-box .brand-logo + .brand-text { border-left-color: var(--line, #d0d7de); }
@media (max-width: 420px) { .brand img.brand-logo { height: 30px; max-width: 150px; } .brand-logo + .brand-text .brand-title { font-size: 1.05rem; } .brand-logo + .brand-text { padding-left: 10px; } }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: #1e6fc4; display: grid; place-items: center; flex: none; }
.brand-mark .ic { color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 0.74rem; font-weight: 600; color: #9fb7d0; letter-spacing: 0.02em; }
.brand-title { font-weight: 800; font-size: 1.12rem; color: #fff; letter-spacing: -0.01em; }
.brandrow { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.badge { font-size: 0.72rem; font-weight: 700; color: #0a2540; background: #ffc56b; border-radius: 4px; padding: 2px 8px; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.nav a, .nav button { color: #c9d7e6; text-decoration: none; font: inherit; font-size: 0.92rem; font-weight: 500; padding: 7px 11px; border-radius: 6px; background: none; border: 0; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover, .nav button:hover { color: #fff; background: var(--navy-2); }
.nav a[aria-current] { color: #fff; background: var(--navy-2); }
.nav form { margin: 0; }
.langs { display: inline-flex; align-items: center; border: 1px solid var(--navy-line); border-radius: 6px; padding: 2px; margin: 0 4px; }
.langs a, .langs strong { font-size: 0.8rem; font-weight: 600; padding: 3px 9px; border-radius: 4px; text-decoration: none; }
.langs a { color: #9fb7d0; }
.langs a:hover { color: #fff; background: var(--navy-2); }
.langs strong { color: var(--navy); background: #fff; }
.langs span { display: none; }
.who { color: #fff; font-size: 0.9rem; font-weight: 600; padding: 0 4px 0 10px; border-left: 1px solid var(--navy-line); margin-left: 4px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* Search hero (home) and breadcrumb bar (other pages) */
.hero { background: var(--navy); color: #fff; padding: 22px 0 44px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.hero p { margin: 0 0 22px; color: #a9bfd6; font-size: 1rem; }
.hero .search { max-width: 720px; flex: none; }
.hero .search input { height: 54px; font-size: 1.02rem; border: 0; border-radius: 8px; padding-left: 18px; padding-right: 60px; }
.hero .search button { top: 6px; right: 6px; width: 46px; height: 42px; border-radius: 6px; background: var(--accent); color: #fff; }
.hero .search button:hover { background: var(--accent-dark); }
.bar { background: #fff; border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 60px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.crumbs { font-size: 0.88rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs > span:last-child { color: var(--ink); font-weight: 600; }
.crumbs .sep { margin: 0 9px; color: #a7b3c1; font-weight: 400; }
.search { position: relative; flex: 0 1 460px; min-width: 240px; }
.search input { width: 100%; height: 40px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 46px 0 14px; font: inherit; font-size: 0.92rem; background: #fff; color: var(--text); }
.search input:focus-visible { outline: 3px solid #a9cdf2; outline-offset: 0; border-color: var(--accent); }
.search button { position: absolute; right: 3px; top: 3px; width: 38px; height: 34px; border: 0; border-radius: 6px; background: none; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Home: model shortcuts, recently viewed, lists */
.models { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; max-width: 760px; }
.models > span { color: #9fb7d0; font-size: 0.84rem; font-weight: 600; margin-right: 2px; }
.models a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 600;
  color: #e4eef8; text-decoration: none; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); }
.models a:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.recent { margin: 28px 0 0; }
.recent h2, .home-lists h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.recent h2 .ic, .home-lists h2 .ic { color: var(--accent); }
.recent ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.recent li a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; background: var(--bar); border: 1px solid var(--rule-soft); border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.35; }
.recent li a:hover { border-color: #9cc3ec; background: var(--accent-soft); }
.recent li small { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
.home-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; padding: 0 0 70px; }
.home-lists ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.home-lists li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.home-lists li a { color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 500; line-height: 1.4; }
.home-lists li a:hover { color: var(--accent); text-decoration: underline; }
.home-lists li small { flex: none; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* Error codes */
.errcard { margin: 14px 0 22px; border: 1px solid #f1d4a6; border-left: 4px solid #e08a1e; border-radius: 10px; background: #fffaf2; padding: 16px 18px; }
.errcard-head { display: flex; align-items: center; gap: 10px; color: var(--amber); margin-bottom: 8px; }
.errcard-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.errlist { margin: 0; }
.errlist > div { padding: 10px 0; border-top: 1px solid #f3e3c7; }
.errlist > div:first-child { border-top: 0; }
.errlist dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 2px; }
.errlist dd { margin: 0; color: var(--text); }
.errlist dd a { font-size: 0.86rem; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.code { font: 600 0.88rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; text-decoration: none; white-space: nowrap; }
a.code:hover { border-color: #9cc3ec; color: var(--accent-dark); }
.src { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.errfix { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f3e3c7; }
.errfix strong { display: block; font-size: 0.9rem; margin-bottom: 4px; color: var(--ink); }
.errfix ul { margin: 0; padding-left: 18px; }
.errfix li { margin: 3px 0; }
.errfix a { font-weight: 600; }
.codes-page { padding-bottom: 70px; }
.codes-hero { margin: 26px 0 8px; padding: 26px 28px 22px; border-radius: 18px; background: linear-gradient(135deg, #0b2545 0%, #13315c 55%, #1e4f8f 100%); color: #fff; position: relative; overflow: hidden; }
.codes-hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,240,.35), transparent 70%); pointer-events: none; }
.codes-hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; position: relative; z-index: 1; }
.codes-hero-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #cfe3ff; flex: none; }
.codes-hero h1 { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.codes-hero p { margin: 2px 0 0; color: #b8cbe2; font-size: .95rem; }
.codes-hero .codes-search { max-width: 680px; position: relative; z-index: 1; border-color: transparent; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 5px 5px 5px 0; border-radius: 12px; }
.codes-hero .search.essi-search input { height: 44px; font-size: 1rem; }
.codes-hero .essi-search button.es-go, .codes-hero .essi-search button.es-ask { height: 42px; }
.codes-hero .essi-search button.es-go { width: 44px; }
.codes-stats { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; position: relative; z-index: 1; color: #b8cbe2; font-size: .88rem; }
.codes-stats strong { color: #fff; font-size: 1.05rem; margin-right: 2px; }
.codes-sec { display: flex; align-items: center; gap: 8px; margin: 30px 0 12px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.codes-sec .ic { color: var(--accent); }
.codes-sec small { font-weight: 600; font-size: .8rem; }
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.code-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.code-card:hover { border-color: #9cc3ec; box-shadow: 0 6px 18px rgba(15,29,46,.08); transform: translateY(-1px); }
.code-card-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #f1eefe; color: #6c5ce7; flex: none; }
.code-card-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.code-card-t strong { font-size: .98rem; font-weight: 700; }
.code-card-t small { color: var(--muted); font-size: .8rem; }
.code-card-go { color: var(--muted); }
.code-card:hover .code-card-go { color: var(--accent); }
.code-pill { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 7px; background: #eef4fb; color: var(--accent-dark); font: 700 .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; text-decoration: none; white-space: nowrap; }
a.code-pill:hover { background: #dcebfa; }
.fix-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 14px; background: #fff; overflow: hidden; }
.fix-list li + li { border-top: 1px solid var(--rule-soft); }
.fix-list a { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.45; }
.fix-list a:hover { background: #f7faff; }
.fix-list a:hover .fix-t { color: var(--accent); }
.fix-codes { display: flex; flex-wrap: wrap; gap: 4px; flex: none; width: 128px; }
.fix-t { flex: 1; min-width: 0; }
.fix-more { margin-top: 10px; }
.fix-more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; padding: 6px 0; }
.fix-more[open] summary { margin-bottom: 8px; }
.codes-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 4px; }
.codes-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); background: #fff; color: var(--ink); font-size: .86rem; font-weight: 600; text-decoration: none; }
.codes-tabs a small { color: var(--muted); font-weight: 600; }
.codes-tabs a:hover { border-color: #9cc3ec; }
.codes-tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.codes-tabs a[aria-current] small { color: #dbe9f8; }
.codes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.codes-head .codes-h { margin: 0; }
.codes-h { margin: 26px 0 12px; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.codes-filter { display: flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: 10px; padding: 0 10px; background: #fff; color: var(--muted); flex: 0 1 280px; }
.codes-filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,111,196,.15); }
.codes-filter input[type=search] { border: 0; outline: none; box-shadow: none; padding: 0 2px; height: 36px; flex: 1; min-width: 0; font: inherit; font-size: .9rem; background: transparent; }
.codes-tablewrap { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: #fff; }
.codes-table { margin: 0; }
.codes-table td { font-size: 0.92rem; vertical-align: top; }
.codes-table tbody tr:hover { background: #f7faff; }
.codes-table tr.is-fix td { background: #fbfaff; }
.codes-table tr.is-fix a { text-decoration: none; color: var(--accent-dark); font-weight: 600; }
.codes-table tr.is-fix a:hover { text-decoration: underline; }
.fixtag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 6px; background: #f1eefe; color: #5b4bd6; font-size: .76rem; font-weight: 700; margin-right: 4px; }
.codes-nomatch { padding: 12px 16px; margin: 0; }
.codes-empty { padding: 18px 20px; border: 1px dashed var(--rule); border-radius: 14px; background: #fff; }
.codes-empty p { margin: 0 0 10px; }
.btn-essi { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: linear-gradient(135deg, #6c5ce7, #2f80ed); color: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
@media (max-width: 620px) { .codes-hero { padding: 20px 16px 18px; border-radius: 14px; } .codes-hero h1 { font-size: 1.4rem; } .fix-codes { width: auto; } .fix-list a { flex-direction: column; gap: 6px; } }

/* Model pages */
.model-page { padding-top: 28px; padding-bottom: 70px; }
.model-head { display: flex; align-items: center; gap: 16px; }
.model-ic { flex: none; width: 64px; height: 64px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.model-ic img { max-width: 52px; max-height: 52px; border-radius: 8px; }
.model-head h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; }
.model-head p { margin: 2px 0 0; }
.model-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 22px 0 8px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.model-tools .chips { margin: 0; }
.model-tools .bfilter { flex: 1 1 100%; }
.chip.chip-brand.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .num { margin-left: 6px; font-weight: 700; opacity: 0.75; }
.chip-strong { background: #fff5e6; border-color: #f1d4a6; color: var(--amber); gap: 4px; }
.chip-strong:hover { background: #ffecd0; color: var(--amber); }
.chip-brand { background: #f1f3f6; border-color: #d5dbe3; color: var(--ink); }
.chips .chips-sep { margin-left: 10px; }
.model-search { flex: 0 1 380px; min-width: 220px; }
.bar-search { flex: 0 1 520px; min-width: 260px; margin-left: auto; }
@media (max-width: 760px) { .bar-search { flex: 1 1 100%; min-width: 0; } }
/* Family / model search joined with Ask Essi */
.essi-search { display: flex; align-items: center; gap: 4px; flex: 0 1 520px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 3px 3px 3px 0; }
.essi-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 111, 196, 0.15); }
.search.essi-search input { flex: 1 1 auto; min-width: 0; height: 38px; border: 0; padding: 0 8px 0 14px; background: transparent; }
.search.essi-search input:focus-visible { outline: none; }
.essi-search button.es-go, .essi-search button.es-ask { position: static; flex: none; height: 36px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.essi-search button.es-go { width: 38px; background: #eef4fb; color: var(--accent-dark); }
.essi-search button.es-go:hover { background: #dcebfa; }
.essi-search button.es-ask { width: auto; gap: 6px; padding: 0 12px; background: linear-gradient(135deg, #6c5ce7, #2f80ed); color: #fff; font: inherit; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.essi-search button.es-ask:hover { filter: brightness(1.08); }
@media (max-width: 480px) { .essi-search button.es-ask span { display: none; } .essi-search button.es-ask { width: 38px; padding: 0; } }
.model-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 40px; margin-top: 22px; }
.model-groups section { scroll-margin-top: 16px; }
.model-groups h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.model-groups h2 .ic { color: var(--accent); }
.model-groups h2 small { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.model-groups ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.model-groups li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); }
.model-groups li a { color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 500; line-height: 1.4; }
.model-groups li a:hover { color: var(--accent); text-decoration: underline; }
.model-groups li small { flex: none; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
details.other-lang { margin-top: 30px; }
details.other-lang summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.other-lang ul { margin: 10px 0 0; }
.model-more { margin-top: 22px; }
.family-models { margin: 14px 0 0; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on:hover { background: var(--accent-dark); color: #fff; }
.cat-tools { margin-top: 14px; }
.mfilter-note { margin: -4px 0 6px; font-size: 0.92rem; }
.h-model { color: var(--accent-dark); font-weight: 700; }
.sec-head h2 .num, .mgroup h2 .num { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-left: 4px; }
.mgroup { margin: 22px 0 8px; }
.mgroup h2 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.mgroup h2 a { color: inherit; text-decoration: none; }
.mgroup h2 a:hover { color: var(--accent-dark); text-decoration: underline; }
.listpage .cat-tools { margin: 8px 0 14px; }
@media (max-width: 640px) {
  .chips.mfilter { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-right: -16px; }
  .chips.mfilter .chip { flex: 0 0 auto; }
  .chips.mfilter > span { flex: 0 0 auto; }
  .cat-tools .model-search { flex: 1 1 100%; }
}

/* Home: category cards */
.home-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 36px 0 16px; }
.home-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 0 44px; }
.card { display: flex; gap: 16px; align-items: flex-start; padding: 20px 20px 20px 18px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--text); min-height: 104px; }
.card:hover { color: var(--text); border-color: #9cc3ec; box-shadow: 0 6px 20px rgba(10, 37, 64, 0.08); }
.card-ic { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.card-ic img { max-width: 44px; max-height: 44px; display: block; border-radius: 6px; }
.card strong { display: block; font-size: 1.04rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card small { display: block; margin-top: 4px; font-size: 0.84rem; color: var(--muted); line-height: 1.45; }
.card .count { display: inline-block; margin-top: 8px; font-size: 0.78rem; font-weight: 600; color: var(--accent); }

/* Category page: sections with their articles */
.sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 30px 0 70px; }
.sections section { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 18px 18px 14px; }
.cat-title { margin: 30px 0 0; font-size: 1.7rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.cat-title + .sections { padding-top: 18px; }
.sec-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--rule-soft); }
.sec-ic { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.sec-ic img { max-width: 22px; max-height: 22px; display: block; }
.sec-head h2 { margin: 4px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.sec-head h2 a { color: var(--ink); text-decoration: none; }
.sec-head h2 a:hover { color: var(--accent); }
.sec-head small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.sec-head h2 small.num { display: inline-block; vertical-align: 2px; margin: 0 0 0 8px; padding: 1px 9px; border-radius: 999px; background: #eef2f7; color: #4b5b6e; font-size: 0.74rem; font-weight: 700; line-height: 1.6; }
.sec-head { align-items: center; }
.sec-head h2 { margin-top: 0; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; font-size: 0.93rem; line-height: 1.45; }
.alist .ic { color: #8796a8; margin-top: 2px; }
.alist a { color: var(--ink); text-decoration: none; }
.alist a:hover { color: var(--accent); text-decoration: underline; }
.alist a[aria-current] { color: var(--accent); font-weight: 600; }
.more { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0 2px; font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 600; color: var(--amber); background: #fff5e6; border: 1px solid #f1d4a6; border-radius: 4px; padding: 0 6px; margin-left: 8px; white-space: nowrap; vertical-align: 2px; }
.listpage { max-width: 860px; padding: 30px 0 70px; }
.listpage h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 14px; color: var(--ink); letter-spacing: -0.02em; }
.listpage .alist { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 6px 18px; }
.listpage .alist li { padding: 11px 0; border-bottom: 1px solid var(--rule-soft); }
.listpage .alist li:last-child { border-bottom: 0; }
.empty { padding: 60px 0 90px; color: var(--muted); max-width: 620px; }
.empty strong { color: var(--ink); }

/* Article page */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 48px; padding: 32px 0 80px; align-items: start; }
.article > article { background: #fff; min-width: 0; }
.a-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.a-head h1 { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.a-tools { display: flex; gap: 6px; padding-top: 4px; }
.a-tools button { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 8px; color: var(--muted); cursor: pointer; }
.a-tools button:hover { color: var(--accent); border-color: #9cc3ec; }
.a-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; color: var(--muted); font-size: 0.86rem; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.a-meta a { font-weight: 600; text-decoration: none; }
.a-meta a:hover { text-decoration: underline; }
.a-frame { display: block; width: 100%; min-height: 240px; border: 0; }
.side { position: sticky; top: 16px; }
.side section { background: var(--bar); border-radius: 10px; padding: 14px 16px 10px; margin-bottom: 16px; }
.side h2 { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.side h2 .ic { color: var(--accent); }
.side h2 a { color: inherit; text-decoration: none; }
.side h2 a:hover { color: var(--accent); }
.side .alist li { padding: 6px 0; gap: 8px; font-size: 0.88rem; }

/* Search results */
.results { max-width: 860px; padding: 30px 0 70px; }
.results h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 4px; color: var(--ink); letter-spacing: -0.015em; }
.result { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.result h2 { margin: 0; font-size: 1.06rem; font-weight: 700; }
.result h2 a { color: var(--accent); text-decoration: none; }
.result h2 a:hover { text-decoration: underline; }
.result .path { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.result p { margin: 6px 0 0; color: #3c4a5a; font-size: 0.93rem; overflow-wrap: anywhere; }
mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.result .snip { margin: 6px 0 0; color: #3c4a5a; font-size: 0.93rem; overflow-wrap: anywhere; }
.result .lng { display: inline-block; font-size: 0.68rem; font-weight: 700; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; margin-left: 8px; vertical-align: 2px; }
/* Article page: models, tools, contents, feedback, zoom */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 12px; }
.chips > span { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.82rem; font-weight: 600; text-decoration: none; border: 1px solid #cfe2f7; }
.chip:hover { background: #d6e8fb; color: var(--accent-dark); }
.a-tools .tool { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.a-tools .tool:hover { border-color: #9cc3ec; color: var(--accent-dark); }
.a-tools .tool.done { color: var(--green); border-color: #b7dcc8; }
.a-meta .score { color: var(--green); font-weight: 600; }
.article.has-toc { grid-template-columns: minmax(0, 1fr) 260px; }
.toc { position: sticky; top: 16px; border-left: 2px solid var(--rule); padding: 2px 0 2px 0; max-height: calc(100vh - 32px); overflow-y: auto; }
.toc h2 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px 14px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 10px 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-size: 0.86rem; line-height: 1.4; text-decoration: none; }
.toc a.sub { padding-left: 26px; font-size: 0.83rem; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--accent-dark); border-left-color: var(--accent); font-weight: 600; }
.toc-m { display: none; margin: 0 0 18px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bar); }
.toc-m summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 0.92rem; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.toc-m ol { list-style: none; margin: 0; padding: 0 8px 8px; }
.toc-m a { display: block; padding: 7px 8px; color: var(--accent-dark); text-decoration: none; font-size: 0.92rem; border-radius: 4px; }
.toc-m a.sub { padding-left: 22px; }
.helpful { margin: 34px 0 0; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 10px; background: var(--bar); }
.helpful .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.helpful .q { font-weight: 700; color: var(--ink); margin-right: 4px; }
.helpful button.vote { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 0.92rem; font-weight: 600; padding: 7px 16px; border-radius: 6px; border: 1px solid #c5d0dc; background: #fff; color: var(--navy); cursor: pointer; }
.helpful button.vote:hover { border-color: #9cc3ec; background: var(--accent-soft); }
.helpful button.vote[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.helpful .msg { color: var(--muted); font-size: 0.9rem; }
.helpful .linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.9rem; color: var(--accent); cursor: pointer; text-decoration: underline; }
.ed .linkbtn { background: none; border: 0; padding: 0 0 0 6px; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; }
.ed .linkbtn:hover { color: var(--accent-dark); }
.helpful form { margin-top: 14px; }
.helpful textarea { min-height: 84px; resize: vertical; }
.helpful form .btn { margin-top: 10px; }
.more-below { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.more-below section { background: var(--bar); border-radius: 10px; padding: 14px 16px 10px; }
.more-below h2 { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.more-below h2 .ic { color: var(--accent); }
.more-below h2 a { color: inherit; text-decoration: none; }
.more-below .alist li { padding: 6px 0; gap: 8px; font-size: 0.88rem; }
.more-below .more, .side .more { margin-left: 0; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 18, 33, 0.92); display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.lightbox button { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 6px; padding: 7px 12px; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 110; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; box-shadow: 0 8px 24px rgba(10, 37, 64, 0.3); }
@media (max-width: 980px) {
  .article.has-toc { grid-template-columns: minmax(0, 1fr); }
  .article.has-toc .side { display: none; }
  .toc-m { display: block; }
  .more-below { grid-template-columns: minmax(0, 1fr); }
}
@media print { .chips, .helpful, .toc-m, .more-below, .a-tools { display: none !important; } }
/* customer access: share dialog (staff), invitation form and contact line (customers) */
.tool-share { color: var(--accent-dark); border-color: #9cc3ec; }
.share-dlg { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(10, 37, 64, 0.35); color: var(--text); }
.share-dlg::backdrop { background: rgba(10, 37, 64, 0.45); }
.share-dlg form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.share-dlg h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.share-dlg p { margin: 0 0 6px; font-size: 0.9rem; }
.share-dlg label, .cust-form label { font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-top: 6px; }
.share-dlg input, .share-dlg textarea, .cust-form input { font: inherit; font-size: 0.95rem; padding: 9px 11px; border: 1px solid #c5d0dc; border-radius: 6px; width: 100%; box-sizing: border-box; }
.share-dlg input:focus, .share-dlg textarea:focus, .cust-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.share-dlg input[readonly] { background: var(--bar); font-size: 0.85rem; }
.share-err { color: var(--danger); font-weight: 600; }
.share-result { background: #eef7f0; border: 1px solid #c9e5cf; border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cust-form { max-width: 520px; margin: 36px auto 60px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 20px rgba(10, 37, 64, 0.06); }
.cust-form h1 { margin: 0 0 6px; font-size: 1.4rem; color: var(--ink); line-height: 1.25; }
.cust-form .cust-inv { margin: 0 0 4px; }
.cust-form .cust-inv strong { display: block; color: var(--ink); margin-top: 2px; }
.cust-note { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bar); border-radius: 0 6px 6px 0; font-size: 0.92rem; }
.cust-consent { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 500 !important; color: var(--text) !important; margin: 12px 0 8px; font-size: 0.86rem !important; }
.cust-consent input { width: auto; margin-top: 3px; }
.cust-form .btn { margin-top: 6px; align-self: flex-start; }
.cust-form .code-input { font-size: 1.6rem; letter-spacing: 0.35em; text-align: center; max-width: 220px; font-variant-numeric: tabular-nums; }
.cust-msg .btn { margin-top: 6px; }
.cust-contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; margin-top: 28px; padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--rule); }
.cust-contact strong { color: var(--ink); }
@media print { .cust-contact { display: none; } }
.corrected { margin: 4px 0 10px; font-size: 0.95rem; }
.corrected a { font-weight: 600; }
.relaxed { background: #fff8e8; border: 1px solid #f1d4a6; border-radius: 8px; padding: 10px 14px; margin: 12px 0 4px; font-size: 0.92rem; }
.other-lang { margin-top: 26px; background: var(--bar); border-radius: 10px; padding: 14px 18px; }
.other-lang h2 { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.other-lang ul { margin: 0; padding-left: 18px; }
.other-lang li { margin: 4px 0; }
.search-tips { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; }
.search .suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 30px rgba(10, 37, 64, 0.16); list-style: none; margin: 0; padding: 4px 0; text-align: left; }
.search .suggest li a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 14px; color: var(--ink); text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.search .suggest li a small { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.search .suggest li a:hover, .search .suggest li a[aria-selected=true] { background: var(--accent-soft); }
.search .suggest li.all a { color: var(--accent); font-weight: 600; border-top: 1px solid var(--rule-soft); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; }
.pager a { font-weight: 600; text-decoration: none; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.pager a:hover { border-color: #9cc3ec; }
.pager span[aria-disabled] { color: #a7b3c1; padding: 7px 14px; }

/* Forms, buttons, notices */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 0.92rem; font-weight: 600; padding: 9px 18px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-quiet { background: #fff; color: var(--navy); border-color: #c5d0dc; }
.btn-quiet:hover { background: var(--accent-soft); border-color: #9cc3ec; color: var(--navy); }
label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--ink); margin-bottom: 6px; }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid #c5d0dc; border-radius: 6px; padding: 9px 11px;
}
input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=url], select { height: 42px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #a9cdf2; outline-offset: 0; border-color: var(--accent); }
.notice { background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 6px; padding: 12px 16px; margin: 0 0 22px; }
.notice-error { border-left-color: var(--danger); background: #fdf3f2; border-color: #f1d0cc; }
.notice-warn { border-left-color: #e08a1e; }
.gate { max-width: 440px; margin: 7vh auto 80px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 30px rgba(10, 37, 64, 0.08); padding: 30px 32px 30px; }
.gate h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 6px; color: var(--ink); letter-spacing: -0.015em; }
.gate p { margin: 0 0 20px; }
.gate .btn { width: 100%; margin-top: 18px; padding: 11px 18px; }
.gate .field + .field { margin-top: 14px; }
.gate .links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; font-size: 0.86rem; }
.handoff-page { min-height: 100vh; display: grid; place-items: center; }
.handoff { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 0.95rem; margin: 0; }
.handoff-box { width: min(460px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 26px; box-shadow: 0 6px 20px rgba(10, 37, 64, 0.08); }
.handoff-page:has(.handoff-box:not([hidden])) { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 0; }
.handoff-page { width: 100%; box-sizing: border-box; }
.handoff-box { margin: 0 auto; }
.handoff-box .brand { margin-bottom: 14px; display: inline-flex; text-decoration: none; }
.handoff-box .brand-text, .handoff-box .brand-text * { color: var(--navy) !important; }
.handoff-box .brand-name { color: var(--muted) !important; }
.handoff-box h1 { font-size: 1.3rem; color: var(--ink); margin: 6px 0 8px; line-height: 1.3; }
.handoff-box p { margin: 0 0 16px; color: var(--text); }
.handoff-wait { display: flex; gap: 10px; align-items: center; color: var(--muted) !important; font-size: 0.92rem; margin: 16px 0 0 !important; }
.handoff-alt { font-size: 0.86rem; margin: 18px 0 0 !important; color: var(--muted) !important; }
.spinner { width: 16px; height: 16px; border: 2px solid #c5d0dc; border-top-color: var(--accent); border-radius: 50%; flex: none; }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 0.8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Editor */
.ed { padding: 30px 0 110px; }
.ed h1 { font-size: 1.7rem; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
.ed h2 { font-size: 1.1rem; font-weight: 800; color: var(--ink); margin: 34px 0 12px; }
.column { max-width: 1000px; }
.headrow { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.headrow > span { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.headrow .count { color: var(--muted); margin-left: 10px; font-size: 0.95rem; font-weight: 500; }
.filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; align-items: end; margin-bottom: 10px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 14px; }
.filters label { font-size: 0.8rem; color: var(--muted); }
.filter-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.table th { text-align: left; font-size: 0.78rem; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--rule); background: #f8fafc; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; font-size: 0.93rem; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfe; }
.table .t a { font-weight: 600; color: var(--ink); text-decoration: none; }
.table .t a:hover { color: var(--accent); }
.table .sub { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.table .r { text-align: right; white-space: nowrap; }
.table .nw { white-space: nowrap; }
.table input[type=text], .table select, .table input[type=number] { height: 36px; padding: 5px 8px; }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 0.88rem; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status-published { color: var(--green); }
.status-published::before { background: var(--green); }
.status-draft { color: var(--amber); }
.status-draft::before { background: #e08a1e; }
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 14px 0 22px; padding: 0; background: #fff; border: 1px solid var(--rule); border-radius: 10px; }
.facts > div { padding: 10px 18px; border-right: 1px solid var(--rule-soft); }
.facts dt { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; font-size: 0.93rem; }

/* Impact dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 6px 0 26px; }
.kpi { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px 14px; min-width: 0; }
.kpi dt { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.kpi dd { margin: 4px 0 0; }
.kpi .big { display: block; font-size: 1.95rem; line-height: 1.15; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.kpi .big small { font-size: 0.95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi .sub { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.kpi.kpi-main { background: var(--navy); border-color: var(--navy); }
.kpi.kpi-main dt, .kpi.kpi-main .sub, .kpi.kpi-main .big small { color: #b9cbe0; }
.kpi.kpi-main .big { color: #fff; }
.kpi.kpi-main a { color: #cfe3fb; }
.delta { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 3px; }
.delta.up { background: #e3f3ea; color: var(--green); }
.delta.down { background: #fbe9e7; color: var(--danger); }
.delta.flat { background: #eef2f6; color: var(--muted); }
.kpi.kpi-main .delta.up { background: rgba(126, 214, 160, 0.18); color: #9fe3b9; }
.kpi.kpi-main .delta.down { background: rgba(255, 140, 130, 0.18); color: #ffb3ab; }
.kpi.kpi-main .delta.flat { background: rgba(255, 255, 255, 0.12); color: #cdd8e5; }
.panel { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px 16px; margin-bottom: 22px; min-width: 0; }
.panel h2 { margin: 0 0 4px; font-size: 1.05rem; }
.panel > p.muted { margin: 0 0 12px; font-size: 0.88rem; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
.panels > div { min-width: 0; }
.chart-wrap { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: #e9eef3; stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: #1e6fc4; }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar-hit:hover + .bar, .chart .col.on .bar { fill: #165596; }
.chart .line { fill: none; stroke: #c0700f; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #c0700f; stroke: #fff; stroke-width: 2; }
.legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text); margin: 0 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #1e6fc4; }
.legend i.ln { height: 3px; border-radius: 2px; background: #c0700f; }
.tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; font-size: 0.8rem; line-height: 1.45; padding: 7px 10px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25); z-index: 5; }
.tip b { font-weight: 700; }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 6px 0 12px; background: #fff; }
.split span { display: block; min-width: 4px; }
.split .s1 { background: #1e6fc4; } .split .s2 { background: #6aa7e6; } .split .s3 { background: #b9d5f2; }
.splitkey { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.splitkey li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-top: 1px solid var(--rule-soft); }
.splitkey li:first-child { border-top: 0; }
.splitkey i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.splitkey i.s1 { background: #1e6fc4; } .splitkey i.s2 { background: #6aa7e6; } .splitkey i.s3 { background: #b9d5f2; }
.splitkey b { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.health { list-style: none; margin: 0; padding: 0; }
.health li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-soft); font-size: 0.92rem; }
.health li:first-child { border-top: 0; }
.health li b { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.health .warn { color: var(--amber); }
.mini { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mini th { text-align: left; font-size: 0.75rem; color: var(--muted); font-weight: 600; padding: 0 0 6px; }
.mini td { padding: 8px 0; border-top: 1px solid var(--rule-soft); vertical-align: top; }
.mini td.r, .mini th.r { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini .meter { display: block; height: 4px; border-radius: 2px; background: #e8f1fb; margin-top: 5px; }
.mini .meter span { display: block; height: 4px; border-radius: 2px; background: #1e6fc4; }
.assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; align-items: end; }
.assume label { font-size: 0.8rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.assume input { width: 100%; }
details.how { margin-top: 10px; font-size: 0.88rem; }
details.how summary { cursor: pointer; color: var(--accent); font-weight: 600; }
@media (max-width: 980px) { .panels { grid-template-columns: 1fr; } }

/* Pictures */
.progress { height: 10px; border-radius: 5px; background: var(--accent-soft); overflow: hidden; margin: 6px 0 0; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width 0.4s ease; }
.up-note { font-size: 0.84rem; color: var(--green); font-weight: 600; margin-right: auto; }
.up-note.is-bad { color: var(--danger); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Assistant */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-ask { display: inline-flex; align-items: center; gap: 6px; }
.nav-ask .ic { color: #8fc1f5; }
.hero-ask { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: #dbe9f8; font-weight: 600; font-size: 0.95rem; text-decoration: none; padding: 6px 2px; }
.hero-ask .ic:first-child { color: #8fc1f5; }
.hero-ask:hover { color: #fff; }
.hero-ask:hover span { text-decoration: underline; text-underline-offset: 0.2em; }
/* Home: one box for search and ask */
.hero .hero-box { display: flex; align-items: center; gap: 6px; max-width: 780px; background: #fff; border-radius: 12px; padding: 6px 6px 6px 14px;
  box-shadow: 0 12px 32px rgba(3, 18, 38, 0.35); transition: box-shadow 0.2s; }
.hero .hero-box:focus-within { box-shadow: 0 0 0 3px rgba(143, 193, 245, 0.55), 0 12px 32px rgba(3, 18, 38, 0.35); }
.hero .hero-box .hb-ic { display: flex; color: #8a99ab; flex: 0 0 auto; }
.hero .hero-box input { flex: 1 1 auto; min-width: 0; height: 46px; border: 0; padding: 0 6px; font-size: 1.04rem; background: transparent; }
.hero .hero-box input:focus, .hero .hero-box input:focus-visible { outline: none; border: 0; }
.hero .hero-box .hb-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.hero .hero-box button.hb-search, .hero .hero-box .hb-ask { position: static; display: inline-flex; align-items: center; gap: 7px; width: auto; height: 44px; padding: 0 16px;
  border: 0; border-radius: 9px; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.hero .hero-box button.hb-search { background: #eef4fb; color: var(--accent-dark); }
.hero .hero-box button.hb-search:hover { background: #dcebfa; }
.hero .hero-box .hb-ask { background: linear-gradient(135deg, #6c5ce7, #2f80ed); color: #fff; transition: box-shadow 0.2s, transform 0.2s; }
.hero .hero-box .hb-ask:hover { filter: brightness(1.08); color: #fff; }
.hero .hero-box .hb-ask.hint { box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3); transform: translateY(-1px); }
.hb-hint { margin: 12px 2px 0; color: #9fb7d0; font-size: 0.86rem; }
@media (max-width: 600px) {
  .hero .hero-box { padding-left: 10px; }
  .hero .hero-box .hb-ic { display: none; }
  .hero .hero-box input { font-size: 1rem; }
  .hero .hero-box button.hb-search span { display: none; }
  .hero .hero-box .hb-actions:has(.hb-ask) button.hb-search { display: none; }
  .hero .hero-box button.hb-search, .hero .hero-box .hb-ask { padding: 0 12px; }
  .hb-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero .hero-box .hb-ask { transition: none; } }
.askcall { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; padding: 14px 16px; border: 1px solid #cfe2f7; background: linear-gradient(90deg, #eef5fd, #f7fbff); border-radius: 12px; text-decoration: none; color: var(--ink); }
.askcall > .ic { color: var(--accent); flex: none; }
.askcall > span:nth-child(2) { flex: 1; min-width: 0; }
.askcall strong { display: block; font-size: 0.98rem; }
.askcall small { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.askcall .btn { flex: none; }
.askcall:hover { border-color: #9cc3ec; color: var(--ink); }
.search .suggest li.ask { padding: 0; margin: 0; }
.suggest li.ask a { color: var(--accent-dark); font-weight: 600; background: #f3f8fe; }
.ask { max-width: 860px; padding-top: 34px; padding-bottom: 80px; }
.ask-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.ask-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: #8fc1f5; }
.ask-head h1 { margin: 0 0 4px; font-size: clamp(1.45rem, 3vw, 1.9rem); color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
.ask-head p { margin: 0; color: var(--muted); }
.askbox { display: flex; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid #c5d0dc; border-radius: 12px; padding: 8px 8px 8px 14px; box-shadow: 0 4px 16px rgba(10, 37, 64, 0.06); }
.askbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 111, 196, 0.15); }
.askbox textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; font: inherit; font-size: 1.02rem; line-height: 1.5; padding: 6px 0; background: transparent; color: var(--ink); min-height: 34px; box-shadow: none; }
.askbox .btn { flex: none; height: 42px; }
/* Full Ask page as a conversation */
.ask-thread .ask-turn { margin-top: 22px; scroll-margin-top: 90px; }
.ask-thread .ask-turn:first-child { margin-top: 18px; }
.ask-me { margin: 0 0 10px auto; width: fit-content; max-width: 80%; background: var(--accent); color: #fff; padding: 10px 15px; border-radius: 16px 16px 4px 16px;
  font-weight: 500; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-turn .answer { margin-top: 0; }
.askbox.follow { position: sticky; bottom: 14px; z-index: 5; margin-top: 20px; box-shadow: 0 10px 30px rgba(10, 37, 64, 0.18); }
.ask-new { margin: 10px 0 0; text-align: center; }
.ask-new .btn[hidden] { display: none; }
/* Ask page in "AI mode": a chat. Empty: Essi greets you with the box in the middle. Then: chat bubbles, box docked at the bottom. */
.ask-page.ai-mode { min-height: calc(100vh - 140px); background: radial-gradient(60% 40% at 50% 0%, rgba(139, 92, 246, 0.10), transparent 70%), radial-gradient(50% 35% at 15% 10%, rgba(56, 189, 248, 0.10), transparent 70%), #f8fafc; }
.ai-mode .wrap.ask { max-width: 820px; padding-top: 1px; padding-bottom: 40px; }
.ai-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8vh 0 24px; }
.ai-orb { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; margin-bottom: 18px;
  background: conic-gradient(from 0deg, #38bdf8, #8b5cf6, #ec4899, #38bdf8); box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.10), 0 14px 40px rgba(99, 102, 241, 0.40); animation: ai-float 4s ease-in-out infinite; }
.ai-orb { padding: 3px; }
.ai-face { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--navy); color: #fff; }
.ai-face .ai-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14%; background: var(--navy); }
.ai-orb .ic { animation: essi-spin 7s ease-in-out 1s infinite; }
.ai-av { padding: 2px; }
@keyframes ai-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ai-hero h1 { margin: 0 0 10px; font-size: clamp(1.9rem, 4.6vw, 2.9rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
  background: linear-gradient(90deg, #1e6fc4 0%, #6d28d9 55%, #db2777 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-sub { margin: 0 0 26px; max-width: 600px; color: var(--muted); font-size: 1.02rem; line-height: 1.55; }
.ai-mode .askbox.ai-box { width: 100%; align-items: center; border: 0; border-radius: 28px; padding: 8px 8px 8px 22px; background: #fff; text-align: left;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 16px 40px rgba(76, 29, 149, 0.14); }
.ai-mode .askbox.ai-box:focus-within { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.55), 0 16px 40px rgba(76, 29, 149, 0.18); }
.ai-mode .askbox textarea { padding: 10px 0; min-height: 44px; font-size: 1.05rem; }
.ai-mode .ask-mic, .ai-mode .ask-talk { border-radius: 999px; height: 44px; }
.ai-mode .ask-mic { width: 44px; }
.ask-send { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #6c5ce7, #2f80ed); box-shadow: 0 6px 16px rgba(76, 29, 149, 0.30); transition: transform .15s, filter .15s; }
.ask-send:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ai-sugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 18px; }
.ai-sug { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 13px 15px; border-radius: 16px; cursor: pointer; font: inherit; font-size: 0.93rem; line-height: 1.4; color: var(--ink);
  background: rgba(255, 255, 255, 0.85); border: 1px solid #e4e0f5; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ai-sug .ic { flex: none; margin-top: 2px; color: #8b5cf6; }
.ai-sug:hover { border-color: #b8a4f5; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(76, 29, 149, 0.10); }
.ai-recent { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; margin-top: 16px; font-size: 0.85rem; color: var(--muted); }
.ai-rq { padding: 4px 11px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.83rem; color: var(--accent); background: var(--accent-soft); border: 0; }
.ai-rq:hover { background: #d6e8fa; }
.ai-stats { margin: 26px 0 0; font-size: 0.8rem; color: #94a3b8; }
.ai-stats a { color: #64748b; text-decoration: none; white-space: nowrap; }
.ai-stats a b { color: #334155; }
.ai-stats a:hover { color: var(--accent); }
.ai-stats span { margin: 0 4px; }
.ai-mode .ask-convo { width: 100%; }
/* the chat */
.ai-mode.started .ai-hero { display: none; }
.ai-mode .ask-thread .ask-turn { margin-top: 26px; }
.ai-mode .ask-thread .ask-turn:first-child { margin-top: 30px; }
.ai-mode .ask-me { border-radius: 20px 20px 6px 20px; padding: 11px 16px; background: linear-gradient(135deg, #6c5ce7, #2f80ed); box-shadow: 0 6px 16px rgba(76, 29, 149, 0.18); }
.ai-row { display: flex; gap: 12px; align-items: flex-start; }
.ai-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; margin-top: 4px;
  background: conic-gradient(from 0deg, #38bdf8, #8b5cf6, #ec4899, #38bdf8); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.30); }
.ai-msg { flex: 1; min-width: 0; }
.ai-mode .ai-msg .answer { border-radius: 6px 20px 20px 20px; border-color: #ebe7f7; box-shadow: 0 4px 18px rgba(15, 29, 46, 0.05); }
.ai-mode .ai-msg .answer.thinking { display: inline-flex; align-items: center; gap: 10px; width: auto; padding: 12px 16px; color: var(--muted); }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8b5cf6; animation: ai-dot 1.2s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: .15s; background: #6366f1; }
.ai-dots i:nth-child(3) { animation-delay: .3s; background: #38bdf8; }
@keyframes ai-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.ai-mode .askbox.follow { position: sticky; bottom: 12px; margin-top: 26px; border-radius: 26px; padding: 6px 6px 6px 20px; border: 0; background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.28), 0 14px 36px rgba(15, 29, 46, 0.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ai-mode .ask-new .btn { border-radius: 999px; }
.ask-started-head { display: none; }
.ask-go-talk { position: fixed; inset: 0; z-index: 1002; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(10, 37, 64, 0.88); cursor: pointer; }
.ask-go-talk button { width: 96px; height: 96px; border-radius: 50%; border: 0; color: #fff; cursor: pointer; background: linear-gradient(135deg, #ef4444, #a855f7); animation: ask-pulse 1.6s ease-out infinite; }
.ask-go-talk p { margin: 0; color: #fff; font-size: 1.1rem; font-weight: 700; }
.ask-say.nudge { animation: ask-pulse 1.4s ease-out 3; }
/* Home banner: Talk and mic next to Ask Essi */
.hero .hero-box .hb-talk, .hero .hero-box .hb-mic { position: static; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 999px; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.hero .hero-box .hb-talk { padding: 0 14px; color: #6d28d9; background: #f3e8ff; border: 1px solid #ddd0fb; }
.hero .hero-box .hb-talk:hover { background: #ead9ff; color: #6d28d9; }
.hero .hero-box .hb-mic { width: 44px; padding: 0; color: var(--accent); background: var(--accent-soft); border: 1px solid #c4dbf3; }
.hero .hero-box .hb-mic:hover { background: #d6e8fa; }
.hero .hero-box .hb-mic.on { color: #fff; background: #ef4444; border-color: #fca5a5; animation: ask-pulse 1.2s ease-out infinite; }
@media (max-width: 600px) {
  .hero.hero-g .hero-box:has(.hb-mic) { flex-wrap: wrap; border-radius: 22px; padding: 6px; }
  .hero.hero-g .hero-box:has(.hb-mic) input { flex-basis: 100%; padding: 0 12px; }
  .hero.hero-g .hero-box:has(.hb-mic) .hb-actions { width: 100%; }
  .hero.hero-g .hero-box:has(.hb-mic) .hb-ask { flex: 1; justify-content: center; }
  .hero.hero-g .hero-box:has(.hb-mic) .hb-actions button.hb-search { display: inline-flex; }
}
.ask-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.ask-mic, .ask-talk { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 42px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.85rem; transition: background .15s, color .15s; }
.ask-mic { width: 42px; color: var(--accent); background: var(--accent-soft); border: 1px solid #c4dbf3; }
.ask-mic:hover { background: #d6e8fa; }
.ask-mic.on { color: #fff; background: #ef4444; border-color: #fca5a5; animation: ask-pulse 1.2s ease-out infinite; }
.ask-talk { padding: 0 12px; color: #6d28d9; background: #f3e8ff; border: 1px solid #ddd0fb; }
.ask-talk:hover { background: #ead9ff; }
.ask-talk[aria-pressed="true"] { color: #fff; border-color: #f87171; background: linear-gradient(135deg, #ef4444, #a855f7); animation: ask-pulse 1.6s ease-out infinite; }
@keyframes ask-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); } }
.ask-convo { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.ask-convo[hidden] { display: none; }
.ask-stats { margin: 16px 0 0; text-align: center; font-size: 0.85rem; color: #8193a8; line-height: 1.7; }
.ask-stats a { color: #b6c3d4; text-decoration: none; white-space: nowrap; }
.ask-stats a b { color: #fff; font-weight: 700; }
.ask-stats a:hover { color: #fff; }
.ask-stats span { margin: 0 4px; color: #4b5d73; }
.ask-home { margin-top: 26px; display: grid; gap: 26px; }
.ask-block h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ask-block h2 .ic { color: #8b5cf6; }
.ask-qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.ask-q.chip { display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left; white-space: normal; height: auto; padding: 11px 14px; border-radius: 12px; font-size: 0.92rem; font-weight: 500; line-height: 1.4;
  color: var(--ink); background: #fff; border: 1px solid var(--rule); box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ask-q.chip .ic { flex: none; margin-top: 2px; color: #8b5cf6; }
.ask-q.chip:hover { border-color: #b8a4f5; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(76, 29, 149, 0.10); }
.ask-tip { margin: 10px 0 0; }
.ask-recent { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 12px; background: #fff; overflow: hidden; }
.ask-recent li + li { border-top: 1px solid var(--rule-soft); }
.chip-plain { display: block; width: 100%; text-align: left; padding: 10px 14px; font: inherit; font-size: 0.92rem; color: var(--accent); background: none; border: 0; cursor: pointer; }
.chip-plain:hover { background: var(--accent-soft); }
.ask-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ask-card { display: flex; flex-direction: column; text-decoration: none; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--rule); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ask-card:hover { transform: translateY(-2px); border-color: #9cc3ec; box-shadow: 0 10px 24px rgba(10, 37, 64, 0.12); }
.ask-thumb { position: relative; display: flex; align-items: center; justify-content: center; height: 120px; background: #f8fafc; border-bottom: 1px solid var(--rule-soft); overflow: hidden; }
.ask-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ask-thumb.none { background: linear-gradient(135deg, #1e3a8a, #6d28d9); color: #e0e7ff; }
.ask-thumb em { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 9999px; background: rgba(15, 23, 42, 0.85); color: #c4b5fd; }
.ask-thumb em.xv { color: #fcd34d; }
.ask-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 10px 12px 2px; font-size: 0.88rem; line-height: 1.35; color: var(--ink); }
.ask-card small { display: block; padding: 0 12px 11px; font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Once the conversation starts: the hero shrinks to the title, the home blocks go away */
.ask-page.started .ask-home { display: none; }
/* Answer: Play button, pictures, picture viewer, voice messages */
.ask-say { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 5px 12px; border-radius: 9999px; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid #c4dbf3; }
.ask-say:hover { background: #d6e8fa; }
.ask-say.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.ask-pics { margin: 18px 0 4px; }
.ask-pics h3 { margin: 0 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ask-pics-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.ask-pic { flex: none; width: 168px; padding: 0; text-align: left; cursor: zoom-in; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--rule); font: inherit; scroll-snap-align: start; }
.ask-pic:hover { border-color: #9cc3ec; box-shadow: 0 6px 16px rgba(10, 37, 64, 0.12); }
.ask-pic img { display: block; width: 100%; height: 118px; object-fit: contain; background: #f8fafc; }
.ask-pic span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 7px 9px; font-size: 0.74rem; line-height: 1.3; color: var(--muted); }
.ask-zoom { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(2, 6, 23, 0.92); }
.ask-zoom[hidden] { display: none; }
.ask-zoom img { max-width: 100%; max-height: 74vh; object-fit: contain; background: #fff; border-radius: 10px; }
.ask-zoom p { margin: 0; max-width: 760px; text-align: center; color: #e2e8f0; line-height: 1.45; }
.ask-zoom-row { display: flex; gap: 10px; }
.ask-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 1001; max-width: 90vw; padding: 9px 16px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 0.9rem; box-shadow: 0 12px 30px rgba(10, 37, 64, 0.35); }
.ask-toast[hidden] { display: none; }
@media (max-width: 640px) {
  .ai-hero { padding-top: 5vh; }
  .ai-orb { width: 62px; height: 62px; }
  .ai-sugs { grid-template-columns: 1fr; }
  .ai-sug:nth-child(n+4) { display: none; }
  .ai-mode .askbox.ai-box { border-radius: 22px; padding: 8px; }
  .ai-mode .askbox.ai-box textarea { padding: 6px 8px; min-height: 52px; }
  .ai-row { gap: 8px; }
  .ai-av { width: 28px; height: 28px; }
  .ai-mode .askbox.ai-box { flex-direction: column; align-items: stretch; }
  .ai-mode .askbox .ask-tools { justify-content: flex-end; }
  .askbox .ask-tools { width: 100%; }
  .ask-page .askbox .ask-tools .btn { width: auto; flex: 1; }
  .ask-page .askbox.follow { flex-wrap: wrap; }
  .ask-page .askbox.follow textarea { flex-basis: 100%; }
  .ask-page .askbox.follow .ask-tools .btn { flex: none; width: auto; }
  .askbox.follow .ask-tools { justify-content: flex-end; }
  .ask-pic { width: 140px; }
  .ask-cards { grid-template-columns: repeat(2, 1fr); }
  .ask-thumb { height: 96px; }
}
@media (prefers-reduced-motion: reduce) { .ask-mic.on, .ask-talk[aria-pressed="true"], .ai-orb, .ai-orb .ic, .ai-dots i, .hb-mic.on, .ask-go-talk button { animation: none; } .ask-q.chip:hover, .ask-card:hover { transform: none; } }
/* Home banner, Gemini-like: centered, glow, few words */
.hero.hero-g { position: relative; overflow: hidden; text-align: center; padding: 46px 0 40px;
  background: radial-gradient(60% 75% at 50% 62%, rgba(56, 102, 230, 0.42) 0%, rgba(99, 76, 214, 0.18) 38%, rgba(10, 37, 64, 0) 72%), var(--navy); }
.hero-g .wrap { display: flex; flex-direction: column; align-items: center; }
.hg-hi { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; color: #b9c9ff; font-size: 0.95rem; font-weight: 600; }
.hg-hi .ic { color: #a78bfa; animation: essi-spin 7s ease-in-out 1.5s infinite; }
.hero.hero-g h1 { margin: 0 0 26px; font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 500; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 0%, #cfe0ff 45%, #c9b8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.hero.hero-g .hero-box { width: 100%; max-width: 760px; border-radius: 999px; padding: 6px 6px 6px 20px; background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.35), 0 18px 50px rgba(37, 52, 160, 0.45); text-align: left; }
.hero.hero-g .hero-box:focus-within { box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.55), 0 18px 50px rgba(37, 52, 160, 0.5); }
.hero.hero-g .hero-box button.hb-search { width: 44px; padding: 0; justify-content: center; border-radius: 999px; }
.hero.hero-g .hero-box button.hb-search span { display: none; }
.hero.hero-g .hero-box .hb-ask { border-radius: 999px; padding: 0 18px; }
.hero.hero-g .search .suggest { border-radius: 14px; }
.hg-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 34px; list-style: none; margin: 22px 0 0; padding: 0; }
.hg-stats li { display: flex; align-items: baseline; gap: 7px; color: #a9bfd6; font-size: 0.9rem; }
.hg-stats strong { color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.hero-g .models { justify-content: center; margin: 18px auto 0; }
.hero-g .models a { height: 28px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.07); }
/* Error codes card */
.card-codes { border-color: #d6cdfb; background: linear-gradient(135deg, #fbfaff 0%, #f3f6ff 100%); }
.card-codes .card-ic { background: #ece8ff; color: #5b47d6; }
.card-xv { border-color: #f3d9a8; background: linear-gradient(135deg, #fffcf5 0%, #fff6e6 100%); }
.card-xv .card-ic { background: #fdebc8; color: #b45309; }
/* Most read / New and updated: one compact panel */
.hl { border: 1px solid var(--rule); border-radius: 12px; padding: 6px 16px 10px; margin: 0 0 60px; background: #fff; }
.hl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule-soft); margin: 0 -16px 4px; padding: 0 12px; }
.hl-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: none;
  font: inherit; font-size: 0.88rem; font-weight: 700; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.hl-tabs button[aria-selected=true] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.hl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.hl-list[hidden] { display: none; }
.hl-list li a { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); font-size: 0.86rem; }
.hl-list li a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-list li a small { flex: none; color: var(--muted); font-size: 0.74rem; }
.hl-list li a:hover span { color: var(--accent); text-decoration: underline; }
@media (max-width: 700px) { .hl-list { grid-template-columns: minmax(0, 1fr); } .hg-stats { gap: 6px 14px; } .hg-stats li { font-size: 0.78rem; gap: 4px; } .hg-stats strong { font-size: 1.05rem; } .hero.hero-g { padding-top: 30px; } }
@media (max-width: 600px) { .hero.hero-g .hero-box { padding-left: 14px; } }
/* Essi learner: Teach Essi / Suggest a fix */
.askw-teach { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border-radius: 999px; border: 1px dashed #b9b0ef;
  background: #faf9ff; color: #4b3cc4; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.askw-teach:hover { background: #f1eeff; border-style: solid; }
.askw-teach[hidden], .ask-teach[hidden] { display: none; }
.askw-topic { margin: 8px 0 0; font-size: 0.82rem; color: #4b3cc4; font-weight: 600; }
.ask-teach { margin-left: auto; color: #4b3cc4; }
.teach { margin-top: 12px; }
.teach-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem; line-height: 1.45; padding: 9px 11px; border: 1px solid #c9bff5; border-radius: 10px; background: #fff; color: var(--ink); resize: vertical; }
.teach-in:focus { outline: none; border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15); }
.teach-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.teach-chg .teach-in { flex: 1 1 200px; width: auto; }
.teach-btn { font: inherit; font-size: 0.85rem; font-weight: 700; padding: 7px 14px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, #6c5ce7, #2f80ed); color: #fff; }
.teach-btn.quiet { background: #fff; color: var(--accent-dark); border-color: var(--rule); }
.teach-btn:hover { filter: brightness(1.06); }
.teach-card { border: 1px solid #d9d2fb; border-radius: 12px; padding: 12px 14px; background: #fcfbff; }
.teach-sum { margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.teach-where { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); }
.essi-list { display: grid; gap: 12px; margin: 0 0 26px; }
.essi-rule { border: 1px solid #d9d2fb; border-radius: 12px; padding: 12px 16px; background: #fcfbff; }
.essi-rule.off { background: #f6f7f9; border-color: var(--rule); opacity: 0.8; }
.essi-rule h3 { margin: 0 0 4px; font-size: 1rem; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.essi-rule p { margin: 4px 0; }
.essi-tag { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e6f6ec; color: #1e7a43; }
.essi-rule.off .essi-tag { background: #eceef1; color: var(--muted); }
.essi-text { white-space: pre-line; }
.essi-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.essi-acts form { margin: 0; }
.essi-acts a { text-decoration: none; display: inline-flex; align-items: center; }
.essi-form { border: 1px solid var(--rule); border-radius: 12px; padding: 16px; background: #fff; }
.essi-form label { display: block; font-weight: 700; margin: 12px 0 4px; }
.essi-form label:first-of-type { margin-top: 0; }
.essi-form input[type=text], .essi-form textarea, .essi-form select { width: 100%; box-sizing: border-box; }
.essi-form select { padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; background: #fff; }
.essi-form .on-off { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-top: 12px; }
.teach-who { color: var(--muted); }
.teach-preview { border-left: 3px solid #6c5ce7; padding: 2px 0 2px 12px; margin: 8px 0; font-size: 0.9rem; }
.teach-note { font-size: 0.8rem; color: #8a5a00; margin: 6px 0 0; }
.teach-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.88rem; margin: 6px 0; }
.teach-done { margin: 6px 0; color: #19703f; font-weight: 600; font-size: 0.9rem; }
.teach-err { margin: 6px 0; color: #b42318; font-size: 0.9rem; }
.teach-link { font-weight: 600; }
.ask-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.ask-examples > span { font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.ask-examples .chip { cursor: pointer; font-family: inherit; height: auto; min-height: 28px; padding: 4px 12px; text-align: left; line-height: 1.35; }
.answer-area { margin-top: 22px; }
.answer { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px; }
.answer.is-ai { border-color: #cfe2f7; box-shadow: 0 6px 22px rgba(10, 37, 64, 0.06); }
.answer h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.08rem; color: var(--ink); }
.answer h2 .ic { color: var(--accent); }
.answer.thinking { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.answer .small { font-size: 0.86rem; margin: -4px 0 12px; }
.answer-body { color: var(--text); }
.answer-body p { margin: 0 0 10px; }
.answer-body ol, .answer-body ul { margin: 0 0 12px; padding-left: 1.4em; }
.answer-body li { margin: 4px 0; padding-left: 2px; }
.answer-body li::marker { color: var(--accent-dark); font-weight: 700; }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.72rem; font-weight: 700; text-decoration: none; vertical-align: 2px; line-height: 1; }

/* Ask widget: floating button + chat panel on every help center page */
.askw-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 20px 0 16px;
  border: 0; border-radius: 26px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 10px 28px rgba(10, 37, 64, 0.35), 0 2px 6px rgba(10, 37, 64, 0.2); transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.askw-fab:hover { transform: translateY(-2px); background: var(--navy-2); box-shadow: 0 14px 32px rgba(10, 37, 64, 0.4), 0 2px 6px rgba(10, 37, 64, 0.2); }
.askw-fab.askw-fab-off { display: none !important; }
.askw-fab:focus-visible { outline: 3px solid #8fc1f5; outline-offset: 3px; }
.askw-fab .ic { color: #8fc1f5; }
.askw-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(30, 111, 196, 0.55); pointer-events: none; }
.askw-fab.hello::before { animation: askw-ring 1.8s ease-out 2; }
.askw-fab[aria-expanded="true"] { transform: scale(0.9); opacity: 0; pointer-events: none; }
/* A little life: the Ask Essi button hops and its spark turns every few seconds */
.askw-fab { animation: essi-hop 7s ease-in-out 2.5s infinite; }
.askw-fab .ic { animation: essi-spin 7s ease-in-out 2.5s infinite; transform-origin: 50% 50%; }
.hero .hero-box .hb-ask .ic { animation: essi-spin 7s ease-in-out 4s infinite; transform-origin: 50% 50%; }
.askw-fab:hover, .askw-fab:hover .ic, .askw-fab[aria-expanded="true"], .askw-fab[aria-expanded="true"] .ic { animation-play-state: paused; }
@keyframes essi-hop {
  0%, 12%, 100% { translate: 0 0; }
  3% { translate: 0 -9px; }
  6% { translate: 0 0; }
  8% { translate: 0 -4px; }
  10% { translate: 0 0; }
}
@keyframes essi-spin {
  0%, 2% { transform: rotate(0deg) scale(1); }
  8% { transform: rotate(200deg) scale(1.25); }
  14%, 100% { transform: rotate(360deg) scale(1); }
}
@keyframes askw-ring { 0% { box-shadow: 0 0 0 0 rgba(30, 111, 196, 0.55); } 100% { box-shadow: 0 0 0 18px rgba(30, 111, 196, 0); } }

.askw { position: fixed; right: 22px; bottom: 22px; z-index: 61; width: 410px; height: min(640px, calc(100vh - 44px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--rule); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 37, 64, 0.28), 0 4px 14px rgba(10, 37, 64, 0.12);
  transform-origin: bottom right; opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.94);
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.26s; }
.askw.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
.askw-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; flex: none; }
.askw-mark { width: 36px; height: 36px; border-radius: 10px; background: rgba(143, 193, 245, 0.16); display: grid; place-items: center; flex: none; }
.askw-mark .ic { color: #8fc1f5; }
.askw-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.2; color: #fff; }
.askw-head p { margin: 2px 0 0; font-size: 0.78rem; color: #9fb7d0; }
.askw-head .grow { flex: 1; min-width: 0; }
.askw-btn { border: 0; background: none; color: #c9d7e6; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; }
.askw-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.askw-log { flex: 1; overflow-y: auto; padding: 16px 16px 8px; background: #f6f8fb; scroll-behavior: smooth; }
.askw-msg { margin: 0 0 12px; max-width: 92%; animation: askw-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.askw-msg.me { margin-left: auto; background: var(--accent); color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; font-size: 0.93rem; line-height: 1.45; width: fit-content; overflow-wrap: anywhere; }
.askw-msg.bot { background: #fff; border: 1px solid var(--rule); border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: 0.92rem; line-height: 1.55; }
.askw-msg.bot.none { border-color: #f1d9a6; background: #fffaf0; }
.askw-msg.bot h3 { margin: 0 0 6px; font-size: 0.92rem; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.askw-msg.bot .muted { font-size: 0.82rem; }
.askw-msg .answer-body blockquote { margin: 0 0 10px; }
.askw-src { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--rule-soft); display: grid; gap: 6px; }
.askw-src a { display: flex; gap: 9px; align-items: flex-start; text-decoration: none; color: var(--ink); padding: 7px 9px; border-radius: 9px; background: #f6f8fb; border: 1px solid transparent; font-size: 0.86rem; line-height: 1.35; transition: border-color 0.15s, background 0.15s; }
.askw-src a:hover { border-color: var(--accent); background: #fff; }
.askw-src .n { flex: none; width: 20px; height: 20px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }
.askw-src small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 1px; }
.askw-sub { margin: 12px 0 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.askw-try { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.askw-try .askw-sub { margin-bottom: 0; }
.askw-chip { display: inline-flex; align-items: flex-start; gap: 7px; text-align: left; font: inherit; font-size: 0.86rem; line-height: 1.35; color: var(--accent-dark); background: #fff; border: 1px solid #cfe0f5; border-radius: 12px; padding: 7px 11px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.askw-chip svg { flex: none; margin-top: 2px; }
.askw-chip:hover { border-color: var(--accent); background: #f3f8fe; transform: translateX(2px); }
.askw-q { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.askw-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.askw-opt { font: inherit; font-size: 0.86rem; font-weight: 600; line-height: 1.3; padding: 7px 12px; border-radius: 999px; border: 1px solid #c9bff5;
  background: #f6f4ff; color: #4b3cc4; cursor: pointer; text-align: left; transition: background 0.15s, border-color 0.15s; }
.askw-opt:hover, .askw-opt:focus-visible { background: #ebe6ff; border-color: #6c5ce7; outline: none; }
.askw-msg.asks { border-left: 3px solid #6c5ce7; }
.askw-msg.asks .askw-note { margin-top: 10px; }
.answer .ask-q { font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; }
.answer .ask-opts .ask-chip { border-color: #c9bff5; background: #f6f4ff; color: #4b3cc4; font-weight: 600; }
.askw-msg.none .askw-src.rel { margin-top: 0; padding-top: 0; border-top: 0; }
.askw-msg.none .askw-src.rel a { background: #fff; }
.askw-src .ic { flex: none; margin-top: 1px; color: var(--accent); }
.ask-try { margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.ask-try h3 { width: 100%; margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ask-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid #cfe0f5; background: #fff; color: var(--accent-dark); text-decoration: none; font-size: 0.9rem; }
.ask-chip:hover { border-color: var(--accent); background: #f3f8fe; }
.askw-fb { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.askw-fb button { border: 1px solid var(--rule); background: #fff; border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 0.8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.askw-fb button:hover { border-color: var(--accent); color: var(--accent-dark); }
.askw-note { margin: 8px 0 0; font-size: 0.74rem; color: var(--muted); }
.askw-typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.askw-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: askw-dot 1.1s infinite ease-in-out; }
.askw-typing span:nth-child(2) { animation-delay: 0.15s; }
.askw-typing span:nth-child(3) { animation-delay: 0.3s; }
.askw-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.86rem; }
@keyframes askw-dot { 0%, 80%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes askw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.askw-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--rule); background: #fff; flex: none; }
.askw-form textarea { flex: 1; resize: none; border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 0.93rem; line-height: 1.4; max-height: 120px; min-height: 42px; color: var(--ink); background: #fff; }
.askw-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.askw-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.askw-send:hover { background: var(--accent-dark); }
.askw-send:disabled { opacity: 0.5; cursor: default; }
.askw-foot { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 12px; background: #fff; font-size: 0.8rem; flex: none; }
.askw-foot a, .askw-foot button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule);
  background: #f7f9fc; color: var(--accent-dark); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.askw-foot a:hover, .askw-foot button:hover { background: #eaf2fb; border-color: #b9d3ef; }
/* Essi chat, AI look: her face, chat rows, pill composer with Talk / mic / send, pictures, Play answer */
.essi-face { display: inline-flex; flex: none; padding: 2px; border-radius: 50%; background: conic-gradient(from 0deg, #38bdf8, #8b5cf6, #ec4899, #38bdf8); box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3); }
.essi-face .ai-face .ic { color: #fff; }
.askw-fab .essi-face { margin-left: -6px; }
.askw-fab .essi-face .ic { color: #fff; }
.askw { border-radius: 22px; }
.askw.big { width: min(760px, calc(100vw - 44px)); height: calc(100vh - 44px); }
.askw-head { gap: 10px; padding: 12px 10px 12px 14px; background: radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.22), transparent 55%), radial-gradient(120% 140% at 100% 0%, rgba(139, 92, 246, 0.35), transparent 55%), var(--navy); }
.askw-head h2 { font-size: 1.08rem; }
.askw-head p { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: #b6c3d4; }
.askw-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22); }
a.askw-btn { text-decoration: none; }
.askw-btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.askw-convo { margin: 0; padding: 7px 14px; font-size: 0.78rem; font-weight: 600; color: #b91c1c; background: #fef2f2; border-bottom: 1px solid #fecaca; flex: none; }
.askw-convo[hidden] { display: none; }
.askw-log { background: radial-gradient(70% 40% at 50% 0%, rgba(139, 92, 246, 0.07), transparent 70%), #f8fafc; padding: 16px 14px 8px; }
.askw-row { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px; animation: askw-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.askw-row .essi-face { margin-top: 2px; }
.askw-row .askw-msg { margin: 0; flex: 1; min-width: 0; max-width: none; animation: none; }
.askw-msg.bot { border-color: #ebe7f7; border-radius: 4px 16px 16px 16px; box-shadow: 0 2px 10px rgba(15, 29, 46, 0.04); }
.askw-msg.me { border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, #6c5ce7, #2f80ed); box-shadow: 0 4px 12px rgba(76, 29, 149, 0.18); }
.askw-hi { margin: 0; }
.askw-msg.hello .askw-try { margin-top: 10px; }
.askw-say { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.74rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid #c4dbf3; }
.askw-say.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.askw-pics { margin-top: 10px; }
.askw-pics-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x mandatory; }
.askw-pic { flex: none; width: 128px; padding: 0; text-align: left; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--rule); font: inherit; scroll-snap-align: start; }
.askw-pic:hover { border-color: #9cc3ec; }
.askw-pic img { display: block; width: 100%; height: 88px; object-fit: contain; background: #f8fafc; }
.askw-pic span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 5px 7px; font-size: 0.68rem; line-height: 1.3; color: var(--muted); }
.askw.big .askw-pic { width: 168px; }
.askw.big .askw-pic img { height: 118px; }
.askw-zoom { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(2, 6, 23, 0.92); }
.askw-zoom[hidden] { display: none; }
.askw-zoom img { max-width: 100%; max-height: 74vh; object-fit: contain; background: #fff; border-radius: 10px; }
.askw-zoom p { margin: 0; max-width: 760px; text-align: center; color: #e2e8f0; line-height: 1.45; }
.askw-zoom-row { display: flex; gap: 10px; }
.askw-form { display: block; padding: 10px 12px 8px; border-top: 1px solid #eef0f6; }
.askw-pill { display: flex; align-items: flex-end; gap: 5px; padding: 5px 5px 5px 14px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.28), 0 6px 18px rgba(76, 29, 149, 0.08); }
.askw-pill:focus-within { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.55), 0 6px 18px rgba(76, 29, 149, 0.12); }
.askw-form .askw-pill textarea { border: 0; box-shadow: none; padding: 9px 0; min-height: 38px; background: transparent; }
.askw-form .askw-pill textarea:focus { border: 0; box-shadow: none; }
.askw-tool { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; }
.askw-mic { color: var(--accent); background: var(--accent-soft); border: 1px solid #c4dbf3; }
.askw-talk { color: #6d28d9; background: #f3e8ff; border: 1px solid #ddd0fb; }
.askw-mic.on { color: #fff; background: #ef4444; border-color: #fca5a5; animation: ask-pulse 1.2s ease-out infinite; }
.askw-talk[aria-pressed="true"] { color: #fff; border-color: #f87171; background: linear-gradient(135deg, #ef4444, #a855f7); animation: ask-pulse 1.6s ease-out infinite; }
.askw-pill .askw-send { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #6c5ce7, #2f80ed); box-shadow: 0 4px 12px rgba(76, 29, 149, 0.3); }
.askw-pill .askw-send:hover { filter: brightness(1.08); background: linear-gradient(135deg, #6c5ce7, #2f80ed); }
.askw-disc { margin: 6px 4px 0; font-size: 0.68rem; line-height: 1.35; color: #94a3b8; text-align: center; }
.askw-foot { display: none; }
.askw-toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 3; max-width: 90%; padding: 8px 14px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 0.82rem; box-shadow: 0 10px 24px rgba(10, 37, 64, 0.35); text-align: center; }
.askw-toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .askw-mic.on, .askw-talk[aria-pressed="true"], .askw-row { animation: none; } }
.askw-foot .ic { flex: none; }
@media (max-width: 640px) {
  .askw-fab { right: 16px; bottom: 16px; width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 28px; }
  .askw-fab span { display: none; }
  .askw.big { width: 100%; height: 94vh; height: 94dvh; }
  #askw-big { display: none; }
  .askw { left: 0; right: 0; bottom: 0; width: 100%; height: 88vh; height: 88dvh; border-radius: 18px 18px 0 0; border-bottom: 0; transform: translateY(100%); transform-origin: bottom center; }
  .askw.open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .askw, .askw.open, .askw-fab { transition: none; }
  .askw-msg, .askw-typing span, .askw-fab.hello::before, .askw-fab, .askw-fab .ic, .hero .hero-box .hb-ask .ic { animation: none; }
}
@media print { .askw, .askw-fab { display: none !important; } }
.cite:hover { background: var(--accent); color: #fff; }
.fieldcite { font-size: 0.82em; color: #8a5a00; font-style: italic; white-space: nowrap; }
.ai-field-note { margin-top: 10px; padding: 8px 12px; border-left: 3px solid #e0a800; background: #fff8e1; color: #6b4a00; font-size: 0.88rem; border-radius: 0 6px 6px 0; }
.essi-kind { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; vertical-align: 2px; background: #eef1f6; color: #3b4a5c; }
.essi-kind.fact { background: #fff3cd; color: #7a5300; }
.passage { margin: 0 0 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: #f8fafc; border-radius: 0 8px 8px 0; }
.passage .ptitle { display: block; font-weight: 700; margin-bottom: 4px; text-decoration: none; }
.passage .ptitle:hover { text-decoration: underline; }
.passage p { margin: 0; font-size: 0.93rem; overflow-wrap: anywhere; }
.passage mark, .answer mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.sources { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.sources h3 { margin: 0 0 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.sources ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sources a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--rule); border-radius: 9px; text-decoration: none; color: var(--ink); height: 100%; }
.sources a:hover { border-color: #9cc3ec; background: #f7fbff; }
.sources .n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.74rem; font-weight: 700; margin-top: 1px; }
.sources strong { display: block; font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.sources small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 2px; }
.sources li.uncited a { opacity: 0.72; }
.ask-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 16px; }
.ask-fb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.ask-fb .btn { padding: 5px 12px; font-size: 0.85rem; }
.ask-fb .done { color: var(--green); font-weight: 600; }
.ask-all { font-size: 0.88rem; }
.ai-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }
.ask-err { margin: 0; color: var(--danger); }
@media (max-width: 640px) {
  .ask { padding-top: 22px; }
  .ask-mark { width: 42px; height: 42px; border-radius: 11px; }
  .askbox { flex-direction: column; align-items: stretch; }
  .askbox .btn { width: 100%; }
  .askbox.follow { flex-direction: row; align-items: flex-end; bottom: 8px; padding: 6px 6px 6px 12px; }
  .askbox.follow textarea { min-height: 0; }
  .askbox.follow .btn { width: auto; padding: 0 12px; }
  .askbox.follow .btn span { display: none; }
  .ask-me { max-width: 88%; }
  .answer { padding: 16px 14px; }
  .askcall { flex-wrap: wrap; }
  .askcall .btn { width: 100%; }
}
.chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px 12px; }
  .kpi.kpi-main { grid-column: 1 / -1; }
  .kpi .big { font-size: 1.6rem; }
  .delta { display: table; margin: 4px 0 0; }
  .kpi.kpi-main .delta { display: inline-block; margin-left: 6px; }
  .chart svg { min-width: 640px; }
  .panel { padding: 16px 14px 14px; }
  .mini .opt { display: none; }
}
.sheet { background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.sheet iframe { display: block; width: 100%; min-height: 240px; border: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.back::before { content: "\2190"; }
.title-input { font-size: 1.35rem !important; font-weight: 700; height: 52px !important; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 18px 0 24px; }
div.editor { border: 1px solid #c5d0dc; border-radius: 10px; background: #fff; overflow: hidden; }
.editor-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--rule); }
.seg { display: inline-flex; border: 1px solid #c5d0dc; border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; font-size: 0.86rem; font-weight: 600; border: 0; background: #fff; color: var(--navy); padding: 6px 14px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--navy); color: #fff; }
.tools { display: flex; flex-wrap: wrap; gap: 2px; }
.tools button { font: inherit; font-size: 0.9rem; min-width: 34px; padding: 6px 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; }
.tools button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.tools .sep { width: 1px; background: var(--rule); margin: 4px 6px; }
.editor iframe { display: block; width: 100%; min-height: 420px; border: 0; }
.editor textarea { display: block; min-height: 560px; border: 0; border-radius: 0; resize: vertical; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; tab-size: 2; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--rule); box-shadow: 0 -6px 18px rgba(10, 37, 64, 0.08); }
.savebar-in { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 11px; padding-bottom: 11px; }
.save-note { margin-right: auto; color: var(--muted); font-size: 0.9rem; }
.save-note.is-dirty { color: var(--amber); font-weight: 600; }
.steps { list-style: none; margin: 0 0 24px; padding: 0; background: #fff; border: 1px solid var(--rule); border-radius: 10px; }
.steps li { padding: 14px 18px; border-bottom: 1px solid var(--rule-soft); display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.steps li:last-child { border-bottom: 0; }
.steps .ok { color: var(--green); font-weight: 700; white-space: nowrap; }
.steps .todo { color: var(--amber); font-weight: 700; white-space: nowrap; }
.inline-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 220px; }

@media (max-width: 980px) {
  .model-groups { grid-template-columns: minmax(0, 1fr); }
  .cards, .sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-lists { grid-template-columns: minmax(0, 1fr); }
  .article { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .cards, .sections { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .a-head { flex-direction: column; gap: 10px; }
  .a-tools { padding-top: 0; }
  .a-head h1 { font-size: 1.5rem; }
  .helpful .row { gap: 8px 10px; }
  .helpful .q { width: 100%; }
  .card { min-height: 0; padding: 14px 14px 14px 12px; gap: 12px; }
  .card-ic { width: 42px; height: 42px; }
  .recent ol { grid-template-columns: minmax(0, 1fr); }
  .recent li:nth-child(n+4) { display: none; }
  .models { gap: 6px; }
  .models a:nth-of-type(n+7) { display: none; }
  .home-head { margin-top: 24px; }
  .search { flex-basis: 100%; }
  .nav a, .nav button { padding: 7px 10px; font-size: 0.88rem; }
  /* Phone header: logo + language on one row, the menu on one scrollable row under it */
  .top-in { gap: 8px; padding-top: 12px; padding-bottom: 6px; min-height: 0; }
  .top-brand { width: 100%; }
  .langs.langs-m { display: inline-flex; margin: 0; flex: none; }
  .nav .langs { display: none; }
  .nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
         width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .who { display: none; }
  .hero { padding: 14px 0 30px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .wide { grid-column: 1 / -1; }
  .facts > div { border-right: 0; }
  .gate { margin: 24px auto 60px; padding: 24px 20px; }
  .table.stack { border-radius: 10px; }
  .table.stack thead { position: absolute; left: -9999px; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; }
  .table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); }
  .table.stack td { padding: 0; border: 0; }
  .table.stack td.t { margin-bottom: 6px; }
  .table.stack td.m { display: inline-block; margin-right: 14px; font-size: 0.86rem; color: var(--muted); text-align: left; }
  .tablewrap { overflow-x: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
}

/* ---- article: previous / next ---- */
.a-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.a-nav a { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; color: var(--ink); padding: 4px 0; }
.a-nav small { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.a-nav span.t { color: var(--accent); font-weight: 600; font-size: 0.95rem; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.a-nav a:hover span.t { text-decoration: underline; }
.a-nav .next { text-align: right; grid-column: 2; }
.kbd-hint { color: var(--muted); font-size: 0.78rem; text-align: center; margin: 10px 0 18px; }
.kbd-hint kbd { font: inherit; font-size: 0.72rem; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--bar); }
@media (max-width: 640px) { .a-nav { gap: 14px; } .a-nav span.t { -webkit-line-clamp: 3; } .kbd-hint .keys { display: none; } }
/* ---- presentation mode ---- */
.tool-present span { font-weight: 600; }
.pres { position: fixed; inset: 0; z-index: 1000; background: #0b1a2c; color: #fff; display: flex; flex-direction: column; }
.pres[hidden] { display: none; }
.pres-stage { flex: 1; position: relative; overflow: hidden; }
.pres-slide { position: absolute; inset: 0; display: none; padding: 4vh 6vw 2vh; overflow: auto; background: #fff; color: #1F2328; }
.pres-slide.on { display: block; animation: presIn .18s ease-out; }
@keyframes presIn { from { opacity: .4; } to { opacity: 1; } }
.pres-in { max-width: 1280px; margin: 0 auto; font: var(--pres-size, 26px)/1.5 var(--font); }
.pres-in h2.pres-h { font-size: 1.55em; line-height: 1.2; color: #0f1d2e; margin: 0 0 .6em; padding-bottom: .3em; border-bottom: 3px solid #1e6fc4; }
.pres-in h3 { font-size: 1.15em; color: #0f1d2e; margin: .8em 0 .3em; }
.pres-in p, .pres-in li { margin: .35em 0; }
.pres-in ul, .pres-in ol { padding-left: 1.3em; }
.pres-in img { max-width: 100%; height: auto; max-height: 68vh; display: block; margin: .4em auto; }
.pres-in table { border-collapse: collapse; width: 100%; font-size: .8em; }
.pres-in td, .pres-in th { border: 1px solid #c9d3df; padding: .3em .55em; vertical-align: top; text-align: left; }
.pres-in th { background: #eef3f8; }
.pres-in a { color: #1e6fc4; }
.pres-in [style*="font-size"] { font-size: inherit !important; }
.pres-in [style*="max-width"]:not(img) { max-width: none !important; }
.pres-in iframe, .pres-in video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.pres-slide.pres-pic .pres-in img { max-height: 74vh; }
.pres-slide.pres-pic .pres-cap { text-align: center; color: #5d6b7c; font-style: italic; font-size: .8em; }
.pres-title { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.pres-title h1 { font-size: 2.1em; line-height: 1.15; color: #0f1d2e; margin: 0 0 .5em; }
.pres-title .pres-meta { color: #5d6b7c; font-size: .85em; }
.pres-title .pres-brand { color: #1e6fc4; font-weight: 700; font-size: .75em; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1.2em; }
.pres-end { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100%; gap: .6em; }
.pres-end a.pres-go { display: inline-block; max-width: 80%; padding: .5em 1.1em; border-radius: 10px; background: #1e6fc4; color: #fff; text-decoration: none; font-weight: 600; }
.pres-end a.pres-go.alt { background: #eef3f8; color: #0f1d2e; }
.pres-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #0b1a2c; color: #cfd8e3; font-size: 14px; }
.pres-bar .pres-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-bar button { background: #12355b; color: #fff; border: 1px solid #1f466f; border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
.pres-bar button:hover { background: #1e6fc4; }
.pres-bar .pres-n { font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.pres-prog { height: 4px; background: #12355b; }
.pres-prog i { display: block; height: 100%; width: 0; background: #f59e0b; transition: width .2s; }
.pres-zone { position: absolute; top: 0; bottom: 0; width: 18%; cursor: pointer; z-index: 2; }
.pres-zone.l { left: 0; cursor: w-resize; } .pres-zone.r { right: 0; cursor: e-resize; }
body.pres-open { overflow: hidden; }
/* ---- Training: lessons, quizzes, progress ---- */
.tr-page { padding-top: 22px; padding-bottom: 48px; }
.tr-head { margin: 0 0 18px; }
.tr-head h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.tr-head h1 .ic { color: var(--accent); }
.tr-kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tr-kicker a { color: inherit; }
.tr-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 26px; }
.tr-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .tr-grid, .tr-cols { grid-template-columns: 1fr; } }
.tr-card { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
.tr-card h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.tr-card > summary { cursor: pointer; list-style: none; }
details.tr-card > summary h2 { display: inline-flex; margin: 0; }
details.tr-card[open] > summary { margin-bottom: 10px; }
.tr-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.tr-field input, .tr-field select, .tr-field textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #c5d0dc; border-radius: 7px; background: #fff; min-width: 0; }
.tr-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.tr-row .tr-field { flex: 0 1 auto; }
.tr-grow { flex: 1 1 220px !important; }
.tr-topics { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.tr-topics legend { font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.tr-topics label, .tr-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #c5d0dc; border-radius: 18px; font-size: .88rem; cursor: pointer; background: #fff; }
.tr-topics label:has(input:checked) { background: var(--accent-soft); border-color: #9cc3ec; color: var(--accent-dark); }
.tr-kpis { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tr-kpis-wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.tr-kpis li { background: var(--bar); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.tr-kpis strong { font-size: 1.5rem; color: var(--ink); line-height: 1.2; }
.tr-kpis span { font-size: .8rem; color: var(--muted); }
.tr-links { font-size: .9rem; margin: 6px 0 0; }
.tr-lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-lhead h2 { margin: 0; }
.tr-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tr-list li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--rule); }
.tr-list li a { text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.tr-list li a small { color: var(--muted); font-size: .82rem; }
.tr-list li a:hover strong { text-decoration: underline; }
.tr-meta { font-size: .8rem; color: var(--muted); text-align: right; flex: none; }
.tr-lhead2 { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.tr-lhead2 h1 { margin: 0 0 4px; }
.tr-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tr-items { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-items > li { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.tr-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy, #0a2540); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.tr-it { flex: 1; min-width: 0; }
.tr-it > a { font-weight: 600; text-decoration: none; }
.tr-it > a:hover { text-decoration: underline; }
.tr-note { margin: 6px 0 0; font-size: .85rem; background: #fff8eb; color: #6b4300; border-radius: 7px; padding: 5px 9px; }
.tr-edit { margin-top: 4px; font-size: .82rem; }
.tr-edit summary { color: var(--muted); cursor: pointer; }
.tr-edit form { display: flex; gap: 6px; margin-top: 6px; }
.tr-edit input { flex: 1; font: inherit; padding: 6px 8px; border: 1px solid #c5d0dc; border-radius: 6px; }
.tr-min { flex: none; color: var(--muted); font-size: .85rem; white-space: nowrap; padding-top: 5px; }
.tr-btns { flex: none; display: flex; gap: 2px; }
.tr-btns button { width: 32px; height: 32px; border: 1px solid transparent; background: none; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 1rem; }
.tr-btns button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.tr-add { display: flex; gap: 8px; margin: 0 0 18px; }
.tr-add input { flex: 1; font: inherit; padding: 8px 10px; border: 1px dashed #9aa7b5; border-radius: 8px; }
.tr-sugg h3 { font-size: .95rem; margin: 0 0 6px; }
.tr-sugg ul { list-style: none; margin: 0; padding: 0; }
.tr-sugg li { padding: 6px 0; border-top: 1px solid var(--rule-soft); }
.tr-mini { list-style: none; margin: 0; padding: 0; }
.tr-mini li { padding: 7px 0; border-top: 1px solid var(--rule-soft); font-size: .9rem; }
.tr-mini li:first-child { border-top: 0; }
.tr-pct { display: inline-block; font-weight: 700; font-size: .82rem; padding: 1px 7px; border-radius: 10px; background: #eef3f8; color: var(--ink); }
.tr-pct.ok, strong.ok { color: #1f7a4d; } .tr-pct.ok { background: #e6f4ec; }
.tr-pct.mid, strong.mid { color: #8a5a00; } .tr-pct.mid { background: #fff3dc; }
.tr-pct.low, strong.low { color: #b42318; } .tr-pct.low { background: #fdecea; }
.tr-danger { color: #b42318 !important; }
.tr-dialog { border: 0; border-radius: 14px; padding: 20px; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(10, 37, 64, .3); }
.tr-dialog::backdrop { background: rgba(10, 37, 64, .45); }
.tr-dialog h2 { margin: 0 0 4px; }
.tr-dialog input[type=search] { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid #c5d0dc; border-radius: 7px; margin: 8px 0; }
.tr-people { max-height: 46vh; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; padding: 4px; }
.tr-people label { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.tr-people label:hover { background: var(--bar); }
.tr-people label[hidden] { display: none; }
.tr-dlg-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.tr-dlg-foot .muted { margin-right: auto; }
.tr-q { border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px 10px; margin: 0 0 12px; background: #fff; }
.tr-q legend { font-weight: 600; padding: 0 6px; display: flex; gap: 10px; align-items: center; }
.tr-q legend .tr-num { width: 26px; height: 26px; font-size: .8rem; }
.tr-q label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.tr-q label:hover { background: var(--bar); }
.tr-q label:has(input:checked) { background: var(--accent-soft); }
.tr-q input { margin-top: 4px; }
.tr-score { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--rule); border-left: 6px solid #9aa7b5; border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; }
.tr-score.ok { border-left-color: #1f9d63; } .tr-score.mid { border-left-color: #e08a1e; } .tr-score.low { border-left-color: #d64545; }
.tr-score h1 { margin: 0 0 4px; font-size: 1.3rem; }
.tr-score p { margin: 0; }
.tr-big { font-size: 2.6rem; font-weight: 800; color: var(--ink); }
.tr-review { margin: 0; padding-left: 20px; }
.tr-review li { padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.tr-review li:first-child { border-top: 0; }
.tr-review p { margin: 3px 0; }
.tr-qt { font-weight: 600; }
.tr-bad { color: #b42318; } .tr-good { color: #1f7a4d; }
.tr-read { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tr-toread { list-style: none; margin: 0; padding: 0; }
.tr-toread li { padding: 8px 0; border-top: 1px solid var(--rule-soft); display: flex; flex-direction: column; }
.tr-toread li:first-child { border-top: 0; }
.tr-toread small { font-size: .8rem; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tr-table th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.tr-table td { padding: 8px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.tr-barcell { white-space: nowrap; width: 45%; }
.tr-bar { display: inline-block; width: calc(100% - 60px); height: 8px; background: #edf1f5; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: #9aa7b5; }
.tr-bar i.ok { background: #1f9d63; } .tr-bar i.mid { background: #e0a030; } .tr-bar i.low { background: #d64545; }
.tr-chg { font-weight: 700; } .tr-chg.up { color: #1f7a4d; } .tr-chg.down { color: #b42318; }
.tr-scroll { overflow-x: auto; margin-bottom: 18px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 6px 10px; }
.tr-inline { display: flex; gap: 6px; align-items: center; }
.tr-inline select { font: inherit; font-size: .85rem; padding: 5px 6px; border: 1px solid #c5d0dc; border-radius: 6px; max-width: 200px; }
.tr-link { margin-top: 10px; }
.tr-bank-list { margin: 0; padding-left: 22px; }
.tr-bank-list li { padding: 6px 0; }
.tr-bank-list li small { display: block; font-size: .8rem; }
.tr-bank-list li.tr-off > a { color: var(--muted); }
.tr-small { font-size: .82rem; font-weight: 600; margin-left: auto; }
.tr-page .linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: .16em; }
.tr-page .linkbtn:hover { color: var(--accent-dark); }
.tr-card .tr-field input, .tr-card .tr-field select, .tr-card .tr-field textarea { width: 100%; box-sizing: border-box; }
.tr-row .tr-field input, .tr-row .tr-field select { width: auto; }
.tr-row .tr-grow input { width: 100%; }
.tr-st { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eef3f8; color: var(--muted); white-space: nowrap; }
.tr-st-reading, .tr-st-quiz { background: #fff3dc; color: #8a5a00; } .tr-st-failed { background: #fdecea; color: #b42318; } .tr-st-passed { background: #e6f4ec; color: #1f7a4d; }
.tr-due { font-size: .78rem; color: var(--muted); } .tr-due.late { color: #b42318; font-weight: 700; }
.tr-assigned { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0 0 24px; }
.tr-assigned a.tr-acard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.tr-assigned a.tr-acard:hover { border-color: #9cc3ec; }
.tr-assigned a.tr-acard strong { color: var(--accent-dark); }
.tr-items > li.tr-done .tr-num { background: #1f9d63; }
.tr-mybar { height: 8px; background: #edf1f5; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.tr-mybar i { display: block; height: 100%; background: #1f9d63; }
.hg-stats a.hg-stat-link { color: inherit; text-decoration: none; display: contents; }
.hg-stats a.hg-stat-link:hover span { text-decoration: underline; }
.lesson-strip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid #cfe2f7; color: var(--accent-dark); border-radius: 10px; padding: 8px 14px; margin: 14px 0 0; font-size: .9rem; font-weight: 600; }
.lesson-strip a { font-weight: 700; }
.lesson-strip .ls-nav { margin-left: auto; display: flex; gap: 12px; }
@media print {
  .top, .hero, .bar, .side, .a-tools, .savebar, .a-nav, .kbd-hint, .pres, .ask-fab { display: none !important; }
  .tr-actions, .tr-side, .tr-edit, .tr-btns, .tr-add, .tr-sugg, .tr-dialog, .lesson-strip { display: none !important; }
  .tr-cols { display: block; }
  body { background: #fff; }
  .article { display: block; padding: 0; }
}
