:root {
  --bg: #0a0a0f;
  --bg-soft: #111118;
  --card: #15151f;
  --line: #232331;
  --text: #f4f4f8;
  --muted: #9a9ab0;
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --yellow: #ffd60a;
  --radius: 18px;
  --max: 980px;
  --prose: 540px;      /* centered body paragraphs */
  --caption: 260px;    /* tight meta line under a button */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 700px at 50% -220px, rgba(139,92,246,0.12), transparent 70%),
    linear-gradient(180deg, #0c0c15 0%, #08080d 100%);
  background-color: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.logo-slash { margin: 0 -0.04em; }

/* ---------- sparkle helpers ---------- */
.price-star, .brand-star, .cap-star, .star { fill: currentColor; }
.cap-star { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
.cap-star.awake { color: var(--yellow); filter: drop-shadow(0 0 4px rgba(255,214,10,0.6)); }
.cap-star.sleep { color: #8a8a9c; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto;
  padding: 18px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-star { width: 16px; height: 16px; color: var(--yellow); }
.nav-buy {
  font-weight: 600; font-size: 14px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 14px; corner-shape: squircle; --corner-shape: squircle;
  transition: border-color .2s ease, background .2s ease;
}
.nav-buy:hover { border-color: var(--violet); background: rgba(139,92,246,0.12); }

/* ---------- layout ---------- */
section { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding-top: 64px; padding-bottom: 96px; }
.glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 620px; max-width: 120vw;
  background: radial-gradient(circle at 50% 35%, rgba(139,92,246,0.45), rgba(59,130,246,0.22) 38%, transparent 68%);
  filter: blur(20px); z-index: -1; pointer-events: none;
}
.hero-icon {
  width: 160px; height: 160px; border-radius: 42px; corner-shape: squircle; --corner-shape: squircle;
  box-shadow: 0 24px 70px rgba(91,61,212,0.45);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-10px) } }
