/* ==========================================================================
   Qevna, landing (redesign). Same visual direction as the app:
   DESIGN.md ("Padrão da categoria", Q48) and apps/web/styles/globals.css.
   Inter everywhere, indigo for the main action, cool grays, white cards with
   a 1px border, 8px controls, 12px cards, shadow-xs, tabular numbers, titles
   without a trailing period and without a label above them.

   Order: fonts, tokens (light, dark), base, components (button, badge, card,
   list), header, sections in page order, illustrations, footer.
   Class prefix: q-. Sections own their layout; components are shared.
   ========================================================================== */

/* Fonts: self-hosted Inter (SIL OFL 1.1, fonts/LICENSES/Inter-OFL.txt) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-ext-500.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   Tokens: the app's, same names (globals.css). Light, then dark.
   ========================================================================== */
:root {
  color-scheme: light;
  --background: #f6f7f9;
  --foreground: #111827;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-foreground: #ffffff;
  --primary-soft: #eef0ff;
  --primary-soft-foreground: #3730a3;
  --muted: #eef0f3;
  --muted-foreground: #556070;
  --accent: #eef0f3;
  --success: #067647;
  --success-soft: #e7f6ee;
  --warning: #a14a06;
  --warning-soft: #fdf1e3;
  --destructive: #c0262d;
  --destructive-soft: #fdeeee;
  --border: #e3e6eb;
  --input: #cdd2da;
  --ring: #4f46e5;
  --logo-key: #e5383b;
  --shadow-color: 220 40% 15%;

  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-control: 8px;
  --radius-card: 12px;

  --page-max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-gap: clamp(64px, 9vw, 112px);
  --card-pad: clamp(20px, 3vw, 28px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0e1117;
    --foreground: #e7e9ee;
    --card: #161a22;
    --primary: #8b86f7;
    --primary-hover: #a19df9;
    --primary-foreground: #0e1117;
    --primary-soft: #23244a;
    --primary-soft-foreground: #c9c7fc;
    --muted: #222833;
    --muted-foreground: #9ba4b4;
    --accent: #222833;
    --success: #4cc38a;
    --success-soft: #16301f;
    --warning: #f0a35e;
    --warning-soft: #3a2614;
    --destructive: #f2777c;
    --destructive-soft: #3a1d20;
    --border: #262c37;
    --input: #353c49;
    --ring: #8b86f7;
    --logo-key: #ff5a5f;
    --shadow-color: 220 40% 2%;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0e1117;
  --foreground: #e7e9ee;
  --card: #161a22;
  --primary: #8b86f7;
  --primary-hover: #a19df9;
  --primary-foreground: #0e1117;
  --primary-soft: #23244a;
  --primary-soft-foreground: #c9c7fc;
  --muted: #222833;
  --muted-foreground: #9ba4b4;
  --accent: #222833;
  --success: #4cc38a;
  --success-soft: #16301f;
  --warning: #f0a35e;
  --warning-soft: #3a2614;
  --destructive: #f2777c;
  --destructive-soft: #3a1d20;
  --border: #262c37;
  --input: #353c49;
  --ring: #8b86f7;
  --logo-key: #ff5a5f;
  --shadow-color: 220 40% 2%;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.5 var(--font);
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--primary-soft); color: var(--primary-soft-foreground); }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; }
/* Tabular figures where numbers line up. Not on the landing's <dl>s: they hold
   prose, and Inter's tnum also widens the hyphen ("NF - e"). */
table, time, .q-num { font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
/* Fiscal names and "e-mail" never break at their hyphen (Inter here has no
   non-breaking hyphen glyph, so the markup wraps them instead) */
.q-nw { white-space: nowrap; }
/* The SVG sprite (icons and logo): out of the flow, without a style attribute (CSP). */
.q-sprite { position: absolute; }
.q-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; }
.q-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-container { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.q-section { padding-top: var(--section-gap); }
section[id] { scroll-margin-top: 72px; }

/* Link in running text: indigo, underlined 4px below */
.q-link { color: var(--primary); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.q-link:hover { text-decoration-color: currentColor; }

/* Skip link */
.q-skip { position: absolute; left: 16px; top: -100px; z-index: 60; padding: 10px 14px; border-radius: var(--radius-control); background: var(--primary); color: var(--primary-foreground); font-weight: 500; text-decoration: none; }
.q-skip:focus { top: 12px; }

/* ==========================================================================
   Components
   ========================================================================== */

/* Button: default (indigo, one per area), outline, ghost. 40px, lg 44px. */
.q-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: 500 0.9375rem/1.25 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.q-btn--lg { min-height: 44px; padding-inline: 20px; }
.q-btn--primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-xs); }
.q-btn--primary:hover { background: var(--primary-hover); }
.q-btn--outline { border-color: var(--input); background: var(--card); color: var(--foreground); box-shadow: var(--shadow-xs); }
.q-btn--outline:hover { background: var(--accent); }
.q-btn--ghost { background: transparent; color: var(--foreground); }
.q-btn--ghost:hover { background: var(--accent); }
.q-btn:focus-visible { outline-offset: 2px; border-radius: var(--radius-control); }
.q-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .q-actions .q-btn { flex: 1 1 100%; } }

