/* ==========================================================================
   Resume Tools — shared design system
   ========================================================================== */

:root {
  --green-primary: #1B8A5A;
  --green-primary-hover: #157048;
  --green-dark: #0F5C3C;
  --green-accent: #4CAF7D;
  --green-soft: #EAF6F0;
  --green-soft-2: #DEF2E7;
  --bg: #F7FAF9;
  --white: #FFFFFF;
  --text: #16221D;
  --text-muted: #5C6B66;
  --border: #DCEAE3;
  --border-strong: #BFDDD0;
  --score-red: #C15B4A;
  --score-amber: #C1924A;
  --score-green: #1B8A5A;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-card: 0 1px 2px rgba(15, 92, 60, 0.06);
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--green-dark);
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 68ch; }
p.lede { font-size: 1.1rem; color: var(--text-muted); }

a { color: var(--green-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--green-primary);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--soft { background: var(--green-soft); }
.section--dark { background: var(--green-dark); color: #EFF7F3; }
.section--dark h2, .section--dark h3 { color: #FFFFFF; }
.section--dark p { color: #CDE7DA; }

.eyebrow-none { display: none; } /* placeholder to avoid stray labels */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--green-primary-hover); }

.btn--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--green-dark);
}
.btn--outline:hover { border-color: var(--green-primary); background: var(--green-soft); }

.btn--sm { padding: 9px 16px; font-size: 0.88rem; }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.logo span { color: var(--green-accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #DCEEE4;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a:hover { color: #fff; text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.is-open { max-height: 400px; }
  .nav-links li { border-top: 1px solid rgba(255,255,255,0.08); }
  .nav-links a { display: block; padding: 16px 24px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-mock {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px;
}
.hero-mock .mock-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.hero-mock .mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.hero-mock .mock-name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--green-dark); }
.hero-mock .mock-role { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.hero-mock .mock-line { height: 8px; background: var(--green-soft-2); border-radius: 4px; margin-bottom: 8px; }
.hero-mock .mock-line.w-70 { width: 70%; }
.hero-mock .mock-line.w-90 { width: 90%; }
.hero-mock .mock-line.w-50 { width: 50%; }
.hero-mock .mock-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-primary); margin: 16px 0 8px; font-weight: 600; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-mock { order: -1; }
}

/* ---------- Tools list (homepage) ---------- */
.tools-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.tool-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.tool-row:hover { background: var(--green-soft); }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--green-soft-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
}
.tool-row h3 { margin: 0 0 4px; font-size: 1.1rem; }
.tool-row p { margin: 0; font-size: 0.93rem; color: var(--text-muted); max-width: 52ch; }

@media (max-width: 640px) {
  .tool-row { grid-template-columns: 40px 1fr; }
  .tool-row .btn { grid-column: 1 / -1; margin-top: 10px; }
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.step { position: relative; padding-left: 44px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green-primary);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Cards / grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 780px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

/* ---------- Related tools widget ---------- */
.related-tools {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 8px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: block;
  color: var(--text);
}
.related-card:hover { border-color: var(--green-primary); text-decoration: none; background: var(--green-soft); }
.related-card strong { display: block; font-family: var(--font-serif); color: var(--green-dark); margin-bottom: 4px; }
.related-card span { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  padding: 18px 4px;
  font-family: var(--font-serif);
  font-weight: 600;
  cursor: pointer;
  color: var(--green-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--green-primary);
  font-family: var(--font-sans);
  margin-left: 12px;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 4px 18px; color: var(--text-muted); }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 1px dashed var(--border-strong);
  background: #FCFFFE;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 40px 0;
}
.ad-slot span { display: block; letter-spacing: 0.02em; }

