/* Hermance Capital — landing page
   Inter typography, warm-human aesthetic, editorial pacing.
   Tokens are CSS custom properties so Tweaks can swap them live.
*/

:root {
  /* Palette — warm-leaning neutrals + navy primary + warm accent */
  --bg: #F6F2EC;               /* warm paper */
  --bg-elev: #FBF8F3;          /* card surface */
  --bg-deep: #EDE6DB;          /* section divider */
  --ink: #1A1A1A;              /* body */
  --ink-2: #4A4A4A;            /* secondary */
  --ink-3: #6B6657;            /* meta — tightened for WCAG AA contrast on warm paper */
  --rule: #D8CFBF;             /* hairlines */

  --primary: #0B3A5E;          /* Trust Blue (navy default) */
  --primary-ink: #FFFFFF;
  --accent: #8A6B2E;           /* warm gold default */

  --radius: 6px;
  --radius-lg: 14px;

  --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-serif: 'Fraunces', 'EB Garamond', Georgia, serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

[data-theme="dark"] {
  --bg: #141617;
  --bg-elev: #1C1F21;
  --bg-deep: #0F1112;
  --ink: #F1ECE3;
  --ink-2: #C8C2B6;
  --ink-3: #A8A395;        /* lifted from #8A8577 — ~5.4:1 on #141617 (was ~4.0:1, borderline AA) */
  --rule: #2A2E31;
  --primary-ink: #FFFFFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Accessibility: visually hidden (but screen-reader accessible) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Skip link — hidden until focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 200;
  font-size: 14px;
  font-weight: 500;
  transition: top 0.15s;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--accent); outline-offset: 2px; }