/* Badge: soft fill, strong text of the same family, always a word, icon helps */
.q-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap;
}
.q-badge .q-icon { width: 13px; height: 13px; }
.q-badge--ok { background: var(--success-soft); color: var(--success); }
.q-badge--obra { background: var(--warning-soft); color: var(--warning); }
.q-badge--breve { background: var(--muted); color: var(--muted-foreground); }
/* Planned: further off than "Em breve", so quieter: the word only, no fill */
.q-badge--plan { padding-inline: 0; background: none; color: var(--muted-foreground); font-weight: 400; }

/* Card: white surface, 1px border, 12px, shadow-xs */
.q-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
}

/* A list with dividers in one card (DESIGN.md: never a grid of equal cards) */
.q-list { list-style: none; padding: 0; }
.q-list > li { padding: 18px var(--card-pad); }
.q-list > li + li { border-top: 1px solid var(--border); }

/* Section head: title, then a lead. No label above the title. */
.q-sec-head { display: grid; gap: 12px; max-width: 44rem; margin-bottom: clamp(28px, 4vw, 40px); }
.q-lead { color: var(--muted-foreground); font-size: 1.0625rem; line-height: 1.6; max-width: 62ch; }
.q-muted { color: var(--muted-foreground); }

/* Two columns: head on the left, content on the right (desktop) */
.q-split { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .q-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .q-split > .q-sec-head { margin-bottom: 0; position: sticky; top: 88px; }
}

/* ==========================================================================
   Header: the app's top bar, 56px, card surface, bottom border
   ========================================================================== */
.q-header { position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border); }
.q-header__row { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; }
.q-logo { display: inline-flex; border-radius: 6px; color: var(--foreground); text-decoration: none; }
.q-logo svg { display: block; height: 26px; width: auto; }
/* No descendant selector: the ring lives in the shadow tree of <use>, which
   a selector starting outside it (.q-logo ...) never reaches. */
.q-logo__key { stroke: var(--logo-key); }
.q-nav { display: none; gap: 4px; margin-left: 20px; }
.q-nav a, .q-menu__panel a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--radius-control);
  color: var(--muted-foreground); font-size: 0.875rem; text-decoration: none; transition: background-color 150ms, color 150ms;
}
.q-nav a:hover, .q-menu__panel a:hover { background: var(--accent); color: var(--foreground); }
.q-header__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.q-menu summary {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-control);
  color: var(--foreground); cursor: pointer; list-style: none;
}
.q-menu summary:hover { background: var(--accent); }
.q-menu summary::-webkit-details-marker { display: none; }
.q-menu summary .q-icon { width: 20px; height: 20px; }
.q-menu__panel {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter);
  display: grid; gap: 2px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 8px 24px hsl(var(--shadow-color) / 0.1);
}
.q-menu__panel a { min-height: 44px; font-size: 0.9375rem; color: var(--foreground); }
@media (min-width: 1040px) { .q-nav { display: flex; } .q-menu { display: none; } }
@media (max-width: 420px) { .q-btn--entrar { display: none; } }
@media (max-width: 360px) { .q-logo svg { height: 24px; } .q-header__end .q-btn { padding-inline: 12px; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.q-hero { padding-top: clamp(40px, 7vw, 88px); }
.q-hero__grid { display: grid; gap: 36px; }
.q-hero h1 { max-width: 20ch; }
.q-hero__lead { margin-top: 20px; color: var(--muted-foreground); font-size: 1.125rem; line-height: 1.6; max-width: 54ch; }
.q-hero .q-actions { margin-top: 28px; }
.q-hero__fine { margin-top: 16px; color: var(--muted-foreground); font-size: 0.875rem; max-width: 54ch; }
/* Summary of the product: a definition list in one card */
.q-spec { align-self: start; }
.q-spec div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; padding: 13px var(--card-pad); }
.q-spec div + div { border-top: 1px solid var(--border); }
.q-spec dt { color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.5rem; }
.q-spec dd { font-size: 0.9375rem; line-height: 1.5rem; }
@media (min-width: 960px) {
  .q-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 64px; align-items: end; }
}
/* Narrow screens: the illustration right after the copy, the summary card
   after it. The grid dissolves so its two children and the figure order
   as siblings of the section. */
