/* The demo server's landing page (landing.html). Colors, type and controls come from style.css; this is the layout. */

.landing { background: var(--bg); }
.landing h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.landing h3 { font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: -0.01em; color: var(--text-strong); }
.landing p { margin: 0; line-height: 1.6; }
.landing code { font-family: var(--mono); font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); color: var(--text-strong); }

/* ---------- top ---------- */
.l-nav {
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
}
.l-nav-inner { max-width: 1160px; height: 64px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.l-links { display: flex; gap: 22px; flex: 1; }
.l-links a { color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.l-links a:hover { color: var(--text-strong); }
.l-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; }
:root[data-theme="dark"] .only-light { display: none; }

/* ---------- hero ---------- */
.l-hero { max-width: 1160px; margin: 0 auto; padding: 72px 24px 24px; text-align: center; }
.l-eyebrow { display: inline-block; margin-bottom: 18px !important; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--accent); background: var(--accent-weak); border: 1px solid var(--accent-border); }
.l-hero h1 { max-width: 820px; margin: 0 auto; font-size: clamp(36px, 5.6vw, 62px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.l-lead { max-width: 680px; margin: 22px auto 0 !important; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
.l-lead strong { color: var(--text-strong); }
.l-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.button.big { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: var(--radius-lg); }
.l-note { margin-top: 14px !important; font-size: 13.5px; color: var(--subtle); }

/* ---------- the hero demo: a small panel and a phone (landing-demo.js) ---------- */
.l-live { max-width: 1080px; margin: 48px auto 0; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); overflow: hidden; }
.l-live-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 11px 16px 11px 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.l-live-title { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--text-strong); }
.l-live-title .small-logo { margin-right: 2px; vertical-align: 0; }
.l-live-langs { display: flex; align-items: center; gap: 8px; }
.l-live-bar select.l-country { min-height: 0; height: 32px; padding: 0 28px 0 10px; font-size: 13px; font-weight: 600; border-radius: 9px; }
.l-live-publish { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#live-publish { min-width: 126px; }

.l-live-body { display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 28px; padding: 16px 24px 24px; align-items: start; }
.l-live-texts { min-width: 0; }
.l-live-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.l-live-table th, .l-live-table td { padding: 8px 6px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--border); }
.l-live-table thead th { padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-live-table thead th.active { color: var(--accent); }
.l-live-table td.active { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.l-key-col { width: 168px; }
.l-main { font-weight: 600; color: var(--subtle); }
.l-progress { margin-left: 2px; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.l-progress.partial { color: var(--warn); }
.l-key { padding-top: 10px !important; }
.l-key-inner { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; }
.l-key .type-icon { width: 24px; height: 24px; border-radius: 6px; }
.l-key-name { font-family: var(--mono); font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--text-strong); overflow-wrap: anywhere; }
.l-key-name small { display: block; margin-top: 2px; font-family: var(--font); font-size: 11.5px; font-weight: 600; color: var(--subtle); }
.l-live-table input:not(.switch) { min-height: 0; height: 32px; padding: 0 9px; font-size: 13.5px; border-radius: var(--radius-sm); }
.l-live-table input.changed { border-color: var(--accent); background: var(--accent-weak); }
/* A value that isn't a text: one for every language. */
.l-live-table td.l-any { vertical-align: middle; }
.l-live-table :is(td.l-any, td.l-rule-cell).changed { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
/* A key's rules, as a small list under it, like the panel's key list: a line from the key's icon to each rule,
   and a dotted line from the rule's condition to its value. */
.l-live-table { --branch: color-mix(in srgb, var(--subtle) 40%, var(--border-strong)); }
.l-live-table tr.has-rules > * { border-bottom-color: transparent; }
.l-live-table .l-rule-row > * { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.l-rule-who { position: relative; padding-left: 38px !important; }
.l-rule-who::before { content: ""; position: absolute; left: 17px; top: -13px; width: 14px; height: calc(50% + 13px); border-left: 1.5px solid var(--branch); border-bottom: 1.5px solid var(--branch); border-bottom-left-radius: 8px; pointer-events: none; }
.l-rule-who-inner { display: flex; align-items: center; min-width: 0; }
.l-rule-who-inner::after { content: ""; flex: 1 1 0; min-width: 6px; margin: 0 -6px 0 6px; border-bottom: 2px dotted var(--branch); }
.l-rule-who .cond[data-kind] { height: 22px; padding: 0 8px; gap: 5px; font-size: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted); }
.l-rule-who .cond .icon { width: 12px; height: 12px; color: var(--t-size); }
.l-hit { display: none; margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.l-live-table .l-rule-row.hit > * { background: var(--accent-weak); }
.l-rule-row.hit .l-hit { display: inline; }
.l-rule-row.hit .l-number { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.l-any-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-height: 32px; }
.l-every { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--subtle); }
.l-switch { font-size: 13px; color: var(--text); }
.l-live-table input.l-number { width: 84px; }
.l-color { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.l-color .swatch-wrap, .l-color .swatch { width: 26px; height: 26px; }
.l-color .swatch { border-radius: 7px; }
.landing .l-hex { padding: 1px 5px; font-size: 11.5px; }
.l-form { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 4px; }
.l-form + .l-form { margin-top: 4px; }
.l-form > span { font-family: var(--mono); font-size: 10.5px; color: var(--subtle); }
.l-form.used > span { color: var(--accent); font-weight: 700; }
.l-form.used input:not(:focus-visible) { box-shadow: inset 3px 0 0 var(--accent); }
.l-cell-warn { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--warn); }
.l-live-try { margin-top: 16px; }
.l-live-hint { font-size: 13.5px; font-weight: 650; color: var(--text-strong); }
.l-live-ideas { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.l-live-ideas li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.l-live-ideas li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.l-phone { justify-self: center; width: 276px; padding: 9px; border-radius: 42px; background: #0B1220; box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg); }
.l-phone-screen { position: relative; display: flex; flex-direction: column; gap: 12px; height: 500px; padding: 10px 16px 16px; overflow: hidden; border-radius: 33px; background: var(--bg); color: var(--text-strong); }
.l-phone-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 76px; height: 22px; margin-left: -38px; border-radius: 12px; background: #0B1220; }
.l-phone-status { display: flex; align-items: center; justify-content: space-between; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.l-phone-top { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; font-size: 16px; }
.l-phone-cart { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }
.l-phone-cart b { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--cta); color: var(--on-cta); font-size: 11px; font-variant-numeric: tabular-nums; }
.l-phone [data-key] { border-radius: 6px; }
.l-phone-title { margin-top: 4px !important; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.l-phone-promo { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--accent-weak); color: var(--accent); font-size: 13px; font-weight: 700; line-height: 1.35; }
.l-phone-promo .icon { flex: none; }
.l-phone-banner { display: grid; place-items: center; height: 108px; border-radius: 16px; background: linear-gradient(135deg, #FB923C 0%, #EC4899 55%, #6366F1 100%); }
.l-phone-cartline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 14.5px; font-weight: 700; }
.l-stepper { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.l-stepper button { width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--text-strong); font-size: 17px; font-weight: 700; }
.l-stepper button:hover { background: var(--hover); }
.l-stepper output { min-width: 20px; text-align: center; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.l-phone-cta { display: grid; place-items: center; min-height: 46px; padding: 4px 12px; border-radius: 14px !important; background: var(--accent); color: var(--accent-text); font-size: 15px; font-weight: 750; line-height: 1.25; text-align: center; transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.l-flash { animation: l-flash 1.6s var(--ease); }
@keyframes l-flash { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cta) 55%, transparent); } to { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .l-flash { animation: none; } }

/* ---------- sections ---------- */
.l-section { max-width: 1160px; margin: 0 auto; padding: 72px 24px 0; }
.l-head { max-width: 720px; margin-bottom: 32px; }
.l-head p { margin-top: 12px; color: var(--muted); font-size: 16.5px; }

.l-problems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 56px; }
.l-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.l-card p { color: var(--muted); font-size: 14.5px; }
.l-card .type-icon { width: 36px; height: 36px; }

/* texts and translations: a band of their own */
.l-band { margin-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--bg)) 0%, var(--bg) 100%); }
.l-band > .l-section { padding-top: 64px; }
.l-lang-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.l-lang-grid > * { min-width: 0; }
.l-lang-grid .l-card { gap: 8px; }
.l-lang-grid p code { white-space: nowrap; }
.l-card .l-sample { align-self: flex-start; margin-top: auto; padding: 5px 10px; border-radius: var(--radius); background: var(--accent-weak); color: var(--accent); font-size: 13.5px; font-weight: 650; }
.l-formats { gap: 5px; margin-top: auto; }
.l-formats .chip { padding: 1px 7px; font-size: 12px; }
.l-lang-grid .l-code { margin-top: auto; font-size: 12px; }
.l-wide { margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.l-wide img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-md); }
.l-wide figcaption { font-size: 13.5px; color: var(--subtle); }

/* not only texts */
.l-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 28px; }
.l-feature { display: flex; gap: 12px; align-items: flex-start; }
.l-feature h3 { margin-bottom: 4px; }
.l-feature p { color: var(--muted); font-size: 14px; }
.l-screens { display: grid; grid-template-columns: 0.75fr 1fr 1fr; gap: 16px; margin-top: 40px; align-items: start; }
.l-screens figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.l-screens img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-md); }
.l-screens figcaption { font-size: 13.5px; color: var(--subtle); }

