/* ============================================================
   TRUEFANS TOOLKIT — design system
   Matches truefanslabel.com / tfcjam.netlify.app
   Dark stone + amber + Fraunces serif italics + Inter body
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Warm dark stone palette */
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-400: #a8a29e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50:  #fafaf9;

  /* Accents */
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --rose-500:  #f43f5e;
  /* The CONNECT-flavoured aside on the home page ("the till") uses its own
     accent so it reads as a different product from Paul's amber. */
  --teal-400:  #2dd4bf;

  /* Bare channels for the same accents, so a rule that needs a translucent
     wash can say rgba(var(--amber-rgb), .05) instead of hardcoding the hex.
     Anything themed (see scripts/ask-themes.cjs) overrides these in step with
     the solid values above — keep the two in sync when editing either. */
  --amber-rgb: 245, 158, 11;
  --teal-rgb:  20, 184, 166;
  --stone-900-rgb: 28, 25, 23;

  /* Borders / overlays */
  --border-soft: rgba(255,255,255,0.06);
  --border:      rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.20);
  /* The two decorations that aren't a flat colour. Tokenised because a light
     theme needs them inverted — a white dashed ring and a heavy black drop
     shadow both vanish or bruise on a white page. */
  --ring-dash: rgba(255,255,255,0.08);
  --shadow-portrait: 0 8px 32px rgba(0,0,0,0.35);

  --gutter:     clamp(1.5rem, 5vw, 3rem);
  --max:        680px;
  --max-wide:   1100px;
  --radius:     2px;
  --radius-lg:  4px;

  /* ----- Typography & shape -----
     Tokenised so a theme can swap the whole voice of the type, not just its
     colour. The CONNECT skin (scripts/ask-themes.cjs) runs the system stack
     with heavier, tighter headlines and pill buttons, matching
     tfc-calculators.netlify.app. */
  --font-display: 'Fraunces', serif;   /* headlines, the italic emphasis */
  --font-body:    'Inter', sans-serif; /* body, UI, labels */

  --display-weight:   400;             /* Fraunces sits right at 400; a system
                                          sans needs 700 at these sizes */
  --display-tracking: -0.015em;

  /* Buttons. The default is a near-square, wide-tracked uppercase label; the
     CONNECT skin is a sentence-case pill. */
  --btn-radius:    var(--radius);
  --btn-size:      12px;
  --btn-weight:    700;
  --btn-tracking:  0.3em;
  --btn-transform: uppercase;
  --btn-primary-bg:       var(--amber-500);
  --btn-primary-bg-hover: var(--amber-400);
  --btn-primary-shadow:   none;

  /* The wordmark. The markup reads "TrueFans", so a theme that wants the
     PLAYBOOK's all-caps lockup gets it from text-transform rather than from
     shouting in the HTML. */
  --wordmark-transform: uppercase;
  --wordmark-em-style:  italic;

  /* The <em> brand-emphasis treatment. */
  --em-font:   var(--font-display);
  --em-style:  italic;
  --em-weight: 400;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body {
  background: var(--stone-950);
  color: var(--stone-100);
  font-family: var(--font-body);
  font-weight: 400;
  font-feature-settings: "cv11", "ss01", "ss03";
  line-height: 1.6;
  min-height: 100vh;
}

/* ----- Layout ----- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.container       { width: 100%; max-width: var(--max);      margin: 0 auto; padding: 0 var(--gutter); }
.container-wide  { width: 100%; max-width: var(--max-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ----- Header ----- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 640px) {
  .site-header { padding: 1.5rem var(--gutter); }
}
/* Hide the right-side nav link on very narrow screens so the wordmark
   doesn't collide with it. Tools page still reachable via the toolkit teaser. */
@media (max-width: 480px) {
  .site-header .nav-meta { display: none; }
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 20px;
  letter-spacing: -0.01em;
  text-transform: var(--wordmark-transform);
  color: var(--stone-100);
  text-decoration: none;
}
.wordmark em { font-style: var(--wordmark-em-style); color: var(--amber-500); font-weight: var(--em-weight); }