@media (max-width: 959px) {
  .q-hero { display: flex; flex-direction: column; gap: 36px; }
  .q-hero__grid { display: contents; }
  .q-hero .q-figure--hero { order: 1; margin-top: 0; }
  .q-hero .q-spec { order: 2; }
}

/* ==========================================================================
   Illustrations (ilustracoes/): a poster that the scene replaces when it runs
   ========================================================================== */
.q-figure { margin: 0; }
.q-figure--hero { margin-top: clamp(40px, 6vw, 64px); }
.q-illus { position: relative; }
.q-illus picture, .q-illus img { display: block; }
/* The posters are 2x WebP with srcset "2x", so they draw at design size and
   never wider than the column, centred like the live stage */
.q-illus img { max-width: 100%; height: auto; margin-inline: auto; }
.q-illus__live { position: absolute; inset: 0 0 auto 0; visibility: hidden; }
.q-illus[data-live] .q-illus__live { position: static; visibility: visible; }
/* Visually hidden, not removed: the img alt keeps describing the figure */
.q-illus[data-live] picture { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.q-figure figcaption { margin-top: 12px; color: var(--muted-foreground); font-size: 0.8125rem; text-align: center; }
.q-figure--alerta { max-width: 640px; }
.q-figure--alerta figcaption { text-align: left; }

/* ==========================================================================
   What already works, and what doesn't: two cards, each a divided list
   ========================================================================== */
.q-status { display: grid; gap: 20px; }
@media (min-width: 900px) { .q-status { grid-template-columns: 1fr 1fr; align-items: start; } }
.q-status__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px var(--card-pad); border-bottom: 1px solid var(--border); }
.q-status__head h3 { font-size: 1rem; }
.q-count { color: var(--muted-foreground); font-size: 0.875rem; }
.q-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.q-item h4 { margin: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.5rem; }
.q-item p { grid-column: 1 / -1; color: var(--muted-foreground); font-size: 0.9375rem; max-width: 62ch; }
.q-item .q-badge { margin-top: 2px; }

/* ==========================================================================
   The problem: three statements in one card
   ========================================================================== */
.q-issues > li { display: grid; gap: 6px; padding-block: 22px; }
.q-issues h3 { font-size: 1.0625rem; }
.q-issues p { color: var(--muted-foreground); max-width: 64ch; }
@media (min-width: 900px) { .q-issues > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; } }

/* ==========================================================================
   How it works: three steps in one card, divided
   ========================================================================== */
.q-steps { list-style: none; padding: 0; display: grid; counter-reset: passo; }
.q-step { display: grid; gap: 10px; align-content: start; padding: var(--card-pad); counter-increment: passo; }
.q-step + .q-step { border-top: 1px solid var(--border); }
.q-step__title { display: flex; align-items: center; gap: 10px; }
/* The step number in a small muted circle beside the title, not a label above it */
.q-step__title::before {
  content: counter(passo); display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-foreground);
  font-size: 0.8125rem; font-weight: 600;
}
.q-step p { color: var(--muted-foreground); font-size: 0.9375rem; }
.q-step .q-badge { justify-self: start; }
@media (min-width: 900px) {
  .q-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .q-step + .q-step { border-top: 0; border-left: 1px solid var(--border); }
}

/* ==========================================================================
   History: one row per source, then how the XML import will work
   ========================================================================== */
.q-hist > li { display: grid; gap: 6px 32px; padding-block: 20px; }
.q-hist__src { display: grid; gap: 2px; align-content: start; }
.q-hist__src h3 { font-size: 1rem; }
.q-hist__src > span { color: var(--muted-foreground); font-size: 0.875rem; }
.q-hist__src .q-badge { justify-self: start; margin-top: 6px; }
.q-hist__fig { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
/* A figure that depends on something still under construction: muted */
.q-hist__fig--obra { color: var(--muted-foreground); font-weight: 500; }
/* Import details folded into one disclosure under the history list */
.q-import-more { margin-top: 16px; }
.q-import-more .q-faq p:last-of-type { padding-bottom: 16px; }
.q-import-more .q-facts { margin: 0 var(--card-pad) 20px; }
.q-hist__text { color: var(--muted-foreground); font-size: 0.9375rem; max-width: 60ch; }
@media (min-width: 900px) { .q-hist > li { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 6fr); align-items: baseline; } }