.l-how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.l-how-grid > *, .l-host-grid > *, .l-try > * { min-width: 0; } /* long code lines scroll inside their block */
.l-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.l-steps li { counter-increment: step; position: relative; padding-left: 46px; color: var(--muted); line-height: 1.6; }
.l-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 14px; color: var(--accent); background: var(--accent-weak); }
.l-steps strong { color: var(--text-strong); }
.l-code { margin: 0; padding: 20px 22px; overflow: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #E2E8F0; background: #0F172A; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.l-code.small { padding: 14px 16px; font-size: 12.5px; }
.l-code code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.l-code .c { color: #64748B; }
.l-code .s { color: #86EFAC; }
.l-code .n { color: #FDBA74; }

/* ---------- try ---------- */
.l-try { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
.l-try-copy > p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }
.l-checks { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.l-checks li { position: relative; padding-left: 30px; color: var(--text); }
.l-checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-weak); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.l-checks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 9px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.l-try-box { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.l-signup .field { margin: 14px 0; }
.l-signup > p.small, .l-signed-in > p { margin-top: 12px; }
.l-signup a, .l-note a { color: var(--accent); font-weight: 600; }
.l-signup a:hover, .l-note a:hover { text-decoration: underline; }
.l-signed-in { display: flex; flex-direction: column; gap: 10px; }
.l-turnstile { margin: 6px 0 12px; min-height: 65px; }

/* ---------- host ---------- */
.l-host-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.l-host-grid .button { align-self: flex-start; }
.l-host-grid .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.l-host > .l-note { margin-top: 18px !important; }

/* ---------- bottom ---------- */
.l-footer { margin-top: 88px; border-top: 1px solid var(--border); background: var(--surface); }
.l-footer-inner { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; font-weight: 650; color: var(--text-strong); }
.l-footer-inner .muted { max-width: 560px; font-weight: 500; }
.small-logo { width: 24px; height: 24px; font-size: 10px; margin-right: 6px; vertical-align: -6px; }

@media (max-width: 1080px) {
  .l-lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .l-problems, .l-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-screens { grid-template-columns: 1fr 1fr; }
  .l-screens figure:first-child { grid-row: span 2; }
  .l-try, .l-how-grid, .l-host-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  /* The demo shows the phone's language only. */
  .l-live-table :is(th, td)[data-lang]:not(.active) { display: none; }
  .l-key-col { width: 156px; }
}
@media (max-width: 680px) {
  .l-live { margin-top: 36px; }
  .l-live-bar { padding: 11px 14px; }
  .l-live-langs { order: 3; width: 100%; flex-wrap: wrap; }
  .l-live-langs .segmented { flex: 1 1 220px; flex-wrap: nowrap; }
  .l-live-langs .segmented button { flex: 1; }
  .l-live-bar select.l-country { flex: 1 1 100%; }
  .l-live-body { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 12px 14px 20px; }
  .l-key-col { width: 146px; }
  .l-key-name { font-size: 11px; }
  .l-every { display: none; }
}
@media (max-width: 640px) {
  .l-links { display: none; }
  .l-nav-inner { gap: 12px; padding: 0 16px; }
  .l-nav-actions #sign-in { display: none; }
  .l-hero { padding: 44px 16px 16px; }
  .l-section { padding: 56px 16px 0; }
  .l-problems, .l-lang-grid, .l-features, .l-screens { grid-template-columns: 1fr; }
  .l-band { margin-top: 56px; padding-bottom: 56px; }
  .l-band > .l-section { padding-top: 48px; }
  .l-screens figure:first-child { grid-row: auto; }
  .l-try-box { padding: 20px; }
}