.nav-meta {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone-500);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-meta:hover { color: var(--stone-300); }

/* ----- Type ----- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--stone-700);
}
.eyebrow.center { justify-content: center; }
.eyebrow.plain::before { display: none; }
.eyebrow.amber { color: var(--amber-500); }

.h1 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: var(--display-tracking);
  color: var(--stone-100);
}
.h1 em {
  font-style: var(--em-style);
  color: var(--amber-500);
  font-weight: var(--em-weight);
}

.h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: var(--display-tracking);
  color: var(--stone-100);
}
.h2 em { font-style: var(--em-style); color: var(--amber-500); font-weight: var(--em-weight); }

.h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 24px;
  line-height: 1.2;
  color: var(--stone-100);
}
.h3 em { font-style: var(--em-style); color: var(--amber-500); }

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--stone-300);
  font-weight: 400;
}
.lede em { font-style: italic; color: var(--amber-500); font-weight: 500; }
/* Brand emphasis fallback for body copy — any <em> not already styled
   above (paragraphs, list items, captions) gets the amber-italic
   treatment so brand names like TrueFans CONNECT and TrueFans PLAYBOOK
   read consistently across the site. Headings, wordmarks, and the lede
   keep their specific rules above. */
em { font-family: var(--em-font); font-style: var(--em-style); font-weight: var(--em-weight); color: var(--amber-500); }
@media (min-width: 640px) { .lede { font-size: 20px; } }

.muted { color: var(--stone-500); }
.small { font-size: 13px; color: var(--stone-500); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  letter-spacing: var(--btn-tracking);
  text-transform: var(--btn-transform);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--stone-950);
  box-shadow: var(--btn-primary-shadow);
}
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
.btn-primary:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--stone-100);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--stone-500);
  border-color: var(--border-soft);
}
.btn-ghost:hover { color: var(--stone-300); border-color: var(--border); }

.btn-large { padding: 18px 32px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ----- Form fields ----- */
.field-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 0.5rem;
}

.field {
  width: 100%;
  background: var(--stone-900);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone-100);
  outline: none;
  border-radius: var(--radius);
  transition: border-color 0.2s;
  display: block;
}
.field::placeholder { color: var(--stone-600); }
.field:focus { border-color: var(--amber-500); }
textarea.field { resize: vertical; line-height: 1.55; min-height: 88px; font-family: var(--font-body); }

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--stone-500);
  font-size: 11px;
}
@media (min-width: 640px) {
  .site-footer { flex-direction: row; align-items: center; }
}
.site-footer .uppercase {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ----- Accessibility ----- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--amber-500);
  color: var(--stone-950);
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; outline: 0; }

*:focus { outline: 0; }
.btn:focus-visible,
.field:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.field:focus-visible { outline-offset: 0; border-color: var(--amber-500); }

/* Honour reduced-motion preference */
@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;
  }
}

/* Footer link treatment */
.site-footer .footer-links {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.site-footer .footer-links a {
  color: var(--stone-500);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.site-footer .footer-links a:hover { color: var(--amber-500); }
.site-footer .footer-links .dot { color: var(--stone-700); }

/* Portrait image variant — wrap an <img> in <div class="portrait-frame">
   to get the dashed outer ring (mirrors the placeholder treatment). */
.portrait-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed var(--ring-dash);
  border-radius: 50%;
  pointer-events: none;
}
.portrait-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
  box-shadow: var(--shadow-portrait);
}

