/* Crafts Software — corporate site. Hand-written, no build step, ~one file. */
:root {
  --ink: #0b1220;
  --navy: #0a1020;
  --navy-2: #111a2f;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #526071;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --paper: #ffffff;
  --blue: #2563eb;       /* buttons, fills (white text = 5.2:1) */
  --blue-text: #1d4ed8;  /* blue text on light surfaces (>= 6:1) */
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --on-dark: #e6ecf8;
  --on-dark-dim: #9fb0cc;
  --line-dark: rgba(148, 163, 184, .18);
  --radius: 12px;
  --fast: 150ms;
  --std: 250ms;
  --slow: 400ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--slate-900); background: var(--paper); line-height: 1.6; font-size: 16px; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: inherit; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
/* Focus ring: dark blue on light surfaces (>= 3:1), cyan on dark ones. */
:focus-visible { outline: 3px solid var(--blue-text); outline-offset: 3px; border-radius: 4px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .section.dark :focus-visible, .search-overlay :focus-visible, .on-dark :focus-visible { outline-color: var(--cyan); }
.skip:focus { outline-color: var(--blue-text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform var(--fast) var(--ease), background var(--std), border-color var(--std); font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { border-color: var(--slate-300); color: var(--slate-900); background: transparent; }
.btn-ghost:hover { border-color: var(--slate-700); }
.on-dark .btn-ghost { border-color: var(--line-dark); color: var(--on-dark); }
.on-dark .btn-ghost:hover { border-color: var(--on-dark-dim); }
.btn .arrow { transition: transform var(--std) var(--ease); }
.btn:hover .arrow, .card:hover .arrow { transform: translateX(4px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 16, 32, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-dark); color: var(--on-dark); transition: padding var(--std); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { font-weight: 700; letter-spacing: -.02em; font-size: 1.15rem; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--on-dark-dim); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .94rem; transition: color var(--fast), background var(--fast); }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(148, 163, 184, .1); }
.nav .btn { color: #fff; padding: 9px 18px; margin-left: 8px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-dark); color: var(--on-dark); border-radius: 8px; padding: 10px 12px; font: inherit; min-height: 44px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--slate-100); }
.section.dark { background: var(--navy); color: var(--on-dark); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--blue-text); margin-bottom: 14px; }
.dark .eyebrow, .on-dark .eyebrow { color: var(--cyan); }
.lead { font-size: 1.15rem; color: var(--slate-500); max-width: 62ch; }
.dark .lead, .on-dark .lead { color: var(--on-dark-dim); }
.section-head { margin-bottom: 40px; max-width: 720px; }

/* Hero */
.hero { background: var(--navy); color: var(--on-dark); position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); opacity: .5; }
.hero .grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { margin-bottom: 28px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { width: 100%; aspect-ratio: 1 / 1; max-width: 520px; margin-inline: auto; }
.hero-visual .node rect { fill: var(--navy-2); stroke: var(--line-dark); transition: stroke var(--std); }
.hero-visual .node text { fill: var(--on-dark); font-size: 13px; font-weight: 600; }
.hero-visual .node:hover rect { stroke: var(--cyan); }
.hero-visual .path { stroke: var(--blue); stroke-width: 1.2; fill: none; stroke-dasharray: 4 6; opacity: .7; }
.hero-visual .core circle { fill: var(--navy-2); stroke: var(--cyan); stroke-width: 1.5; }
.hero-visual .core text { fill: #fff; font-size: 14px; font-weight: 700; }

/* Cards & grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { display: block; background: var(--paper); border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; transition: border-color var(--std), transform var(--std) var(--ease), box-shadow var(--std); }
.card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .35); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--slate-500); font-size: .95rem; margin-bottom: 14px; }
.card .more { color: var(--blue-text); font-weight: 600; font-size: .9rem; }
.card.dark { background: var(--navy-2); border-color: var(--line-dark); color: var(--on-dark); }
.card.dark p { color: var(--on-dark-dim); }
.shot { aspect-ratio: 16 / 10; background: var(--slate-100); border-radius: 8px; margin: -8px -8px 16px; overflow: hidden; border: 1px solid var(--slate-200); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--slow) var(--ease); }
.card:hover .shot img { transform: scale(1.03); }
.tag { display: inline-block; font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: var(--slate-100); color: var(--slate-700); margin: 0 6px 6px 0; }
.tag.cat { background: rgba(59, 130, 246, .1); color: #1d4ed8; }

.list-check { list-style: none; padding: 0; margin: 0 0 1.2em; }
.list-check li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.list-check li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; border-top: 2px solid var(--slate-200); padding-top: 14px; }
.steps li::before { content: "0" counter(s); display: block; color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--slate-500); font-size: .93rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--slate-300); text-decoration: none; font-size: .9rem; color: var(--slate-700); transition: all var(--fast); }
.filters a:hover { border-color: var(--slate-700); }
.filters a[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Browser frame for screenshots */
.frame { border: 1px solid var(--slate-200); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .5); }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--slate-100); border-bottom: 1px solid var(--slate-200); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--slate-300); }

