/* ============================================================================
   QRLib — "Broadsheet" Design System
   Editorial / newspaper aesthetic: serif display, hairline rules, columnar
   grids, warm paper + ink, single confident accent.
   Shared by the marketing site (index.html) and the client panel (app.html).
   Zero-build, native CSS. RTL-ready via logical properties + [dir].
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Paper & ink — the newsprint substrate */
  --paper:        #faf7f0;   /* page background */
  --paper-2:      #f4efe3;   /* raised panels, subtle fills */
  --paper-3:      #ece6d6;   /* deeper wells, hovers */
  --card:         #fffdf8;   /* cards sit slightly brighter than paper */
  --ink:          #1b1a17;   /* primary text — warm near-black */
  --ink-2:        #565148;   /* secondary text */
  --ink-3:        #8b857a;   /* muted / captions */
  --ink-inverse:  #f7f3ea;   /* text on dark */

  /* Hairlines — the rules that define a broadsheet */
  --rule:         #ddd6c6;   /* standard hairline */
  --rule-strong:  #c3bba7;   /* emphasized divider */
  --rule-ink:     #1b1a17;   /* heavy black rule (mastheads) */

  /* Brand — deep editorial green, used sparingly */
  --brand:        #1c5540;
  --brand-ink:    #123c2d;   /* pressed / text-on-tint */
  --brand-strong: #24704f;
  --brand-tint:   #e5efe8;   /* pale green wash */
  --brand-tint-2: #d3e5da;

  /* Signal — newspaper red, for emphasis & destructive intent */
  --signal:       #a5382a;
  --signal-tint:  #f6e6e2;

  /* Semantic status (QR code lifecycle + system) */
  --ok:           #1c5540;  --ok-tint:   #e5efe8;
  --warn:         #9a6a12;  --warn-tint: #f7ecd4;
  --danger:       #a5382a;  --danger-tint:#f6e6e2;
  --info:         #2b5171;  --info-tint: #e4ecf3;

  /* Code status chips */
  --st-active:    #1c5540;  --st-active-bg:  #e5efe8;
  --st-paused:    #9a6a12;  --st-paused-bg:  #f7ecd4;
  --st-archived:  #8b857a;  --st-archived-bg:#ece6d6;
  --st-draft:     #2b5171;  --st-draft-bg:   #e4ecf3;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-serif:   'Source Serif 4', 'Georgia', serif;
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arabic, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  /* Type scale (fluid where it matters) */
  --t-masthead: clamp(2.6rem, 6vw, 4.6rem);
  --t-h1:       clamp(2.1rem, 4.4vw, 3.3rem);
  --t-h2:       clamp(1.6rem, 3vw, 2.2rem);
  --t-h3:       1.35rem;
  --t-h4:       1.12rem;
  --t-body:     1rem;
  --t-sm:       0.875rem;
  --t-xs:       0.78rem;
  --t-2xs:      0.68rem;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radius — sharp, print-like */
  --r-xs: 2px; --r: 4px; --r-lg: 8px; --r-pill: 999px;

  /* Elevation — soft, paper-on-paper */
  --shadow-1: 0 1px 2px rgba(27,26,23,.06), 0 1px 1px rgba(27,26,23,.04);
  --shadow-2: 0 4px 14px rgba(27,26,23,.09), 0 2px 4px rgba(27,26,23,.05);
  --shadow-3: 0 18px 48px rgba(27,26,23,.16), 0 6px 14px rgba(27,26,23,.08);

  /* Structure */
  --maxw: 1200px;
  --maxw-wide: 1360px;
  --sidebar-w: 264px;
  --topbar-h: 60px;
  --focus: 0 0 0 3px rgba(28,85,64,.28);

  --ease: cubic-bezier(.2,.6,.2,1);
  --dur: 180ms;
}

/* ----------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
::selection { background: var(--brand-tint-2); color: var(--brand-ink); }
[hidden] { display: none !important; }

/* ----------------------------------------------------------------------------
   3. Typography primitives
   -------------------------------------------------------------------------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
h4 { font-family: var(--font-sans); font-size: var(--t-h4); font-weight: 650; line-height: 1.3; }
.masthead { font-family: var(--font-display); font-weight: 800; font-size: var(--t-masthead); line-height: 1.02; letter-spacing: -.02em; }
.lede { font-family: var(--font-serif); font-size: clamp(1.05rem, 1.6vw, 1.28rem); line-height: 1.55; color: var(--ink-2); }
.prose { font-family: var(--font-serif); line-height: 1.7; }
.prose p + p { margin-top: var(--s-4); }

/* Editorial label — the small-caps kicker used above headlines & on sections */
.kicker {
  font-family: var(--font-sans);
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--brand); display: inline-block; }
.kicker.plain::before { display: none; }
.dateline { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }

