/* ==========================================================================
   ScribSave design system
   Single stylesheet, custom properties first, then layout, then components.
   ========================================================================== */

:root {
  /* One light theme, tuned to read as paper rather than as a console.

     The surfaces are almost white and the borders are hairlines, so the
     structure is carried by spacing and weight instead of by grey fills. A
     document tool should look like the page it prints to, and a page of white
     is what people compare a PDF against.

     Every value below is a token. Components never hardcode a colour, so the
     whole palette can be retuned from this one block. */
  --bg:        #ffffff;
  --bg-alt:    #fbfcfe;   /* alternating sections: a whisper, not a grey band */
  --bg-sunken: #f6f8fc;   /* inset surfaces: disabled fields, empty tracks */

  --ink:       #0f172a;   /* headings: near-black, for weight not for filling */
  --ink-soft:  #475569;   /* body copy: light enough to read long stretches of */
  --muted:     #64748b;   /* captions and hints. Chosen to clear WCAG AA on white at
                              the small sizes it is actually used at; a lighter grey
                              measured 4.36:1 and failed. */

  --line:      #e9eef5;   /* hairlines. A 1px line at this weight is structure,
                             not a box, which is most of what makes a page read
                             as light rather than as a grid */
  --line-soft: #f3f6fa;

  /* A bright blue rather than a heavy indigo. Indigo is legible but reads
     serious and dark against white; blue reads clean and fresh, and still
     clears 4.5:1 against white for the button label. */
  --brand:      #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff5ff;
  --accent:     #38bdf8;

  --info:      #1d4ed8;
  --info-soft: #eff5ff;
  --ok:        #047857;
  --ok-soft:   #ecfdf5;
  --warn:      #b45309;
  --warn-soft: #fffbeb;
  --bad:       #b91c1c;
  --bad-soft:  #fef2f2;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  /* Shadows do the work borders used to. They are wide and very faint: the aim
     is a card that appears to lift a millimetre off the page, not one that
     floats above it. */
  --shadow:    0 1px 2px rgba(15, 23, 42, .03), 0 6px 16px -10px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .03), 0 20px 40px -22px rgba(15, 23, 42, .14);

  --shell: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings are the one place the near-black is used, so weight and size carry
   the hierarchy and body copy never has to. `balance` evens out the ragged
   right edge that a large headline otherwise leaves. */
h1, h2, h3, h4 {
  margin: 0 0 .6rem;
  line-height: 1.18;
  letter-spacing: -.022em;
  font-weight: 750;
  color: var(--ink);
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
h1 { font-size: clamp(1.85rem, 1.45rem + 1.5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.12rem + .7vw, 1.65rem); }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .88em;
  /* --ink-soft, not --muted: on the inset background the lighter grey measured
     4.48:1, a hair under the 4.5 that small text needs. */
  color: var(--ink-soft);
  background: var(--bg-sunken);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: .12em .38em;
  word-break: break-word;
}

img, svg { max-width: 100%; }
.muted { color: var(--muted); }
.optional { color: var(--muted); font-weight: 400; }

/* Accessibility ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Honeypot: hidden from people, reachable by naive bots. */
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

/* Shell -------------------------------------------------------------------- */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 1.25rem; }
.shell.narrow { max-width: 720px; }
.section { padding: 3.75rem 0; }
.section-tight { padding: 2rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; }
.section-lede { text-align: center; color: var(--muted); margin-bottom: 2.25rem; }
.section-title-sm { font-size: 1.15rem; margin: 2.25rem 0 1rem; }
.section-more { text-align: center; margin-top: 2.25rem; }

/* Header ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  color: #fff;
}
.brand-text { font-size: 1.06rem; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.button) { color: var(--ink-soft); font-size: .93rem; font-weight: 550; }
.site-nav a:not(.button):hover { color: var(--brand); text-decoration: none; }
.site-nav .nav-dashboard { color: var(--brand); font-weight: 650; }
.site-nav .nav-login { margin-left: .25rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 0; padding: .4rem;
  color: var(--ink); cursor: pointer;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: .5rem 1.25rem 1rem;
}
.mobile-nav a:not(.button) { padding: .6rem 0; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav[data-open="1"] { display: flex; }
}

/* Buttons ------------------------------------------------------------------ */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .72rem 1.15rem;
  font: inherit; font-weight: 650; font-size: .95rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.button:hover { text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled, .button[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.button-sm { padding: .45rem .8rem; font-size: .875rem; }
.button-block { width: 100%; }

.button-quiet { background: var(--bg); color: var(--muted); border-color: var(--line); }
.button-quiet:hover:not([disabled]) { color: var(--ink); border-color: var(--ink-soft); }
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover:not([disabled]) { background: var(--brand-dark); color: #fff; }
.button-secondary { background: var(--bg); color: var(--ink); border-color: var(--line); }
.button-secondary:hover { border-color: var(--ink-soft); color: var(--ink); }
.button-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.button-ghost:hover { color: var(--ink); border-color: var(--ink-soft); }
.button-danger { background: var(--bad); color: #fff; }
.button-danger:hover { background: #991b1b; color: #fff; }

/* Alerts and notices ------------------------------------------------------- */

.notice { background: var(--warn-soft); border-bottom: 1px solid #fde68a; color: var(--warn); padding: .7rem 0; text-align: center; font-size: .9rem; }
.alert { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin: 1rem 0; font-size: .93rem; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); border-color: #a7f3d0; color: var(--ok); }
.alert-error { background: var(--bad-soft); border-color: #fecaca; color: var(--bad); }
.alert-list { margin: 0; padding-left: 1.1rem; }

/* Hero --------------------------------------------------------------------- */

.hero {
  background: var(--bg);
  padding: 4rem 0 3.25rem;
  /* A single hairline under the hero instead of a coloured panel. Structure by
     rule, not by fill: it keeps the whole page one white surface. */
  border-bottom: 1px solid var(--line-soft);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-block;
  font-size: .76rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 58ch; line-height: 1.6; }

.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 1.4rem; padding: 0; margin: 1.5rem 0 0; }
.hero-points li { display: flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--ink-soft); font-weight: 550; }
.hero-points svg { color: var(--ok); flex: none; }

.hero-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.5rem; }
.hero-card-head { display: flex; align-items: center; gap: .85rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--line-soft); }
.doc-chip {
  display: grid; place-items: center;
  width: 44px; height: 52px; border-radius: 7px;
  background: linear-gradient(150deg, #fb7185, #ef4444); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(239, 68, 68, .55);
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
}
.hero-card-title { margin: 0; font-weight: 700; }
.hero-card-meta { margin: 0; font-size: .84rem; color: var(--muted); }
.hero-stats { list-style: none; margin: 0; padding: 1.15rem 0 0; display: grid; gap: .85rem; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: .93rem; }
.hero-stats span { font-size: .84rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.25rem; }
}

/* Converter form ----------------------------------------------------------- */

.converter { margin: 2rem 0 0; }
.converter-label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .5rem; }
.converter-row { display: flex; gap: .6rem; }
.converter-input {
  flex: 1;
  min-width: 0;
  padding: .85rem 1rem;
  font: inherit; font-size: .97rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.converter-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.converter-input[disabled] { background: var(--bg-sunken); cursor: not-allowed; }
.converter-button { position: relative; min-width: 165px; }
.converter-hint { margin: .75rem 0 0; font-size: .875rem; color: var(--muted); }
.converter-blocked { margin: .8rem 0 0; font-size: .9rem; color: var(--warn); background: var(--warn-soft); border: 1px solid #fde68a; padding: .7rem .9rem; border-radius: var(--radius-sm); }

.button-spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-busy .button-spinner { display: inline-block; }
.is-busy .button-label { opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .converter-row { flex-direction: column; }
  .converter-button { width: 100%; }
}

/* Cards, features, steps --------------------------------------------------- */

.card, .panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card p { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 1.1rem; }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; padding: 0; margin: 0; }
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: .85rem;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 750;
}
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--muted); font-size: .93rem; }

/* Page head and prose ------------------------------------------------------ */

.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 3.25rem 0 2.75rem; }
.app-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.app-head-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.app-head h1 { font-size: 1.65rem; margin-bottom: .25rem; }
.app-head-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.25rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .4rem; }

/* FAQ ---------------------------------------------------------------------- */

.faq details, .faq-preview details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  background: var(--bg);
}
.faq summary, .faq-preview summary {
  cursor: pointer; padding: .95rem 1.1rem; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker, .faq-preview summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq-preview summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); line-height: 1; }
.faq details[open] summary::after, .faq-preview details[open] summary::after { content: "\2212"; }
.faq details p, .faq-preview details p { padding: 0 1.1rem 1.15rem; margin: 0; color: var(--ink-soft); font-size: .94rem; }
.faq-preview { max-width: 70ch; margin: 0 auto; }
.help-box { margin-top: 2.5rem; padding: 1.5rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }

/* Forms -------------------------------------------------------------------- */

.form { background: var(--bg); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=password],
.field input[type=search], .field input[type=number], .field select, .field textarea {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit; font-size: .95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}
.field input:disabled { background: var(--bg-sunken); color: var(--muted); }
.field textarea { resize: vertical; min-height: 110px; }
.field-hint { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); }
.field-error { margin: .35rem 0 0; font-size: .84rem; color: var(--bad); font-weight: 550; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.field-check { display: flex; gap: .6rem; align-items: flex-start; }
.field-check input { margin-top: .25rem; flex: none; }
.field-check label { font-weight: 400; font-size: .89rem; margin: 0; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; cursor: pointer; }
.link-quiet { color: var(--muted); font-size: .88rem; }
.link-quiet:hover { color: var(--brand); }
.form-note { margin-top: 1.5rem; font-size: .88rem; color: var(--muted); }

.search-form { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.search-form input[type=search] {
  flex: 1; min-width: 220px;
  padding: .6rem .85rem; font: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}

/* Auth --------------------------------------------------------------------- */

.auth { display: grid; place-items: center; padding: 3.5rem 1.25rem 4.5rem; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: .35rem; }
.auth-lede { color: var(--muted); margin-bottom: 1.75rem; }
.auth-card .form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow); }
.auth-alt { text-align: center; margin-top: 1.5rem; font-size: .92rem; color: var(--muted); }

/* Usage and stats ---------------------------------------------------------- */

