/* Tempo home page. Builds on the tokens in styles.css. */
.home { overflow-x: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hnav { gap: 1.5rem; }
.hlinks { display: flex; gap: .25rem; margin-left: 1rem; }
.hlinks a { font-size: .875rem; color: var(--muted); text-decoration: none; padding: .35rem .6rem; border-radius: 6px; }
.hlinks a:hover { color: var(--ink); background: var(--sunk); }
@media (max-width: 980px) { .hlinks { display: none; } }
.btn.big { min-height: 48px; padding: .7rem 1.25rem; font-size: 1rem; border-radius: 8px; }
.btn.accent:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.home .display em, .home h3 em { font-style: italic; }
.home .display em { color: var(--brand); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(3rem, 6.4vw, 5.6rem); line-height: .95; letter-spacing: -.025em; margin: .9rem 0 1.4rem; }
.hero-sub { font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: 34rem; margin: 0 0 2rem; }
.hero-sub em { font-style: italic; }
.hero-cta { gap: .75rem; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding: 0; margin: 1.6rem 0 0; color: var(--muted); }
.hero-facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: .5rem; vertical-align: .12em; }

.preview { margin: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; box-shadow: 0 1px 0 rgba(27, 26, 23, .04), 0 24px 60px -24px rgba(27, 26, 23, .22); }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .9rem; white-space: nowrap; }
.pv-head > div { overflow: hidden; text-overflow: ellipsis; }
.live { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); border-radius: 99px; padding: .1rem .5rem; margin-right: .3rem; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion="off"]) .live i { animation: pulse 1.1s infinite alternate; } }
.pv-scenario { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; color: var(--muted); }
.pv-scenario output { margin-left: auto; font-size: 1.05rem; color: var(--ink); font-weight: 600; }
#pvSlider { width: 100%; margin: .45rem 0 .9rem; height: 22px; }
.pv-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-height: 292px; }
.pv-day { background: var(--card); padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pv-day.today { background: color-mix(in srgb, var(--brand-soft) 35%, var(--card)); }
.pv-dh { display: flex; align-items: baseline; gap: .3rem; padding: 0 2px 4px; }
.pv-dh b { font-size: 1.1rem; letter-spacing: -.03em; }
.pv-dh span { font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.pv-day.today .pv-dh span { color: var(--brand); }
.pv-s { border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--card)); border-radius: 2px 5px 5px 2px; padding: 4px 6px; font-size: .68rem; line-height: 1.25; }
.pv-s b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-s span { display: flex; justify-content: space-between; gap: 3px; font-family: var(--mono); font-size: .58rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pv-s span i { font-style: normal; }
.pv-c { font-size: .62rem; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 4px; padding: 3px 6px; background: repeating-linear-gradient(135deg, var(--act-soft) 0 5px, transparent 5px 10px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pv-due { font-size: .62rem; font-weight: 600; color: var(--brand); line-height: 1.2; padding: 0 2px; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion="off"]) .pv-s { animation: fadein .25s ease-out both; } }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.pv-status { margin: .85rem 0 .5rem; padding: .65rem .8rem; border-radius: 8px; font-size: .88rem; display: flex; gap: .6rem; align-items: baseline; }
.pv-status.ok { background: var(--ok-soft); color: var(--ok); }
.pv-status.bad { background: var(--err-soft); color: var(--err); }
.pv-status b { white-space: nowrap; }
.preview figcaption { line-height: 1.4; }

/* ---------- facts strip ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 0; padding-bottom: 0; }
.strip > div { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.strip > div { padding: 26px 22px 26px 0; display: flex; flex-direction: column; gap: .35rem; }
.strip > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.strip b { font-weight: 600; font-size: 2.3rem; line-height: 1; letter-spacing: -.045em; font-feature-settings: "tnum"; }
.strip span { font-size: .875rem; color: var(--muted); line-height: 1.4; }

/* ---------- sections ---------- */
.sect { padding-top: 112px; }
.sect-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: baseline; margin-bottom: 48px; }
.num { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 0; padding-top: .6rem; border-top: 1px solid var(--ink); }
.sect-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.02; letter-spacing: -.02em; margin: 0; text-transform: none; color: var(--ink); font-weight: 400; }
.home h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; margin: 0 0 .6rem; }
.home p { margin: 0 0 .8rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 52rem; margin-left: 244px !important; }

