/* Taste MCP site. Direction: paper and vermilion, editorial serif over a grotesk, one accent. */
:root {
  --bg: #f2efe7;
  --surface: #faf8f3;
  --ink: #1a1915;
  --muted: #5c584e;
  --line: #dcd6c8;
  --line-strong: #c4bba7;
  --accent: #b8391b;
  --accent-ink: #fff8f0;
  --code: #e9e4d8;
  --serif: "Gloock", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1b1a17;
    --ink: #ebe7de;
    --muted: #a39e93;
    --line: #2e2c28;
    --line-strong: #45423c;
    --accent: #ff7a57;
    --accent-ink: #1a0d08;
    --code: #24221f;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
code { font: 500 0.86em/1.4 var(--mono); background: var(--code); padding: 0.12em 0.36em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -10000px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* Backdrop: the marbled endpaper (assets/endpaper.js), under a fine paper grain. The reading
   sections sit on a sheet of paper pasted over it; the hero and the footer show it whole. Past
   800px the sheet narrows by --board a side so the marbling runs down both edges, and its
   padding shrinks by the same amount so the text still lines up with the hero's. */
.endpaper { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 260ms var(--ease); }
.endpaper.is-ready { opacity: 1; }
body::after, .sheet::before {
  content: ""; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after { position: fixed; inset: 0; z-index: 0; }
.top, main, .foot { position: relative; z-index: 1; }
.sheet {
  --board: clamp(0px, 4vw - 32px, 24px);
  --pad: calc(var(--gutter) - var(--board));
  position: relative; isolation: isolate; background: var(--bg);
  width: min(100% - 2 * var(--board), var(--max) + 2 * var(--pad)); margin-inline: auto;
  box-shadow: 0 0 0 1px var(--line-strong), 0 24px 48px -24px rgba(26, 25, 21, 0.32);
}
.sheet::before { position: absolute; inset: 0; z-index: -1; }
@media (prefers-color-scheme: dark) {
  body::after, .sheet::before { opacity: 0.09; }
  .sheet { box-shadow: 0 0 0 1px var(--line-strong), 0 24px 48px -24px rgba(0, 0, 0, 0.7); }
}
.field-note { font-size: 14px; color: var(--muted); margin: 32px 0 0; max-width: 34rem; }
.field-note[data-pending] { visibility: hidden; }
.remarble {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  transition: text-decoration-color 160ms var(--ease);
}
.remarble:hover { text-decoration-color: var(--accent); }
@media (hover: none), (prefers-reduced-motion: reduce) { .fine-only { display: none; } }

/* Shell */
.top, main > section, .foot { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sheet > section { padding-inline: var(--pad); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 400 24px/1 var(--serif); letter-spacing: -0.01em; }
.top nav { display: flex; gap: clamp(16px, 2.4vw, 32px); font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); transition: color 160ms var(--ease); }
.top nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .top nav a:not(.gh) { display: none; } }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 128px) clamp(64px, 9vw, 120px); }
.hero h1 { font: 400 clamp(52px, 9.6vw, 136px)/0.96 var(--serif); letter-spacing: -0.025em; margin: 0; max-width: 10ch; }
.lede { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; max-width: 38rem; margin: 36px 0 0; }

