/* Advice guide template. Loaded after ../beta.css by every beta/advice/<guide>/ page. */
html { scroll-padding-top: 96px; }

.read-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 70; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent, var(--blue)); transform-origin: left; transform: scaleX(0); }

/* ---------- Hero ---------- */
.g-hero { position: relative; overflow: hidden; background: var(--navy-deep); color: #fff; padding: calc(68px + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 88px); background: var(--navy-950); }
.g-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; transform: scale(1.06); }
.g-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 19, 46, .9) 0%, rgba(3, 19, 46, .6) 50%, rgba(3, 19, 46, .3) 100%), linear-gradient(0deg, rgba(3, 19, 46, .6), transparent 50%); }
.g-hero-copy { position: relative; z-index: 1; }
.crumbs { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); margin-bottom: 18px; }
.crumbs a { text-decoration: none; color: #fff; display: inline-block; padding-block: 14px; margin-block: -14px; } .crumbs a:hover { text-decoration: underline; }
.g-title { font-size: clamp(3.4rem, 9vw, 8rem); line-height: .85; letter-spacing: -.045em; }
.g-title .w { display: inline-block; }
.g-title.is-split .w { animation: word-in .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 100ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(40%); } }
.g-lede { font-size: clamp(17px, 1.8vw, 21px); max-width: 52ch; margin: 22px 0 28px; color: rgba(255, 255, 255, .86); }
.g-meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.g-meta li { padding: 6px 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.g-meta b { font-weight: 700; opacity: .65; margin-right: 4px; }

/* ---------- Layout ---------- */
.g-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 120px); align-items: start; }
.g-body { max-width: 720px; min-width: 0; }

/* ---------- Contents ---------- */
.toc { position: sticky; top: 96px; }
.toc-toggle { display: none; }
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 2px solid var(--line); }
.toc-list a { position: relative; display: block; padding: 8px 0 8px 18px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color var(--dur), border-color var(--dur) var(--ease); counter-increment: toc; }
.toc-list a::before { content: counter(toc, decimal-leading-zero); font-size: 11px; font-weight: 800; margin-right: 8px; opacity: .55; }
.toc-list a:hover { color: var(--heading); }
.toc-list a.is-active { color: var(--heading); border-left-color: var(--accent); }
.toc::before { content: "Contents"; display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

@media (max-width: 900px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); padding-top: 0; gap: 24px; }
  .toc, .toc-toggle { min-width: 0; max-width: 100vw; }
  .toc { top: 68px; z-index: 40; margin-inline: calc(-1 * var(--gutter)); background: var(--overlay); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .toc::before { display: none; }
  .toc-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 var(--gutter); background: none; border: 0; text-align: left; cursor: pointer; }
  .toc-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); flex: none; }
  .toc-current { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toc-chev { width: 10px; height: 10px; border: solid var(--heading); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform var(--dur) var(--ease); flex: none; }
  .toc.is-open .toc-chev { transform: rotate(-135deg) translateY(-3px); }
  .toc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease); }
  .toc.is-open .toc-panel { grid-template-rows: 1fr; }
  .toc-list { overflow: hidden; min-height: 0; border: 0; padding: 0 var(--gutter); }
  .toc.is-open { background: var(--bg); box-shadow: var(--shadow); }
  .toc.is-open .toc-list { padding-bottom: 12px; }
  .toc-list a { border-left: 0; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
  .toc-list a.is-active { color: var(--blue-300); }
}

/* ---------- Body typography ---------- */
.g-sec { padding-top: clamp(32px, 5vw, 56px); }
.g-sec:first-of-type { padding-top: 8px; }
.g-sec h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.g-sec h3 { font-size: 1.35rem; margin: 28px 0 10px; }
.g-sec p, .g-sec li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.g-sec p { margin: 0 0 16px; }
.g-sec strong { color: var(--heading); }
.g-sec a:not(.link-card):not(.card) { color: var(--blue); text-underline-offset: 3px; }

.takeaways { border-radius: var(--radius); background: var(--navy-950); border: 1px solid var(--line-strong); color: var(--ink); padding: 26px 28px; margin-bottom: 8px; }
.takeaways-title { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300, #8fb5ff); margin: 0 0 10px; }
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { margin: 6px 0; font-weight: 500; color: var(--ink); }

.callout { border-left: 4px solid var(--blue); background: var(--grey-2); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px; margin: 24px 0; }
.callout-tip { border-left-color: var(--t-no); }
.callout-title { font-weight: 800; color: var(--heading); margin: 0 0 6px !important; }
.callout p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 440px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table-wrap th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--grey-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 700; color: var(--heading); white-space: nowrap; }