.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-left: 244px; border-top: 1px solid var(--line); }
.cols3 article { padding: 24px 24px 0 0; color: var(--ink-2); }
.cols3 article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.cols3 h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; letter-spacing: -.01em; color: var(--ink); }
.fix { border-top: 1px dashed var(--line-2); padding-top: .8rem; color: var(--ink); }
.fix span { font-family: var(--mono); font-size: .72rem; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin-right: .35rem; }

/* how */
.steps { list-style: none; padding: 0; margin: 0 0 0 244px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps h3 { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; }
.steps h3 .mono { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ink); font-size: .72rem; font-weight: 500; }
.steps p { color: var(--ink-2); font-size: .95rem; }
.step-art { height: 196px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: .6rem; overflow: hidden; }
.art-tell p { font-family: var(--serif); font-size: 1.28rem; line-height: 1.38; margin: 0; }
.art-tell mark { background: none; color: inherit; padding: 0 1px; border-bottom: 2px solid; }
.m-s { border-color: #0f766e !important; } .m-d { border-color: var(--brand) !important; } .m-t { border-color: #a16207 !important; } .m-a { border-color: var(--act) !important; border-bottom-style: dashed !important; }
.legend-mini { display: flex; gap: .8rem; color: var(--muted); font-size: .72rem; }
.legend-mini span { border-bottom: 2px solid; padding-bottom: 1px; }
.mini-rv { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 6px; font-size: .82rem; }
.mini-rv > div:first-child { display: flex; justify-content: space-between; }
.mini-rv > div:first-child span { font-size: .7rem; color: var(--muted); background: var(--info-soft); border-radius: 99px; padding: 0 .45rem; }
.mini-rv .f { border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 8px; color: var(--muted); font-size: .78rem; }
.mini-rv .f.guess { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--ink); }
.mini-q { font-size: .78rem; background: var(--sunk); border-radius: 6px; padding: 6px 8px; color: var(--ink-2); }
.mini-q b { color: var(--brand); margin-right: .2rem; }
.art-adapt { background: var(--sunk); }
.mini-toast { background: var(--ink); color: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: .82rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .4); }
.mini-toast ul { margin: .35rem 0 0; padding-left: 1.05rem; }

/* ai */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-left: 244px; }
.ai-card { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); padding: 22px; color: var(--ink-2); font-size: .95rem; }
.ai-card h3 { color: var(--ink); }
.tag-k { font-family: var(--mono); font-size: .7rem !important; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); margin-bottom: .7rem !important; }
.formula { font-family: var(--serif); font-size: 1.45rem; display: flex; align-items: center; gap: .35rem; margin: .5rem 0 .6rem; color: var(--ink); flex-wrap: wrap; }
.formula > span:first-child { font-style: italic; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-size: 1.05rem; line-height: 1.3; }
.frac > span:first-child { border-bottom: 1px solid var(--ink); padding: 0 .3rem; }
.formula sub { font-size: .65em; }
#pvLearn b { color: var(--ink); }
.callout { margin: 20px 0 0 244px; border-radius: 12px; background: var(--ink); color: var(--bg); padding: 28px 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: center; }
.callout .display { font-size: 1.9rem; line-height: 1.1; margin: 0; }
.callout p:last-child { margin: 0; color: color-mix(in srgb, var(--bg) 78%, transparent); }
.engines { margin: 20px 0 0 244px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--card); }
.eg-row { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1.5fr; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: .9rem; align-items: center; }
.eg-head { border-top: 0; background: var(--sunk); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 20px; }
.eg-row small { display: block; font-family: var(--mono); font-size: .7rem; color: var(--muted); }