.text-muted { color: var(--ink-2); }
.text-faint { color: var(--ink-3); }
.text-brand { color: var(--brand); }
.text-signal { color: var(--signal); }
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }

/* Drop cap — a broadsheet flourish for opening paragraphs */
.dropcap::first-letter {
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4em; line-height: .78; float: left;
  padding-inline-end: .08em; margin-top: .05em; color: var(--brand);
}

/* ----------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-5); }
.container-wide { max-width: var(--maxw-wide); }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; gap: var(--s-4); }
.row.center { align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: var(--s-5); }
.spacer { flex: 1; }
.hr { height: 1px; background: var(--rule); border: 0; }
.hr-strong { height: 2px; background: var(--rule-ink); border: 0; }
.hr-dotted { height: 0; border: 0; border-top: 1px dotted var(--rule-strong); }

/* Section rhythm */
.section { padding-block: var(--s-9); }
.section-sm { padding-block: var(--s-7); }
.section-head { max-width: 62ch; margin-bottom: var(--s-6); }
.section-head .lede { margin-top: var(--s-3); }

/* ----------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --bg: var(--ink); --fg: var(--ink-inverse); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 10px 18px; font-family: var(--font-sans); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .01em; line-height: 1; color: var(--fg); background: var(--bg);
  border: 1.5px solid var(--bd); border-radius: var(--r);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

.btn-brand    { --bg: var(--brand); --fg: #fff; --bd: var(--brand); }
.btn-brand:hover { --bg: var(--brand-strong); }
.btn-ghost    { --bg: transparent; --fg: var(--ink); --bd: var(--rule-strong); }
.btn-ghost:hover { --bg: var(--paper-2); box-shadow: none; }
.btn-quiet    { --bg: transparent; --fg: var(--ink-2); --bd: transparent; padding-inline: 10px; }
.btn-quiet:hover { --bg: var(--paper-2); --fg: var(--ink); box-shadow: none; }
.btn-signal   { --bg: transparent; --fg: var(--signal); --bd: var(--signal); }
.btn-signal:hover { --bg: var(--signal); --fg: #fff; }
.btn-lg { padding: 14px 26px; font-size: var(--t-body); }
.btn-sm { padding: 7px 12px; font-size: var(--t-xs); }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 9px; }

/* Link with editorial underline */
.link { color: var(--brand); font-weight: 600; box-shadow: inset 0 -1px 0 var(--brand-tint-2); transition: box-shadow var(--dur); }
.link:hover { box-shadow: inset 0 -2px 0 var(--brand); }

/* ----------------------------------------------------------------------------
   6. Forms
   -------------------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: var(--s-4); }
.label { display: block; font-size: var(--t-xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s-2); }
.label .req { color: var(--signal); }
.hint { font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s-2); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; font-size: var(--t-body);
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--rule-strong); border-radius: var(--r);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: var(--focus); outline: none; }
.textarea { min-height: 108px; resize: vertical; font-family: inherit; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23565148' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
[dir="rtl"] .select { background-position: left 12px center; padding-inline-end: 13px; padding-inline-start: 34px; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--danger); }
.field.invalid .error-text { color: var(--danger); font-size: var(--t-xs); margin-top: var(--s-2); display: block; }
.error-text { display: none; }

.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: inline-flex; align-items: center; padding: 0 12px; background: var(--paper-2); border: 1.5px solid var(--rule-strong); color: var(--ink-2); font-size: var(--t-sm); }
.input-group .addon:first-child { border-inline-end: 0; border-radius: var(--r) 0 0 var(--r); }
.input-group .input { border-radius: 0 var(--r) var(--r) 0; }
[dir="rtl"] .input-group .addon:first-child { border-radius: 0 var(--r) var(--r) 0; }
[dir="rtl"] .input-group .input { border-radius: var(--r) 0 0 var(--r); }

/* Check & radio */
.check { display: inline-flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; font-size: var(--t-sm); color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: none; }

/* Toggle */
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--rule-strong); border-radius: var(--r-pill); transition: background var(--dur); }
.switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-18px); }

/* Segmented control */
.segmented { display: inline-flex; padding: 3px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); }
.segmented button { padding: 6px 14px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); border-radius: var(--r-xs); }
.segmented button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

/* ----------------------------------------------------------------------------
   7. Cards & panels
   -------------------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: var(--s-5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--rule); }
.card-head h3, .card-head h4 { margin: 0; }
.card-body { padding: var(--s-5); }
.card-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--rule); background: var(--paper); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s-5); }
.well { background: var(--paper); border: 1px dashed var(--rule-strong); border-radius: var(--r); padding: var(--s-5); }

/* KPI / stat tile — framed like a stock-ticker box */
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s-5); position: relative; }
.stat .kicker { margin-bottom: var(--s-3); }
.stat .value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .meta { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--ink-3); display: flex; align-items: center; gap: var(--s-2); }
.trend { font-weight: 700; font-size: var(--t-xs); display: inline-flex; align-items: center; gap: 3px; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--danger); }