/* ---------- Tool page shell ---------- */
.tool-intro { padding: 40px 0 8px; }
.tool-workspace { padding-bottom: 8px; }
.tool-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Profile photo upload (Resume Builder / CV Maker) */
.photo-field { margin-top: 4px; }
.photo-upload { display: flex; align-items: center; gap: 16px; }
.photo-preview {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: #EDF3F0 center/cover no-repeat;
  border: 1px solid var(--border);
}
.photo-preview::after {
  content: "";
}
.photo-preview:not(.has-photo)::before {
  content: "";
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: repeating-linear-gradient(45deg, #E3ECE7, #E3ECE7 4px, #F4F8F6 4px, #F4F8F6 8px);
}
.photo-upload .hint { display: block; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--green-dark); }
.field input, .field textarea, .field select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-primary);
  outline: none;
}
.field .hint { font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}

.repeatable-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  background: var(--green-soft);
}
.repeatable-block .remove-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  color: var(--score-red);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .builder-layout { grid-template-columns: 1fr; }
}

.builder-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.builder-tab {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.builder-tab.is-active { background: var(--green-primary); color: #fff; border-color: var(--green-primary); }

.builder-step { display: none; }
.builder-step.is-active { display: block; }

.template-switch { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.template-swatch {
  width: 48px; height: 60px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  padding: 6px;
  background: #fff;
}
.template-swatch.is-active { border-color: var(--green-primary); }
.template-swatch .bar { height: 3px; background: var(--border); margin-bottom: 3px; border-radius: 2px; }
.template-swatch.tpl-classic .bar:first-child { background: var(--green-dark); height: 6px; }
.template-swatch.tpl-modern .bar:first-child { background: var(--green-accent); height: 5px; width: 60%; }
.template-swatch.tpl-minimal .bar { background: #999; }
.template-swatch.tpl-beacon .bar:first-child { background: #1B2B3A; height: 7px; }
.template-swatch.tpl-foundry .bar:first-child { background: #B5522E; height: 5px; width: 70%; }
.template-swatch.tpl-harbor .bar:first-child { background: #14507A; height: 5px; }
.template-swatch.tpl-meridian .bar:first-child { background: #0F6E5C; height: 5px; width: 50%; margin: 0 auto 3px; }
.template-swatch.tpl-crest .bar:first-child { background: #5C1A2B; height: 6px; }
.template-swatch.tpl-summit .bar:first-child { background: #33415C; height: 5px; width: 65%; }
.template-swatch.tpl-quill .bar:first-child { background: #B8975A; height: 4px; }
.template-swatch.tpl-anchor .bar:first-child { background: #0B3D3A; height: 7px; width: 80%; }
.template-swatch.tpl-vista .bar:first-child { background: #A85A32; height: 5px; width: 55%; }
.template-swatch.tpl-ledger .bar:first-child { background: #16233E; height: 7px; width: 40%; margin-right: auto; }
.template-swatch.tpl-linden .bar:first-child { background: #0E4C3B; height: 7px; width: 40%; }
.template-swatch.tpl-atlas .bar:first-child { background: #A8471F; height: 7px; width: 40%; }

/* ==========================================================================
   Live resume preview — A4 (210×297mm ≈ 794×1123px @96dpi), ~17mm print-
   safe margin on all sides, matching the jsPDF/html2pdf A4 export.
   Requires (added to <head>): Lora, Space Grotesk, Poppins, IBM Plex Mono,
   Playfair Display, alongside the Inter/Source Serif 4 already loaded.
   ========================================================================== */
:root { --page-margin: 64px; }

.resume-preview {
  background: #fff;
  width: 794px;
  min-height: 1123px;
  margin: 0 auto;
  box-shadow: 0 8px 28px rgba(20, 24, 30, 0.16);
  font-family: var(--font-sans);
  color: #262b30;
  line-height: 1.5;
}
.resume-preview:not(:has(.rp-columns)) { padding-bottom: 56px; }
.resume-preview.tpl-modern { border-top: 6px solid var(--green-primary); }
.resume-preview.tpl-minimal { font-family: var(--font-sans); }

.rp-placeholder { color: #B7C4BF; font-style: italic; }

.rp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 26px 0 10px;
}
.rp-entry { margin-bottom: 14px; }
.rp-entry-title { font-weight: 600; font-size: 0.97rem; }
.rp-entry-sub { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.rp-entry p { font-size: 0.88rem; margin: 4px 0 0; color: #333; }
.rp-skills { font-size: 0.88rem; line-height: 1.7; }

/* header (non-sidebar) layout: beacon, meridian, foundry, harbor, crest, summit, quill, anchor, vista */
.rp-header {
  padding: 56px var(--page-margin) 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 22px;
  row-gap: 3px;
  align-items: center;
}
.rp-header:not(:has(.rp-photo)) { display: block; }
.rp-header .rp-photo { grid-row: 1 / span 3; grid-column: 1; width: 104px; height: 104px; object-fit: cover; }
.rp-header .rp-name { grid-column: 2; grid-row: 1; }
.rp-header .rp-role { grid-column: 2; grid-row: 2; }
.rp-header .rp-contact { grid-column: 2; grid-row: 3; }
.rp-name { font-size: 1.9rem; font-weight: 700; line-height: 1.15; }
.rp-role { font-size: 1.02rem; font-weight: 500; margin-top: 4px; }
.rp-contact { font-size: 0.82rem; margin-top: 8px; color: var(--text-muted); }

.tpl-beacon > .rp-section-title, .tpl-beacon > p, .tpl-beacon > .rp-entry, .tpl-beacon > .rp-skills,
.tpl-meridian > .rp-section-title, .tpl-meridian > p, .tpl-meridian > .rp-entry, .tpl-meridian > .rp-skills,
.tpl-foundry > .rp-section-title, .tpl-foundry > p, .tpl-foundry > .rp-entry, .tpl-foundry > .rp-skills,
.tpl-harbor > .rp-section-title, .tpl-harbor > p, .tpl-harbor > .rp-entry, .tpl-harbor > .rp-skills,
.tpl-crest > .rp-section-title, .tpl-crest > p, .tpl-crest > .rp-entry, .tpl-crest > .rp-skills,
.tpl-summit > .rp-section-title, .tpl-summit > p, .tpl-summit > .rp-entry, .tpl-summit > .rp-skills,
.tpl-quill > .rp-section-title, .tpl-quill > p, .tpl-quill > .rp-entry, .tpl-quill > .rp-skills,
.tpl-anchor > .rp-section-title, .tpl-anchor > p, .tpl-anchor > .rp-entry, .tpl-anchor > .rp-skills,
.tpl-vista > .rp-section-title, .tpl-vista > p, .tpl-vista > .rp-entry, .tpl-vista > .rp-skills {
  margin-left: var(--page-margin);
  margin-right: var(--page-margin);
}
.tpl-beacon > p, .tpl-meridian > p, .tpl-foundry > p, .tpl-harbor > p, .tpl-crest > p,
.tpl-summit > p, .tpl-quill > p, .tpl-anchor > p, .tpl-vista > p { font-size: 0.9rem; }

/* sidebar layout: ledger, linden, atlas */
.rp-columns { display: grid; grid-template-columns: 256px 1fr; min-height: 1123px; }
.rp-sidebar { padding: 56px 34px; color: #fff; }
.rp-main { padding: 56px var(--page-margin); background: #fff; color: #222; }
.rp-sidebar .rp-photo {
  display: block;
  width: 116px; height: 116px; object-fit: cover;
  margin-bottom: 20px;
}
.rp-sidebar .rp-name { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 0; }
.rp-sidebar .rp-role { font-size: 0.92rem; margin-top: 4px; margin-bottom: 0; }
.rp-sidebar .rp-contact { font-size: 0.78rem; margin-top: 14px; line-height: 1.9; margin-bottom: 0; word-break: break-word; }
.rp-sidebar .rp-section-title { margin-top: 26px; }
.rp-skills--pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-skill-pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .resume-preview { width: 100%; min-height: 0; }
  .rp-columns { grid-template-columns: 1fr; min-height: 0; }
  .rp-sidebar, .rp-main { padding: 32px 24px; }
}

/* ============ tpl-beacon: classic / distinguished ============ */
.tpl-beacon { --ink:#1C2430; --accent:#A9782F; }
.tpl-beacon .rp-name { font-family: 'Lora', serif; color: var(--ink); }
.tpl-beacon .rp-role { color: var(--accent); }
.tpl-beacon .rp-header { border-bottom: 2px solid var(--accent); }
.tpl-beacon .rp-photo { border-radius: 6px; }
.tpl-beacon .rp-section-title { color: var(--ink); border-left: 3px solid var(--accent); padding-left: 10px; }
.tpl-beacon .rp-entry-title { color: var(--ink); }
.tpl-beacon .rp-contact { letter-spacing: 0.01em; }

/* ============ tpl-meridian: modern / precise ============ */
.tpl-meridian { --ink:#122A2B; --accent:#0F7A6E; }
.tpl-meridian .rp-name { font-family: 'Space Grotesk', sans-serif; color: var(--ink); }
.tpl-meridian .rp-role { color: var(--accent); font-weight: 600; }
.tpl-meridian .rp-photo { border-radius: 50%; border: 3px solid var(--accent); }
.tpl-meridian .rp-header { padding-bottom: 26px; }
.tpl-meridian > .rp-section-title, .tpl-meridian > .rp-entry, .tpl-meridian > p, .tpl-meridian > .rp-skills {
  border-left: 2px solid #E1E5E3;
  padding-left: 18px;
  margin-left: var(--page-margin);
}
.tpl-meridian > .rp-entry:last-child { padding-bottom: 4px; }
.tpl-meridian .rp-section-title { color: var(--accent); }
.tpl-meridian .rp-entry-title { color: var(--ink); }

/* ============ tpl-ledger: refined / editorial sidebar ============ */
.tpl-ledger .rp-sidebar { background: #1E2A24; color: #E9EDE9; }
.tpl-ledger .rp-sidebar .rp-name { font-family: 'Lora', serif; color: #fff; }
.tpl-ledger .rp-sidebar .rp-role { color: #C9A24B; }
.tpl-ledger .rp-sidebar .rp-contact { color: #B8C2BB; }
.tpl-ledger .rp-photo { border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); }
.tpl-ledger .rp-sidebar .rp-section-title { color: #C9A24B; border-top: 1px solid rgba(255,255,255,0.18); padding-top: 14px; }
.tpl-ledger .rp-skill-pill { background: rgba(255,255,255,0.08); color: #E9EDE9; border: 1px solid rgba(255,255,255,0.2); }
.tpl-ledger .rp-main .rp-section-title { color: #1E2A24; border-bottom: 1px solid #DDE3DE; padding-bottom: 8px; }
.tpl-ledger .rp-entry-title { color: #1E2A24; }

/* ============ tpl-linden: warm / approachable sidebar ============ */
.tpl-linden .rp-sidebar { background: #48583F; color: #F3F1E9; }
.tpl-linden .rp-sidebar .rp-name { font-family: 'Poppins', sans-serif; color: #fff; }
.tpl-linden .rp-sidebar .rp-role { color: #D9C489; }
.tpl-linden .rp-sidebar .rp-contact { color: #DCE3D3; }
.tpl-linden .rp-photo { border-radius: 50%; }
.tpl-linden .rp-sidebar .rp-section-title { color: #D9C489; }
.tpl-linden .rp-skill-pill { background: #F3F1E9; color: #48583F; }
.tpl-linden .rp-main .rp-section-title { color: #48583F; }
.tpl-linden .rp-main .rp-section-title::after { content: ""; display: block; width: 34px; height: 3px; background: #D9C489; margin-top: 6px; border-radius: 3px; }
.tpl-linden .rp-entry-title { color: #2B3327; }

/* ============ tpl-atlas: structured / global sidebar ============ */
.tpl-atlas .rp-sidebar { background: #1B2A45; color: #E4EAF3; }
.tpl-atlas .rp-sidebar .rp-name { font-family: 'Space Grotesk', sans-serif; color: #fff; }
.tpl-atlas .rp-sidebar .rp-role { color: #8FB4D9; }
.tpl-atlas .rp-sidebar .rp-contact { color: #B7C4D8; }
.tpl-atlas .rp-photo { border-radius: 6px; }
.tpl-atlas .rp-sidebar .rp-section-title { color: #8FB4D9; }
.tpl-atlas .rp-skill-pill { background: rgba(143,180,217,0.16); color: #E4EAF3; border: 1px solid rgba(143,180,217,0.4); }
.tpl-atlas .rp-main { border-top: 4px solid #1B2A45; }
.tpl-atlas .rp-main .rp-section-title { color: #1B2A45; }
.tpl-atlas .rp-entry-title { color: #1B2A45; }

/* ============ tpl-foundry: industrial / technical ============ */
.tpl-foundry { --ink:#23262B; --accent:#B14A2C; }
.tpl-foundry .rp-name { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.tpl-foundry .rp-role { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tpl-foundry .rp-header { border-bottom: none; position: relative; padding-bottom: 26px; }
.tpl-foundry .rp-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, transparent 18px 26px); }
.tpl-foundry .rp-section-title { font-family: 'IBM Plex Mono', monospace; color: var(--ink); position: relative; }
.tpl-foundry .rp-section-title::before { content: "// "; color: var(--accent); }
.tpl-foundry .rp-entry-title { color: var(--ink); font-weight: 700; }
.tpl-foundry .rp-entry-sub { font-family: 'IBM Plex Mono', monospace; font-size: 0.74rem; }
.tpl-foundry .rp-contact { font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; }

/* ============ tpl-harbor: calm / maritime ============ */
.tpl-harbor { --ink:#0E2E3B; --accent:#2E8C82; }
.tpl-harbor .rp-name { font-family: 'Lora', serif; font-style: italic; color: var(--ink); }
.tpl-harbor .rp-role { color: var(--accent); }
.tpl-harbor .rp-header { border-bottom: 1px dashed rgba(46,140,130,0.5); padding-bottom: 24px; }
.tpl-harbor .rp-section-title { color: var(--ink); }
.tpl-harbor .rp-section-title::after { content: ""; display: block; width: 100%; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); margin-top: 6px; }
.tpl-harbor .rp-entry-title { color: var(--ink); }
.tpl-harbor .rp-contact { color: var(--accent); }

/* ============ tpl-crest: heraldic / distinguished ============ */
.tpl-crest { --ink:#3A1220; --accent:#8C6B2F; }
.tpl-crest .rp-name { font-family: 'Playfair Display', serif; font-weight: 800; color: var(--ink); }
.tpl-crest .rp-role { color: var(--accent); font-weight: 600; }
.tpl-crest .rp-header { text-align: center; display: block; border-bottom: 3px double var(--accent); padding-bottom: 20px; }
.tpl-crest .rp-header .rp-contact { justify-content: center; }
.tpl-crest .rp-section-title { color: var(--ink); text-align: center; font-family: 'Playfair Display', serif; text-transform: none; font-size: 0.98rem; letter-spacing: 0.02em; }
.tpl-crest .rp-entry-title { color: var(--ink); }
.tpl-crest > p { text-align: center; max-width: 560px; margin-left: auto !important; margin-right: auto !important; }

/* ============ tpl-summit: bold / ambitious ============ */
.tpl-summit { --ink:#1A1F2B; --accent:#3E6FCB; }
.tpl-summit .rp-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2.15rem; color: var(--ink); clip-path: polygon(0 0, 100% 0, 98% 100%, 0% 100%); }
.tpl-summit .rp-role { color: #fff; background: var(--accent); display: inline-block; padding: 3px 12px; font-weight: 600; font-size: 0.86rem; margin-top: 6px; }
.tpl-summit .rp-header { padding-bottom: 24px; }
.tpl-summit .rp-section-title { color: #fff; background: var(--ink); display: inline-block; padding: 4px 14px; clip-path: polygon(0 0, 100% 0, 94% 100%, 0% 100%); }
.tpl-summit .rp-entry-title { color: var(--ink); }
.tpl-summit .rp-entry { border-left: 3px solid var(--accent); padding-left: 14px; }

/* ============ tpl-quill: literary / understated ============ */
.tpl-quill { --ink:#201C18; --accent:#6B5B4A; }
.tpl-quill .rp-name { font-family: 'Lora', serif; font-style: italic; font-weight: 500; color: var(--ink); font-size: 2.05rem; }
.tpl-quill .rp-role { color: var(--accent); font-style: italic; }
.tpl-quill .rp-section-title { font-family: 'Lora', serif; font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--ink); }
.tpl-quill .rp-entry-title { color: var(--ink); font-weight: 600; }
.tpl-quill > p { font-family: 'Lora', serif; font-size: 0.94rem; }

/* ============ tpl-anchor: grounded / steady ============ */
.tpl-anchor { --ink:#1C2B3A; --accent:#B08D3E; }
.tpl-anchor .rp-header { text-align: left; border-bottom: 4px solid var(--ink); padding-bottom: 22px; }
.tpl-anchor .rp-name { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--ink); }
.tpl-anchor .rp-role { color: var(--accent); font-weight: 600; }
.tpl-anchor .rp-section-title { color: #fff; background: var(--ink); padding: 5px 12px; border-radius: 3px; }
.tpl-anchor .rp-entry-title { color: var(--ink); }

/* ============ tpl-vista: open / airy / minimal ============ */
.tpl-vista { --ink:#33413A; --accent:#7E9583; }
.tpl-vista .rp-header { padding-top: 68px; padding-bottom: 34px; }
.tpl-vista .rp-name { font-weight: 500; letter-spacing: -0.01em; color: var(--ink); font-size: 2.1rem; }
.tpl-vista .rp-role { color: var(--accent); font-weight: 500; }
.tpl-vista .rp-section-title { font-weight: 500; letter-spacing: 0.14em; color: var(--accent); font-size: 0.68rem; }
.tpl-vista .rp-entry-title { color: var(--ink); font-weight: 500; }
.tpl-vista .rp-entry { margin-bottom: 22px; }

.sticky-preview {
  position: sticky;
  top: 88px;
  width: 100%;
  max-width: 794px;
  aspect-ratio: 794 / 1123;
  overflow: hidden;
  container-type: inline-size;
  box-shadow: 0 8px 28px rgba(20, 24, 30, 0.16);
}
.preview-scale {
  width: 794px;
  transform: scale(calc(100cqw / 794));
  transform-origin: top left;
}
.sticky-preview .resume-preview { box-shadow: none; }

/* Unified download button with format dropdown */
.download-menu { position: relative; display: inline-flex; margin-top: 20px; }
.download-menu__main {
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.download-menu__toggle {
  border-top-left-radius: 0; border-bottom-left-radius: 0;
  border-left: 1px solid rgba(255,255,255,0.35);
  padding-left: 10px; padding-right: 12px;
}
.download-menu__list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 280px; overflow: hidden;
}
.download-menu__item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 14px; font-size: 0.9rem; font-weight: 600; color: var(--green-dark);
  cursor: pointer; border-bottom: 1px solid var(--border);
}
.download-menu__item:last-child { border-bottom: none; }
.download-menu__item:hover, .download-menu__item.is-selected { background: #F2F7F4; }
.download-menu__hint { display: block; font-size: 0.76rem; font-weight: 400; color: var(--text-muted); margin-top: 2px; }

/* Upload dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 44px 24px;
  text-align: center;
  background: var(--green-soft);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.dropzone.is-drag { border-color: var(--green-primary); }
.dropzone p { margin: 0; color: var(--text-muted); }
.dropzone strong { color: var(--green-dark); }

/* Score result */
.score-wrap { display: flex; align-items: center; gap: 24px; margin: 28px 0; flex-wrap: wrap; }
.score-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2rem; font-weight: 600;
  color: #fff;
  background: conic-gradient(var(--green-primary) 0deg, var(--border) 0deg);
  position: relative;
}
.score-ring::before {
  content: "";
  position: absolute;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: #fff;
}
.score-ring span { position: relative; color: var(--green-dark); }
.score-label { font-size: 0.95rem; color: var(--text-muted); max-width: 320px; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.check-list .mark { font-weight: 700; width: 20px; flex-shrink: 0; }
.check-list li.pass .mark { color: var(--green-primary); }
.check-list li.warn .mark { color: var(--score-amber); }
.check-list li.fail .mark { color: var(--score-red); }

/* Template gallery: this page gets a wider content column than the site's
   default 1120px container so the (now full-size) template previews have
   real room — matching the scale of thumbnails on sites like
   resumebuilder.com/resume-templates/ rather than a cramped mini-preview. */
body.tool-page--resume-templates .container { max-width: 1400px; }

.tpl-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.tpl-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 92, 60, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tpl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(15, 92, 60, 0.16);
  border-color: var(--border-strong);
}
.tpl-thumb {
  height: 190px;
  background: var(--green-soft);
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.tpl-thumb .t-line { height: 5px; background: var(--border-strong); border-radius: 3px; margin-bottom: 6px; }
.tpl-thumb .t-line.head { background: var(--green-dark); height: 8px; width: 60%; margin-bottom: 10px; }
.tpl-body { padding: 18px 20px 20px; }
.tpl-body h4 { margin: 0 0 6px; font-size: 1.08rem; }
.tpl-body p { font-size: 0.87rem; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }

/* Live example-content thumbnails: a real .resume-preview (same markup and
   CSS as the actual builder output) scaled down as a whole unit so the
   gallery shows exactly what each template looks like — full size, edge to
   edge in the card, the way resumebuilder.com/resume-templates/ shows its
   thumbnails, not a small mini-preview floating in empty space.
   fitTemplateThumbs() in main.js sets the real transform/height per card:
   it measures the card's actual available width and scales the (fixed
   794px-wide) preview up to fill it, then measures that template's real
   content height so the card is sized to show the page in full, with no
   cropping. The values below are only a same-layout fallback for the
   instant before JS runs. */
.tpl-thumb-live {
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 10px 20px;
  background: linear-gradient(180deg, var(--green-soft) 0%, #F4FAF7 100%);
  border-bottom: 1px solid var(--border);
  min-height: 360px;
}
.tpl-thumb-live .resume-preview {
  width: 794px;
  min-height: auto;
  transform-origin: top center;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(20, 24, 30, 0.24);
  flex-shrink: 0;
}
.tpl-thumb-live .rp-columns { min-height: auto; }

@media (max-width: 1180px) { body.tool-page--resume-templates .container { max-width: 1120px; } }
@media (max-width: 980px) { .tpl-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tpl-gallery { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: #CDE7DA;
  padding: 48px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; font-family: var(--font-sans); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #CDE7DA; font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.82rem;
  color: #9FC3B2;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Content pages ---------- */
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { max-width: 68ch; }
.prose li { margin-bottom: 6px; }

.breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: var(--green-dark); padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }
