/* ============================================================
   Jobflick static content design system (v2) — presentation only.
   Loaded by every zero-JS static page (salary, city, calculators,
   tools, guides, labour market, hubs).

   ONE system, dark, aligned with the React app's semantic tokens
   (src/index.css). Every colour in these pages comes from here —
   the build step strips hard-coded colours out of page-level
   <style> blocks and inline style attributes, so nothing can
   collide with this file any more.

   No markup, URL, copy, metadata or schema changes live here.
   ============================================================ */

:root {
  /* Semantic tokens (mirror of the app, expressed as HSL triplets) */
  --background: 215 28% 7%;
  --foreground: 220 14% 93%;
  --card: 215 19% 11%;
  --card-foreground: 220 14% 93%;
  --elevated: 220 26% 15%;
  --muted-foreground: 220 16% 74%;
  --primary: 263 83% 66%;
  --primary-foreground: 0 0% 100%;
  --accent: 189 95% 60%;
  --border: 216 18% 24%;
  --success: 160 74% 55%;
  --warning: 38 93% 62%;

  /* Chart palette — colourblind-safe (violet / cyan / amber / teal) */
  --chart-1: 263 83% 68%;
  --chart-2: 189 90% 58%;
  --chart-3: 38 93% 62%;
  --chart-4: 160 66% 55%;

  --radius: 14px;
  --radius-lg: 20px;
  --measure: 72ch;      /* readable prose width */
  --max: 1180px;        /* page container */
  --shadow: 0 1px 2px hsl(215 40% 3% / .5), 0 18px 40px -28px hsl(215 40% 3% / .9);
  --shadow-lift: 0 18px 44px -20px hsl(263 83% 30% / .75);
  --gradient: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  --space-section: clamp(40px, 6vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body {
  margin: 0;
  padding: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient brand glow behind the hero — decorative. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(52vw 42vh at 18% 0%, hsl(var(--primary) / .20), transparent 70%),
    radial-gradient(42vw 34vh at 88% 6%, hsl(var(--accent) / .13), transparent 70%);
}
body > * { position: relative; z-index: 1; }

a { color: hsl(var(--accent)); text-decoration: none; }
a:hover { text-decoration: underline; }
:where(a, button, summary, input, select, textarea, details):focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 3px;
  border-radius: 8px;
}

img { max-width: 100%; }

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
header, header.site {
  background: hsl(var(--background) / .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 30;
}
header, header.site { display: block; padding: 10px clamp(14px, 4vw, 28px); }
header > .wrap, header.site > .wrap {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
header.site:not(:has(> .wrap)) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
header .brand, header .logo, header > a:first-child { display: inline-flex; align-items: center; gap: 10px; color: hsl(var(--foreground)); font-weight: 800; }
header img { height: 28px; width: auto; display: block; }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
header nav a {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  color: hsl(var(--muted-foreground));
  font-size: .9rem;
  font-weight: 600;
}
header nav a:hover, header nav a:focus-visible {
  color: hsl(var(--foreground));
  background: hsl(var(--elevated));
  text-decoration: none;
}
header .cta, header a.cta { color: hsl(var(--primary-foreground)); }

/* ---------------------------------------------------------------
   Page shell / layout primitives
   --------------------------------------------------------------- */
main {
  display: block;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 28px) 80px;
}
main > .inner, main > article, main > .wrap { display: block; }

/* Prose measure: text blocks stay readable, data blocks may go wide. */
main article > p,
main article > ul,
main article > ol,
main article > section > p,
main article > section > ul,
main article > section > ol,
main > p, main > ul, main > ol {
  max-width: var(--measure);
}
main article > section > .full, main .full { max-width: none; }

/* Sections */
main article > section, main > section { margin-top: var(--space-section); scroll-margin-top: 84px; }
main article > section:first-of-type { margin-top: clamp(28px, 4vw, 40px); }

/* ---------------------------------------------------------------
   Typography
   --------------------------------------------------------------- */
h1, h2, h3, h4 { color: hsl(var(--foreground)); letter-spacing: -.02em; text-wrap: balance; }
h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 12px;
  max-width: 20ch;
}
h2 { font-size: clamp(1.3rem, 1.05rem + .9vw, 1.75rem); font-weight: 800; line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); font-weight: 700; margin: 22px 0 8px; }
p, li { color: hsl(var(--foreground) / .88); }
p strong, li strong, td strong { color: hsl(var(--foreground)); font-weight: 700; }
p.lead, .lead {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
  line-height: 1.6;
  color: hsl(var(--foreground) / .92);
}
small, .small { font-size: .85rem; }

/* Overline / eyebrow labels (never headings). */
.eyebrow {
  display: block;
  margin: 0 0 8px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--accent));
}