/* testing */
.quote { background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: .05rem .35rem; font-size: .86em; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 0 244px; }
.ba { border-radius: 12px; padding: 22px; border: 1px solid var(--line-2); background: var(--card); }
.ba ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.ba li { padding: .6rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.ba li:first-child { border-top: 0; padding-top: 0; }
.ba em { display: block; font-style: normal; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.ba-bad s { text-decoration-color: var(--err); text-decoration-thickness: 1.5px; color: var(--ink-2); }
.ba-bad .tag-k { color: var(--err); }
.ba-good { border-color: color-mix(in srgb, var(--ok) 40%, var(--line-2)); }
.ba-good .tag-k { color: var(--ok); }
.lesson { margin: 18px 0 0 244px !important; max-width: 52rem; }
.lesson a { color: var(--ink); font-weight: 500; }

/* responsible */
.resp { display: grid; grid-template-columns: repeat(3, 1fr); margin-left: 244px; border-top: 1px solid var(--line); }
.resp article { padding: 22px 24px 18px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
.resp article:not(:nth-child(3n + 1)) { padding-left: 24px; border-left: 1px solid var(--line); }

/* final + footer */
.final { text-align: center; padding-top: 128px; padding-bottom: 96px; }
.final h2 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; margin: 0 0 1rem; text-transform: none; color: var(--ink); letter-spacing: -.02em; font-weight: 400; }
.final p { color: var(--ink-2); font-size: 1.1rem; max-width: 36rem; margin: 0 auto 1.8rem !important; }
.foot { display: flex; gap: 28px; align-items: flex-start; border-top: 1px solid var(--line-2); padding-top: 28px; padding-bottom: 48px; }
.foot .brand span { font-size: 1.3rem; }
.foot p { margin: 0; max-width: 46rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .sect-head { grid-template-columns: 1fr; gap: 14px; }
  .num { max-width: 220px; }
  .cols3, .steps, .ai-grid, .callout, .engines, .before-after, .resp, .lede, .lesson { margin-left: 0 !important; }
  .lead { margin-left: 0 !important; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 48px; gap: 40px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .cols3, .steps, .ai-grid, .resp { grid-template-columns: 1fr; }
  .cols3 article + article, .resp article:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .cols3 article { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .callout, .before-after { grid-template-columns: 1fr; }
  .eg-row { grid-template-columns: 1fr 1fr; }
  .eg-head { display: none; }
  .sect { padding-top: 80px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hnav .nav-link { display: none; }
  .pv-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-day:nth-child(n + 4) { display: none; }
  .strip { grid-template-columns: 1fr; }
  .strip > div { padding-left: 0 !important; border-left: 0 !important; border-top: 1px solid var(--line); }
  .strip > div:first-child { border-top: 0; }
  .foot { flex-direction: column; gap: 12px; }
  .callout { padding: 22px; }
}
.hero > * { min-width: 0; }
@media (max-width: 560px) { #pvRange { display: none; } .hero h1 { font-size: 3.1rem; } }

/* navigation: active section, mobile menu, footer links */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:root[data-motion="off"] { scroll-behavior: auto; }
.hlinks a[aria-current="true"] { color: var(--ink); background: var(--card); box-shadow: inset 0 -2px 0 var(--brand); }
.menu-btn { display: none; }
.menu-panel { position: fixed; top: 53px; left: 0; right: 0; z-index: 9; background: var(--card); border-bottom: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px rgba(0,0,0,.25); padding: 10px 16px 16px; display: flex; flex-direction: column; }
.menu-panel[hidden] { display: none; }
.menu-panel a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 1rem; }
.menu-panel a:last-child { border-bottom: 0; }
.menu-sep { height: 8px; }
@media (max-width: 980px) { .menu-btn { display: inline-grid; } }
@media (max-width: 560px) { .hnav .btn.primary.small { display: none; } }
.steps .link-row { margin-top: .2rem; }
.foot { flex-wrap: wrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; order: 3; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
