/* ==========================================================================
   ProofreadLab — Design System
   proofreadlab.com
   Author: ProofreadLab in-house. All styling and illustration original.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand palette — "scholar's desk": deep teal-navy, saffron, clay */
  --ink-900: #0B1F26;
  --ink-800: #0E3B43;
  --ink-700: #145059;
  --ink-600: #1C6870;
  --ink-500: #2C8A90;
  --ink-100: #DDEBEA;
  --ink-050: #EEF5F4;

  --saffron-600: #C67C15;
  --saffron-500: #E39A2B;
  --saffron-400: #F0B357;
  --saffron-100: #FBEBD2;

  --clay-600: #A4492F;
  --clay-500: #B4553A;
  --clay-100: #F6E4DE;

  --paper: #FBF8F4;
  --paper-2: #F4EFE8;
  --white: #FFFFFF;

  --grey-900: #17232B;
  --grey-700: #3F5158;
  --grey-600: #5A6C74;
  --grey-500: #7C8C93;
  --grey-300: #C6D0D3;
  --grey-200: #E2E9EA;
  --grey-100: #F0F4F4;

  --success-600: #2F7D4F;
  --success-100: #E2F2E8;
  --danger-600: #B3261E;
  --danger-100: #FBE6E4;

  /* Semantic */
  --bg: var(--paper);
  --surface: var(--white);
  --surface-alt: var(--ink-050);
  --text: var(--grey-900);
  --text-muted: var(--grey-600);
  --border: var(--grey-200);
  --border-strong: var(--grey-300);
  --accent: var(--ink-700);
  --accent-hover: var(--ink-800);
  --focus: var(--saffron-500);

  /* Type */
  --font-head: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.33vw, 1.38rem);
  --step-2:  clamp(1.41rem, 1.29rem + 0.57vw, 1.76rem);
  --step-3:  clamp(1.68rem, 1.48rem + 0.94vw, 2.25rem);
  --step-4:  clamp(2rem, 1.69rem + 1.5vw, 2.88rem);
  --step-5:  clamp(2.38rem, 1.91rem + 2.3vw, 3.67rem);

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(11, 31, 38, .06);
  --shadow-sm: 0 2px 8px rgba(11, 31, 38, .07);
  --shadow-md: 0 8px 26px rgba(11, 31, 38, .09);
  --shadow-lg: 0 20px 52px rgba(11, 31, 38, .13);

  --container: 1180px;
  --container-narrow: 760px;

  --ring: 0 0 0 3px rgba(227, 154, 43, .45);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.18; color: var(--ink-900); margin: 0 0 var(--sp-4); letter-spacing: -0.012em; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 var(--sp-4); }
a  { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-600); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li + li { margin-top: .35rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }
small { font-size: var(--step--1); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--saffron-100); color: var(--ink-900); }