/* "View as markdown" affordance — quiet but visible */
.md-link {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 90;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.md-link::before { content: "{ } "; color: var(--accent); }
.md-link:hover { color: var(--ink); border-color: var(--ink-3); }
@media (max-width: 600px) { .md-link { display: none; } }

/* Universal focus-visible ring (WCAG 2.1 AA) */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 3px; }

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .learn-card:hover { transform: none !important; }
}
body {
  font-family: var(--ff-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Kit form wrapper — gives the injected script a clean container & inherits page styles */
.readiness-form-wrap {
  min-height: 60px;
}
.readiness-form-wrap .formkit-form,
.readiness-form-wrap form {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}
.readiness-form-wrap input[type="email"],
.readiness-form-wrap input[type="text"] {
  font-family: var(--ff-sans) !important;
  font-size: 16px !important;
}
.readiness-form-wrap button[type="submit"] {
  font-family: var(--ff-sans) !important;
  font-weight: 500 !important;
}


a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Logo contrast — invert the black silhouette for dark mode */
.logo-mark-img { transition: filter 0.2s; }
[data-theme="dark"] .logo-mark-img { filter: invert(1) brightness(1.1); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }

/* Typography */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 2px;
}

h1, h2, h3 { font-family: var(--ff-serif); font-weight: 400; margin: 0; letter-spacing: -0.015em; }
h1 { font-size: clamp(44px, 6.4vw, 88px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
h4 { font-family: var(--ff-sans); font-weight: 600; font-size: 17px; margin: 0; letter-spacing: -0.005em; }

p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 86%, #000); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: color-mix(in oklch, var(--accent) 88%, #000); }
.btn-text {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  border-radius: 0;
  border: none;
}
.btn-text::after { content: "→"; transition: transform 0.2s; margin-left: 6px; }
.btn-text:hover::after { transform: translateX(4px); }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo {
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark { width: 22px; height: 22px; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-mark-img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}
[data-theme="dark"] .logo-mark-img {
  filter: invert(1) brightness(1.15) contrast(1.05);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta .btn { padding: 10px 18px; font-size: 14px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Hero */
.hero { padding: clamp(60px, 10vh, 120px) 0 clamp(48px, 6vh, 80px); position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: end;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy { padding-bottom: 20px; }
.hero-title { margin-top: 28px; }
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-family: var(--ff-serif);
}
.hero-lede { max-width: 48ch; margin-top: 24px; }
.hero-actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-image-wrap { position: relative; }
.hero-image {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Monospace-labeled placeholder */
.ph {
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklch, var(--primary) 10%, var(--bg-elev)) 0 1px,
      transparent 1px 16px),
    linear-gradient(160deg,
      color-mix(in oklch, var(--primary) 18%, var(--bg-elev)) 0%,
      color-mix(in oklch, var(--accent) 14%, var(--bg-elev)) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  position: relative;
  isolation: isolate;
  color: var(--ink-2);
  min-height: 200px;
  width: 100%;
  height: 100%;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed color-mix(in oklch, var(--ink-3) 55%, transparent);
  border-radius: 6px;
  pointer-events: none;
}
.ph-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  background: color-mix(in oklch, var(--bg-elev) 88%, transparent);
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--ink-2);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 1;
}

/* Floating credential card over hero image */
.hero-badge {
  position: absolute;
  right: -18px;
  bottom: 36px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 24px 50px -24px rgba(11, 58, 94, 0.28);
  max-width: 260px;
}
.hero-badge .eyebrow { display: block; margin-bottom: 8px; }
.hero-badge-text { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 900px) { .hero-badge { right: 16px; bottom: 16px; } }

/* Stats strip */
.stats { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 780px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
.stat-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.stat-value {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }

/* Section */
.section { padding: clamp(70px, 10vh, 130px) 0; }
.section-deep { background: var(--bg-deep); }
.section-header {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: clamp(48px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 780px) { .section-header { grid-template-columns: 1fr; } }
.section-header .eyebrow { padding-top: 10px; }

/* Principles */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) { .principles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .principles-grid { grid-template-columns: 1fr; } }
.principle {
  padding: 32px 24px 32px 0;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.principle:nth-child(4n) { border-right: none; }
@media (max-width: 900px) {
  .principle:nth-child(n) { border-right: 1px solid var(--rule); }
  .principle:nth-child(2n) { border-right: none; }
}
@media (max-width: 500px) {
  .principle { border-right: none !important; }
}
.principle-number {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.principle h4 { margin-bottom: 10px; font-family: var(--ff-serif); font-weight: 400; font-size: 22px; letter-spacing: -0.01em; }
.principle p { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 0; }

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .approach-grid { grid-template-columns: 1fr; } }
.approach-image {
  aspect-ratio: 5/6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) { .approach-image { position: relative; top: 0; } }
.approach-step {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}
.approach-step:first-child { padding-top: 0; }
.approach-step:last-child { border-bottom: none; }
.approach-step-num { font-family: var(--ff-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.08em; padding-top: 6px; }
.approach-step h4 { margin-bottom: 8px; font-family: var(--ff-serif); font-weight: 400; font-size: 24px; }
.approach-step p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* Markets */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) { .markets-grid { grid-template-columns: repeat(2, 1fr); } }
.market {
  background: var(--bg-elev);
  padding: 22px 20px;
  transition: background 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 136px;
}
.market:hover { background: color-mix(in oklch, var(--primary) 5%, var(--bg-elev)); }
.market-city { font-family: var(--ff-serif); font-size: 22px; letter-spacing: -0.01em; }
.market-state { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.market-driver { font-size: 13px; color: var(--ink-2); margin-top: 16px; line-height: 1.4; }

/* Learning Hub preview */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .learn-grid { grid-template-columns: 1fr; } }
.learn-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.learn-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklch, var(--ink-3) 50%, var(--rule));
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.18);
}
.learn-card .ph-wrap { aspect-ratio: 16/10; }
.learn-card .ph { border-radius: 0; min-height: 0; }
.learn-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.learn-card-kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.learn-card h3 { font-size: 22px; line-height: 1.2; margin-bottom: 10px; }
.learn-card p { font-size: 14px; color: var(--ink-2); margin: 0 0 16px; flex: 1; }
.learn-card-meta { font-size: 12px; color: var(--ink-3); font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: 0.08em; }

/* Readiness checklist CTA */
.readiness {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  background: var(--primary);
  color: var(--primary-ink);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 5vw, 72px);
  overflow: hidden;
  position: relative;
}
@media (max-width: 820px) { .readiness { grid-template-columns: 1fr; } }
.readiness h2 { color: var(--primary-ink); font-size: clamp(28px, 3.2vw, 42px); }
.readiness .eyebrow { color: color-mix(in oklch, var(--primary-ink) 60%, transparent); }
.readiness .eyebrow .dot { background: var(--accent); }
.readiness p { color: color-mix(in oklch, var(--primary-ink) 82%, transparent); margin-top: 20px; max-width: 42ch; }
.readiness-form {
  background: color-mix(in oklch, var(--primary-ink) 6%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary-ink) 20%, transparent);
  border-radius: var(--radius);
  padding: 6px 6px 6px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.readiness-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--primary-ink);
  font-family: var(--ff-sans);
  font-size: 15px;
  padding: 14px 0;
}
.readiness-form input::placeholder { color: color-mix(in oklch, var(--primary-ink) 50%, transparent); }
.readiness-checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.readiness-checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px;
  color: color-mix(in oklch, var(--primary-ink) 85%, transparent);
}
.readiness-checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}
.readiness-note { font-size: 12px; color: color-mix(in oklch, var(--primary-ink) 60%, transparent); margin-top: 12px; font-family: var(--ff-mono); letter-spacing: 0.02em; }

