/* Kitfold website. Same design as ratio.salegor.com: Helvetica Neue, square
 * corners, hairline rules, small tracked uppercase labels, Ratio's grey and dark
 * themes and its coral highlight. Follows the system theme; the header switch
 * overrides it (data-theme on <html>, see assets/theme.js). */
:root {
  --bg: #d6d9da; --panel: #eceeef; --sunk: #cdd2d4; --line: #b9bfc1; --line-soft: #c9ced0;
  --text: #222729; --muted: #565f63; --faint: #6f797d;
  --accent: #b92f1d; --accent-strong: #8f2316; --accent-ink: #ffffff; --accent-soft: #edd5cf;
  --coral: #ff5b2b; --coral-strong: #ef4a19; --coral-ink: #191b19;
  --ok: #2f7d4f;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #252728; --panel: #303334; --sunk: #1c2021; --line: #505556; --line-soft: #35393a;
    --text: #f4f5f5; --muted: #c2c7c8; --faint: #9aa2a4;
    --accent: #ff593b; --accent-strong: #ff7a61; --accent-ink: #171a1b; --accent-soft: #503b36;
    --ok: #7fd3a0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #252728; --panel: #303334; --sunk: #1c2021; --line: #505556; --line-soft: #35393a;
  --text: #f4f5f5; --muted: #c2c7c8; --faint: #9aa2a4;
  --accent: #ff593b; --accent-strong: #ff7a61; --accent-ink: #171a1b; --accent-soft: #503b36;
  --ok: #7fd3a0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--sunk); padding: 1px 5px; }
pre { background: var(--sunk); border: 1px solid var(--line-soft); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.mark { display: grid; grid-template-columns: 8px 8px; gap: 2px; flex: none; }
.mark i { width: 8px; height: 8px; background: var(--text); border-radius: 1px; display: block; }
.mark i:nth-child(2) { background: var(--coral); }
.word { font-size: 20px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .nav { gap: 14px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--text); color: var(--text); background: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); font-weight: 500; }
.btn.primary:hover { background: var(--coral-strong); border-color: var(--coral-strong); color: var(--coral-ink); }
.btn.small { padding: 8px 14px; font-size: 12px; }

/* type */
.eyebrow { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
h1 { font-size: clamp(40px, 8vw, 84px); line-height: 0.98; letter-spacing: -0.035em; }
h1 em, h2 em { font-style: normal; color: var(--faint); }
h2 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.05; letter-spacing: -0.025em; }
h3 { font-size: 19px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { section { padding: 52px 0; } }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.label { display: flex; align-items: baseline; gap: 10px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin: 0 0 14px; }
.label .val { margin-left: auto; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* hero */
.hero { padding: 40px 0 64px; }
.hero-grid { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.hero p.lead { margin: 24px 0 32px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .fine { margin-top: 16px; font-size: 13px; color: var(--muted); }
.shot { background: var(--sunk); border: 1px solid var(--line); padding: 20px; display: flex; justify-content: center; }
.shot img { max-width: 340px; width: 100%; border: 1px solid #000; box-shadow: 0 18px 50px rgba(0,0,0,0.18); }

/* tiles / grids */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid > * { background: var(--panel); padding: 24px; }
.g2 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
.tile .n { font-size: 12px; color: var(--accent-strong); font-variant-numeric: tabular-nums; display: block; margin-bottom: 18px; }
.tile h3 { margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.stat .big { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1; display: block; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat p { margin: 0; color: var(--muted); font-size: 14px; }

/* problem / fix list */
.fixes { border-top: 1px solid var(--line); }
.fix { display: grid; gap: 6px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .fix { grid-template-columns: 1fr 1.3fr; } }
.fix .q { font-size: 18px; }
.fix .a { color: var(--muted); }
.fix .a strong { color: var(--text); font-weight: 500; }

/* steps */
.steps { counter-reset: s; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--panel); display: grid; grid-template-rows: auto auto 1fr; }
.step .body { padding: 22px 24px 26px; }
.step .body p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.step .pic { background: var(--sunk); border-bottom: 1px solid var(--line); padding: 20px; display: flex; justify-content: center; align-items: flex-start; height: 340px; overflow: hidden; }
.step .pic img { width: 100%; max-width: 260px; border: 1px solid #000; }
.step .n { font-size: 12px; color: var(--accent-strong); }

/* tree */
.tree-wrap { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .tree-wrap { grid-template-columns: 1fr 1fr; } }
.tree { background: var(--panel); border: 1px solid var(--line); padding: 20px; }
.files { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.files li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.files li span:first-child { min-width: 92px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 2px; }

/* pricing */
.price-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 32px 28px; }
.card .amount { font-size: 72px; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.card .amount sup { font-size: 28px; vertical-align: top; position: relative; top: 10px; margin-right: 2px; }
.card .per { color: var(--muted); font-size: 15px; margin: 8px 0 24px; }
.ticks { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1px solid var(--line); }
.ticks li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 10px; background: var(--accent); }
.card .btn { width: 100%; }
.card .fine { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* faq */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-size: 18px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 22px; color: var(--muted); }
details[open] summary::after { content: "\2212"; }
details .ans { padding: 0 0 20px; color: var(--muted); max-width: 46em; }
details .ans p { margin: 0 0 10px; }

/* footer */
.site-foot { padding: 48px 0 64px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-foot h4 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); font-weight: 400; margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.copy { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }

/* docs / prose */
.doc { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 72px; }
@media (min-width: 900px) { .doc { grid-template-columns: 220px 1fr; } }
.toc { font-size: 14px; }
@media (min-width: 900px) { .toc { position: sticky; top: 84px; align-self: start; } }
.toc ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.toc li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.toc li a:hover, .toc li a[aria-current="page"] { color: var(--text); }
.toc li a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
.prose { max-width: 760px; min-width: 0; }
.prose h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 18px; }
.prose h2 { font-size: 26px; margin: 48px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.prose h3 { margin: 30px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0 24px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 400; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.prose td:first-child { white-space: nowrap; padding-right: 20px; }
@media (max-width: 640px) { .prose td:first-child { white-space: normal; } }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; margin: 18px 0; font-size: 15px; }
.prose figure { margin: 24px 0; }
.prose figure img { max-width: 300px; border: 1px solid #000; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.kbd-path { font-family: var(--mono); font-size: 0.86em; background: var(--sunk); padding: 1px 5px; }
.updated { font-size: 13px; color: var(--muted); }
.center-page { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 80px 16px; }
[id] { scroll-margin-top: 76px; }

/* Ratio's coral highlight block */
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.local-highlight { background: var(--coral); color: var(--coral-ink); border-top: 2px solid var(--coral); padding: 18px 20px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; position: relative; text-decoration: none; }
.local-highlight .k { grid-column: 1 / -1; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.local-highlight .k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.local-highlight .arrow { position: absolute; top: 14px; right: 16px; width: 20px; height: 20px; }
.local-highlight .big { font-size: 30px; line-height: 1.02; letter-spacing: -0.03em; text-transform: uppercase; }
.local-highlight .why { font-size: 13px; line-height: 1.45; }
.local-highlight .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; border-top: 1px solid rgba(25,27,25,0.35); padding-top: 9px; margin-top: 8px; font-size: 12px; }
@media (max-width: 520px) { .local-highlight { grid-template-columns: 1fr; } .local-highlight .big { font-size: 26px; } }

/* Ratio's light / dark switch */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sw { width: 26px; height: 14px; border-radius: 99px; background: var(--line); position: relative; flex: none; }
.theme-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); transition: left .15s; }
:root[data-theme="light"] .theme-toggle .sw::after { left: 14px; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-toggle .sw::after { left: 14px; } }
@media (max-width: 640px) { .theme-toggle .lbl { display: none; } }

/* Kitfold logo (brand kit): ink follows the theme, the folded corner stays orange */
.brand .kf-logo { height: 21px; width: auto; display: block; color: var(--text); }
.site-foot .brand .kf-logo { height: 18px; }
.nav .btn { white-space: nowrap; }
@media (max-width: 420px) { .brand .kf-logo { height: 17px; } .nav { gap: 10px; } .nav .btn.small { padding: 8px 10px; } }