.eyebrow {
  margin-top: 30px; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
h1 {
  margin-top: 32px; font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 700;
}
h1 em { color: transparent; background: linear-gradient(100deg, var(--violet), var(--blue)); -webkit-background-clip: text; background-clip: text; }
.lede { max-width: var(--prose); margin: 24px auto 0; font-size: 18px; color: var(--muted); text-wrap: balance; }
.cta-row { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.trust { font-size: 13px; color: var(--muted); max-width: var(--caption); text-align: center; line-height: 1.5; text-wrap: balance; }

/* ---------- buttons (flat, minimal) ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 11px 22px; border-radius: 16px; corner-shape: squircle; --corner-shape: squircle; cursor: pointer;
  transition: filter .2s ease, background .2s ease, border-color .2s ease, transform .1s ease;
}
.btn-primary { color: #fff; background: var(--violet); font-size: 16px; padding: 14px 30px; }
.btn-primary:hover { filter: brightness(1.09); }
.btn-primary:active { transform: scale(0.98); }
.btn-star { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; margin-inline-end: 8px; }
.btn-lg { font-size: 16px; padding: 13px 28px; }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid var(--line); }
/* Pre-launch badge (LIDWORK_APP_STORE_LIVE=0): the stage turns each App Store link into a span. */
.btn-soon, .btn-soon:hover, .btn-soon:active { cursor: default; filter: none; transform: none; }
.btn-primary.btn-soon { color: var(--text); background: transparent; border: 1px solid var(--line); padding: 13px 29px; }
.ghost-link.btn-soon:hover { color: var(--muted); }
.btn-ghost:hover { border-color: var(--muted); background: rgba(255,255,255,0.04); }
.btn-ghost:active { transform: scale(0.98); }
.gh-mark { width: 16px; height: 16px; fill: currentColor; vertical-align: -3px; margin-inline-end: 8px; }
.price-card .btn-gh { margin-top: 30px; }

/* ---------- showcase: menu bar + dropdown ---------- */
.showcase { padding-top: 4px; padding-bottom: 72px; }
.screen {
  position: relative; max-width: 760px; height: 410px; margin: 0 auto;
}
.menubar {
  position: absolute; top: 0; left: 0; right: 0; height: 30px;
  display: flex; align-items: center; justify-content: flex-end; gap: 15px;
  padding: 0 28px; color: #dadae4;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.09);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 97%, transparent 100%);
}
.mb-glyph { height: 13px; width: auto; fill: currentColor; opacity: 0.85; }
.mb-highlight { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 6px; corner-shape: squircle; --corner-shape: squircle; background: rgba(255,255,255,0.18); }
.mb-star { width: 15px; height: 15px; color: var(--yellow); filter: drop-shadow(0 0 5px rgba(255,214,10,0.7)); }
.mb-clock { font-size: 12.5px; color: #dadae4; }
.menu {
  position: absolute; top: 38px; right: 104px; width: 270px;
  background: rgba(32,32,40,0.72); backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; corner-shape: squircle; --corner-shape: squircle;
  padding: 5px; box-shadow: 0 24px 56px rgba(0,0,0,0.55); font-size: 13px;
}
.mi { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 6px; corner-shape: squircle; --corner-shape: squircle; color: #f1f1f6; }
.mi-check { width: 13px; text-align: center; font-size: 12px; flex: none; }
.mi-label { flex: 1; white-space: nowrap; }
.mi-kbd { color: #a2a2b2; font-size: 12px; }
.mi-warn .mi-label { color: #f0b73a; font-size: 12px; }
.mi-sep { height: 1px; margin: 5px 9px; background: rgba(255,255,255,0.1); }
.showcase-cap { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }

/* ---------- highlights + use-case bites (no boxes, just emoji) ---------- */
.bites {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding-top: 24px; padding-bottom: 44px; text-align: start;
}
.bite { padding: 8px 6px; }
.bite .emoji { font-size: 30px; line-height: 1; display: block; margin-bottom: 12px; }
.bite h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 6px; color: #c6c6d2; }
.bite h4 { font-size: 16px; letter-spacing: -0.01em; margin-bottom: 6px; color: #c6c6d2; }
.bite p { font-size: 15px; color: var(--muted); }
.bite.sm .emoji { font-size: 26px; margin-bottom: 10px; }
.bite.sm p { font-size: 14px; }

/* ---------- use cases ---------- */
.usecases { padding-top: 56px; padding-bottom: 56px; text-align: center; }
.usecases h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.usecases-sub { color: var(--muted); margin: 10px auto 40px; max-width: var(--prose); }
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: start; }
@media (max-width: 760px) { .uc-grid { grid-template-columns: 1fr; } }

/* ---------- how ---------- */
.how { padding-top: 64px; padding-bottom: 64px; }
.how h2, .faq h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin-bottom: 40px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: var(--max); margin: 0 auto; }
.steps li { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.num {
  flex: none; font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  color: transparent; background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text;
}
.steps h4 { font-size: 17px; margin-bottom: 2px; }
.steps p { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- buy ---------- */
.buy { padding-top: 32px; padding-bottom: 80px; }
.price-card {
  position: relative; text-align: center; max-width: 420px; margin: 0 auto;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 30px; corner-shape: squircle; --corner-shape: squircle; padding: 48px 32px;
  box-shadow: 0 30px 80px rgba(91,61,212,0.18);
}
.price-star { width: 0.62em; height: 0.62em; color: var(--yellow); fill: currentColor; flex: none; }
.price { font-size: 80px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; display: flex; align-items: center; justify-content: center; gap: 0.16em; }
.price-sub { color: var(--muted); margin-top: 10px; margin-bottom: 38px; font-size: 13px; }
.price-meta { margin: 18px auto 0; max-width: var(--caption); font-size: 13px; color: var(--muted); line-height: 1.5; text-wrap: balance; }
.price-brew { margin: 22px auto 0; font-size: 13px; color: var(--muted); }
.price-brew code {
  display: block; margin-top: 9px; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; corner-shape: squircle; --corner-shape: squircle;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; color: var(--text); user-select: all;
  overflow-x: auto; white-space: nowrap;
}

/* ---------- faq ---------- */
.faq { padding-top: 32px; padding-bottom: 80px; }
.faq-list { max-width: 680px; margin: 0 auto; display: grid; gap: 12px; }
details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; corner-shape: squircle; --corner-shape: squircle; padding: 4px 20px; transition: border-color .2s ease;
}
details[open] { border-color: #34344a; }
summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 16px;
  padding: 16px 0; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); font-size: 15px; padding-bottom: 18px; }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.brand-sm { font-size: 15px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { transition: color .2s ease; }
.footer-links a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .bites { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .btn-primary:hover { transform: none; }
}

/* ---------- price-card quiet link ---------- */
.price-card .ghost-link { display: inline-block; margin-top: 18px; }
.ghost-link { font-size: 13px; color: var(--muted); transition: color .2s ease; }
.ghost-link:hover { color: var(--text); }

/* ---------- tip bar (quiet, separate, near the bottom) ---------- */

/* showcase menu: dimmed status line (no permanent highlight — native menus rest unselected) */
.mi-dim .mi-label { color: var(--muted); font-size: 12px; }

/* ---------- analytics consent (analytics.js) ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 340px; margin-inline-start: auto;
  /* Apple-style translucent material: blurred, saturated backdrop + hairline edge + top highlight */
  background: rgba(28, 28, 38, 0.58);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px; corner-shape: squircle; --corner-shape: squircle; padding: 16px 16px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  font-size: 13.5px; line-height: 1.45; color: rgba(244, 244, 248, 0.78);
  animation: consent-in .38s cubic-bezier(.2, .9, .25, 1.05) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .consent { background: var(--card); }
}
@keyframes consent-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }
.consent p { margin: 0 2px 12px; }
.consent p a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.consent-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.consent .btn-primary { width: 100%; justify-content: center; font-size: 15px; font-weight: 600; padding: 11px 16px; border-radius: 12px; corner-shape: squircle; --corner-shape: squircle; border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.consent-deny { align-self: center; background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.consent-deny:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* =====================================================================
   Lidwork additions (2026-10). Everything above this line is the
   original Lidless design, kept 1:1. New blocks reuse its tokens.
   ===================================================================== */

/* wordmark: plain text "Lidwork" in Prompt, same as the old Lid/ess mark */
.brand-text { letter-spacing: -0.015em; }
/* Wordmark "l/dwork": the "i" is a closing lid. */
.brand-lid { margin: 0 0.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* keyword line inside the hero H1, styled like the existing .eyebrow */
.hero h1 .eyebrow, .h1-eyebrow {
  display: block; margin: 0 0 18px; font-family: "Inter", system-ui, sans-serif;
  font-size: 12px; line-height: 1.5; letter-spacing: 0.18em; font-weight: 600;
  text-transform: uppercase; color: var(--muted); -webkit-text-fill-color: var(--muted);
}

/* nav: small text links next to the pill button */
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s ease; }
.nav-link:hover { color: var(--text); }
@media (max-width: 420px) { .nav-link.hide-sm { display: none; } .nav { padding: 18px 16px; } section { padding-left: 16px; padding-right: 16px; } }

/* shared section heading (same scale as .usecases h2) */
.sec-h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.sec-sub { color: var(--muted); margin: 10px auto 40px; max-width: var(--prose); text-align: center; text-wrap: balance; }

/* quick answer card */
.quick {
  max-width: 680px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; corner-shape: squircle; --corner-shape: squircle; padding: 18px 22px; font-size: 15px; color: var(--muted);
}
.quick-label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #c6c6d2; margin-bottom: 6px; }
.quick-label svg { width: 12px; height: 12px; color: var(--yellow); fill: currentColor; }
.quick p + p { margin-top: 8px; }
.quick code, .prose code, .cmp code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; corner-shape: squircle; --corner-shape: squircle; padding: 1px 6px; }
.quick-wrap { padding-top: 0; padding-bottom: 56px; }

/* comparison table */
.compare { padding-top: 56px; padding-bottom: 56px; }
.table-wrap {
  max-width: var(--max); margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; corner-shape: squircle; --corner-shape: squircle;
}
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.cmp th, .cmp td { text-align: start; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cmp tbody th { font-weight: 600; color: #c6c6d2; white-space: nowrap; }
.cmp td { color: var(--muted); }
.cmp .ours th, .cmp .ours td { color: var(--text); background: rgba(139,92,246,0.08); }
.cmp .ours th svg { width: 11px; height: 11px; color: var(--yellow); fill: currentColor; vertical-align: -1px; margin-inline-end: 6px; }
.cmp .y { color: #7ee2a8; } .cmp .n { color: #f0b73a; }
.table-note { max-width: var(--max); margin: 14px auto 0; font-size: 13px; color: var(--muted); text-align: center; text-wrap: balance; }
.table-note a, .prose a, .quick a, .crumbs a, .related a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.table-note a:hover, .prose a:hover, .quick a:hover, .crumbs a:hover, .related a:hover { text-decoration-color: var(--muted); }

/* safety block reuses .bites; only spacing here */
.safety { padding-top: 56px; padding-bottom: 32px; }
.safety .bites { padding-top: 0; }
.safety-note { max-width: var(--prose); margin: 0 auto; text-align: center; font-size: 14px; color: var(--muted); text-wrap: balance; }

/* price card: second line + secondary download link */
.price-was { font-size: 15px; font-weight: 600; color: #c6c6d2; margin-top: 8px; }
.price-card .btn-ghost.btn-download { margin-top: 14px; }
.price-list { list-style: none; margin: 22px auto 0; max-width: 300px; font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.price-list li::before { content: "✦ "; color: var(--yellow); }

/* footer additions */
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-note { font-size: 13px; color: var(--muted); }
.footer-links { flex-wrap: wrap; justify-content: center; }

/* ---------- content pages (guides, vs, tools) ---------- */
.page { padding-top: 24px; padding-bottom: 40px; }
.crumbs { max-width: 680px; margin: 0 auto; font-size: 13px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; color: var(--line); }
.page-head { max-width: 680px; margin: 0 auto; padding: 28px 0 28px; }
.page-head h1 { margin-top: 0; font-size: clamp(32px, 5.2vw, 50px); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.page-head h1 em { color: transparent; background: linear-gradient(100deg, var(--violet), var(--blue)); -webkit-background-clip: text; background-clip: text; }
.page-meta { margin-top: 14px; font-size: 13px; color: var(--muted); }
.page-lede { margin-top: 16px; font-size: 18px; color: var(--muted); }
.prose { max-width: 680px; margin: 0 auto; padding-top: 32px; font-size: 16px; color: #d6d6e0; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 44px; font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; color: var(--text); }
.prose h3 { margin-top: 28px; font-size: 18px; color: var(--text); }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.prose pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; corner-shape: squircle; --corner-shape: squircle;
  padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.55;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose .table-wrap { margin-top: 20px; }
.prose .cmp { min-width: 560px; }
.callout { background: var(--card); border: 1px solid var(--line); border-radius: 18px; corner-shape: squircle; --corner-shape: squircle; padding: 16px 20px; color: var(--muted); }
.callout strong { color: var(--yellow); }

/* soft CTA on guides */
.cta-card {
  max-width: 680px; margin: 48px auto 0; text-align: center; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 30px; corner-shape: squircle; --corner-shape: squircle; padding: 32px 24px;
  box-shadow: 0 30px 80px rgba(91,61,212,0.14);
}
.cta-card h2 { font-size: 22px; letter-spacing: -0.01em; display: flex; justify-content: center; align-items: center; gap: 8px; }
.cta-card h2 svg { width: 16px; height: 16px; color: var(--yellow); fill: currentColor; }
.cta-card p { color: var(--muted); font-size: 15px; margin: 8px auto 20px; max-width: 460px; text-wrap: balance; }
.cta-card .price-meta { margin-top: 14px; }

.related { max-width: 680px; margin: 40px auto 0; }
.related h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.related ul { list-style: none; display: grid; gap: 8px; }

/* hub cards */
.hub { max-width: 680px; margin: 0 auto; display: grid; gap: 12px; padding-top: 24px; }
.hub-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 18px; corner-shape: squircle; --corner-shape: squircle;
  padding: 18px 20px; transition: border-color .2s ease;
}
.hub-card:hover { border-color: #34344a; }
.hub-card h3 { font-size: 17px; letter-spacing: -0.01em; }
.hub-card p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.hub-group { max-width: 680px; margin: 40px auto 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* caffeinate builder */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 18px; corner-shape: squircle; --corner-shape: squircle; padding: 20px; }
.tool fieldset { border: 0; display: grid; gap: 10px; }
.tool legend { font-weight: 600; margin-bottom: 8px; color: var(--text); }
.tool label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #d6d6e0; cursor: pointer; }
.tool label small { display: block; color: var(--muted); font-size: 13px; }
.tool input[type=checkbox] { margin-top: 5px; accent-color: var(--violet); width: 16px; height: 16px; flex: none; }
.tool .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tool .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tool input[type=text], .tool input[type=number] {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; corner-shape: squircle; --corner-shape: squircle;
  padding: 9px 12px; font: 14px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tool-out { margin-top: 18px; }
.tool-out pre { margin: 0; font-size: 15px; white-space: pre-wrap; word-break: break-all; }
.tool-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.tool-explain { margin-top: 12px; font-size: 14px; color: var(--muted); }
.tool-explain li + li { margin-top: 4px; }
@media (max-width: 560px) { .tool .row { grid-template-columns: 1fr; } }

/* the decorative hero glow (max 120vw) made the document 429px wide at 390px;
   body overflow-x hid it, but clip it at the hero so scrollWidth == viewport */
.hero { overflow-x: clip; }

/* =====================================================================
   Localization (2026-10): language menu, suggestion bar, RTL, scripts.
   System font stacks only — no web fonts are added for non-Latin scripts.
   ===================================================================== */

/* nav: small globe link next to the buy pill (jumps to / opens the footer language menu) */
.nav-lang { font-size: 14px; color: var(--muted); padding: 6px 4px; transition: color .2s ease; }
.nav-lang:hover { color: var(--text); }

/* footer language menu: one <details> disclosure instead of 35 inline links */
.lang-menu { position: relative; font-size: 13px; }
.lang-menu > summary {
  display: inline-flex; justify-content: flex-start; gap: 8px; align-items: center;
  width: auto; padding: 8px 14px; font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); border-radius: 12px; corner-shape: squircle; --corner-shape: squircle;
}
.lang-menu > summary::after { content: "▾"; font-size: 11px; transform: none; }
.lang-menu[open] > summary::after { transform: rotate(180deg); }
.lang-menu > summary:hover, .lang-menu > summary:focus-visible { color: var(--text); border-color: #34344a; }
.lang-menu > summary:focus-visible, .lang-menu a:focus-visible, .lang-bar button:focus-visible, .lang-bar a:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lang-menu { background: none; border: 0; padding: 0; }
.lang-menu[open] { border: 0; }
.lang-list {
  list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 12px;
  margin-top: 8px; padding: 10px; max-height: 280px; overflow-y: auto; max-width: 520px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; corner-shape: squircle; --corner-shape: squircle;
}
.lang-list a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--muted); transition: color .2s ease, background .2s ease; }
.lang-list a:hover { color: var(--text); background: rgba(139,92,246,0.12); }
.lang-list a[aria-current] { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .lang-list { margin-inline: auto; } .footer-col { align-items: center; } }

/* one-time "this page is available in your language" bar (never a redirect) */
.lang-bar {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  padding: 10px 16px; font-size: 14px; color: var(--text); background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.lang-bar a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lang-bar button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 10px; corner-shape: squircle; --corner-shape: squircle; padding: 4px 12px; cursor: pointer; }
.lang-bar button:hover { color: var(--text); }

/* the macOS menu mock is a picture of an English UI: it never mirrors */
.screen { direction: ltr; text-align: left; }

/* commands and addresses stay left-to-right inside right-to-left text */
code, .price, bdi { unicode-bidi: isolate; }
code { direction: ltr; }
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
[dir="rtl"] .price-list li::before { content: "✦ "; }

/* Non-Latin scripts: the Latin italic serif and tracked uppercase look wrong or break joining */
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) em { font-family: inherit; font-style: normal; font-weight: 700; }
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3, h4, summary, .hero h1 .eyebrow, .quick-label, .cmp thead th, .related h2, .hub-group, .lede, .price-was) {
  letter-spacing: normal; text-transform: none;
}
/* overflow safety for long words in agglutinative languages (fi, hu, de, tr) */
h1, h2, h3, h4, .bite p, .steps p, summary, .cmp td, .cmp th { overflow-wrap: break-word; hyphens: auto; }
.cmp thead th { hyphens: manual; }

/* system font stacks with glyph coverage per script (Inter stays first for Latin, Cyrillic, Greek, Vietnamese) */
html:lang(ja) body { font-family: "Inter", -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif; }
html:lang(ko) body { font-family: "Inter", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
html:lang(zh-Hans) body { font-family: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
html:lang(zh-Hant) body { font-family: "Inter", -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
html:lang(th) body { font-family: "Inter", -apple-system, "Thonburi", "Sukhumvit Set", "Leelawadee UI", "Tahoma", "Noto Sans Thai", system-ui, sans-serif; line-height: 1.75; }
html:lang(hi) body { font-family: "Inter", -apple-system, "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", "Mangal", "Noto Sans Devanagari", system-ui, sans-serif; line-height: 1.7; }
html:lang(ar) body { font-family: "Inter", -apple-system, "SF Arabic", "Geeza Pro", "Segoe UI", "Tahoma", "Noto Sans Arabic", system-ui, sans-serif; line-height: 1.75; }
html:lang(he) body { font-family: "Inter", -apple-system, "Arial Hebrew", "Segoe UI", "Arial", "Noto Sans Hebrew", system-ui, sans-serif; line-height: 1.7; }
html:is(:lang(ja), :lang(zh), :lang(ko)) body { line-height: 1.7; }

/* Japanese: break at phrase boundaries (Chrome/Edge; ignored elsewhere) instead of inside words,
   and keep a lone punctuation mark or kana off its own last line. */
html:lang(ja) :is(h1, h2, h3, p, summary, td, li) { word-break: auto-phrase; line-break: strict; }
html:lang(ja) h1 { text-wrap: balance; }