/* "Last updated" pill */
.last-updated, .updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--elevated));
  color: hsl(var(--muted-foreground));
  font-size: .8rem;
  font-weight: 600;
}
.last-updated::before, .updated::before {
  content: "";
  width: 7px; height: 7px; border-radius: 999px;
  background: hsl(var(--success));
}

/* Breadcrumbs */
.breadcrumb, nav.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: .85rem;
  color: hsl(var(--muted-foreground));
}
.breadcrumb a { color: hsl(var(--muted-foreground)); }
.breadcrumb a:hover { color: hsl(var(--foreground)); }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.page-hero {
  padding: clamp(22px, 3.4vw, 34px) clamp(20px, 3vw, 34px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 140% at 0% 0%, hsl(var(--primary) / .18), transparent 62%),
    hsl(var(--card));
  box-shadow: var(--shadow);
}
.page-hero > :last-child { margin-bottom: 0; }
.page-hero .lead { max-width: var(--measure); }

/* Hero stat: the big headline figure */
.hero-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin: 18px 0 6px;
}
.hero-figure .value {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@supports not (background-clip: text) { .hero-figure .value { color: hsl(var(--accent)); } }
.hero-figure .label { color: hsl(var(--muted-foreground)); font-weight: 600; }

/* ---------------------------------------------------------------
   Cards / stat cards / grids
   --------------------------------------------------------------- */
.card, .panel, .box, .about, .note, .other, .salary-box, .stat, .tile, .item,
.toolcard, .block, .section-box, .faq-item, .figure, .kpi, .callout, .highlight {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.2vw, 22px);
}
.card h2, .card h3, .box h3, .panel h3, .about h2, .other h2, .faq-item h3 { margin-top: 0; }
.card p, .box p, .panel p, .note p, .about p, .other p { color: hsl(var(--foreground) / .82); }
.note, .disclaimer {
  color: hsl(var(--muted-foreground));
  font-size: .9rem;
}
.note { border-left: 3px solid hsl(var(--primary)); }
.disclaimer { box-shadow: none; border: 0; background: none; padding: 0; margin-top: 16px; }

.grid, .cards, .links, .stats, .other-calcs ul, ul.hub {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }

a.card, .links > a, .grid > a, .cards > a, ul.hub > li > a {
  display: block;
  min-height: 44px;
  padding: clamp(16px, 2vw, 20px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
a.card:hover, .links > a:hover, .grid > a:hover, .cards > a:hover, ul.hub > li > a:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--primary) / .6);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}
a.card strong, .links > a strong, .grid > a strong, .cards > a strong, ul.hub > li > a {
  color: hsl(var(--foreground));
  font-weight: 700;
}
a.card p, a.card span, .links > a span, .grid > a span, .cards > a p, .cards > a span {
  color: hsl(var(--muted-foreground));
  font-size: .92rem;
}
a.card h2, a.card h3, .grid > a h2, .cards > a h3 { color: hsl(var(--foreground)); }