/* ----------------------------------------------------------------------------
   8. Badges, chips, pills
   -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--r-xs); background: var(--paper-3); color: var(--ink-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active   { background: var(--st-active-bg); color: var(--st-active); }
.badge.paused   { background: var(--st-paused-bg); color: var(--st-paused); }
.badge.archived { background: var(--st-archived-bg); color: var(--st-archived); }
.badge.draft    { background: var(--st-draft-bg); color: var(--st-draft); }
.badge.brand    { background: var(--brand-tint); color: var(--brand-ink); }
.badge.signal   { background: var(--signal-tint); color: var(--signal); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; font-size: var(--t-xs); font-weight: 600; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-pill); color: var(--ink-2); }
.chip button { color: var(--ink-3); display: inline-flex; }
.chip.selected { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand-ink); }

/* ----------------------------------------------------------------------------
   9. Tables — ledger style
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); }
table.ledger { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.ledger thead th { text-align: start; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: var(--s-3) var(--s-4); border-bottom: 2px solid var(--rule-ink); white-space: nowrap; background: var(--paper); position: sticky; top: 0; }
.ledger tbody td { padding: var(--s-4); border-bottom: 1px solid var(--rule); vertical-align: middle; }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr { transition: background var(--dur); }
.ledger tbody tr:hover { background: var(--paper); }
.ledger tbody tr.selected { background: var(--brand-tint); }
.ledger .num { text-align: end; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------------------
   10. Overlays — modal, drawer, toast, menu
   -------------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(27,26,23,.42); backdrop-filter: blur(2px); z-index: 80; display: grid; place-items: center; padding: var(--s-5); opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.overlay.open { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-3); transform: translateY(8px) scale(.99); transition: transform var(--dur) var(--ease); max-height: 90vh; display: flex; flex-direction: column; }
.overlay.open .modal { transform: none; }
.modal-head { padding: var(--s-5); border-bottom: 1px solid var(--rule); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); }
.modal-body { padding: var(--s-5); overflow-y: auto; }
.modal-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; gap: var(--s-3); background: var(--paper); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(460px, 92vw); background: var(--card); border-inline-start: 1px solid var(--rule-strong); box-shadow: var(--shadow-3); z-index: 85; transform: translateX(100%); transition: transform var(--dur) var(--ease); display: flex; flex-direction: column; }
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: none; }

.toast-stack { position: fixed; inset-block-end: var(--s-5); inset-inline-end: var(--s-5); z-index: 120; display: flex; flex-direction: column; gap: var(--s-3); max-width: 380px; }
.toast { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); background: var(--ink); color: var(--ink-inverse); border-radius: var(--r); box-shadow: var(--shadow-3); animation: toast-in var(--dur) var(--ease); }
.toast .bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--brand-strong); flex: none; }
.toast.ok .bar { background: #6fce9f; }
.toast.danger .bar { background: #e58e80; }
.toast .t-title { font-weight: 650; font-size: var(--t-sm); }
.toast .t-msg { font-size: var(--t-xs); color: #cfc9bd; margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.menu { min-width: 200px; background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow-3); padding: var(--s-2); }
.menu button, .menu a { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 8px 10px; font-size: var(--t-sm); color: var(--ink); border-radius: var(--r-xs); text-align: start; }
.menu button:hover, .menu a:hover { background: var(--paper-2); }
.menu button.danger { color: var(--danger); }
.menu .sep { height: 1px; background: var(--rule); margin: var(--s-2) 0; }

/* ----------------------------------------------------------------------------
   11. States — empty, loading, skeleton
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: var(--s-8) var(--s-5); max-width: 460px; margin-inline: auto; }
.empty .mark { width: 56px; height: 56px; margin: 0 auto var(--s-4); display: grid; place-items: center; border: 2px solid var(--rule-ink); border-radius: var(--r); color: var(--ink); }
.empty h3 { font-size: var(--t-h3); margin-bottom: var(--s-2); }
.empty p { color: var(--ink-2); margin-bottom: var(--s-5); }

.skeleton { background: linear-gradient(100deg, var(--paper-2) 30%, var(--paper-3) 50%, var(--paper-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-xs); }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--rule-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------------------
   12. Utilities
   -------------------------------------------------------------------------- */
.flex { display: flex; } .grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s-4); }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.w-full { width: 100%; } .text-center { text-align: center; } .text-end { text-align: end; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none; }
.fs-sm { font-size: var(--t-sm); } .fs-xs { font-size: var(--t-xs); }
.fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }
.rounded { border-radius: var(--r); } .bordered { border: 1px solid var(--rule); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--s-7); }
  .hide-sm { display: none; }
}

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