.q-import { margin-top: 20px; display: grid; gap: 20px; padding: var(--card-pad); }
.q-import h3 { font-size: 1.125rem; }
.q-import > div > p { margin-top: 8px; color: var(--muted-foreground); max-width: 56ch; }
.q-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--border); }
.q-facts div { display: grid; gap: 2px; align-content: start; padding: 12px 14px; background: var(--card); }
.q-facts dt { color: var(--muted-foreground); font-size: 0.8125rem; }
.q-facts dd { font-size: 0.9375rem; font-weight: 500; }
/* Phones: one fact per row, label over the value, instead of two cramped
   columns where each value wraps to three or four lines */
@media (max-width: 559px) { .q-facts { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .q-import { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; } .q-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   What Qevna does: the alert illustration, then the list of features
   ========================================================================== */
.q-feat-intro { display: grid; gap: 28px; margin-bottom: clamp(28px, 4vw, 40px); }
.q-feat-intro .q-sec-head { margin-bottom: 0; }
@media (min-width: 1040px) {
  .q-feat-intro { grid-template-columns: minmax(0, 4fr) minmax(0, 640px); gap: 56px; align-items: center; }
}
.q-feats { display: grid; }
.q-feats > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-content: start; }
.q-feats h3 { font-size: 1rem; line-height: 1.5rem; }
.q-feats p { grid-column: 1 / -1; color: var(--muted-foreground); font-size: 0.9375rem; max-width: 62ch; }
/* "Para quem é": the two audiences, a second card under the features */
/* "Para quem é": a small heading, then the two audiences in one card */
.q-audiences-head { margin: clamp(40px, 6vw, 56px) 0 16px; font-size: 1.125rem; }
.q-audiences { margin-top: 0; }
@media (min-width: 900px) {
  .q-feats { grid-template-columns: 1fr 1fr; }
  .q-feats > li + li { border-top: 0; }
  .q-feats > li:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .q-feats > li:nth-child(even) { border-left: 1px solid var(--border); }
}

/* ==========================================================================
   National NFS-e, security: icon rows in one card
   ========================================================================== */
.q-rows > li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 4px 14px; }
.q-rows .q-icon { margin-top: 4px; color: var(--muted-foreground); }
.q-rows h3, .q-rows strong { display: block; font-size: 0.9375rem; font-weight: 500; line-height: 1.5rem; }
.q-rows p, .q-rows li > span { grid-column: 2; color: var(--muted-foreground); font-size: 0.9375rem; }
.q-rows li > span strong { color: var(--foreground); }
.q-rows .q-icon--ok { color: var(--success); }
.q-aside { margin-top: 16px; color: var(--muted-foreground); font-size: 0.875rem; max-width: 62ch; }

/* ==========================================================================
   FAQ: one card, each question a disclosure
   ========================================================================== */
.q-faq + .q-faq { border-top: 1px solid var(--border); }
.q-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px var(--card-pad); cursor: pointer; list-style: none;
  font-weight: 500; line-height: 1.45;
}
.q-faq summary::-webkit-details-marker { display: none; }
.q-faq summary .q-icon { color: var(--muted-foreground); transition: transform 150ms; }
.q-faq[open] summary .q-icon { transform: rotate(180deg); }
.q-faq summary:hover { color: var(--primary); }
.q-faq summary:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }
.q-faq p { padding: 0 var(--card-pad) 12px; color: var(--muted-foreground); max-width: 68ch; }
.q-faq p:last-of-type { padding-bottom: 20px; }

/* ==========================================================================
   Sign-up: the account goes to the waiting list (no form here)
   ========================================================================== */