/* ---------- 3. Layout ---------- */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2rem, var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--alt { background: var(--surface-alt); }
.section--paper { background: var(--paper-2); }
.section--ink { background: var(--ink-800); color: #E7F0EF; }
.section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink a { color: var(--saffron-400); }

.grid { display: grid; gap: var(--sp-5); }
/* Grid and flex children default to min-width:auto, which lets wide content
   (a table, a long URL) push the whole layout sideways. */
.grid > *, .split > *, .wizard > *, .tier-grid > *, .stat-row > * { min-width: 0; }
.table-wrap { max-width: 100%; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-7); align-items: center; }
.split--reverse > *:first-child { order: 2; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
  .split--reverse > *:first-child { order: 0; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.measure { max-width: 62ch; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }

/* ---------- 4. Utility type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay-600);
  margin: 0 0 var(--sp-3);
}
.lead { font-size: var(--step-1); color: var(--grey-700); line-height: 1.6; }
.muted { color: var(--text-muted); }
.tiny { font-size: var(--step--1); color: var(--text-muted); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-body); font-size: var(--step-0); font-weight: 600;
  line-height: 1; text-decoration: none; cursor: pointer;
  padding: .85em 1.5em; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink-700); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--ink-800); color: var(--white); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--saffron-500); color: var(--ink-900); box-shadow: var(--shadow-sm); }
.btn--accent:hover { background: var(--saffron-400); color: var(--ink-900); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink-700); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--ink-050); border-color: var(--ink-500); color: var(--ink-800); }
.btn--light { background: var(--white); color: var(--ink-800); }
.btn--light:hover { background: var(--ink-050); color: var(--ink-900); }
.btn--sm { padding: .6em 1.1em; font-size: var(--step--1); }
.btn--lg { padding: 1em 1.9em; font-size: var(--step-1); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.btn-row--center { justify-content: center; }

/* ---------- 6. Header ---------- */
.topbar {
  background: var(--ink-900); color: #CFE0DE;
  font-size: var(--step--1); padding: .45rem 0;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between; }
.topbar a { color: #CFE0DE; text-decoration: none; }
.topbar a:hover { color: var(--saffron-400); text-decoration: underline; }
.topbar__list { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; list-style: none; margin: 0; padding: 0; }
.topbar__list li + li { margin: 0; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 248, 244, .92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-5); min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink-900); flex: none; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font-family: var(--font-head); font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.brand__name span { color: var(--ink-600); }
.brand__tag { display: block; font-family: var(--font-body); font-size: .63rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey-500); font-weight: 600; margin-top: 3px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.nav__list li + li { margin-top: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; color: var(--grey-900); text-decoration: none;
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--ink-050); color: var(--ink-800); }
.nav__link[aria-current="page"] { color: var(--ink-700); box-shadow: inset 0 -2px 0 var(--saffron-500); }
.nav__caret { width: 10px; height: 10px; transition: transform .2s ease; }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

.megamenu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  padding: var(--sp-6) 0; display: none;
}
.megamenu[data-open="true"] { display: block; }
.megamenu__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.megamenu__title { font-family: var(--font-body); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clay-600); font-weight: 700; margin: 0 0 var(--sp-3); }
.megamenu__list { list-style: none; margin: 0; padding: 0; }
.megamenu__list li + li { margin-top: .45rem; }
.megamenu__list a { color: var(--grey-900); text-decoration: none; font-weight: 500; font-size: .95rem; }
.megamenu__list a:hover { color: var(--ink-700); text-decoration: underline; }
.megamenu__promo { background: var(--ink-050); border-radius: var(--radius); padding: var(--sp-5); }
@media (max-width: 1080px) { .megamenu__grid { grid-template-columns: repeat(2, 1fr); } }

.nav-toggle { display: none; margin-left: auto; }
.mobile-nav { display: none; }
@media (max-width: 1024px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; border-top: 1px solid var(--border); background: var(--white); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav__inner { padding: var(--sp-4) 0 var(--sp-6); max-height: 78vh; overflow-y: auto; }
  .mobile-nav details { border-bottom: 1px solid var(--border); }
  .mobile-nav summary { cursor: pointer; padding: .85rem .2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary::after { content: "+"; font-size: 1.3rem; color: var(--ink-600); }
  .mobile-nav details[open] summary::after { content: "–"; }
  .mobile-nav ul { list-style: none; margin: 0; padding: 0 0 .85rem .2rem; }
  .mobile-nav ul li + li { margin-top: .5rem; }
  .mobile-nav ul a { text-decoration: none; color: var(--grey-900); }
  .mobile-nav__cta { margin-top: var(--sp-5); display: grid; gap: var(--sp-3); }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink-800); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 7. Breadcrumbs ---------- */
.breadcrumbs { background: var(--paper-2); border-bottom: 1px solid var(--border); font-size: var(--step--1); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; list-style: none; margin: 0; padding: .7rem 0; }
.breadcrumbs li { display: flex; align-items: center; gap: .45rem; margin: 0; }
.breadcrumbs li + li::before { content: "›"; color: var(--grey-500); }
.breadcrumbs a { color: var(--grey-700); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink-700); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink-900); font-weight: 600; }

/* ---------- 8. Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--sp-8) calc(var(--sp-8) + var(--sp-5)); background: linear-gradient(170deg, var(--paper) 0%, var(--ink-050) 100%); }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: radial-gradient(60% 100% at 70% 0%, rgba(227,154,43,.10), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { max-width: 17ch; font-size: clamp(2.25rem, 1.85rem + 1.95vw, 3.35rem); }
.hero__art { filter: drop-shadow(0 18px 38px rgba(11,31,38,.13)); }
.hero__badges { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-5); padding: 0; list-style: none; }
.hero__badges li { display: flex; align-items: center; gap: .5rem; font-size: var(--step--1); font-weight: 600; color: var(--grey-700); margin: 0; }
.page-hero { background: var(--ink-800); color: #DCEAE8; padding-block: var(--sp-7); }
.page-hero h1 { color: var(--white); margin-bottom: var(--sp-3); }
.page-hero .lead { color: #BFD6D3; }

/* ---------- 9. Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-5); box-shadow: var(--shadow-xs);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--ink-100); }
.card h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.card p:last-child { margin-bottom: 0; }
.card__icon { width: 52px; height: 52px; margin-bottom: var(--sp-4); }
.card__link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35em; align-items: center; }
.card__link:hover { text-decoration: underline; }
.card--feature { border-top: 4px solid var(--saffron-500); }
.card--quiet { background: var(--ink-050); border-color: transparent; }

.pill { display: inline-block; padding: .28em .8em; border-radius: var(--radius-pill); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pill--accent { background: var(--saffron-100); color: var(--saffron-600); }
.pill--ink { background: var(--ink-100); color: var(--ink-800); }
.pill--clay { background: var(--clay-100); color: var(--clay-600); }
.pill--success { background: var(--success-100); color: var(--success-600); }

/* ---------- 10. Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 var(--sp-4); }
.checklist li { position: relative; padding-left: 1.9rem; margin-top: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .38em; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background: var(--ink-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.9 2.9 6.1-6.4' fill='none' stroke='%230E3B43' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 76%; background-position: center; background-repeat: no-repeat;
}
.checklist--accent li::before { background-color: var(--saffron-100); }

/* ---------- 11. Steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); }
.step { position: relative; padding-left: 4rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 2.8rem; height: 2.8rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ink-800); color: var(--white);
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 700;
}
.step h3 { margin-bottom: .35rem; font-size: var(--step-1); }

/* ---------- 12. Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
table.data caption { text-align: left; padding: var(--sp-4) var(--sp-5) 0; font-weight: 600; color: var(--grey-700); }
table.data th, table.data td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data thead th { background: var(--ink-050); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-800); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--paper-2); }
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 13. Forms ---------- */
.field { margin-bottom: var(--sp-4); }
.field > label, .field-label {
  display: block; font-weight: 600; font-size: .93rem; margin-bottom: .4rem; color: var(--grey-900);
}
.field-label .opt { font-weight: 400; color: var(--grey-500); font-style: italic; }
.hint { font-size: var(--step--1); color: var(--text-muted); margin-top: .35rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], select, textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--white); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: .7rem .85rem; transition: border-color .15s ease, box-shadow .15s ease;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%235A6C74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.15rem; padding-right: 2.4rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-500); box-shadow: var(--ring); }
textarea { min-height: 130px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger-600); }
.error-text { color: var(--danger-600); font-size: var(--step--1); margin-top: .3rem; display: none; }
.error-text.is-visible { display: block; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.choice-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice {
  position: relative; flex: 1 1 140px;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: .7rem .6rem; font-size: .92rem; font-weight: 600; cursor: pointer;
  background: var(--white); text-align: center; transition: all .15s ease; height: 100%;
}
.choice span:hover { border-color: var(--ink-500); background: var(--ink-050); }
.choice input:checked + span { border-color: var(--ink-700); background: var(--ink-700); color: var(--white); box-shadow: var(--shadow-sm); }
.choice input:focus-visible + span { box-shadow: var(--ring); }

.fieldset-clean { border: 0; margin: 0 0 var(--sp-4); padding: 0; }
.fieldset-clean legend { font-weight: 600; font-size: .93rem; padding: 0; margin-bottom: .45rem; }

/* ---------- 14. Order wizard ---------- */
.wizard { display: grid; grid-template-columns: 1fr 340px; gap: var(--sp-6); align-items: start; }
@media (max-width: 1000px) { .wizard { grid-template-columns: 1fr; } }

.progress { display: flex; gap: .4rem; margin-bottom: var(--sp-5); list-style: none; padding: 0; }
.progress li { flex: 1; margin: 0; }
.progress button {
  width: 100%; display: flex; align-items: center; gap: .55rem; text-align: left;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem .8rem; font: inherit; font-size: .88rem; font-weight: 600; color: var(--grey-600); cursor: pointer;
}
.progress button .n {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--grey-200); color: var(--grey-600); font-size: .82rem;
}
.progress li[data-state="active"] button { border-color: var(--ink-700); color: var(--ink-900); box-shadow: var(--shadow-xs); }
.progress li[data-state="active"] button .n { background: var(--ink-700); color: #fff; }
.progress li[data-state="done"] button { border-color: var(--ink-100); color: var(--ink-700); }
.progress li[data-state="done"] button .n { background: var(--success-600); color: #fff; }
@media (max-width: 700px) { .progress { flex-direction: column; } }

.step-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.step-panel[hidden] { display: none; }
.step-panel__head { display: flex; align-items: flex-start; gap: var(--sp-3); border-bottom: 1px solid var(--border); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); }
.step-panel__num { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink-700); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.step-panel__head h2 { font-size: var(--step-2); margin: 0 0 .15rem; }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-5); }
@media (max-width: 820px) { .tier-grid { grid-template-columns: 1fr; } }
.tier { position: relative; }
.tier input { position: absolute; opacity: 0; width: 0; height: 0; }
.tier__box {
  display: flex; flex-direction: column; height: 100%; cursor: pointer;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius); padding: var(--sp-5) var(--sp-4) var(--sp-4);
  background: var(--white); transition: all .18s ease;
}
.tier__box:hover { border-color: var(--ink-500); box-shadow: var(--shadow-sm); }
.tier input:checked + .tier__box { border-color: var(--ink-700); background: var(--ink-050); box-shadow: var(--shadow-md); }
.tier input:focus-visible + .tier__box { box-shadow: var(--ring); }
.tier__name { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; margin-bottom: .6rem; color: var(--ink-900); }
.tier__list { list-style: none; padding: 0; margin: 0 0 var(--sp-4); font-size: .88rem; color: var(--grey-700); }
.tier__list li { position: relative; padding-left: 1.4rem; margin-top: .4rem; }
.tier__list li::before { content: ""; position: absolute; left: 0; top: .42em; width: .85rem; height: .85rem; border-radius: 50%; background: var(--ink-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.9 2.9 6.1-6.4' fill='none' stroke='%230E3B43' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/76% no-repeat; }
.tier__price { margin-top: auto; background: var(--ink-700); color: #fff; border-radius: var(--radius-pill); text-align: center; padding: .6rem; font-weight: 700; font-size: .95rem; }
.tier input:checked + .tier__box .tier__price { background: var(--saffron-500); color: var(--ink-900); }
.tier__flag { position: absolute; top: -.6rem; left: var(--sp-4); z-index: 2; }

.rate-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rate-table th, .rate-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--border); text-align: left; }
.rate-table thead th { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-800); background: var(--ink-050); }
.rate-table tbody tr { cursor: pointer; }
.rate-table tbody tr:hover { background: var(--paper-2); }
.rate-table tbody tr[data-selected="true"] { background: var(--saffron-100); }
.rate-table td.price { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rate-table .radio-cell { width: 3rem; text-align: center; }

.summary {
  position: sticky; top: 92px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.summary__head { background: var(--ink-800); color: #fff; padding: var(--sp-4) var(--sp-5); }
.summary__head h2 { color: #fff; font-size: var(--step-1); margin: 0; }
.summary__body { padding: var(--sp-5); }
.summary__row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: .5rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.summary__row:last-of-type { border-bottom: 0; }
.summary__row dt { color: var(--text-muted); margin: 0; }
.summary__row dd { margin: 0; font-weight: 600; text-align: right; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 2px solid var(--ink-100); }
.summary__total .label { font-weight: 700; }
.summary__total .value { font-family: var(--font-head); font-size: var(--step-3); font-weight: 700; color: var(--ink-800); font-variant-numeric: tabular-nums; }

.upload-drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--ink-050);
  padding: var(--sp-6) var(--sp-4); text-align: center; cursor: pointer; transition: all .18s ease;
}
.upload-drop:hover, .upload-drop.is-drag { border-color: var(--ink-500); background: var(--white); }
.upload-drop svg { margin: 0 auto var(--sp-3); }
.file-list { list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.file-list li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .7rem; margin-top: .45rem; }
.file-list__name { word-break: break-word; min-width: 0; }
.file-list .size { margin-left: auto; color: var(--grey-500); font-size: .82rem; white-space: nowrap; }
/* Remove the chosen file and pick another. */
/* order.js sets the button's layout inline, so that it still looks right if this
   stylesheet is ever a version behind. Inline styles outrank a class selector,
   so the hover state has to say !important to get a word in. */
.file-remove {
  flex: none; display: inline-flex; align-items: center; gap: .3rem;
  white-space: nowrap; line-height: 1;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--white); color: var(--text-muted);
  font: inherit; font-size: .8rem; font-weight: 600;
  padding: .28rem .6rem .28rem .5rem; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.file-remove svg { flex: none; display: block; }
.file-remove:hover {
  color: var(--danger-600) !important;
  border-color: var(--danger-600) !important;
  background: #FDF3F2 !important;
}
.file-remove:focus-visible { box-shadow: var(--ring); outline: none; }
@media (max-width: 460px) {
  .file-list li { flex-wrap: wrap; }
  .file-list .size { margin-left: auto; }
  .file-remove { margin-left: auto; }
}

.secure-note {
  display: flex; align-items: center; gap: .6rem; font-size: var(--step--1); color: var(--success-600);
  background: var(--success-100); border-radius: var(--radius-sm); padding: .6rem .85rem; margin-bottom: var(--sp-5);
}

/* ---------- 15. Accordion / FAQ ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.accordion details + details { border-top: 1px solid var(--border); }
.accordion summary {
  cursor: pointer; padding: 1.05rem var(--sp-5); font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 1.1rem; height: 1.1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%230E3B43' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(180deg); }
.accordion summary:hover { background: var(--ink-050); }
.accordion .acc-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--grey-700); }
.accordion .acc-body > :last-child { margin-bottom: 0; }

/* ---------- 16. Quote / testimonial ---------- */
.quote { background: var(--white); border-left: 4px solid var(--saffron-500); border-radius: 0 var(--radius) var(--radius) 0; padding: var(--sp-5); box-shadow: var(--shadow-xs); }
.quote blockquote { margin: 0 0 var(--sp-4); font-family: var(--font-head); font-size: 1.08rem; line-height: 1.55; color: var(--ink-900); }
.quote figcaption { font-size: var(--step--1); color: var(--text-muted); }
.quote figcaption strong { color: var(--grey-900); display: block; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat__value { font-family: var(--font-head); font-size: var(--step-4); font-weight: 700; color: var(--ink-800); line-height: 1; }
.section--ink .stat__value { color: var(--saffron-400); }
.stat__label { font-size: var(--step--1); color: var(--text-muted); margin-top: .35rem; }
.section--ink .stat__label { color: #A9C6C3; }

/* ---------- 17. CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--ink-800) 0%, var(--ink-600) 100%); color: #fff; border-radius: var(--radius-lg); padding: var(--sp-7); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #CDE3E0; max-width: 54ch; margin-inline: auto; }
.cta-band::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(227,154,43,.14); top: -180px; right: -120px; }

/* ---------- 18. Footer ---------- */
.site-footer { background: var(--ink-900); color: #B7CCC9; padding-block: var(--sp-8) var(--sp-5); margin-top: var(--sp-8); font-size: .94rem; }
.site-footer h3 { color: var(--white); font-family: var(--font-body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.site-footer a { color: #B7CCC9; text-decoration: none; }
.site-footer a:hover { color: var(--saffron-400); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: .5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-7); padding-top: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; font-size: var(--step--1); }
.footer-brand__mark { width: 38px; height: 38px; }

/* ---------- 19. Misc ---------- */
.notice { border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--border); background: var(--white); }
.notice--info { background: var(--ink-050); border-color: var(--ink-100); }
.notice--warn { background: var(--saffron-100); border-color: var(--saffron-400); }
.notice--ok { background: var(--success-100); border-color: #B9DDC7; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-6); opacity: .8; }
.divider-wave { display: block; width: 100%; height: 48px; }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }
.prose table { width: 100%; }

@media print {
  .site-header, .topbar, .site-footer, .breadcrumbs, .btn, .summary { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   20. Accounts, dashboard and admin
   ========================================================================== */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 60vh; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } }
.auth-shell__aside {
  background: linear-gradient(160deg, var(--ink-800) 0%, var(--ink-900) 100%);
  color: #CDE3E0; padding: var(--sp-8) var(--sp-7); display: flex; flex-direction: column; justify-content: center;
}
.auth-shell__aside h2 { color: #fff; }
.auth-shell__aside .checklist li::before { background-color: rgba(255,255,255,.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.9 2.9 6.1-6.4' fill='none' stroke='%23F0B357' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.auth-shell__main { padding: var(--sp-8) var(--sp-6); display: flex; align-items: center; }
.auth-card { width: min(100%, 420px); margin-inline: auto; }
.auth-card h1 { font-size: var(--step-3); }

.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  width: 100%; padding: .8rem 1.2rem; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong); background: var(--white);
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--grey-900);
  text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.oauth-btn:hover { background: var(--ink-050); border-color: var(--ink-500); color: var(--grey-900); box-shadow: var(--shadow-sm); }
.oauth-btn svg { flex: none; }

.or-rule { display: flex; align-items: center; gap: var(--sp-4); margin: var(--sp-5) 0; color: var(--text-muted); font-size: var(--step--1); }
.or-rule::before, .or-rule::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: .4rem .6rem;
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink-700); border-radius: var(--radius-sm);
}
.pw-toggle:hover { background: var(--ink-050); }
.pw-meter { height: 5px; border-radius: 999px; background: var(--grey-200); overflow: hidden; margin-top: .5rem; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--clay-500); transition: width .25s ease, background .25s ease; }
.pw-meter[data-score="2"] i { background: var(--saffron-500); }
.pw-meter[data-score="3"] i { background: var(--success-600); }
.pw-meter[data-score="4"] i { background: var(--success-600); }

/* ---- Dashboard shell ---- */
.dash { display: grid; grid-template-columns: 236px 1fr; gap: var(--sp-6); align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash-nav { position: sticky; top: 92px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); box-shadow: var(--shadow-xs); }
.dash-nav ul { list-style: none; margin: 0; padding: 0; }
.dash-nav li + li { margin-top: .2rem; }
.dash-nav a {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--grey-900); font-weight: 600; font-size: .94rem;
}
.dash-nav a:hover { background: var(--ink-050); color: var(--ink-800); }
.dash-nav a[aria-current="page"] { background: var(--ink-700); color: #fff; }
.dash-nav a[aria-current="page"] svg { color: #fff; }
.dash-nav svg { flex: none; color: var(--ink-600); }
@media (max-width: 900px) { .dash-nav { position: static; } .dash-nav ul { display: flex; flex-wrap: wrap; gap: .3rem; } }

.dash-head { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-end; justify-content: space-between; margin-bottom: var(--sp-5); }
.dash-head h1 { margin: 0; font-size: var(--step-3); }

/* ---- Order cards and tables ---- */
.order-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-5); box-shadow: var(--shadow-xs); transition: box-shadow .18s ease, border-color .18s ease;
}
.order-card + .order-card { margin-top: var(--sp-4); }
.order-card:hover { box-shadow: var(--shadow-sm); border-color: var(--ink-100); }
.order-card__top { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.order-card__ref { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--ink-800); text-decoration: none; }
.order-card__ref:hover { text-decoration: underline; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-3) var(--sp-4); }
.order-meta dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-500); margin: 0 0 .15rem; }
.order-meta dd { margin: 0; font-weight: 600; font-size: .94rem; }

