/* Soft Brutalism — hard outlines, soft radii, no shadows. */
:root {
  --base: #FFFFFF; --elevated: #FFFFFF; --calm: #F8FAFC; --border: #000000;
  --text: #1F1F1F; --text-weak: #6B7280; --divider: rgba(0,0,0,0.10);
  --accent: #7C3AED; --accent-flat: #EDE9FE; --accent-ring: rgba(124,58,237,0.20);
  --ok: #16A34A; --ok-flat: rgba(22,163,74,0.12); --err: #DC2626;
  --r-xs: 12px; --r-sm: 16px; --r-md: 24px; --r-lg: 32px; --r-xl: 40px; --r-full: 9999px;
  --b-fine: 1px; --b-surface: 2px; --b-object: 3px; --b-show: 4px;
  --t-fast: 150ms; --t-normal: 300ms; --t-slow: 800ms;
  --spring: cubic-bezier(0.34,1.56,0.64,1); --smooth: cubic-bezier(0.22,1,0.36,1);
  --font: Inter, "Plus Jakarta Sans", Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --tone-violet: #EDE9FE; --tone-orange: #FFEDD5; --tone-fuchsia: #FAE8FF; --tone-blue: #DBEAFE;
  --tone-green: #D1FAE5; --tone-pink: #FCE7F3; --tone-amber: #FEF3C7; --tone-gray: #F3F4F6;
  color-scheme: light;
}
.dark {
  --base: #0A0A0A; --elevated: #161617; --calm: rgba(22,22,23,0.5); --border: #FFFFFF;
  --text: #E3E3E3; --text-weak: #9CA3AF; --divider: rgba(255,255,255,0.10);
  --accent: #A78BFA; --accent-flat: rgba(167,139,250,0.15); --accent-ring: rgba(167,139,250,0.25);
  --ok: #4ADE80; --ok-flat: rgba(74,222,128,0.12); --err: #F87171;
  --tone-violet: rgba(46,16,101,0.4); --tone-orange: rgba(67,20,7,0.4); --tone-fuchsia: rgba(74,4,78,0.4); --tone-blue: rgba(23,37,84,0.4);
  --tone-green: rgba(2,44,34,0.4); --tone-pink: rgba(80,7,36,0.4); --tone-amber: rgba(69,26,3,0.4); --tone-gray: rgba(3,7,18,0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; box-shadow: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--base); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.6; font-weight: 400; }
a { color: inherit; }
img { max-width: 100%; height: auto; border: var(--b-object) solid var(--border); border-radius: var(--r-md); }
:focus-visible { outline: 4px solid var(--accent-ring); outline-offset: 2px; }
.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--border); color: var(--base); padding: 12px 24px; border-radius: var(--r-full); z-index: 10; }
.skip:focus { top: 16px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 48px; } }
.narrow { max-width: 880px; }

