/* CarrySo site styles. System fonts only (no font requests), mobile first. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-card: #ffffff;
  --fg: #0f172a;
  --fg-soft: #334155;
  --muted: #5b6477;
  --line: #e3e7ef;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef2ff;
  --on-accent: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #10172b;
    --bg-card: #131b31;
    --fg: #e8ecf5;
    --fg-soft: #c8d0e0;
    --muted: #9aa5bd;
    --line: #243049;
    --accent: #a5b4fc;
    --accent-strong: #c7d2fe;
    --accent-soft: #1e2547;
    --on-accent: #0b1020;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
@media (prefers-color-scheme: light) { a { color: var(--accent); } }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; color: var(--fg); }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 0 0 14px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
p { margin: 0 0 14px; color: var(--fg-soft); }
ul, ol { padding-left: 1.2em; color: var(--fg-soft); }
li { margin: 6px 0; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { color: var(--fg-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 550; font-size: 0.97rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--bg-soft); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--fg); }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > .menu-panel { display: flex; }
.menu-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; min-width: 240px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.menu-panel a { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--fg); }
.menu-panel a:hover { background: var(--bg-soft); }
@media (min-width: 900px) { .nav { display: flex; } .menu { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; font-weight: 650; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--fg); }
.nav .btn { padding: 8px 16px; min-height: 40px; margin-left: 8px; color: var(--on-accent); }
.nav .btn:hover { background: var(--accent-strong); color: var(--on-accent); }

/* Sections */
main { display: block; }
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .section { padding: 80px 0; } }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.lede { font-size: 1.15rem; color: var(--fg-soft); max-width: 72ch; }
.prose { max-width: 76ch; }
.section-head { max-width: 760px; margin-bottom: 32px; }

.hero { padding: 48px 0 40px; }
@media (min-width: 720px) { .hero { padding: 88px 0 64px; } }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.breadcrumbs { font-size: 0.9rem; color: var(--muted); padding-top: 20px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--muted); }

/* Grids and cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.two, .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p:last-child { margin-bottom: 0; }
.card .more { font-weight: 600; }

.facts { display: grid; gap: 0; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0 0; background: var(--bg-card); }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--fg); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.97rem; }
caption { text-align: left; padding: 14px 16px 0; color: var(--muted); font-size: 0.9rem; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tbody th { color: var(--fg); font-weight: 650; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li { margin: 0; }

.faq { display: grid; gap: 14px; }
.faq article { border-top: 1px solid var(--line); padding-top: 18px; }

/* App cards */
.app-card { display: flex; flex-direction: column; gap: 12px; }
.app-card .app-head { display: flex; gap: 14px; align-items: center; }
.app-card .app-head img { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); }
.app-card h3 { margin: 0; font-size: 1.05rem; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.app-meta li { margin: 0; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); }
.app-card .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; font-weight: 600; }

.shots { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
@media (min-width: 720px) { .shots { grid-auto-columns: 22%; } }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; background: var(--bg-soft); }

.cta { border-radius: 20px; padding: 32px 22px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
.cta h2, .cta p { color: #fff; }
.cta .btn-primary { background: #fff; color: #312e81; }
.cta .btn-primary:hover { background: #eef2ff; color: #312e81; }
@media (min-width: 720px) { .cta { padding: 48px; } }

.note { font-size: 0.9rem; color: var(--muted); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pill-list li { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; background: var(--bg-card); color: var(--fg); }

/* Forms */
form.lead { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; color: var(--fg); }
.field .hint { font-size: 0.88rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.row { display: grid; gap: 16px; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 12px; padding: 12px 16px; border: 1px solid var(--line); background: var(--bg-soft); }
.alert[data-kind="error"] { border-color: #dc2626; }
.field-error { color: #dc2626; font-size: 0.9rem; min-height: 0; }
@media (prefers-color-scheme: dark) { .field-error { color: #fca5a5; } .alert[data-kind="error"] { border-color: #fca5a5; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 48px 0 32px; margin-top: 40px; font-size: 0.95rem; }
.site-footer .cols { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--fg-soft); text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.site-footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }

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

/* --- Round 2: positioning, products, blog --- */
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.2fr 0.8fr; } }
.hero-aside { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); padding: 20px; box-shadow: var(--shadow); }
.hero-aside h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.hero-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hero-aside li { margin: 0; padding-left: 22px; position: relative; color: var(--fg); }
.hero-aside li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 32px; list-style: none; padding: 0; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-card); }
.stats strong { display: block; font-size: 1.45rem; letter-spacing: -0.02em; color: var(--fg); line-height: 1.2; }
.stats span { font-size: 0.88rem; color: var(--muted); }

.group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 36px 0 14px; }
.group-head h3 { margin: 0; font-size: 1.05rem; }
.group-head p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.card .tag { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--bg-card)); }

.timeline { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: stage; display: grid; gap: 0; }
.timeline li { margin: 0; position: relative; padding: 0 0 22px 52px; counter-increment: stage; }
.timeline li::before { content: counter(stage); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.9rem; display: grid; place-items: center; }
.timeline li::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline h3 { margin: 4px 0 4px; font-size: 1.05rem; }
.timeline h3 a { color: var(--fg); }
.timeline p { margin: 0; }
@media (min-width: 900px) { .timeline { grid-template-columns: 1fr 1fr; column-gap: 32px; } }

.product-card .app-meta li:first-child { background: var(--accent); color: var(--on-accent); }
.article-card .eyebrow { margin-bottom: 6px; }
.article-card h3 { font-size: 1.1rem; }

.article-body h2 { margin-top: 44px; }
.article-body h3 { margin-top: 24px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); padding: 16px 20px; margin: 24px 0; }
.toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { margin: 4px 0; break-inside: avoid; }
.takeaways { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 24px 0; }
.takeaways h2 { font-size: 1.05rem; margin-bottom: 8px; }
.takeaways ul { margin: 0; }
.entity-note { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 18px; font-size: 0.95rem; color: var(--fg-soft); background: var(--bg-soft); }
.entity-note strong { color: var(--fg); }

/* --- Round 4: CMS trust blocks --- */
.quote blockquote { margin: 0 0 12px; }
.quote blockquote p { font-size: 1.02rem; color: var(--fg); }
.quote figcaption { display: grid; gap: 2px; }
.logo-strip { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 36px; align-items: center; }
.logo-strip li { margin: 0; }
.logo-strip img { height: 40px; width: auto; max-width: 160px; object-fit: contain; opacity: 0.85; }
.team { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .team { grid-template-columns: repeat(3, 1fr); } }
.team img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); margin-bottom: 10px; }

/* --- Rebuild additions --- */
.policy-body h2 { margin-top: 36px; }
.policy-body h3 { margin-top: 22px; }
.policy-body code { background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.policy-body blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.policy-body blockquote p { color: var(--fg); }
.article-body .prose .table-wrap, .policy-body .table-wrap { margin: 16px 0; }
.alert[data-kind="error"] { border-color: #dc2626; }
