/* Skillproof, design tokens + components.
 * Signature ported from skillier-website's design-system: cream-light theme,
 * Space Grotesk / Instrument Serif / JetBrains Mono, flat surfaces with warm
 * soft shadows, serif-italic emphasis in headlines, mono uppercase eyebrows.
 * Accent: skillier `violet` token (#5b3df5). Token NAMES are kept intact so the
 * scanner markup in app.js (which reads --brand/--safe/… and emits .gradecard,
 * .finding, … by name) keeps working, only the VALUES + component skins change. */
:root {
  --bg: #f6f4ee;          /* cream page */
  --bg-soft: #efece3;     /* alternate section ground */
  --panel: #fffdf8;       /* raised card surface, warm near-white */
  --border: #d9d4c6;      /* line */
  --text: #0b0b09;        /* ink */
  --muted: #6b675e;       /* muted ink */
  --brand: #5b3df5;       /* accent, skillier `violet` */
  --brand-2: #6b51f6;     /* accent, hover/links */
  --accent-ink: #ffffff;  /* text on accent fills */
  --safe: oklch(0.55 0.16 145); /* grade A/B + logo dot, green (skillier `good`, darkened for light bg) */
  --warn: #b87503;        /* grade C, amber, contrast-safe on white letter */
  --danger: #d93b3b;      /* grade F */
  --radius: 14px;         /* skillier md */
  --maxw: 1240px;         /* skillier layout.maxw */
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--brand); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
em { font-style: italic; }

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

/* nav */
header.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
/* Brand lockup, skillier.ai style: green dot + "Skill" (bold sans) + serif-italic "proof". */
.logo { font-weight: 700; letter-spacing: -.02em; font-size: 1.34rem; display: flex; gap: 10px; align-items: center; line-height: 1; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--safe); flex: none;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--safe) 16%, transparent); }
.logo .logo-word { display: inline-flex; align-items: baseline; }
.logo em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.nav nav { display: flex; gap: 20px; align-items: center; }
/* Plain nav links are muted; buttons (.btn) keep their own color (white CTA text). */
.nav nav a:not(.btn) { color: var(--muted); font-size: .92rem; }
.nav nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* Language switcher, segmented pill (EN | FR), skillier toggle style. */
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); }
.lang button { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 4px 9px; cursor: pointer; transition: color 160ms ease, background 160ms ease; }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--accent-ink); background: var(--brand); }
@media (max-width: 680px) { .nav nav a.hide-sm { display: none; } .nav nav { gap: 10px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px;
  padding: 11px 18px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease; }
.btn-primary { background: var(--brand); color: var(--accent-ink); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--accent-ink); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* hero */
.hero { padding: 88px 0 44px; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 700; }
/* signature emphasis: serif-italic accent phrase inside the headline */
.hero h1 .grad { font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -.01em; color: var(--brand); -webkit-text-fill-color: var(--brand); }
.hero p.sub { font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 680px; margin: 0 auto 26px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* sections */
section { padding: 64px 0; }
section h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -.025em; margin: 0 0 8px; font-weight: 700; }
section .lede { color: var(--muted); max-width: 640px; margin-bottom: 28px; }
section .lede em, section h2 em { font-family: var(--serif); font-style: italic; color: var(--brand); }

/* grid, mobile-first single column to avoid horizontal scroll */
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 760px) { .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; min-width: 0;
  box-shadow: 0 1px 0 rgba(11,11,9,.03), 0 14px 34px -22px rgba(11,11,9,.22); }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card .tag { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }

/* scanner */
.scanner { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 1px 0 rgba(11,11,9,.03), 0 18px 44px -28px rgba(11,11,9,.24); }
.scanner .tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.scanner .tab { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; font-size: .9rem; font-family: var(--font); transition: all 160ms ease; }
.scanner .tab.active { color: var(--brand); border-color: var(--brand); background: color-mix(in oklab, var(--brand) 8%, transparent); }
/* :not(.share-md) so the report's compact copy-markdown textarea isn't restyled
   (and force-grown to 180px) just because the result renders inside .scanner. */