.file-row {
  display: flex; align-items: center; gap: var(--sp-3); padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white);
}
.file-row + .file-row { margin-top: .5rem; }
.file-row__icon { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--ink-050); display: grid; place-items: center; }
.file-row__name { font-weight: 600; font-size: .94rem; word-break: break-word; }
.file-row__meta { font-size: var(--step--1); color: var(--text-muted); }
.file-row__action { margin-left: auto; flex: none; }

/* ---- Status timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding-bottom: var(--sp-4); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -2.1rem; top: .35rem; width: .85rem; height: .85rem;
  border-radius: 50%; background: var(--white); border: 2px solid var(--border-strong);
}
.timeline li[data-done="true"]::before { background: var(--ink-700); border-color: var(--ink-700); }
.timeline li[data-current="true"]::before { background: var(--saffron-500); border-color: var(--saffron-500); box-shadow: 0 0 0 4px var(--saffron-100); }
.timeline strong { display: block; font-size: .95rem; }
.timeline span { font-size: var(--step--1); color: var(--text-muted); }

/* ---- Admin ---- */
.admin-bar { background: var(--ink-900); color: #CFE0DE; padding: .5rem 0; font-size: var(--step--1); }
.admin-bar a { color: var(--saffron-400); }
.admin-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--sp-5); }
.admin-filters a {
  padding: .45rem .9rem; border-radius: var(--radius-pill); border: 1.5px solid var(--border);
  text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--grey-700); background: var(--white);
}
.admin-filters a:hover { border-color: var(--ink-500); color: var(--ink-800); }
.admin-filters a[aria-current="true"] { background: var(--ink-700); border-color: var(--ink-700); color: #fff; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4); }
.kpi__value { font-family: var(--font-head); font-size: var(--step-3); font-weight: 700; color: var(--ink-800); line-height: 1; }
.kpi__label { font-size: var(--step--1); color: var(--text-muted); margin-top: .3rem; }
.kpi--alert .kpi__value { color: var(--clay-600); }

.empty-state { text-align: center; padding: var(--sp-8) var(--sp-5); background: var(--white); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-state svg { margin: 0 auto var(--sp-4); }

/* ==========================================================================
   21. Sign in / register — plain centred column, no card
   ========================================================================== */
.authpage {
  background: var(--white);
  min-height: 58vh;
  padding-block: var(--sp-9) var(--sp-9);
}
.authpage__col { width: min(100% - 2.5rem, 27rem); margin-inline: auto; }
.authpage__col--wide { width: min(100% - 2.5rem, 30rem); }

.authpage__col h1 {
  font-size: var(--step-3);
  letter-spacing: -.02em;
  margin-bottom: .35rem;
}
.authpage__alt {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}
.authpage__alt a { font-weight: 600; }

.authpage__col .field { margin-bottom: var(--sp-5); }
.authpage__col .field:last-of-type { margin-bottom: 0; }
.authpage__col .field > label,
.authpage__col .field-label {
  font-size: .9rem;
  font-weight: 500;
  color: var(--grey-600);
  margin-bottom: .45rem;
}
.authpage__col input[type="text"],
.authpage__col input[type="email"],
.authpage__col input[type="password"],
.authpage__col input[type="tel"] {
  padding: .85rem .95rem;
  border-radius: 8px;
  border-color: var(--grey-300);
  background: var(--white);
}
.authpage__col .hint { margin-top: .4rem; }
.authpage__col .pw-meter { height: 4px; margin-top: .6rem; transition: opacity .2s ease; }
.authpage__col .pw-meter[data-score="0"] { opacity: 0; }
.authpage__col .oauth-btn { border-radius: 8px; padding: .8rem 1rem; }

.authpage__remember {
  display: flex; align-items: center; gap: .5rem;
  font-size: .88rem; color: var(--grey-700);
  margin: var(--sp-5) 0 0;
  font-weight: 400;
}
.authpage__remember input { width: auto; }

.authpage__actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  margin-top: var(--sp-6);
}
.authpage__actions .btn { padding-inline: 2.2em; }
.authpage__actions a { font-size: .92rem; }

.authpage__note {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.authpage__note p { margin-bottom: .4rem; }
.authpage__note p:last-child { margin-bottom: 0; }
/* Numbered examples in the custom-work panel on the order form. */
.custom-list { margin: 0 0 var(--sp-4); padding-left: 1.35rem; }
.custom-list li { margin-bottom: .35rem; }
.custom-list li:last-child { margin-bottom: 0; }
/* ---------- 22. Payments ---------- */
/* "More options" sits in the same row as the method buttons and has to look
   like them, but it is a button, not a radio. */
.choice--more {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
}
.choice--more span {
  border-style: dashed;
  color: var(--ink-700);
}
.choice--more[aria-expanded="true"] span {
  border-style: solid; border-color: var(--ink-500); background: var(--ink-050);
}
.choice--more:focus-visible span { box-shadow: var(--ring); }

/* The document is required, so say so loudly when it is missing. */
.upload-drop.is-invalid {
  border-color: var(--danger-600);
  background: var(--danger-050, #FDF3F2);
}