.checklist { list-style: none; padding: 0; margin: 12px 0 20px; }
.checklist li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border-radius: 4px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; color: var(--heading); letter-spacing: -.02em; line-height: 1; }
.stat-label { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } .stat { flex-direction: row; align-items: baseline; justify-content: space-between; } }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.mini-card h3 { margin: 0 0 6px; font-size: 17px; }
.mini-card p { font-size: 15px; margin: 0; color: var(--muted); }
@media (max-width: 560px) { .cols-2 { grid-template-columns: 1fr; } }

.g-figure { margin: 24px 0; }
.g-figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; background: var(--grey); }
.g-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.link-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; margin: 20px 0; border-radius: var(--radius); background: var(--grey-2); border: 1px solid var(--line); text-decoration: none; color: var(--heading); transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease), border-color var(--dur-slow); }
@media (hover: hover) { .link-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); } }
.link-card .eyebrow { display: block; margin-bottom: 4px; }
.link-card b { font-family: var(--font-display); font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; }
.link-card .arrow { font-size: 22px; font-weight: 700; }

/* facts still to check: visible in beta only */
.verify { font-size: 13px !important; color: #2a1d00 !important; background: #ffd66b; border-radius: 6px; padding: 2px 8px; display: inline-block; }
.verify::before { content: "To verify · "; font-weight: 700; }

.g-end { margin-top: clamp(48px, 7vw, 80px); padding-top: 32px; border-top: 1px solid var(--line); }
.related { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .related { grid-template-columns: 1fr; } }
.soft-cta { margin: 28px 0 0; color: var(--muted); }
.soft-cta a { color: var(--blue-300); font-weight: 700; }

/* section reveal */
.g-sec.pre { opacity: 0; transform: translateY(24px); }
.g-sec { transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* POLISH-AUDIT #1: pressed states (hover is pointer-only above) */
.link-card:active { transform: scale(.985); transition-duration: var(--dur-fast); }

/* ---- Kai copy pass (13 Nov) ---- */
/* Public "still working on it" marker. Search the HTML for "EDIT LATER" to find each one. */
.wip { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--warn-tx); background: var(--warn-bg); border: 1px dashed currentColor; border-radius: 3px; padding: 2px 9px; white-space: nowrap; }
.wip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: wip-pulse 1.8s var(--ease) infinite; }
@keyframes wip-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .wip::before { animation: none; } }
.g-steps { padding-left: 22px; }
.g-steps li { margin: 12px 0; }
.g-signoff { margin-top: 24px; font-style: italic; }
.g-signoff b { font-style: normal; font-family: var(--font-display); text-transform: uppercase; font-size: 1.4rem; }

/* Advice directory + under-construction pages */
.g-hero-short { padding-bottom: clamp(36px, 5vw, 56px); }
.hub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hub-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius-sm); color: var(--heading); text-decoration: none; font-weight: 700; font-size: .85rem; transition: background var(--dur) var(--ease), border-color var(--dur); }
.hub-jump a:hover { background: var(--surface-2); border-color: var(--blue-300); }
.tag-soon { background: var(--warn-bg); color: var(--warn-tx); }
.card-soon h3 { color: var(--ink-2); }
.card-soon .arrow { color: var(--muted); }
.az-list { columns: 3 240px; column-gap: 32px; list-style: none; margin: 0; padding: 0; }
.az-list li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.az-list a { color: var(--heading); text-decoration: none; font-weight: 600; min-height: 24px; }
.az-list a:hover { color: var(--blue-300); }
.wip-panel { max-width: 680px; margin: 0 auto; text-align: center; padding: clamp(28px, 5vw, 48px); border: 1px dashed var(--warn-tx); border-radius: var(--radius); background: var(--surface); }
.wip-panel .h2 { margin: 18px 0 12px; }
.wip-panel p { color: var(--ink-2); margin: 0 auto 24px; max-width: 46ch; }
.wip-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Public site: "To verify" tags read as plain text unless review mode (?review=1, vt.js) */
html:not(.review) .verify { font-size: inherit !important; color: inherit !important; background: none; padding: 0; }
html:not(.review) .verify::before { content: none; }
/* Venue guides: internal markers hidden unless review mode */
html:not(.review) .todo, html:not(.review) .gfx-slot { display: none; }
html:not(.review) .draft { box-shadow: none; padding-left: 0; }
html:not(.review) .draft::before { content: none; }