/* Invitation / final CTA */
.invite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(60px, 8vh, 100px) 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 820px) { .invite { grid-template-columns: 1fr; } }
.invite h2 { max-width: 18ch; }
.invite p { color: var(--ink-2); max-width: 48ch; }
.invite-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* FAQ */
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-h { margin: 0; font-weight: 400; }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 26px);
  color: var(--ink);
  padding: 28px 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 20px;
  letter-spacing: -0.01em;
}
.faq-q-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: transform 0.25s;
  color: var(--ink-2);
}
.faq-item.open .faq-q-icon { transform: rotate(45deg); border-color: var(--accent); color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.faq-a-inner { padding: 0 0 28px; max-width: 72ch; }

/* Footer */
.footer { background: var(--bg-deep); padding: 80px 0 40px; border-top: 1px solid var(--rule); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-col h5 {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); font-size: 14px; }
.footer-col a:hover { color: var(--ink); }
.footer-brand p { color: var(--ink-2); font-size: 14px; margin-top: 16px; max-width: 34ch; line-height: 1.5; }
.footer-legal {
  border-top: 1px solid var(--rule);
  padding-top: 32px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 820px) { .footer-legal { grid-template-columns: 1fr; } }
.footer-disclaimer {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 72ch;
  font-family: var(--ff-mono);
  letter-spacing: 0.01em;
}
.footer-meta { font-size: 12px; color: var(--ink-3); text-align: right; font-family: var(--ff-mono); letter-spacing: 0.02em; }
@media (max-width: 820px) { .footer-meta { text-align: left; } }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 280px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
  display: none;
  font-size: 13px;
}
.tweaks-panel.visible { display: block; }
.tweaks-panel h6 {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin: 0 0 4px;
  font-weight: 500;
}
.tweaks-title { font-family: var(--ff-serif); font-size: 20px; margin: 0 0 16px; letter-spacing: -0.01em; }
.tweak-row { margin-bottom: 16px; }
.tweak-row:last-child { margin-bottom: 0; }
.tweak-label {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweak-label-val { font-family: var(--ff-mono); color: var(--ink-3); font-size: 11px; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
  position: relative;
}
.swatch.active { border-color: var(--ink); }
.swatch:hover { transform: scale(1.06); }
.swatch-none {
  background: var(--bg);
  border: 1px dashed var(--ink-3) !important;
  color: var(--ink-3);
  font-family: var(--ff-mono);
  font-size: 10px;
  display: grid;
  place-items: center;
}
.swatch-none.active { border-color: var(--ink) !important; border-style: solid !important; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.toggle-input { display: none; }
.toggle-track {
  width: 38px; height: 22px;
  background: var(--rule);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--bg-elev);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-input:checked + .toggle-track { background: var(--primary); }
.toggle-input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }
.tweaks-close {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
