/* TTF developer landing (/developers/): hero, alerts, the first call, the data list, the period switch, the plan cards, the
   suggestions, the limits table, ways to pay, steps and docs links. Two looks like the dashboard (terminal by default,
   shared/dev-term.css; classic, shared/studio.css): colours, fonts and corners come from the look's tokens, never from here.
   On this public page both looks use sentence case, labels of 12 px or more and 44 px targets on touch screens.
   The period switch and the code-language switch are real radio inputs: without JavaScript the :has rules below still show
   the picked one, and pricing.js mirrors the choice on [data-months] / [data-lang-pick] for browsers without :has. A :has rule
   stands alone (a browser that does not know a selector drops its whole list). No inline styles anywhere. */

/* ------------------------------------------------------------------------------------------- readable, tappable controls */
body[data-page="dev-home"] .btn,
body[data-page="dev-home"] .t-btn { text-transform: none; letter-spacing: 0; }
body[data-page="dev-home"] .btn { min-height: 44px; padding: 8px 16px; font-size: 14px; }
body[data-page="dev-home"] .t-btn { font: 600 12.5px/1.2 var(--font); }
body[data-page="dev-home"] .t-ph h2 { font-size: 16px; font-weight: 650; line-height: 1.3; text-transform: none; letter-spacing: 0; }
body[data-page="dev-home"] .t-ph .meta { font-size: 12.5px; text-transform: none; letter-spacing: 0; }
body[data-page="dev-home"] .t-tbl th { font-size: 12.5px; text-transform: none; letter-spacing: 0; }
body[data-page="dev-home"] .crumb { font-size: 12.5px; text-transform: none; letter-spacing: 0; }
body[data-page="dev-home"] .foot { font-size: 12.5px; }
body[data-page="dev-home"] .mono { font-size: max(12px, .92em); }
body[data-page="dev-home"] .topbar .d-who { font-size: 12px; }
.t-page > * + * { margin-top: 20px; }
.t-page h3 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; }