/* Typography: one contrast — huge+900+tight vs tiny+900+wide. Body: light, large, mixed case. */
.display, .title1, .title2, .title3, .wordmark { font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; margin: 0; text-transform: uppercase; }
.display { font-size: clamp(48px, 10vw, 128px); }
.title1 { font-size: clamp(36px, 5vw, 60px); text-transform: none; }
.title2 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 32px; }
.title3 { font-size: 22px; margin-bottom: 16px; }
.eyebrow, .label { font-size: 12px; font-weight: 900; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.label { color: var(--text-weak); font-size: 11px; }
.lead { font-size: 20px; font-weight: 300; color: var(--text-weak); max-width: 640px; margin: 24px 0 0; }
.meta { font-size: 14px; color: var(--text-weak); margin: 16px 0 0; }
.accent { color: var(--accent); }

/* Chrome — 2px */
.chrome-header { position: sticky; top: 0; z-index: 5; background: var(--base); border-bottom: var(--b-surface) solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.wordmark { font-size: 24px; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.main-nav a:not(.btn) { font-size: 12px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; padding: 10px 16px; border-radius: var(--r-full); border: var(--b-surface) solid transparent; transition: color var(--t-fast) ease, border-color var(--t-fast) ease; }
.main-nav a:not(.btn):hover { color: var(--accent); }
.main-nav a[aria-current="page"] { border-color: var(--border); }
.chrome-footer { border-top: var(--b-surface) solid var(--border); margin-top: 128px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: var(--text-weak); }
.footer-row p { margin: 0; }
.theme-switch { display: inline-flex; border: var(--b-surface) solid var(--border); border-radius: var(--r-full); padding: 4px; gap: 4px; }
.theme-switch button { font: 900 11px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; background: transparent; color: var(--text); border: 0; padding: 8px 12px; border-radius: var(--r-full); cursor: pointer; transition: background var(--t-fast) ease, color var(--t-fast) ease; }
.theme-switch button[aria-pressed="true"] { background: var(--border); color: var(--base); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 900 12px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; padding: 16px 32px; border-radius: var(--r-full); border: var(--b-surface) solid var(--border); cursor: pointer; transition: transform var(--t-fast) ease-out, background var(--t-fast) ease, color var(--t-fast) ease; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--border); color: var(--base); }
.btn-secondary { background: transparent; color: var(--text); }
.btn-sm { padding: 12px 20px; }
.btn[disabled] { opacity: 0.5; cursor: wait; transform: none; }

/* Sections */
.hero { padding: 96px 0; border-bottom: var(--b-surface) solid var(--border); }
@media (min-width: 900px) { .hero { padding: 160px 0 128px; } }
.section { padding-top: 96px; }
.section-sm { padding-top: 64px; }
.page { padding-top: 48px; }
.page-head { margin-bottom: 48px; }
.more { margin-top: 24px; font-size: 14px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; }

/* Search */
.search { position: relative; display: flex; gap: 12px; margin-top: 40px; max-width: 760px; flex-wrap: wrap; }
.search input { flex: 1 1 260px; }
.search-suggest { position: absolute; top: calc(100% + 12px); left: 0; right: 0; z-index: 4; background: var(--elevated); border: var(--b-object) solid var(--border); border-radius: var(--r-md); padding: 8px; list-style: none; margin: 0; }
.search-suggest a { display: block; padding: 12px 16px; border-radius: var(--r-sm); text-decoration: none; border: var(--b-fine) solid transparent; }
.search-suggest a:hover, .search-suggest a.active { background: var(--calm); border-color: var(--divider); }
.search-suggest small { display: block; color: var(--text-weak); font-size: 14px; }

/* Inputs — 3px object */
input:not([type="checkbox"]), select, textarea { width: 100%; font: 700 17px/1.4 var(--font); color: var(--text); background: var(--calm); border: var(--b-object) solid var(--border); border-radius: var(--r-sm); padding: 16px 20px; transition: outline-color var(--t-fast) ease; }
input:focus, select:focus, textarea:focus { outline: 4px solid var(--accent-ring); outline-offset: 0; }
textarea { resize: vertical; min-height: 160px; font-weight: 400; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 3px; }

/* Cards — 3px, radius 40 */
.grid { display: grid; gap: 24px; }
.grid-cats { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--elevated); border: var(--b-object) solid var(--border); border-radius: var(--r-xl); }
.card-show { border-width: var(--b-show); padding: 48px 32px; }
@media (min-width: 900px) { .card-show { padding: 64px; } }
.card-cat { display: flex; flex-direction: column; padding: 32px; text-decoration: none; min-height: 220px; transition: transform var(--t-normal) ease-out; }
.card-cat:hover { transform: scale(1.02); }
.card-cat h3 { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin: auto 0 12px; }
.card-cat p { margin: 0; font-weight: 300; font-size: 17px; color: var(--text-weak); }
.card-cat .label { color: var(--text); }
.tone-violet { background: var(--tone-violet); } .tone-orange { background: var(--tone-orange); }
.tone-fuchsia { background: var(--tone-fuchsia); } .tone-blue { background: var(--tone-blue); }
.tone-green { background: var(--tone-green); } .tone-pink { background: var(--tone-pink); }
.tone-amber { background: var(--tone-amber); } .tone-gray { background: var(--tone-gray); }

/* Lists */
.list { list-style: none; margin: 0; padding: 8px; }
.list li + li { border-top: var(--b-fine) solid var(--divider); }
.row-link { display: flex; justify-content: space-between; gap: 24px; padding: 20px 24px; text-decoration: none; border-radius: var(--r-sm); font-weight: 700; transition: background var(--t-fast) ease, color var(--t-fast) ease; }
.row-link:hover { background: var(--calm); color: var(--accent); }
.row-meta { color: var(--text-weak); font-weight: 300; font-size: 15px; text-align: right; }
@media (max-width: 700px) { .row-link { flex-direction: column; gap: 4px; } .row-meta { text-align: left; } }

/* Pills / status */
.pill { display: inline-block; padding: 4px 12px; border-radius: var(--r-full); font: 900 11px/1.4 var(--font); letter-spacing: 0.15em; text-transform: uppercase; vertical-align: middle; }
.pill-flat { background: var(--accent-flat); color: var(--accent); }
.pill-open { border: var(--b-surface) solid var(--border); }
.pill-closed { background: var(--ok-flat); color: var(--ok); }
.status { display: inline-flex; align-items: center; gap: 10px; border: var(--b-surface) solid var(--border); border-radius: var(--r-full); padding: 8px 16px; font: 900 12px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 24px; }
.dot { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--ok); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 32px; font-size: 14px; color: var(--text-weak); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--accent); }