/* Stat cards */
.stat, .kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat .label, .kpi .label, .stat-label {
  order: -1;
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stat .value, .kpi .value, .stat-value, .salary-box .n, .result .value, .n {
  color: hsl(var(--foreground));
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  display: block;
}
.salary-box .n { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
@supports not (background-clip: text) { .salary-box .n { color: hsl(var(--accent)); } }
.salary-box p, .stat p { color: hsl(var(--muted-foreground)); font-size: .95rem; margin: 8px 0 0; }

/* Tag / chip / badge */
.tag, .badge, .pill, .chip {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 8px 0;
  padding: 4px 10px;
  border: 1px solid hsl(var(--primary) / .45);
  border-radius: 999px;
  background: hsl(var(--primary) / .16);
  color: hsl(var(--foreground));
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Answer / TL;DR card */
.answer, .answer-box {
  margin: 0 0 26px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid hsl(var(--primary) / .35);
  border-left: 4px solid hsl(var(--primary));
  border-radius: var(--radius);
  background: hsl(var(--primary) / .10);
}
.answer-box > :last-child, .answer > :last-child { margin-bottom: 0; }
.answer-box p, .answer p { color: hsl(var(--foreground) / .92); max-width: var(--measure); }

/* ---------------------------------------------------------------
   Tables
   --------------------------------------------------------------- */
.tablewrap { overflow-x: auto; margin: 16px 0 0; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: var(--shadow); }
.tablewrap table { margin: 0; border: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0 0;
}
caption { caption-side: top; text-align: left; padding: 12px 16px 8px; color: hsl(var(--muted-foreground)); font-size: .85rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--foreground) / .9); }
thead th {
  background: hsl(var(--elevated));
  color: hsl(var(--muted-foreground));
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
tbody th { font-weight: 700; color: hsl(var(--foreground)); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover td, tbody tr:hover th { background: hsl(var(--elevated) / .6); }

/* ---------------------------------------------------------------
   Bar chart (built at compile time from the data tables)
   --------------------------------------------------------------- */
.chart {
  margin: 18px 0 0;
  padding: clamp(16px, 2.2vw, 22px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: var(--shadow);
}
.chart-title {
  margin: 0 0 14px;
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.chart-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.chart-row:last-child { margin-bottom: 0; }
.chart-row .cat { color: hsl(var(--foreground) / .9); font-size: .9rem; font-weight: 600; }
.chart-bar { display: flex; align-items: center; gap: 10px; }
.chart-bar > span.fill {
  display: block;
  height: 16px;
  min-width: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--chart-1)), hsl(var(--chart-2)));
}
.chart-row[data-emphasis="high"] .fill { background: linear-gradient(90deg, hsl(var(--chart-2)), hsl(var(--chart-4))); }
.chart-bar > span.val { color: hsl(var(--foreground)); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.chart + .tablewrap, .chart + table { margin-top: 14px; }
.chart-note { margin: 14px 0 0; color: hsl(var(--muted-foreground)); font-size: .82rem; }
@media (max-width: 560px) {
  .chart-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------------------------------------------------------------
   FAQ / details
   --------------------------------------------------------------- */
.faq { display: grid; gap: 10px; margin-top: 16px; padding: 0; background: none; border: 0; box-shadow: none; }
details {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 4px 18px;
  box-shadow: var(--shadow);
}
details + details { margin-top: 10px; }
.faq details + details { margin-top: 0; }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 12px 0;
  color: hsl(var(--foreground));
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-right: 2px solid hsl(var(--accent));
  border-bottom: 2px solid hsl(var(--accent));
  transform: rotate(45deg);
  transition: transform .18s ease;
}
details[open] summary::after { transform: rotate(-135deg); }
details > *:not(summary) { color: hsl(var(--foreground) / .85); }
details p { margin: 0 0 14px; max-width: var(--measure); }

/* ---------------------------------------------------------------
   CTA
   --------------------------------------------------------------- */
a.cta, .cta a.btn, .cta .btn, button.print, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient);
  color: hsl(var(--primary-foreground));
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 30px -14px hsl(var(--primary) / .9);
  transition: transform .16s ease, box-shadow .16s ease;
}
a.cta:hover, .cta .btn:hover, button.print:hover { transform: translateY(-2px); text-decoration: none; }

/* Block CTA panel */
div.cta, section.cta, aside.cta {
  display: block;
  margin: 28px 0 0;
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid hsl(var(--primary) / .4);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 140% at 100% 0%, hsl(var(--accent) / .14), transparent 60%),
    hsl(var(--primary) / .12);
}
div.cta strong, section.cta strong { display: block; font-size: 1.15rem; color: hsl(var(--foreground)); }
div.cta p, section.cta p { color: hsl(var(--foreground) / .85); margin: 8px 0 16px; max-width: var(--measure); }

/* Empty state (e.g. open roles gated behind auth) */
.empty-state {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 18px 0 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px dashed hsl(var(--primary) / .45);
  border-radius: var(--radius-lg);
  background: hsl(var(--elevated) / .5);
}
.empty-state .icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: hsl(var(--primary) / .18);
}
.empty-state .icon svg { width: 22px; height: 22px; stroke: hsl(var(--accent)); fill: none; stroke-width: 2; }
.empty-state p { color: hsl(var(--muted-foreground)); margin: 0 0 14px; max-width: var(--measure); }
.empty-state strong { color: hsl(var(--foreground)); font-size: 1.05rem; }

/* Related / aside modules */
.related, .other, .other-calcs, aside.related {
  margin-top: var(--space-section);
  padding: clamp(18px, 2.4vw, 24px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, hsl(var(--primary) / .12), transparent 62%), hsl(var(--card));
  box-shadow: var(--shadow);
}
.related h2, .other h2, .other-calcs h2, .related p.footer-col-title { font-size: 1.05rem; margin: 0 0 12px; }
.related ul, .other ul, .other-calcs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.related a, .other a, .other-calcs a { color: hsl(var(--accent)); font-weight: 600; }

/* Fact lists / tips */
ul.facts, ul.tips, ul.steps { padding-left: 0; list-style: none; }
ul.facts li, ul.tips li, ul.steps li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--foreground) / .88);
}
ul.facts li:last-child, ul.tips li:last-child, ul.steps li:last-child { border-bottom: 0; }
ul.facts li::before, ul.tips li::before, ul.steps li::before {
  content: "";
  position: absolute;
  left: 4px; top: 19px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--gradient);
}