.scanner textarea:not(.share-md), .scanner input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: var(--mono); font-size: .9rem; resize: vertical; }
.scanner textarea:not(.share-md) { min-height: 180px; }
.scanner textarea:focus, .scanner input:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 12%, transparent); }
.scanner .row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.examples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.examples button { font-size: .8rem; background: transparent; border: 1px dashed var(--border);
  color: var(--muted); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-family: var(--font); }
.examples button:hover { border-color: var(--brand); color: var(--brand); }

/* report */
.report { margin-top: 18px; }
.grades { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .grades { grid-template-columns: 1fr 1fr; } }
.gradecard { border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 16px;
  background: var(--panel); }
.gradeletter { font-size: 2.4rem; font-weight: 800; width: 64px; height: 64px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: #fff; }
.g-A, .g-B { background: var(--safe); } .g-C { background: var(--warn); }
.g-D { background: #e06b1f; } .g-F { background: var(--danger); }
.verdict { font-weight: 700; }
.finding { border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; padding: 12px 14px; margin-top: 10px;
  background: var(--panel); }
.finding.critical { border-left-color: var(--danger); } .finding.high { border-left-color: #e06b1f; }
.finding.medium { border-left-color: var(--warn); } .finding.low { border-left-color: var(--muted); }
.finding .ftitle { font-weight: 600; }
.finding .meta { font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.finding .fix { font-size: .88rem; margin-top: 6px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* pricing */
.price { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 760px) { .price { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.tier { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-width: 0;
  box-shadow: 0 1px 0 rgba(11,11,9,.03), 0 14px 34px -22px rgba(11,11,9,.22); }
.tier.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 18px 44px -24px color-mix(in oklab, var(--brand) 45%, transparent); }
.tier .tag { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.tier .amt { font-size: 1.9rem; font-weight: 800; margin: 6px 0; letter-spacing: -.02em; }
.tier ul { list-style: none; padding: 0; margin: 14px 0 0; }
.tier li { font-size: .88rem; color: var(--muted); padding: 5px 0 5px 22px; position: relative; }
.tier li::before { content: "✓"; color: var(--safe); position: absolute; left: 0; }

/* ─── Report source reference + share/embed block ─────────────────────── */
.report-source { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin: 0 0 14px; }
.report-source strong { color: var(--text); font-weight: 600; }
.report-source a { color: var(--brand); }
.share-box { margin-top: 22px; border: 1px solid color-mix(in oklab, var(--brand) 32%, var(--border));
  background: color-mix(in oklab, var(--brand) 5%, var(--panel)); border-radius: var(--radius); padding: 16px 18px; }
.share-head { font-weight: 700; font-size: .98rem; margin-bottom: 8px; letter-spacing: -.01em; }
.share-link { display: inline-block; font-family: var(--mono); font-size: .85rem; color: var(--brand); word-break: break-all; }
.share-badges { display: flex; gap: 8px; margin: 12px 0; align-items: center; flex-wrap: wrap; }
.share-sub { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.share-md-row { display: flex; gap: 8px; align-items: stretch; }
.share-md { flex: 1; min-width: 0; resize: vertical; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px 10px; font-size: .76rem; line-height: 1.45; }
.share-copy { flex: none; padding: 0 14px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand);
  color: var(--accent-ink); font-weight: 600; font-size: .82rem; cursor: pointer; transition: background 160ms ease; }
.share-copy:hover { background: var(--brand-2); }

/* misc */
.honest { background: color-mix(in oklab, var(--brand) 6%, var(--bg)); border: 1px solid color-mix(in oklab, var(--brand) 28%, transparent);
  border-radius: 12px; padding: 16px 18px; }
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: .88rem; }
.kbd { font-family: var(--mono); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-size: .82rem; color: var(--text); }
.hidden { display: none; }