/* Article */
.article-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; } .article-side { position: sticky; top: 104px; align-self: start; } }
.article-side { display: grid; gap: 24px; align-content: start; }
.toc { padding: 24px; border-radius: var(--r-lg); }
.toc ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.toc li { padding: 6px 0; } .toc .toc-3 { padding-left: 16px; }
.toc a { text-decoration: none; color: var(--text-weak); transition: color var(--t-fast) ease; } .toc a:hover { color: var(--accent); }

.prose { max-width: 72ch; font-weight: 300; }
.prose h2, .prose h3, .prose h4 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; margin: 56px 0 16px; }
.prose h2 { font-size: 30px; } .prose h3 { font-size: 22px; } .prose h4 { font-size: 18px; }
.prose .anchor { text-decoration: none; }
.prose a:not(.anchor) { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose strong { font-weight: 700; }
.prose li { margin: 8px 0; }
.prose li.task { list-style: none; margin-left: -24px; } .prose li.task::before { content: "☐ "; } .prose li.task[data-done="true"]::before { content: "☑ "; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--calm); border: var(--b-fine) solid var(--divider); border-radius: 6px; padding: 2px 6px; }
.prose pre { font-family: var(--mono); font-size: 15px; background: var(--calm); border: var(--b-object) solid var(--border); border-radius: var(--r-md); padding: 24px; overflow-x: auto; line-height: 1.5; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { margin: 24px 0; padding: 4px 24px; border-left: var(--b-object) solid var(--border); }
.prose hr { border: 0; border-top: var(--b-fine) solid var(--divider); margin: 48px 0; }
.table-wrap { overflow-x: auto; border: var(--b-object) solid var(--border); border-radius: var(--r-md); margin: 24px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: var(--b-fine) solid var(--divider); }
.prose th { font-weight: 900; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }
.prose tr:last-child td { border-bottom: 0; }
.callout { border: var(--b-object) solid var(--border); border-radius: var(--r-md); padding: 20px 24px; margin: 24px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-label { font: 900 11px/1 var(--font) !important; letter-spacing: 0.25em; text-transform: uppercase; margin: 0 0 12px; }
.callout-note { background: rgba(37,99,235,0.10); } .callout-note .callout-label { color: #2563EB; }
.callout-tip { background: rgba(22,163,74,0.10); } .callout-tip .callout-label { color: #16A34A; }
.callout-warning { background: rgba(234,88,12,0.10); } .callout-warning .callout-label { color: #EA580C; }
.callout-important { background: rgba(147,51,234,0.10); } .callout-important .callout-label { color: #9333EA; }
.dark .callout-note .callout-label { color: #60A5FA; } .dark .callout-tip .callout-label { color: #4ADE80; }
.dark .callout-warning .callout-label { color: #FB923C; } .dark .callout-important .callout-label { color: #C084FC; }
.intro { margin-bottom: 16px; }

.feedback { margin-top: 64px; padding: 32px; border-radius: var(--r-lg); }
.feedback-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.feedback-done { margin: 0; color: var(--text-weak); }

/* Ticket thread */
.thread { padding: 32px; margin-bottom: 24px; border-radius: var(--r-lg); }
.thread-answer { background: var(--accent-flat); }
.thread .prose p:last-child { margin-bottom: 0; }

/* Form */
.form { display: grid; gap: 24px; }
.field label { display: block; font: 900 12px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 12px; }
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check label { font: 300 16px/1.5 var(--font); letter-spacing: 0; text-transform: none; margin: 0; }
.form-error { margin: 0; color: var(--err); font-weight: 700; }
.form .btn { justify-self: start; }

/* CTA / empty */
.cta { text-align: center; } .cta .lead { margin: 24px auto 40px; }
.empty { text-align: center; padding: 48px; background: var(--calm); border: var(--b-surface) dashed var(--divider); border-radius: var(--r-xl); color: var(--text-weak); }
.empty .search { margin-left: auto; margin-right: auto; }

/* Motion */
.js .fade-in { opacity: 0; transform: translateY(20px); transition: opacity var(--t-slow) ease-out, transform var(--t-slow) var(--smooth); }
.fade-in.visible { opacity: 1; transform: none; }
.card-cat.fade-in.visible:hover { transform: scale(1.02); transition-duration: var(--t-normal); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
  .js .fade-in { opacity: 1; transform: none; }
}