/* Table of contents */
.toc {
  margin: 22px 0 0;
  padding: 18px 22px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
}
.toc .footer-col-title, .toc .eyebrow { margin-bottom: 10px; }
.toc ol, .toc ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.toc a { color: hsl(var(--foreground) / .9); }
.toc a:hover { color: hsl(var(--accent)); }

/* ---------------------------------------------------------------
   Forms (calculators, CV builder, cover letter)
   --------------------------------------------------------------- */
label, legend {
  display: block;
  margin: 12px 0 6px;
  color: hsl(var(--muted-foreground));
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--elevated));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: .95rem;
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: hsl(var(--muted-foreground) / .8); }
option { background: hsl(var(--elevated)); color: hsl(var(--foreground)); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
button {
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
}
button.add, button.ghost, .btn-secondary {
  padding: 10px 18px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--elevated));
  color: hsl(var(--foreground));
}
button.add:hover, button.ghost:hover { border-color: hsl(var(--primary) / .6); }

/* Calculator result tiles */
.results, .result-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 18px; }
.result, .results > div, .estimate, .value-card {
  padding: 18px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  color: hsl(var(--foreground));
}
.result .label, .estimate .label { color: hsl(var(--muted-foreground)); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.result .value, .estimate .value { color: hsl(var(--foreground)); }
.result.median { border-color: hsl(var(--primary) / .6); box-shadow: 0 0 0 1px hsl(var(--primary) / .25) inset; }

.share a, .share-buttons a, a.share, .share button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--elevated));
  color: hsl(var(--foreground));
}

/* ---------------------------------------------------------------
   Two-pane tool layout (CV builder / cover letter)
   --------------------------------------------------------------- */
.tool-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: start;
  margin-top: 22px;
}
@media (min-width: 960px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool-layout > .preview-panel { position: sticky; top: 84px; }
}
.form-panel, .preview-panel {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow);
}
.tool-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 12px clamp(14px, 3vw, 20px);
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--elevated) / .96);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.tool-actions .cta { margin: 0; }

/* The CV preview is a document surface: always light, always printable. */
#cv-preview, .doc-preview {
  background: #ffffff;
  color: #14181f;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9);
}
#cv-preview *, .doc-preview * { color: inherit; }
#cv-preview .name, .doc-preview .name { font-size: 1.5rem; font-weight: 800; margin: 0 0 2px; letter-spacing: -.02em; }
#cv-preview .role, .doc-preview .role { color: #4338ca; font-weight: 700; }
#cv-preview .contact, .doc-preview .contact { color: #4b5563; font-size: .85rem; margin-bottom: 14px; }
#cv-preview .cv-h, .doc-preview .cv-h {
  margin: 18px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #374151;
}
#cv-preview p, #cv-preview li, #cv-preview div { color: #14181f; }
#cv-preview .skills span {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: .78rem;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
footer, footer.site {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card) / .6);
  color: hsl(var(--muted-foreground));
  padding: 32px clamp(16px, 4vw, 28px) 48px;
  font-size: .9rem;
}
footer.site > *, footer > * { max-width: var(--max); margin-inline: auto; }
footer a { color: hsl(var(--muted-foreground)); }
footer a:hover { color: hsl(var(--foreground)); }
.global-links { text-align: center; margin-top: 10px; }

/* Footer column titles are NOT document headings. */
.footer-col-title {
  margin: 18px 0 6px;
  color: hsl(var(--foreground) / .8);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cluster-links { margin-top: 20px; font-size: .82rem; line-height: 1.6; }
.cluster-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 0; }
.cluster-links a { color: hsl(var(--muted-foreground)); }

/* ---------------------------------------------------------------
   Utilities / a11y
   --------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  a.card:hover, .grid > a:hover, .cards > a:hover, .links > a:hover, a.cta:hover { transform: none; }
}

@media (forced-colors: active) {
  .card, .panel, details, .chart, table, .related, a.card { border-color: CanvasText; }
  .chart-bar > span.fill { background: CanvasText; }
  a.cta { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; }
}

@media print {
  body::before, header, footer, .no-print, .tool-actions, .faq, .related, .other { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  main { padding: 0; max-width: none; }
  #cv-preview, .doc-preview, .preview-panel { box-shadow: none; border: 0; padding: 0; }
}

/* Card/grid item titles (labels, not document headings) */
.card-title{
  margin:0 0 6px;
  font-size:1.05rem;
  font-weight:700;
  line-height:1.3;
  color:var(--jf-fg, #e8edf7);
}
a.card:hover .card-title{color:var(--jf-accent, #a78bfa)}