/* Forms */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--slate-300); border-radius: 10px; background: #fff; color: var(--slate-900); min-height: 46px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice span { display: block; padding: 14px; border: 1px solid var(--slate-300); border-radius: 10px; cursor: pointer; font-size: .93rem; transition: all var(--fast); }
.choice input:checked + span { border-color: var(--blue); background: rgba(59, 130, 246, .08); font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--blue-text); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .94rem; }
.alert.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.stepper { display: flex; gap: 6px; margin-bottom: 24px; }
.stepper i { height: 4px; flex: 1; background: var(--slate-200); border-radius: 2px; }
.stepper i.on { background: var(--blue); }
.js-steps .step { display: none; }
.js-steps .step.active { display: block; }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-dark-dim); padding: 64px 0 28px; border-top: 1px solid var(--line-dark); }
.site-footer .foot-title { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.foot-bottom { border-top: 1px solid var(--line-dark); padding-top: 20px; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.breadcrumb { font-size: .85rem; color: var(--on-dark-dim); margin-bottom: 16px; }
.breadcrumb a { text-decoration: none; }

/* Reveal (one-time, reduced-motion safe) */
.reveal-hide { opacity: 0; transform: translateY(14px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal-hide.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-hide { opacity: 1; transform: none; }
}

@media (max-width: 920px) {
  .hero .grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual { max-width: 380px; }
}
@media (max-width: 520px) {
  .grid-4, .steps, .foot-grid { grid-template-columns: 1fr; }
}

/* Portfolio */
.feature-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; margin-bottom: 28px; }
.compact { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 14px; }
.compact .thumb { aspect-ratio: 16 / 10; background: var(--slate-100); border-radius: 6px; overflow: hidden; }
.compact .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.compact h3 { font-size: 1rem; margin: 0 0 2px; }
.compact p { margin: 0; font-size: .85rem; }
.device { width: 220px; border: 8px solid var(--ink); border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .6); }
.composition { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: end; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.metric { border-top: 2px solid var(--blue); padding-top: 10px; }
.metric strong { display: block; font-size: 1.8rem; letter-spacing: -.02em; }
.faq details { border-bottom: 1px solid var(--slate-200); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.sticky-cta { display: none; }
.lightbox { position: fixed; inset: 0; background: rgba(5, 8, 16, .92); display: none; align-items: center; justify-content: center; z-index: 90; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 8px; }
.lightbox button { position: absolute; top: 14px; right: 14px; background: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font: inherit; cursor: pointer; min-height: 44px; }
@media (max-width: 920px) {
  .feature-card, .composition { grid-template-columns: 1fr; }
  .device { margin-inline: auto; }
  .sticky-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; }
  .sticky-cta .btn { width: 100%; justify-content: center; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
  body.has-sticky { padding-bottom: 76px; }
}

/* Dropdown (mega) menus */
.has-menu { position: relative; }
.has-menu > a { display: inline-flex; gap: 6px; align-items: center; }
.menu-panel { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; background: var(--navy-2); border: 1px solid var(--line-dark); border-radius: 12px; padding: 8px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); z-index: 60; }
.menu-panel a { display: block; padding: 9px 12px; font-size: .9rem; }
.menu-panel .menu-all { color: var(--cyan); border-top: 1px solid var(--line-dark); margin-top: 4px; border-radius: 0 0 8px 8px; }
.has-menu:hover .menu-panel, .has-menu:focus-within .menu-panel { display: block; }


/* CMS page body */
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--slate-700); }
.prose a { color: var(--blue-text); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--slate-200); padding: 8px 10px; text-align: left; }
.prose blockquote { border-left: 3px solid var(--blue); margin: 1em 0; padding: 0 0 0 16px; color: var(--slate-500); }