.q-signup { display: grid; gap: 28px; padding: clamp(24px, 4vw, 40px); }
@media (min-width: 900px) { .q-signup { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.q-signup .q-lead { margin-top: 12px; }
.q-signup__list { list-style: none; padding: 0; display: grid; gap: 12px; }
.q-signup__list li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; color: var(--muted-foreground); }
.q-signup__list .q-icon { margin-top: 4px; color: var(--success); }
.q-signup .q-actions { margin-top: 24px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.q-footer { margin-top: var(--section-gap); border-top: 1px solid var(--border); background: var(--card); padding-block: 48px 24px; }
.q-footer__grid { display: grid; gap: 32px; }
.q-footer__note { margin-top: 14px; color: var(--muted-foreground); font-size: 0.9375rem; max-width: 38ch; }
.q-footer nav { display: grid; gap: 2px; align-content: start; }
.q-footer__h { margin-bottom: 6px; color: var(--muted-foreground); font-size: 0.75rem; font-weight: 500; }
.q-footer nav a { display: inline-flex; align-items: center; min-height: 36px; justify-self: start; font-size: 0.9375rem; text-decoration: none; }
.q-footer nav a:hover { text-decoration: underline; }
.q-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 0.8125rem; }
@media (min-width: 800px) { .q-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (max-width: 799px) { .q-footer nav a { min-height: 44px; } }

/* ==========================================================================
   Status page (status.qevna.com, infra/production/sites/status.qevna.com):
   this stylesheet and the fonts are served to it by Caddy from here. A banner
   with the overall state, then one divided list with each part of the system.
   State is always a word and an icon; the color only reinforces them.
   ========================================================================== */
.q-badge--bad { background: var(--destructive-soft); color: var(--destructive); }
.q-live { max-width: 46rem; padding-top: clamp(32px, 6vw, 64px); }
.q-live__head { display: grid; gap: 8px; margin-bottom: 28px; }
.q-live__head h1 { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.5rem); }
.q-live__meta { min-height: 1.5rem; color: var(--muted-foreground); font-size: 0.9375rem; }
.q-live__alert { margin-bottom: 20px; padding: 14px var(--card-pad); border-color: var(--destructive); background: var(--destructive-soft); color: var(--destructive); font-size: 0.9375rem; }
.q-live__alert strong { display: block; font-weight: 600; }
.q-live__banner { display: flex; align-items: center; gap: 16px; padding: var(--card-pad); }
.q-live__banner .q-icon { width: 32px; height: 32px; color: var(--muted-foreground); }
.q-live__banner--ok .q-icon { color: var(--success); }
.q-live__banner--warn .q-icon { color: var(--warning); }
.q-live__banner--bad .q-icon { color: var(--destructive); }
.q-live__label { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.q-live__text { color: var(--muted-foreground); }
.q-live__rows { margin-top: 20px; }
.q-live__rows[data-stale] { opacity: 0.6; }
.q-live__rows > li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.q-live__rows h2 { font-size: 1rem; font-weight: 500; line-height: 1.5rem; letter-spacing: 0; }
.q-live__rows p { color: var(--muted-foreground); font-size: 0.9375rem; max-width: 46ch; }
.q-live__rows .q-badge { margin-top: 2px; }
.q-live__note { margin-top: 24px; color: var(--muted-foreground); font-size: 0.875rem; max-width: 62ch; }
@media (max-width: 479px) {
  .q-live__rows > li { flex-direction: column; gap: 8px; }
  .q-live__rows .q-badge { order: -1; margin-top: 0; }
}

/* ==========================================================================
   Legal texts (termos/, privacidade/, ...: generated from apps/web/content/legal
   by apps/web/infra/scripts/build-legal-pages.mts). Read mode: the text is the
   page, a 68ch column with no card around it, a table of contents beside it
   from 1024px (a folded one above the text before that), a way back to the top.
   ========================================================================== */
.q-doc { padding-top: clamp(32px, 6vw, 64px); }
.q-doc__layout { display: grid; gap: 28px; }
.q-doc__main { min-width: 0; }
.q-doc__head { display: grid; gap: 12px; margin-bottom: 28px; }
.q-doc__head h1 { max-width: 22ch; font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.5rem); }
.q-doc__meta { color: var(--muted-foreground); font-size: 0.9375rem; line-height: 1.6; max-width: 68ch; }

/* The text itself */
.q-doc__text { max-width: 68ch; font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
.q-doc__text > * + * { margin-top: 1em; }
.q-doc__text h2 { margin-top: 2.4em; font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); line-height: 1.3; scroll-margin-top: 80px; }
.q-doc__text h3 { margin-top: 1.8em; font-size: 1.125rem; scroll-margin-top: 80px; }
.q-doc__text h4 { margin-top: 1.5em; font-size: 1rem; font-weight: 600; scroll-margin-top: 80px; }
.q-doc__text h2 + *, .q-doc__text h3 + *, .q-doc__text h4 + * { margin-top: 0.75em; }
.q-doc__text ul, .q-doc__text ol { padding-left: 1.4em; }
.q-doc__text li + li { margin-top: 0.4em; }
.q-doc__text li::marker { color: var(--muted-foreground); }
.q-doc__text strong { font-weight: 600; }
.q-doc__text code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--muted); font: 0.875em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.q-doc__text hr { margin-block: 2em; border: 0; border-top: 1px solid var(--border); }
.q-doc__text a, .q-doc__meta a { overflow-wrap: anywhere; }
.q-doc__end { max-width: 68ch; margin-top: 3em; padding-top: 1.25em; border-top: 1px solid var(--border); font-size: 0.9375rem; }