.usage-strip { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.25rem; padding: .9rem 1.1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.usage-item { display: flex; flex-direction: column; }
.usage-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.usage-value { font-weight: 700; font-size: 1rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.stat { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 750; line-height: 1.2; letter-spacing: -.02em; }
.stat-label { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.panel h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.panel-danger { border-color: #fecaca; }
.panel-danger h2 { color: var(--bad); }

.health-row { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem; font-size: .93rem; color: var(--ink-soft); }
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.health-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.health-unavailable { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* Tables ------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.jobs-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.jobs-table th {
  text-align: left; padding: .7rem .9rem;
  background: var(--bg-alt); color: var(--muted);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.jobs-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.jobs-table tr:last-child td { border-bottom: 0; }
.jobs-table tbody tr:hover { background: var(--brand-soft); }
.document-cell { max-width: 300px; }
.document-link { display: block; font-weight: 650; color: var(--ink); }
.document-link:hover { color: var(--brand); }
.url-preview { display: block; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reason-cell { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.actions-heading { text-align: right; }
.actions-cell { text-align: right; white-space: nowrap; }
.progress-cell { min-width: 130px; }
.progress-track { width: 110px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--bg-sunken); }
.progress-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .3s ease; }
.progress-value { display: block; margin-top: .3rem; font-size: .78rem; color: var(--muted); }
.result-cell span, .result-cell small { display: block; }
.result-cell small { font-size: .78rem; color: var(--muted); }
.date-cell { color: var(--muted); font-size: .82rem; white-space: nowrap; }

.status { display: inline-block; border-radius: 999px; padding: .2rem .6rem; font-size: .74rem; font-weight: 750; text-transform: capitalize; }
.status-queued, .status-running { color: var(--info); background: var(--info-soft); }
.status-succeeded { color: var(--ok); background: var(--ok-soft); }
.status-failed { color: var(--bad); background: var(--bad-soft); }
.status-cancelled { color: var(--muted); background: var(--bg-sunken); }
.status-expired { color: var(--warn); background: var(--warn-soft); }
.role-chip { display: inline-block; margin-left: .3rem; border-radius: 999px; padding: .15rem .5rem; font-size: .7rem; font-weight: 750; background: var(--brand-soft); color: var(--brand); }
.message { display: block; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.error-detail { display: block; margin-top: .35rem; max-width: 260px; font-size: .8rem; line-height: 1.45; color: var(--bad); }
.error-detail[hidden] { display: none; }

.action-link { font-weight: 650; font-size: .86rem; }
.action-link[hidden] { display: none; }
.action-button {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: .25rem .55rem; font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
}
.action-button:hover { border-color: var(--ink-soft); color: var(--ink); }
.action-danger { color: var(--bad); }
.action-danger:hover { border-color: var(--bad); color: var(--bad); }
.inline-form { display: inline; }

.admin-form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.admin-form select, .admin-form input {
  font: inherit; font-size: .82rem;
  padding: .25rem .4rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
}

.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.list-head h2 { font-size: 1.1rem; margin: 0; }

.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--bg-alt); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-icon { color: var(--muted); margin-bottom: .75rem; }
.empty-state h3 { margin-bottom: .35rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.25rem; }

/* Pager and filters -------------------------------------------------------- */

.pager { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1.25rem; }
.pager-link {
  min-width: 34px; text-align: center;
  padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 6px;
  font-size: .87rem; color: var(--ink-soft);
}
.pager-link:hover { border-color: var(--ink-soft); text-decoration: none; color: var(--ink); }
.pager-link.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

.filter-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-chip {
  padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; color: var(--ink-soft);
}
.filter-chip:hover { border-color: var(--ink-soft); text-decoration: none; color: var(--ink); }
.filter-chip.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* CTA and footer ----------------------------------------------------------- */

.section-cta { background: var(--brand-soft); color: var(--ink); }
.cta-inner { text-align: center; }
.cta-inner h2 { color: var(--ink); }
.cta-inner p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.section-cta .button-primary { background: var(--brand); color: #fff; }
.section-cta .button-primary:hover { background: var(--brand-dark); color: #fff; }

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid {
  display: grid;
  /* auto-fit rather than a fixed count: the number of footer sections is a
     content decision, and a fifth section should widen the row, not wrap it
     under the brand column. */
  grid-template-columns: minmax(14rem, 2fr) repeat(auto-fit, minmax(8rem, 1fr));
  gap: 2rem 2.5rem;
  align-items: start;
}
.footer-brand p { font-size: .89rem; color: var(--muted); max-width: 40ch; }
.footer-compliance { font-size: .82rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: .75rem; }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .75rem; }
.site-footer nav { display: flex; flex-direction: column; gap: .45rem; }
.site-footer nav a { font-size: .89rem; color: var(--ink-soft); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--muted);
}
.footer-bottom p { margin: 0; }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Added for the open converter: new page furniture, and the guest result page
   ========================================================================== */

/* Available to assistive technology, not to sight. Used for table captions and
   for labels that would otherwise be redundant with adjacent headings. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Breadcrumb trail. Mirrors the BreadcrumbList structured data on the page. */
.crumbs {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--muted);
  margin-bottom: 1rem;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* Spec tables: a property and what it means. Full width on a phone, because a
   two-column table squeezed below 480px is unreadable. */
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom-width: 2px; }
.spec-table tbody th { font-weight: 650; color: var(--ink); white-space: nowrap; width: 1%; }
.spec-table td { color: var(--ink-soft); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
@media (max-width: 480px) {
  .spec-table tbody th { display: block; white-space: normal; border-bottom: 0; padding-bottom: 0; }
  .spec-table tbody td { display: block; padding-top: 0; }
}

/* Three-up "pick a setting" cards. */
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 2rem; }
@media (max-width: 620px) { .choice-grid { grid-template-columns: 1fr; } }
.choice-grid .card h3 { font-size: .98rem; }
.choice-grid .card p { font-size: .9rem; color: var(--ink-soft); }

/* Works / does not work. Two columns that stack, each with its own colour, so
   the boundary between them is visible before it is read. */
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
@media (max-width: 640px) { .do-dont { grid-template-columns: 1fr; } }
.do-dont-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; }
.do-dont-col h3 { font-size: .95rem; margin-bottom: .75rem; }
.do-dont-col ul { margin: 0; padding-left: 1.1rem; }
.do-dont-col li { font-size: .93rem; color: var(--ink-soft); margin-bottom: .5rem; }
.do-dont-col li:last-child { margin-bottom: 0; }
.do-dont-col.do { background: #f7fdfa; border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.do-dont-col.do h3 { color: var(--ok); }
.do-dont-col.dont { background: #fffafa; border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.do-dont-col.dont h3 { color: var(--bad); }

/* Trust strip: the three objections answered in one band, directly under the
   hero, so they are read before the visitor has to decide. */
.trust-strip { background: var(--bg); border-block: 1px solid var(--line-soft); padding: 1.6rem 0; }
.trust-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.trust-strip li { font-size: .88rem; color: var(--ink-soft); }
.trust-strip strong { display: block; color: var(--ink); font-size: .92rem; margin-bottom: .15rem; }

/* Guest result page: one conversion, described as a document rather than a
   table row, because a guest has no dashboard to put a table in. */
.result-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: .35rem; }
.job-list { display: grid; gap: 1rem; }
.job {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.25rem 1.35rem;
  display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.job-main { flex: 1 1 22rem; min-width: 0; }
.job-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.job-doc { font-size: .9rem; color: var(--muted); font-family: var(--mono); }
.job-message { font-size: .9rem; color: var(--ink-soft); margin-bottom: .75rem; }
.job-error { font-size: .88rem; color: var(--bad); margin-bottom: .75rem; }
.job-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-top: .5rem; }
.job-actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.job-actions .button { white-space: nowrap; }
.inline-form { margin: 0; display: inline-flex; }
.cta-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 1.25rem 0 .75rem; }
.small { font-size: .84rem; }
@media (max-width: 560px) {
  .job { flex-direction: column; }
  .job-actions { flex-direction: row; flex-wrap: wrap; }
}

/* The header follows the visitor down the page, so the converter is one scroll
   away from anywhere on a long marketing page. */
@media (min-width: 861px) {
  .site-header { position: sticky; top: 0; z-index: 50; }
}

/* No dark mode, deliberately.
   An earlier version followed prefers-color-scheme and inverted the palette.
   It is gone: the site is one light design, the meta colour-scheme stays "light"
   so the browser does not tint form controls, and nothing on the page changes
   appearance because of an operating system setting. A converter is a document
   tool, and document tools should look like the page they print to. */

/* Progress bar on the guest result page: the track spans the card rather than
   sitting at a fixed 110px, which is sized for a table cell. */
.progress-row { display: flex; align-items: center; gap: .7rem; }
.progress-track-wide { width: 100%; height: 8px; }
.progress-row .progress-value { margin-top: 0; white-space: nowrap; }

/* Error pages: branded rather than the framework's default grey, and given the
   same header and footer as the rest of the site. */
.error-inner { text-align: center; }
.error-inner .lede { margin-inline: auto; }
.error-inner .cta-actions { margin-bottom: 1.5rem; }