/* Search overlay */
.search-btn { background: none; border: 1px solid var(--line-dark); color: var(--on-dark); border-radius: 8px; padding: 9px 11px; cursor: pointer; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; margin-right: 8px; }
.search-btn:hover { border-color: var(--on-dark-dim); }
.search-overlay[hidden] { display: none; }
.search-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 16, .78); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; backdrop-filter: blur(4px); }
.search-box { width: min(720px, 100%); background: var(--navy-2); color: var(--on-dark); border: 1px solid var(--line-dark); border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.search-form { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line-dark); }
.search-form input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; font-size: 1.1rem; min-height: 44px; outline: none; }
.search-form input::placeholder { color: var(--on-dark-dim); }
.search-close { background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark-dim); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 44px; }
.search-box kbd { font: inherit; font-size: .75rem; border: 1px solid var(--line-dark); border-radius: 4px; padding: 1px 6px; color: var(--on-dark-dim); }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-group { padding: 10px 12px 4px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.search-results [role="option"] a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.search-results [role="option"][aria-selected="true"] a, .search-results [role="option"] a:hover { background: rgba(59, 130, 246, .18); }
.sr-title { display: block; font-weight: 600; }
.sr-title mark { background: transparent; color: var(--cyan); }
.sr-snippet { display: block; font-size: .85rem; color: var(--on-dark-dim); margin-top: 2px; }
.search-empty, .search-hint { padding: 14px 16px; color: var(--on-dark-dim); font-size: .9rem; margin: 0; }
@media (max-width: 920px) {
  .search-overlay { padding: 0; }
  .search-box { width: 100%; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
  .search-btn { margin-right: 8px; }
}

/* Touch targets (WCAG 2.2 AA: at least 24px; we aim for 44px where practical) */
.filters a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer li a { display: inline-block; padding: 6px 0; }
.menu-panel a { min-height: 40px; display: flex; align-items: center; }

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand { min-height: 44px; }

/* Contact page: split layout */
.contact-section { padding-top: clamp(24px, 4vw, 48px); background: var(--slate-100); }
.breadcrumb.on-light { color: var(--slate-500); margin-bottom: 18px; }
.contact-split { display: grid; grid-template-columns: 5fr 7fr; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .5); }
.contact-aside { background: var(--navy); color: var(--on-dark); padding: clamp(28px, 4vw, 56px); position: relative; }
.contact-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 48px 48px; opacity: .35; mask-image: radial-gradient(ellipse at 20% 0%, #000 10%, transparent 70%); pointer-events: none; }
.contact-aside > * { position: relative; }
.contact-aside h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.channels { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.channels li { display: grid; gap: 2px; }
.ch-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.channels a, .ch-social a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; overflow-wrap: anywhere; }
.channels a:hover, .ch-social a:hover { text-decoration-color: var(--cyan); }
.ch-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.aside-note { margin-top: 32px; color: var(--on-dark-dim); font-size: .92rem; }
.aside-note a { color: #fff; }
.contact-form-card { background: var(--paper); padding: clamp(24px, 4vw, 48px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.method-field legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.method-options { display: flex; flex-wrap: wrap; gap: 10px; }
.method { position: relative; display: inline-block; }
.method input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.method span { display: inline-block; padding: 10px 18px; border: 1px solid var(--slate-300); border-radius: 999px; cursor: pointer; min-height: 44px; line-height: 22px; transition: all var(--fast); }
.method input:checked + span { border-color: var(--blue); background: rgba(37, 99, 235, .08); font-weight: 600; }
.method input:focus-visible + span { outline: 3px solid var(--blue-text); outline-offset: 2px; }
.form-note { color: var(--slate-500); font-size: .85rem; margin: 0; }
@media (max-width: 920px) {
  .contact-split { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* Header: collapse to the menu button before the links start wrapping (about 1040px) */
.brand, .nav a, .nav .btn { white-space: nowrap; }
@media (max-width: 1040px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); padding: 16px; border-bottom: 1px solid var(--line-dark); max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 14px; font-size: 1rem; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .menu-panel { display: block; position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 14px; min-width: 0; }
  .has-menu > a span { display: none; }
}

/* Blog */
.filters .count { opacity: .75; font-size: .85em; }
.post-card { display: flex; flex-direction: column; }
.post-card .shot { aspect-ratio: 16 / 9; }
.post-card h3 { font-size: 1.1rem; }
.post-card p { flex: 1; }
.post-card-meta { color: var(--slate-500); font-size: .85rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination .gap { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--slate-300); border-radius: 10px; text-decoration: none; color: var(--slate-700); }
.pagination .gap { border: 0; }
.pagination a:hover { border-color: var(--slate-700); }
.pagination a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.post-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--on-dark-dim); margin: 14px 0 0; font-size: .95rem; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.post-main { min-width: 0; max-width: 760px; }
.post-figure { margin: 0 0 32px; }
.post-figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--slate-200); }
.article-body { color: var(--slate-700); font-size: 1.0625rem; line-height: 1.8; overflow-wrap: break-word; }
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.25rem; }
.article-body h2 { font-size: 1.55rem; margin: 2.2rem 0 .9rem; color: var(--ink); scroll-margin-top: 96px; }
.article-body h3 { font-size: 1.2rem; margin: 1.7rem 0 .7rem; color: var(--slate-900); scroll-margin-top: 96px; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.article-body li { margin: .4rem 0; }
.article-body a { color: var(--blue-text); text-underline-offset: 2px; }
.article-body strong { color: var(--ink); }
.article-body blockquote { border-left: 3px solid var(--blue); margin: 1.5rem 0; padding: 0 0 0 18px; color: var(--slate-500); }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--slate-200); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.article-body th { background: var(--slate-100); color: var(--ink); }
.post-faq { margin-top: 40px; }
.byline { border-top: 1px solid var(--slate-200); margin-top: 40px; padding-top: 20px; color: var(--slate-500); font-size: .95rem; }
.byline-name { color: var(--ink); font-weight: 600; margin: 0 0 4px; }
.byline-name span { color: var(--slate-500); font-weight: 400; margin-left: 6px; }
.post-side { position: sticky; top: 92px; display: grid; gap: 20px; }
.toc, .side-related { border: 1px solid var(--slate-200); border-radius: 12px; padding: 18px; background: var(--paper); }
.toc[hidden] { display: none; }
.side-title { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--slate-500); margin: 0 0 10px; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--slate-200); text-decoration: none; color: var(--slate-700); font-size: .9rem; min-height: 24px; }
.toc a:hover, .toc a.on { border-left-color: var(--blue); color: var(--blue-text); }
.side-cta { background: var(--navy); border-radius: 12px; padding: 20px; }
.side-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.side-related a { text-decoration: none; color: var(--slate-700); font-size: .93rem; line-height: 1.4; }
.side-related a:hover { color: var(--blue-text); text-decoration: underline; }
@media (max-width: 920px) {
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
  .post-side { position: static; }
}

/* FAQ tools */
.faq-tools { margin-bottom: 8px; }
.faq-tools[hidden] { display: none; }
.faq-tools input[type=search] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--slate-300); border-radius: 10px; min-height: 46px; margin-bottom: 14px; }
.chip { font: inherit; background: transparent; padding: 8px 16px; min-height: 44px; border-radius: 999px; border: 1px solid var(--slate-300); color: var(--slate-700); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.faq-group[hidden], .faq details[hidden] { display: none; }
.faq summary::marker { color: var(--blue-text); }

/* Footer email sign-up */
.foot-sub { max-width: 34ch; }
.foot-sub-row { display: flex; gap: 8px; }
.foot-sub-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; }
.foot-sub-row input::placeholder { color: rgba(255,255,255,.6); }
.foot-sub-row button { padding: 10px 14px; border-radius: 8px; border: 0; background: #fff; color: #0f172a; font: inherit; font-weight: 600; cursor: pointer; }
.foot-sub-note { font-size: .78rem; opacity: .7; margin-top: 8px; }