/* Tables: a real table from 640px; on a phone every row becomes a block,
   its first cell as the title and the others under their column name. */
.q-doc__table { font-size: 0.9375rem; line-height: 1.55; }
.q-doc__table table { width: 100%; border-collapse: collapse; }
.q-doc__table th { padding: 8px 12px; border-bottom: 1px solid var(--input); color: var(--muted-foreground); font-size: 0.8125rem; font-weight: 500; text-align: left; }
.q-doc__table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.q-doc__table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .q-doc__table table, .q-doc__table tbody, .q-doc__table tr, .q-doc__table td { display: block; }
  .q-doc__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .q-doc__table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .q-doc__table tr:last-child { border-bottom: 0; }
  .q-doc__table td { padding: 2px 0; border: 0; }
  .q-doc__table td:first-child { font-weight: 600; }
  .q-doc__table td:not(:first-child)::before { content: attr(data-label); display: block; margin-top: 6px; color: var(--muted-foreground); font-size: 0.8125rem; font-weight: 500; }
}

/* Table of contents: folded above the text on narrow screens... */
.q-toc ol { list-style: none; padding: 0; }
.q-toc a { text-decoration: none; }
.q-toc--sheet { margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); }
.q-toc--sheet summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; font-weight: 500; cursor: pointer; list-style: none; }
.q-toc--sheet summary::-webkit-details-marker { display: none; }
.q-toc--sheet summary:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }
.q-toc--sheet summary .q-icon { color: var(--muted-foreground); transition: transform 150ms; }
.q-toc--sheet[open] summary .q-icon { transform: rotate(180deg); }
.q-toc--sheet nav { max-height: min(60vh, 28rem); overflow-y: auto; padding: 0 8px 8px; border-top: 1px solid var(--border); }
.q-toc--sheet li a { display: flex; align-items: center; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-control); font-size: 0.9375rem; line-height: 1.35; }
.q-toc--sheet li a:hover { background: var(--accent); }
/* ...and beside the text from 1024px, fixed while the text scrolls */
.q-toc--side { display: none; }
@media (min-width: 1024px) {
  .q-doc__layout { grid-template-columns: 15rem minmax(0, 68ch); gap: 56px; justify-content: center; }
  .q-toc--sheet { display: none; }
  .q-toc--side { display: block; position: sticky; top: 80px; align-self: start; max-height: calc(100svh - 104px); overflow-y: auto; padding-bottom: 8px; }
  .q-toc__h { margin-bottom: 8px; color: var(--muted-foreground); font-size: 0.75rem; font-weight: 500; }
  .q-toc--side li a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--border); color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.4; }
  .q-toc--side li a:hover { border-left-color: var(--primary); color: var(--foreground); }
  .q-toc__top { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 12px; color: var(--foreground); font-size: 0.875rem; font-weight: 500; }
  .q-toc__top:hover { color: var(--primary); }
}

/* Back to the top: a button on narrow screens, shown only after the first
   screen where the browser can tell (scroll-driven animation); elsewhere it
   is always there. */
.q-totop {
  position: fixed; right: var(--gutter); bottom: 16px; z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--input); border-radius: var(--radius-control); background: var(--card); color: var(--foreground);
  box-shadow: var(--shadow-xs); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.q-totop:hover { background: var(--accent); }
@media (min-width: 1024px) { .q-totop { display: none; } }
@supports (animation-timeline: scroll()) {
  .q-totop { opacity: 0; pointer-events: none; animation: q-totop-in linear both; animation-timeline: scroll(root block); animation-range: 320px 560px; }
  @keyframes q-totop-in { to { opacity: 1; pointer-events: auto; } }
}

@media print {
  .q-header, .q-skip, .q-toc, .q-totop, .q-doc__end, .q-footer { display: none; }
  .q-doc__layout { display: block; }
  .q-doc__text { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