/* ----- Animations ----- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease; }

/* ----- Utilities ----- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* ============================================================
   THEME: Entry — the way into Paul K Saunders' programme (paulksaunders.com restyle: paper, green + gold)
   Generated by scripts/build-ask-site.cjs from scripts/ask-themes.cjs.
   Do not edit here — this file is a build artefact. Every rule above
   reads these tokens, so redefining the values reskins the whole site.
============================================================ */
:root {
  --stone-950: #F1F0EC;
  --stone-900: #FFFFFF;
  --stone-800: #E6E4DD;
  --stone-700: #D6D3CA;
  --stone-600: #8E8A80;
  --stone-500: #5E5B52;
  --stone-400: #4A4840;
  --stone-300: #2E2D27;
  --stone-200: #1F1E19;
  --stone-100: #15140F;
  --stone-50: #000000;
  --amber-500: #17624A;
  --amber-400: #12503C;
  --amber-300: #0D3D2E;
  --amber-600: #0F4A37;
  --rose-500: #B23A2B;
  --teal-400: #1A6A43;
  --amber-rgb: 23, 98, 74;
  --teal-rgb: 26, 106, 67;
  --stone-900-rgb: 255, 255, 255;
  --border-soft: rgba(21,20,15,0.07);
  --border: rgba(21,20,15,0.12);
  --border-strong: rgba(21,20,15,0.22);
  --ring-dash: rgba(21,20,15,0.16);
  --shadow-portrait: 0 1px 2px rgba(21,20,15,.06), 0 10px 28px -14px rgba(21,20,15,.22);
  --radius: 12px;
  --radius-lg: 18px;
  --font-display: 'Schibsted Grotesk', -apple-system, 'Segoe UI', Verdana, sans-serif;
  --font-body: 'Schibsted Grotesk', -apple-system, 'Segoe UI', Verdana, sans-serif;
  --display-weight: 700;
  --display-tracking: 0;
  --btn-radius: 999px;
  --btn-size: 15px;
  --btn-weight: 600;
  --btn-tracking: 0;
  --btn-transform: none;
  --btn-primary-bg: var(--amber-500);
  --btn-primary-bg-hover: var(--amber-400);
  --btn-primary-shadow: none;
  --wordmark-transform: uppercase;
  --wordmark-em-style: normal;
  --em-font: var(--font-body);
  --em-style: normal;
  --em-weight: 700;
}
@media (prefers-color-scheme: dark) {
  :root {
    --stone-950: #0E0F0C;
    --stone-900: #171814;
    --stone-800: #20221C;
    --stone-700: #2E3029;
    --stone-600: #77746A;
    --stone-500: #A6A396;
    --stone-400: #C4C1B6;
    --stone-300: #D9D6CC;
    --stone-200: #E6E4DC;
    --stone-100: #F0EEE6;
    --stone-50: #FFFFFF;
    --amber-500: #5BC79A;
    --amber-400: #7DD6AF;
    --amber-300: #A3E4C8;
    --amber-600: #3FA77C;
    --rose-500: #FF7A66;
    --teal-400: #4CC98A;
    --amber-rgb: 91, 199, 154;
    --teal-rgb: 76, 201, 138;
    --stone-900-rgb: 23, 24, 20;
    --border-soft: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.10);
    --border-strong: rgba(255,255,255,0.18);
    --ring-dash: rgba(255,255,255,0.14);
    --shadow-portrait: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
  }
}

:root { color-scheme: light; --pks-gold: #E3B23C; --pks-on-gold: #1C1503; --pks-gold-text: #7E5C10;
  --pks-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif; --pks-mono: 'DM Mono', ui-monospace, Menlo, monospace; }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; --pks-gold: #E8B84A; --pks-gold-text: #E8B84A; } }
/* The visitor's own question is shown back as written, never as a poster. */
html body .ask-q { text-transform: none; letter-spacing: 0; }
/* The widget's headings: the poster face, as on the main site. */
html body .entry-facts-title, html body .entry-card-level { font-family: var(--pks-display); font-weight: 900; letter-spacing: .005em; line-height: .98; }
/* Its labels: typewriter mono, never under 11.5px. */
html body .ask-q-label, html body .ask-actions-ttl, html body .ask-blindspot-ttl, html body .ask-followup-ttl,
html body .ask-welcome-tag, html body .ask-grad-or { font-family: var(--pks-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .12em; }
/* The highlight: what to do next sits on the stage gold. */
html body .ask-actions { background: var(--pks-gold); color: var(--pks-on-gold); border-radius: var(--radius); }
html body .ask-answer, html body .ask-verdict, html body .ask-blindspot, html body .ask-offer, html body .ask-followup, html body .ask-welcome, html body .ask-exit { border-radius: var(--radius); }
html body .ask-answer { background: var(--stone-900); }