/* ------------------------------------------------------------------------------------------------------------------ hero */
.l-hero { padding: 32px 0 4px; }
.l-hero h1 { max-width: 21ch; margin: 0 0 14px; font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
.l-hero-lead { max-width: 62ch; margin: 0 0 20px; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.l-quick { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; }
#app.t-page .l-hero > .d-banner { margin: 20px 0 0; }

/* ------------------------------------------------------------------------------------------- alert kinds, data, "mine" */
.l-kinds,
.l-data,
.l-picks { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border-bottom: 1px solid var(--line); }
.l-kinds li,
.l-data li,
.l-picks li { min-width: 0; background: var(--surface); }
.l-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.l-kinds li { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.l-kinds p { flex: 1 1 auto; font-size: 14px; color: var(--text-2); }
.l-inc { align-self: flex-start; padding: 1px 8px; font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); white-space: nowrap; }
.l-inc.free { color: var(--pass); background: var(--pass-soft); border-color: var(--pass-line); }
.l-data { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom-color: var(--line); }
.l-data li { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "n n n c" "i h . c"; align-items: center;
  align-content: center; gap: 6px 10px; padding: 12px 20px; }
.l-n { grid-area: n; font-weight: 600; }
.l-data .l-inc { grid-area: i; justify-self: start; }
.l-ch { grid-area: h; font-size: 12.5px; color: var(--muted); }
.l-c { grid-area: c; align-self: center; white-space: nowrap; font-size: 13.5px; }

/* ---------------------------------------------------------------------------------------------------------- first call */
.l-req { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 16px 20px 0; }
.l-verb { padding: 0 8px; font: 700 12px/1.8 var(--mono); color: var(--pass); background: var(--pass-soft); border: 1px solid var(--pass-line);
  border-radius: var(--r-ctl); }
.l-req code { min-width: 0; overflow-wrap: anywhere; }
.l-req-cost { padding: 8px 20px 0; font-size: 13.5px; color: var(--muted); }
.l-lang { display: inline-flex; gap: 2px; min-width: 0; margin: 12px 20px 0; padding: 4px; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--r-pill); }
.l-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px 20px 20px; }
.l-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.l-col h3 { color: var(--muted); font-size: 13px; }
.l-col .l-code { flex: 1 1 auto; margin: 0; padding: 14px; overflow: auto; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.l-col .d-actions .d-hint { flex: 1 1 180px; }
.l-call pre[data-lang] { display: none; }
.l-call[data-lang-pick="curl"] [data-lang="curl"],
.l-call[data-lang-pick="py"] [data-lang="py"],
.l-call[data-lang-pick="js"] [data-lang="js"] { display: block; }
.l-call:has(#lang-curl:checked) [data-lang] { display: none; }
.l-call:has(#lang-curl:checked) [data-lang="curl"] { display: block; }
.l-call:has(#lang-py:checked) [data-lang] { display: none; }
.l-call:has(#lang-py:checked) [data-lang="py"] { display: block; }
.l-call:has(#lang-js:checked) [data-lang] { display: none; }
.l-call:has(#lang-js:checked) [data-lang="js"] { display: block; }
.l-status { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; font-size: 13.5px; background: var(--pass-soft); border: 1px solid var(--pass-line);
  border-radius: var(--r-ctl); }
.l-status b { color: var(--pass); }

/* period switch (and the language switch): segmented controls made of real radio inputs */
.d-period { display: inline-flex; gap: 2px; min-width: 0; margin: 16px 20px 0; padding: 4px; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--r-pill); }
.d-seg { position: relative; display: block; }
.d-seg[hidden] { display: none; }
.d-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.d-seg span { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; min-height: 36px; padding: 4px 16px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text-2); text-align: center; }
.d-seg small { font-size: 12px; font-weight: 600; color: var(--pass); }
.d-seg small:empty { display: none; }
.d-seg:hover span { color: var(--text); }
.d-seg input:checked + span { background: var(--text); color: var(--surface); }
.d-seg input:checked + span small { color: var(--surface); }
.d-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.d-pricing [data-m] { display: none; }
.d-pricing[data-months="1"] [data-m="1"],
.d-pricing[data-months="3"] [data-m="3"],
.d-pricing[data-months="12"] [data-m="12"] { display: flex; }
.d-pricing:has(#per-1:checked) [data-m] { display: none; }
.d-pricing:has(#per-1:checked) [data-m="1"] { display: flex; }
.d-pricing:has(#per-3:checked) [data-m] { display: none; }
.d-pricing:has(#per-3:checked) [data-m="3"] { display: flex; }
.d-pricing:has(#per-12:checked) [data-m] { display: none; }
.d-pricing:has(#per-12:checked) [data-m="12"] { display: flex; }

/* ---------------------------------------------------------------------------------------------------------- plan cards */
.d-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.d-plan { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px 16px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card); scroll-margin-top: 72px; }
.d-plan.hot { border-color: var(--accent); }
.d-plan:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-plan h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.l-sugg { align-self: flex-start; margin: 0; padding: 1px 8px; font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--pass);
  background: var(--pass-soft); border: 1px solid var(--pass-line); border-radius: var(--r-pill); }
.d-pp { display: flex; flex-direction: column; gap: 4px; }
.d-plan .p { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-plan .d-per { min-height: 2.9em; font-size: 13px; line-height: 1.45; color: var(--muted); }
.d-plan .d-save { min-height: 1.5em; font-size: 13px; line-height: 1.45; font-weight: 650; color: var(--pass); }
.d-plan .d-offer { align-self: flex-start; padding: 2px 10px; font-size: 13px; font-weight: 600; color: var(--pass); background: var(--pass-soft);
  border-radius: var(--r-pill); }
.d-plan ul { flex: 1 1 auto; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.d-plan li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line-strong); }
.d-plan li b { font: 600 13px/1.4 var(--mono); color: var(--text); text-align: right; }
.d-cta .btn { width: 100%; justify-content: center; }
.d-tag { display: inline-flex; align-items: center; padding: 1px 9px; font-size: 12px; font-weight: 650; line-height: 1.6; border-radius: var(--r-pill);
  color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); }
.d-tag.mine { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* ------------------------------------------------------------------------------------------------- which one is mine */
.l-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; }
.l-picks li[hidden] { display: none; }
.l-picks a { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 44px; padding: 16px 20px; color: var(--text); }
.l-picks a:hover { background: var(--surface-2); text-decoration: none; }
.l-picks span { font-size: 13.5px; color: var(--text-2); }
.l-picks .l-figs { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.l-picks .l-pick-p { margin-top: auto; font-weight: 650; color: var(--accent); }
.l-picks .l-pick-p::after { content: " \2192"; }

/* ------------------------------------------------------------------------------------------------ limits side by side */
.l-all { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.l-all summary { display: flex; align-items: center; min-height: 48px; padding: 0 20px; font-weight: 650; }
.l-all summary::before { flex: none; margin-right: 12px; }
.l-all[open] summary { border-bottom: 1px solid var(--line); }
.d-scroll { margin: 16px 20px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
.d-compare th[scope="row"] { font-size: 13.5px; font-weight: 500; color: var(--text-2); background: var(--surface); border-bottom: 1px solid var(--line); }
.d-compare th small { display: block; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.d-compare td { font-size: 13.5px; color: var(--text); }
.d-compare .l-grp th { font-weight: 650; color: var(--text); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.d-compare tbody tr:hover th { background: var(--surface-3); }
.d-compare tbody:last-of-type tr:last-child th { border-bottom: 0; }

/* -------------------------------------------------------------------------------------------------------- ways to pay */
.l-pay-intro { padding: 16px 20px 0; }
.l-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 20px 0; list-style: none; }
.l-methods li { padding: 6px 12px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); }

/* how it works: numbered step cards */
.d-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 16px 20px 20px; list-style: none;
  counter-reset: d-step; }
.d-steps li { position: relative; padding: 50px 16px 16px; font-size: 14px; line-height: 1.55; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-card); counter-increment: d-step; }
.d-steps li::before { content: counter(d-step); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font: 700 13px/1 var(--mono); }

/* docs links */
.l-links { margin: 0; padding: 6px 0; list-style: none; }
.l-links a { display: flex; align-items: center; min-height: 44px; padding: 0 20px; font-weight: 600; }

@media (max-width: 999px) {
  .d-plans,
  .l-kinds,
  .d-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-cols,
  .l-picks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .l-hero { padding-top: 20px; }
  .l-hero-lead { font-size: 16px; }
  .l-kinds,
  .l-data,
  .d-plans,
  .d-steps { grid-template-columns: minmax(0, 1fr); }
  .d-plans { padding: 16px; }
  .d-period,
  .l-lang { display: flex; margin-left: 16px; margin-right: 16px; }
  .d-seg { flex: 1 1 0; min-width: 0; }
  .d-seg span { flex-direction: column; padding: 4px 6px; }
  .d-plan .d-per { min-height: 0; }
  .l-cols { padding: 16px; }
  .l-req,
  .l-req-cost,
  .l-pay-intro,
  .l-methods,
  .l-kinds li,
  .l-data li,
  .l-picks a,
  .l-links a { padding-left: 16px; padding-right: 16px; }
  .d-scroll { margin: 12px; }
  .d-compare th[scope="row"] { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); min-width: 130px; white-space: normal; }
  /* scrolled sideways, the first column's heading and the group names stay too (no blank bands) */
  .d-compare thead th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line); }
  .d-compare .l-grp th span { position: sticky; left: 10px; display: inline-block; }
  .d-steps { padding: 16px; gap: 10px; }
  .d-steps li { padding: 14px 14px 14px 52px; }
  .d-steps li::before { top: 14px; left: 14px; }
}
@media (max-width: 560px) {
  body[data-page="dev-home"] .topbar .crumb,
  body[data-page="dev-home"] .topbar .d-who { display: none; }
  body[data-page="dev-home"] .topbar .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* narrow phones: the top bar fits from 320 px with the Look button, signed out and signed in. Under 390 px only the Docs link
   leaves the bar (the hero's quickstart link and 'Read the docs' keep the docs one tap away). */
@media (max-width: 420px) {
  body[data-page="dev-home"] .topbar .shell { gap: 6px; padding-left: 10px; padding-right: 10px; }
  body[data-page="dev-home"] .topbar .t-btn { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 389px) {
  body[data-page="dev-home"] .topbar .l-top-docs { display: none; }
}
@media (pointer: coarse) {
  body[data-page="dev-home"] .t-btn { min-height: 44px; min-width: 44px; }
  body[data-page="dev-home"] .brand { min-height: 44px; min-width: 44px; }
  .d-seg span { min-height: 44px; }
}