.install { margin-top: 48px; max-width: 960px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  appearance: none; background: none; border: 0; padding: 12px 0 12px; margin-bottom: -1px; cursor: pointer;
  font: 500 14px/1 var(--sans); color: var(--muted); border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.cmd { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cmd pre { margin: 0; padding: 20px 104px 20px 20px; overflow-x: auto; }
.cmd code { background: none; padding: 0; font: 500 15px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.copy {
  appearance: none; cursor: pointer; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font: 600 13px/1 var(--sans); padding: 12px 16px; border-radius: 8px; min-height: 36px;
  transition: transform 120ms var(--ease), background-color 160ms var(--ease);
}
.copy:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.copy:active { transform: scale(0.97); }
.cmd .copy { position: absolute; top: 12px; right: 12px; }
.copy.small { background: none; color: var(--ink); border-color: var(--line-strong); padding: 8px 12px; min-height: 30px; font-size: 12px; margin-left: 8px; }
.copy.small:hover { border-color: var(--ink); background: none; color: var(--ink); }
.copy[data-done] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cmd-note { color: var(--muted); font-size: 15px; margin: 16px 0 0; max-width: 40rem; }
.link-line { font-size: 15px; color: var(--muted); margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 560px) { .cmd pre { padding: 16px 16px 64px; } .cmd .copy { top: auto; bottom: 12px; } }

/* Sections */
.sheet > section { padding-block: clamp(72px, 10vw, 144px); }
.sheet > section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font: 400 clamp(36px, 4.6vw, 60px)/1.02 var(--serif); letter-spacing: -0.02em; margin: 0; max-width: 14ch; }
.section-head p { margin: 0; color: var(--muted); max-width: 34rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* Before / after */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.pane-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pane-fig figcaption { font-size: 14px; color: var(--muted); }
.pane-fig figcaption b { color: var(--ink); font-weight: 600; }
.pane { position: relative; flex: 1; min-height: 640px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.score { position: absolute; bottom: 16px; right: 16px; font: 500 12px/1 var(--mono); padding: 8px 12px; border-radius: 8px; z-index: 2; font-variant-numeric: tabular-nums; }
.score.bad { background: rgba(0, 0, 0, 0.35); color: #fff; }
.score.good { background: var(--d-text); color: var(--d-bg); }
@media (max-width: 960px) { .compare { grid-template-columns: 1fr; } .pane { min-height: 0; } }

/* before:start (deliberately generic, this is what audit_ui flags) */
.before { background: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #2563eb 100%); font-family: Inter, Roboto, Arial, sans-serif; color: #fff; }
.b-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 72px 28px 72px; }
.b-badge { display: inline-block; padding: 6px 14px; border-radius: 9999px; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(12px); font-size: 13px; margin-bottom: 22px; }
.b-title { font-size: clamp(30px, 3.6vw, 50px); font-weight: 800; line-height: 1.1; margin: 0 0 18px; max-width: 16ch; background: linear-gradient(90deg, #ffffff, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.b-sub { font-size: 17px; opacity: 0.85; max-width: 30rem; margin: 0 0 28px; }
.b-ctas { display: flex; gap: 12px; justify-content: center; margin-bottom: 36px; }
.b-btn { padding: 13px 26px; border-radius: 9999px; font-weight: 700; text-decoration: none; transition: all 0.3s ease-in-out; }
.b-btn.primary { background: #fff; color: #6d28d9; box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5); }
.b-btn.ghost { background: rgba(255, 255, 255, 0.15); color: #fff; backdrop-filter: blur(12px); }
.b-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: min(100%, 640px); }
.b-card { display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; border-radius: 24px; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); }
.b-card span { font-size: 26px; }
.b-card small { opacity: 0.8; font-size: 13px; }
/* before:end */

/* after:start (tokens come from the selected direction) */
.after {
  --d-bg: #f6f3ec; --d-surface: #fffdf8; --d-text: #1d1b16; --d-muted: #5d584c; --d-border: #ddd6c6; --d-accent: #a33a1d; --d-accent-ink: #fff8f0;
  --d-display: var(--serif); --d-body: var(--sans); --d-radius: 8px;
  background: var(--d-bg); color: var(--d-text); font-family: var(--d-body);
}
.a-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 48px clamp(24px, 4vw, 48px) 80px; }
.a-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(24px, 4vw, 48px) 0; font-size: 14px; }
.a-logo { font-family: var(--d-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.a-navlinks { display: flex; gap: 20px; }
.a-navlinks a { color: var(--d-muted); text-decoration: none; }
.a-title { font-family: var(--d-display); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 20px; max-width: 14ch; }
.a-sub { color: var(--d-muted); font-size: 17px; line-height: 1.55; max-width: 30rem; margin: 0 0 28px; }
.a-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.a-btn { background: var(--d-accent); color: var(--d-accent-ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: var(--d-radius); transition: transform 120ms var(--ease), filter 160ms var(--ease); }
.a-btn:hover { filter: brightness(1.08); }
.a-btn:active { transform: scale(0.97); }
.a-link { color: var(--d-text); font-size: 15px; text-decoration-color: var(--d-border); }
.a-invoice { max-width: 420px; background: var(--d-surface); border: 1px solid var(--d-border); border-radius: calc(var(--d-radius) + 4px); padding: 24px 24px 16px; font-size: 14px; }
.a-inv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.a-chip { font: 500 11px/1 var(--mono); padding: 8px 8px; border-radius: 4px; border: 1px solid var(--d-border); color: var(--d-muted); }
.a-client { color: var(--d-muted); margin: 4px 0 16px; }
.a-invoice table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.a-invoice td { padding: 8px 0; border-top: 1px solid var(--d-border); }
.a-invoice td:nth-child(2) { color: var(--d-muted); width: 3.5em; }
.a-invoice td:last-child { text-align: right; }
.a-invoice tr.total td { font-weight: 600; border-top-color: var(--d-text); }
/* after:end */

@media (max-width: 560px) {
  .b-cards { grid-template-columns: 1fr; width: min(100%, 280px); gap: 12px; }
  .b-card { padding: 12px; flex-direction: row; align-items: center; text-align: left; }
  .b-card small { display: none; }
}

.rail-wrap { margin-top: 20px; }
.rail-label { font-size: 15px; color: var(--muted); margin: 0 0 12px; min-height: 1.6em; }
.rail-label b { color: var(--ink); font-weight: 600; }
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.rail button {
  flex: none; appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px 8px 8px; font: 500 13px/1 var(--sans); min-height: 40px;
  transition: border-color 160ms var(--ease), transform 120ms var(--ease);
}
.rail button:hover { border-color: var(--line-strong); }
.rail button:active { transform: scale(0.97); }
.rail button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sw i { display: block; }
.sw { display: inline-grid; grid-template-columns: repeat(4, 8px); height: 22px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.08); }
.fineprint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* Session */
.session { list-style: none; margin: 0; padding: 0; max-width: 880px; border-top: 1px solid var(--line); }
.session li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.session .who { font: 500 13px/1.7 var(--mono); color: var(--accent); }
.session li.you .who, .session li.agent .who { color: var(--muted); }
.session li.you p { font-weight: 500; }
.session p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .session li { grid-template-columns: 1fr; gap: 4px; } }

/* Tables and lists */
.table-wrap { overflow-x: auto; }
.index { width: 100%; border-collapse: collapse; font-size: 16px; }
.index th { text-align: left; font: 500 14px/1 var(--sans); color: var(--muted); padding: 0 24px 16px 0; }
.index td { padding: 20px 24px 20px 0; border-top: 1px solid var(--line); vertical-align: top; }
.index td:first-child { width: 220px; white-space: nowrap; }
.index td:first-child code { background: none; padding: 0; font-size: 15px; }

.src-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.src-list li { display: grid; grid-template-columns: 40px minmax(0, 15rem) minmax(0, 1fr) 11rem; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.src-n { font: 500 13px/1 var(--mono); color: var(--muted); }
.src-name { font-weight: 600; }
.src-name a { text-decoration: none; }
.src-name a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.src-gives { color: var(--muted); font-size: 15px; }
.src-meta { font: 400 12px/1.5 var(--mono); color: var(--muted); text-align: right; }
@media (max-width: 860px) {
  .src-list li { grid-template-columns: 32px minmax(0, 1fr); }
  .src-gives, .src-meta { grid-column: 2; text-align: left; }
}

.rule-groups { columns: 2 22rem; column-gap: 64px; }
.rule-group { break-inside: avoid; margin: 0 0 36px; }
.rule-group h3 { font: 600 15px/1.3 var(--sans); margin: 0 0 12px; }
.rule-group ol { margin: 0; padding: 0; list-style: none; counter-reset: r var(--start); }
.rule-group li { counter-increment: r; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.rule-group li::before { content: counter(r); font: 500 13px/1.75 var(--mono); color: var(--accent); }
.rule-group li strong { font-weight: 600; }

.guide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0 32px; }
.guide-list li { border-top: 1px solid var(--line); }
.guide-list a { display: block; padding: 16px 0 20px; text-decoration: none; }
.guide-list b { display: block; font-weight: 600; transition: color 160ms var(--ease); }
.guide-list a:hover b { color: var(--accent); }
.guide-list span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; }

.foot { padding-block: 56px clamp(96px, 16vh, 168px); color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 8px; max-width: 40rem; }

/* Guide pages */
.doc { width: 100%; max-width: calc(44rem + 2 * var(--gutter)); margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 96px; }
.doc .back { font: 500 13px/1 var(--mono); color: var(--muted); text-decoration: none; }
.doc .raw { float: right; font: 500 13px/1 var(--mono); color: var(--muted); }
.doc h1 { font: 400 clamp(40px, 6vw, 64px)/1.02 var(--serif); letter-spacing: -0.02em; margin: 40px 0 20px; }
.doc h2 { font: 400 clamp(26px, 3vw, 32px)/1.15 var(--serif); letter-spacing: -0.01em; margin: 56px 0 12px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 32px 0 8px; }
.doc blockquote { margin: 0 0 24px; padding: 0; color: var(--muted); font-size: 15px; }
.doc blockquote p { margin: 0; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--muted); }
.doc pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 12px 16px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.doc-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }

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