/* PermitLogic homepage, v5 (Nov 1, 2026). Sits on top of v4.css and uses its tokens.
   The one loud thing is the price check in the hero: the suggested number works itself out once on load.
   Everything else stays quiet: Archivo set wide for headings, normal width for reading, yellow only on the
   main button and the suggestion. Chapters are left aligned with the heading in its own column. */

.v5 { --x-wide: 125%; --x-band: clamp(72px, 10vw, 136px); }
.v5 h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 780; font-stretch: var(--x-wide); letter-spacing: -.028em; line-height: 1.04; max-width: 16ch; }
.v5 .x-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* App Store button: Apple's black badge shape, drawn in CSS */
.x-store { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 18px 0 14px; border-radius: 11px; background: #000; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; line-height: 1; letter-spacing: -.01em; }
.x-store span { display: grid; gap: 2px; }
.x-store small { font-size: 10.5px; font-weight: 500; letter-spacing: .01em; opacity: .9; }
.x-store:hover { background: #222; }
.x-store-lg { height: 56px; font-size: 21px; padding: 0 22px 0 16px; margin-top: 8px; }
.x-store-lg small { font-size: 12px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.x-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); background: linear-gradient(180deg, var(--paper) 0%, var(--white) 78%); border-bottom: 1px solid var(--line); }
.x-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.x-hero h1 { font-size: clamp(40px, 5.2vw, 74px); font-weight: 800; font-stretch: var(--x-wide); letter-spacing: -.034em; line-height: .98; max-width: 14ch; }
.x-lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--body); max-width: 34em; margin: 26px 0 30px; }
.x-meta { margin: 16px 0 0; font-size: 14px; color: var(--soft); }

