/* Home page. Layout: an asymmetric hero (copy left, the live board right), then the tools as one
   large and two smaller articles, the method beside its evidence table, and the limits as a plain
   list. Body text at 16px for reading; the app pages stay denser. */
body.home, .home { font-size: 16px; line-height: 1.6; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.site-bar { gap: 20px; }
.brand { color: inherit; text-decoration: none; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--s2); }
.bar-tools { margin-left: auto; display: flex; gap: 8px; }

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-block: 64px 56px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; margin: 18px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta a, .tool a.primary, .tool a.ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.cta a.ghost, .tool a.ghost { border: 1px solid var(--line); }
.hero-board { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero-board figcaption { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; vertical-align: -1px; }
.sw-h { background: var(--home); } .sw-a { background: var(--away); } .sw-m { background: #9C88FF; }

.sec-title { font-family: var(--display); font-size: clamp(26px, 3vw, 34px); color: var(--text); text-transform: none; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 20px; }
.tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding-block: 40px; align-items: start; }
.tools .sec-title { grid-column: 1 / -1; }
.tool { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.tool h3 { font-family: var(--display); font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.tool p { margin: 0; color: var(--muted); }
.tool-main { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.tool-main h3 { font-size: 28px; }
.tool-main > div { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--shadow); border-bottom: 2px solid var(--shadow); transform: rotate(-45deg); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 15px; }
.steps code { font-family: var(--mono); font-size: 13px; background: var(--s2); padding: 2px 6px; border-radius: 6px; color: var(--text); overflow-wrap: anywhere; }
.steps a { color: var(--text); }

.method { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 48px; }
.method p { color: var(--muted); max-width: 36em; }
.method b { color: var(--text); }
.table-wrap { overflow-x: auto; }
table.valid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.valid caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 10px; caption-side: top; }
table.valid th, table.valid td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); }
table.valid th:first-child, table.valid td:first-child { text-align: left; }
table.valid thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
table.valid tbody td:nth-child(2) { color: var(--ok); font-weight: 600; }
table.valid tbody tr:last-child td { border-bottom: none; }

.limits { padding-block: 24px 56px; }
.limits ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); max-width: 52em; }
.site-foot { border-top: 1px solid var(--line); padding-block: 24px 40px; font-size: 14px; color: var(--muted); }
.site-foot p { margin: 4px 0; }
.site-foot a { color: var(--text); }

@media (max-width: 900px) {
  .hero, .method, .tools { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero { padding-block: 32px; }
  .tool-main { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .site-nav { order: 3; width: 100%; }
  .site-nav a { padding: 8px 10px; }
  .tool { padding: 22px; }
}
.tools > .tool:not(.tool-main) { height: 100%; }
.tool:not(.tool-main) > a { margin-top: auto; }
.own-video { width: 100%; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.own-video summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text); min-height: 32px; display: flex; align-items: center; }
.own-video .steps { margin-top: 10px; }
.tool:not(.tool-main) > a.primary { margin-top: auto; }