/* The price check: an estimate with the check laid over its corner */
.x-check { display: grid; margin: 0; }
.x-check > .x-est, .x-check > .x-panel { grid-area: 1 / 1; }
.x-est { align-self: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px 26px; width: 78%; }
.x-est-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 2px solid var(--ink); font-weight: 700; color: var(--ink); font-stretch: 108%; }
.x-est-who { font-weight: 500; font-size: 14px; color: var(--soft); font-stretch: 100%; }
.x-lines { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14.5px; }
.x-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.x-lines li span:last-child { color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-panel { justify-self: end; align-self: start; margin-top: 150px; width: min(340px, 64%); background: var(--night); color: var(--on-night); border-radius: var(--r-lg); padding: 20px 20px 18px; box-shadow: 0 30px 60px -24px rgba(23, 27, 34, .55); }
.x-panel-h { margin: 0 0 4px; font-weight: 700; color: #fff; font-stretch: 112%; }
.x-sim { margin: 0 0 12px; font-size: 13.5px; color: var(--on-night-soft); }
.x-facts { margin: 0; font-size: 13.5px; }
.x-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.x-facts dt { color: var(--on-night-soft); }
.x-facts dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-suggest { margin-top: 12px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--sun); color: var(--sun-ink); }
.x-suggest > span { display: block; font-size: 13px; font-weight: 600; }
.x-num { font-size: 46px; line-height: 1; font-weight: 800; font-stretch: var(--x-wide); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.x-suggest em { font-style: normal; font-weight: 600; margin-left: 6px; }
.x-suggest p { margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.x-warn { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--on-night); padding-left: 14px; border-left: 2px solid var(--sun); }
.x-check figcaption { margin-top: 16px; font-size: 13px; color: var(--soft); max-width: 30em; }

/* The one orchestrated moment: lines land, the panel slides in, the number counts up. */
@media (prefers-reduced-motion: no-preference) {
  .js .x-check .x-lines li { opacity: 0; transform: translateY(6px); animation: x-in .45s cubic-bezier(.2, .7, .2, 1) forwards; }
  .js .x-check .x-lines li:nth-child(1) { animation-delay: .15s; } .js .x-check .x-lines li:nth-child(2) { animation-delay: .25s; }
  .js .x-check .x-lines li:nth-child(3) { animation-delay: .35s; } .js .x-check .x-lines li:nth-child(4) { animation-delay: .45s; }
  .js .x-check .x-lines li:nth-child(5) { animation-delay: .55s; } .js .x-check .x-lines li:nth-child(6) { animation-delay: .65s; }
  .js .x-check .x-panel { opacity: 0; transform: translate(16px, 10px); animation: x-in .6s cubic-bezier(.2, .7, .2, 1) .8s forwards; }
  .js .x-check .x-warn { opacity: 0; animation: x-in .5s ease 2.2s forwards; }
}
@keyframes x-in { to { opacity: 1; transform: none; } }

/* ── Trades ───────────────────────────────────────────────────────── */
.x-trades { padding: var(--x-band) 0 calc(var(--x-band) * .8); }
.x-trades h2 { max-width: 18ch; }
.x-trades > .wrap > p { max-width: 38em; margin: 18px 0 30px; font-size: 18px; }
.x-trade-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; max-width: 980px; }
.x-trade-list li { padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 15px; background: var(--white); }

/* ── Chapters: heading column + body column ──────────────────────── */
.x-ch { padding: var(--x-band) 0; border-top: 1px solid var(--line); }
.x-ch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.x-ch-head p { font-size: 18px; margin: 20px 0 0; max-width: 28em; }
.x-ch-head-wide { margin-bottom: clamp(32px, 4vw, 56px); }
.x-ch-head-wide h2 { max-width: 20ch; }
@media (min-width: 961px) { .x-ch-grid .x-ch-head { position: sticky; top: 112px; } }

.x-points { margin: 0; display: grid; gap: 0; }
.x-points > div { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; }
.x-points > div:last-child { border-bottom: 1px solid var(--line); }
.x-points dt { font-weight: 700; color: var(--ink); font-size: 18px; line-height: 1.3; font-stretch: 106%; }
.x-points dd { margin: 0; }
.x-points-tight > div { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
.x-points-tight dt { font-size: 16.5px; }
.x-ch-body > .tlink { display: inline-block; margin-top: 22px; }

/* Night chapter: business numbers */
.x-night { background: var(--night); border-top: 0; color: var(--on-night-soft); }
.x-night h2 { color: #fff; }
.x-night .x-ch-head p { color: var(--on-night-soft); }
.x-pl { background: var(--night-2); border-radius: var(--r-lg); padding: 26px 24px 18px; }
.x-pl-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 2vw, 22px); height: 220px; align-items: end; }
.x-pl-bars > div { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.x-pl-bars > div::before { content: ''; display: block; height: calc(var(--s) * 82%); border-radius: 6px 6px 0 0; background: rgba(233, 236, 242, .16); }
.x-pl-bars > div::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 26px; height: calc(var(--n) * 82%); border-radius: 4px 4px 0 0; background: var(--sun); }
.x-pl-bars span { display: block; text-align: center; font-size: 12.5px; margin-top: 8px; color: var(--on-night-soft); height: 18px; }
.x-pl-key { margin: 14px 0 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.x-pl-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.x-pl-key .k-s { background: rgba(233, 236, 242, .3); } .x-pl-key .k-n { background: var(--sun); margin-left: 14px; }
.x-stats { margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.x-stats > div { padding: 18px 18px 18px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.x-stats > div + div { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .12); }
.x-stats dt { font-size: 13.5px; }
.x-stats dd { margin: 4px 0 0; color: #fff; font-weight: 700; font-size: 19px; font-stretch: 108%; font-variant-numeric: tabular-nums; }
.x-stats dd.x-sub { font-weight: 400; font-size: 13.5px; color: var(--on-night-soft); font-stretch: 100%; margin-top: 2px; }
.x-ask { margin: 22px 0 0; display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #fff; font-size: 15px; }
.x-ask span { padding: 4px 10px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 700; font-size: 13px; }

/* Run the job: a list that switches the screenshot */
.x-run { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.x-run-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.x-run-list button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; width: 100%; padding: 18px 16px 18px 18px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.x-run-list b { color: var(--ink); font-size: 17.5px; font-stretch: 106%; }
.x-run-list span { font-size: 15px; color: var(--soft); }
.x-run-list button[aria-selected="true"] { border-left-color: var(--sun); background: var(--paper); }
.x-run-list button:hover b { text-decoration: underline; text-underline-offset: 3px; }
.x-run-list button:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
.x-run-shot { border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); background: var(--paper); aspect-ratio: 16 / 10; }
.x-run-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* Your brand */
.x-paper { background: var(--paper); }
.x-brand { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.x-brand-doc { transform: rotate(-1.5deg); }
.x-brand-doc img { width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(23, 27, 34, .08), 0 40px 70px -30px rgba(23, 27, 34, .35); }
.x-brand-copy > p { font-size: 18px; margin: 20px 0 22px; max-width: 30em; }

/* The app */
.x-app { padding: var(--x-band) 0; border-top: 1px solid var(--line); }
.x-app-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.x-app-grid > div > p { font-size: 18px; margin: 20px 0 24px; max-width: 30em; }
.x-app-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.x-app-list li { padding: 16px 0 16px 30px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; position: relative; }
.x-app-list li::before { content: ''; position: absolute; left: 2px; top: 22px; width: 14px; height: 8px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }

/* Plans */
.x-price { padding: var(--x-band) 0; border-top: 1px solid var(--line); background: var(--paper); }
.x-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.x-plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 30px 32px; display: flex; flex-direction: column; }
.x-plan h3 { font-size: 22px; font-stretch: 110%; }
.x-amt { margin: 14px 0 0; color: var(--ink); }
.x-amt b { font-size: 52px; font-weight: 800; font-stretch: var(--x-wide); letter-spacing: -.03em; line-height: 1; margin-right: 6px; }
.x-alt { margin: 4px 0 16px; font-size: 14px; color: var(--soft); }
.x-plan > p:not(.x-amt):not(.x-alt) { flex: 1; }
.x-plan .btn { align-self: flex-start; margin-top: 8px; }
.x-fine { margin: 24px 0 0; font-size: 15px; color: var(--soft); }

/* Closing */
.x-end { padding: var(--x-band) 0; background: var(--night); }
.x-end h2 { color: #fff; max-width: 18ch; margin-bottom: 30px; }
.x-end .x-meta { color: var(--on-night-soft); }
.x-end .x-store { background: #fff; color: #000; }
.x-end .x-store:hover { background: #eee; }

/* ── Smaller screens ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .x-plans { grid-template-columns: 1fr; max-width: 560px; }
  .x-hero-grid, .x-ch-grid, .x-run, .x-brand, .x-app-grid { grid-template-columns: 1fr; }
  .x-points > div { grid-template-columns: 1fr; gap: 6px; }
  .x-run-list { display: flex; overflow-x: auto; border-top: 0; gap: 8px; padding-bottom: 6px; scrollbar-width: none; }
  .x-run-list li { flex: none; }
  .x-run-list button { border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; }
  .x-run-list button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); }
  .x-run-list button[aria-selected="true"] b { color: #fff; }
  .x-run-list span { display: none; }
  .x-brand-doc { transform: none; max-width: 560px; }
}
@media (max-width: 640px) {
  .x-est { width: 100%; padding: 18px 18px 22px; }
  .x-check > .x-panel { grid-area: 2 / 1; width: auto; margin: -28px 12px 0; justify-self: stretch; }
  .x-stats { grid-template-columns: 1fr; }
  .x-stats > div + div { padding-left: 0; border-left: 0; }
  .x-plans { grid-template-columns: 1fr; }
  .x-pl-bars { height: 170px; }
}

/* Duo section intro line (v4 styles the rest) */
.fold-intro { margin: 14px 0 0; max-width: 30em; font-size: 17px; }
