/* ============================================================
   GlobeResume — styles
   Tokens first; components; builder; resume templates; print.
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --border: #e4e7f0;
  --border-strong: #cdd2e0;
  --text: #12162b;
  --text-2: #545b70;
  --text-3: #8b91a5;
  --accent: #3b5bfd;
  --accent-hover: #2c49e8;
  --accent-soft: #edf1ff;
  --accent-ink: #ffffff;
  --ok: #0f9960;
  --ok-soft: #e8f7f0;
  --danger: #d64545;
  --danger-soft: #fdeeee;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  /* Layered, diffuse shadows read more premium than a single hard drop */
  --shadow: 0 1px 2px rgba(18, 22, 43, .04), 0 6px 16px -4px rgba(18, 22, 43, .08), 0 24px 48px -12px rgba(18, 22, 43, .10);
  --shadow-sm: 0 1px 2px rgba(18, 22, 43, .05), 0 2px 8px -2px rgba(18, 22, 43, .06);
  --shadow-btn: 0 1px 2px rgba(18, 22, 43, .08), 0 4px 12px -2px rgba(59, 91, 253, .28);
  --font: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-jp: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", "Noto Serif JP", serif;
}

/* Self-hosted brand fonts (no third-party requests, per privacy policy) */
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 8px; }
.font-display { font-family: var(--font-display); }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(18,22,43,.1), 0 8px 20px -3px rgba(59,91,253,.36); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 14px; min-height: 38px; }
.btn-lg { padding: 15px 28px; font-size: 16.5px; border-radius: 12px; }
.btn-add { width: 100%; border-style: dashed; box-shadow: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.topnav { display: flex; gap: 20px; margin-left: auto; }
.topnav a { color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.topnav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 24px 72px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(59, 91, 253, .14), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(59, 91, 253, .08), transparent 60%),
    var(--bg);
}
.hero-inner {
  max-width: 1100px; margin: 0 auto; position: relative;
  display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 40px;
  align-items: start; text-align: left;
}
/* Headline spans the hero row but caps at ~2 balanced lines: wide, not a single strip */
.hero-head { grid-column: 1 / -1; margin-bottom: 20px; }
.hero-head h1 { text-wrap: balance; max-width: 20ch; }
/* Copy sits directly under the headline; the art sits higher and larger */
.hero-copy { align-self: start; }
.hero-art { align-self: start; margin-top: -120px; }
.eyebrow {
  display: inline-block; padding: 6px 15px; border-radius: 100px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: .01em; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 64px); font-weight: 500;
  letter-spacing: -.015em; line-height: 1.08; margin-bottom: 0;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { max-width: 540px; margin: 0 0 30px; color: var(--text-2); font-size: 18px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats {
  display: flex; gap: 32px; justify-content: flex-start; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 0; color: var(--text-2); font-size: 15px;
}
.hero-stats strong { color: var(--text); font-size: 17px; }

/* Flowing background blobs (transform-only animation, GPU-cheap) */
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.blob-1 { width: 460px; height: 460px; background: #c9d5ff; top: -140px; left: -120px; opacity: .55; animation: drift-a 24s ease-in-out infinite alternate; }
.blob-2 { width: 420px; height: 420px; background: #dfe7ff; bottom: -180px; right: -110px; opacity: .6; animation: drift-b 28s ease-in-out infinite alternate; }
.blob-3 { width: 280px; height: 280px; background: #d9f2e6; top: 26%; right: 22%; opacity: .4; animation: drift-c 32s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(70px, 40px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-60px, -36px) scale(1.08); } }
@keyframes drift-c { to { transform: translate(-40px, 54px) scale(1.18); } }

/* Hero character */
.hero-art { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-guy { width: min(400px, 90vw); height: auto; }
.hg-person { animation: hg-bob 4.5s ease-in-out infinite; }
.hg-shadow { animation: hg-shadow 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hg-sheet { animation: hg-rock 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 20%; }
.hg-eyes { animation: hg-blink 5.2s infinite; transform-box: fill-box; transform-origin: center; }

/* Job-offer cards flying in from every direction */
.hg-offer { opacity: 0; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 2px 3px rgba(18, 22, 43, .1)); }
.hg-offer text { font-family: var(--font); font-size: 11.5px; font-weight: 700; fill: #12162b; }
.hg-o1 { animation: hg-in-left 6.4s ease-in-out infinite; }
.hg-o2 { animation: hg-in-right 6.4s ease-in-out 1.6s infinite; }
.hg-o3 { animation: hg-in-right 6.4s ease-in-out 3.2s infinite; }
.hg-o4 { animation: hg-in-left 6.4s ease-in-out 4.8s infinite; }
@keyframes hg-in-left {
  0% { opacity: 0; transform: translate(-48px, 10px) scale(.85); }
  10% { opacity: 1; transform: translate(0, 0) scale(1); }
  55% { opacity: 1; transform: translate(0, -6px) scale(1); }
  72%, 100% { opacity: 0; transform: translate(0, -16px) scale(.92); }
}
@keyframes hg-in-right {
  0% { opacity: 0; transform: translate(48px, 10px) scale(.85); }
  10% { opacity: 1; transform: translate(0, 0) scale(1); }
  55% { opacity: 1; transform: translate(0, -6px) scale(1); }
  72%, 100% { opacity: 0; transform: translate(0, -16px) scale(.92); }
}
@keyframes hg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hg-shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.86); } }
@keyframes hg-rock { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes hg-blink { 0%, 90%, 97%, 100% { transform: scaleY(1); } 93%, 95% { transform: scaleY(.12); } }

.hero-art-caption { font-size: 14px; color: var(--text-2); text-align: center; max-width: 320px; margin: 10px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .blob, .hg-person, .hg-shadow, .hg-sheet, .hg-eyes, .hg-offer { animation: none !important; }
  .hg-offer { opacity: 1; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-sub { margin: 0 auto 28px; }
  /* Stacked layout: cancel the desktop upward pull so the art clears the stats */
  .hero-art { margin-top: 8px; }
  .hero-guy { width: min(230px, 65vw); }
}

/* ---------- Sections ---------- */
.section { padding: 72px 24px; max-width: 1200px; margin: 0 auto; }
.section-tint { max-width: none; background: #eef0f7; }
.section-tint > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section h2 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -.01em; text-align: center; }
.section-sub { text-align: center; color: var(--text-2); max-width: 600px; margin: 12px auto 44px; font-size: 16.5px; line-height: 1.6; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.step p { color: var(--text-2); font-size: 15px; margin: 0; line-height: 1.6; }

/* ---------- Country grid ---------- */
.country-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 36px; }
.country-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 10px 14px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s;
  position: relative; min-height: 44px;
}
.country-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.country-card[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(59,91,253,.12); }
.country-card[aria-selected="true"]::after {
  content: "✓"; position: absolute; top: 8px; right: 10px;
  color: var(--accent); font-weight: 800; font-size: 14px;
}
.cc-flag { line-height: 0; margin-bottom: 4px; }
.flag {
  width: 38px; height: auto; border-radius: 4px; display: inline-block;
  box-shadow: 0 0 0 1px rgba(18, 22, 43, .14);
}
.flag-sm { width: 30px; vertical-align: -4px; margin-right: 6px; }
.flag-xs { width: 22px; vertical-align: -3px; margin-right: 2px; }
.cc-name { font-weight: 700; font-size: 14.5px; }
.cc-doc { font-size: 12.5px; color: var(--text-3); }

/* ---------- Guide panel ---------- */
.guide {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
}
.guide-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -.01em; }
.guide-head p { color: var(--text-2); max-width: 760px; }
.guide-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 20px 0 24px;
}
.fact { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.fact-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.fact-v { font-size: 14px; font-weight: 500; }
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.guide-col { border-radius: var(--radius); padding: 18px 22px; }
.guide-do { background: var(--ok-soft); }
.guide-dont { background: var(--danger-soft); }
.guide-col h4 { font-size: 15px; margin-bottom: 8px; }
.guide-do h4 { color: var(--ok); }
.guide-dont h4 { color: var(--danger); }
.guide-col ul { margin: 0; padding-left: 18px; }
.guide-col li { font-size: 14.5px; margin-bottom: 6px; color: var(--text); }
.guide-note {
  margin: 20px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 10px 10px 0;
  font-size: 14.5px; color: var(--text-2);
}
.guide-cta { margin-top: 20px; text-align: center; }

/* ---------- Builder layout ---------- */
.builder { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; gap: 28px; align-items: start; }
.form-pane { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.preview-pane { min-width: 0; }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm);
}
.form-card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.form-card-title-mid { margin-top: 20px; }
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.hint { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field input[type="month"], .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 9px; font-family: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface); transition: border-color .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(59, 91, 253, .15); }
.field textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
[hidden] { display: none !important; }

/* photo uploader */
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-slot {
  width: 84px; height: 106px; border: 2px dashed var(--border-strong); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--bg); flex-shrink: 0;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
#photoEmpty { font-size: 12px; color: var(--text-3); }
#photoInput { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-btns { display: flex; flex-direction: column; gap: 8px; }
.photo-upload-btn { cursor: pointer; }

/* repeatable entries */
.entry { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: var(--bg); }
.entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.entry-head span { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.entry-remove {
  background: none; border: none; color: var(--text-3); font-size: 13.5px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; min-height: 32px;
}
.entry-remove:hover { color: var(--danger); background: var(--danger-soft); }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Design bar ---------- */
.design-bar {
  display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.design-group { display: flex; align-items: center; gap: 10px; }
.design-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.swatches { display: flex; gap: 9px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; background: var(--sw);
  border: none; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
.segmented { display: flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.segmented button {
  border: none; background: var(--surface); padding: 7px 13px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-2); min-height: 36px;
}
.segmented button + button { border-left: 1px solid var(--border-strong); }
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.segmented button[data-font="classic"] { font-family: Georgia, "Times New Roman", serif; }
.segmented button[data-font="elegant"] { font-family: "EB Garamond", Garamond, Georgia, serif; }
.segmented button[data-font="compact"] { font-family: Arial, Helvetica, sans-serif; }
.design-note { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--text-3); }
.design-disabled .swatch, .design-disabled .segmented button { opacity: .35; cursor: not-allowed; }

/* ---------- Preview pane ---------- */
.preview-pane { position: sticky; top: 76px; }
.preview-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
#localToggleWrap { margin-right: auto; }
.preview-wrap { position: relative; overflow: hidden; border-radius: 6px; }
.sheet {
  width: 794px; min-height: 1123px; background: #fff;
  box-shadow: 0 2px 8px rgba(18, 22, 43, .12), 0 12px 40px rgba(18, 22, 43, .14);
  transform-origin: top left;
  padding: 52px 58px;
  color: #16181f;
  font-size: 14px; line-height: 1.5;
  position: relative;
}
.sheet .r-watermark {
  position: absolute; right: 20px; bottom: 14px;
  font-size: 9px; color: #b3b8c6; letter-spacing: .02em;
}
.preview-hint { font-size: 13px; color: var(--text-3); margin-top: 10px; text-align: center; }

/* ============================================================
   RESUME TEMPLATES (shared by screen preview + print)
   ============================================================ */
/* Resumes stay on a neutral, ATS-standard sans regardless of the site's brand font */
.sheet, #print-area .sheet { font-family: var(--font-sans); }

/* ----- shared pieces ----- */
.r-sec { margin-bottom: 18px; }
.sheet h2.r-h {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
  color: #1a2033; border-bottom: 2px solid var(--r-accent, #1a2033);
  padding-bottom: 4px; margin: 0 0 10px; text-align: left;
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}

/* Self-hosted EB Garamond (no third-party font requests, per privacy policy) */
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* User-selectable resume fonts (Japan's rirekisho keeps its own) */
.sheet.f-classic { font-family: Georgia, "Times New Roman", serif; }
.sheet.f-compact { font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.sheet.f-elegant { font-family: "EB Garamond", Garamond, Georgia, serif; font-size: 15px; }
.sheet.f-elegant .r-name { letter-spacing: .06em; }
.r-item { margin-bottom: 12px; page-break-inside: avoid; }
.r-item-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 14.5px; }
.r-dates { font-weight: 500; color: #4a5065; white-space: nowrap; font-size: 13px; }
.r-item-sub { color: #4a5065; font-size: 13.5px; margin-bottom: 3px; }
.r-bullets { margin: 4px 0 0; padding-left: 18px; }
.r-bullets li { margin-bottom: 3px; font-size: 13.5px; }
.r-inline { font-size: 13.5px; margin: 0; }
.r-placeholder { color: #b0b4c2; }

/* ----- ATS template (US/CA/UK/AU/IN) ----- */
.r-ats .r-name { font-size: 27px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.r-ats .r-title { font-size: 15px; color: var(--r-accent, #3b5bfd); font-weight: 600; margin: 2px 0 6px; }
.r-ats .r-contact { font-size: 13px; color: #4a5065; margin-bottom: 20px; }

/* ----- Euro template (DE/FR/NL) ----- */
.r-euro .r-euro-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.r-euro .r-name { font-size: 26px; font-weight: 800; margin: 0; }
.r-euro .r-title { font-size: 15px; color: var(--r-accent, #3b5bfd); font-weight: 600; margin: 2px 0 0; }
.r-euro .r-photo {
  width: 108px; height: 138px; object-fit: cover; border-radius: 4px;
  border: 1px solid #d5d9e4; flex-shrink: 0;
}
.r-euro .r-photo-empty {
  width: 108px; height: 138px; border: 1px dashed #c3c8d6; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #b0b4c2; font-size: 11px; text-align: center; flex-shrink: 0;
}
.r-personal { margin-bottom: 4px; }
.r-prow { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 13.5px; margin-bottom: 3px; }
.r-prow .k { color: #4a5065; }
.r-row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; margin-bottom: 12px; page-break-inside: avoid; }
.r-row-d { font-size: 13px; color: #4a5065; font-weight: 600; }
.r-row-c .rt { font-weight: 700; font-size: 14px; }
.r-row-c .rs { color: #4a5065; font-size: 13.5px; }
.r-sign { margin-top: 40px; font-size: 13.5px; }
.r-sign .r-sign-name { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 19px; margin-top: 14px; }
.r-sign .r-sign-line { border-top: 1px solid #9aa0b0; width: 220px; padding-top: 4px; color: #4a5065; font-size: 12px; }

/* ----- Gulf template (AE) ----- */
.r-gulf .r-gulf-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.r-gulf .r-name { font-size: 26px; font-weight: 800; margin: 0; }
.r-gulf .r-title { font-size: 15px; color: var(--r-accent, #3b5bfd); font-weight: 600; margin: 2px 0 6px; }
.r-gulf .r-contact { font-size: 13px; color: #4a5065; }
.r-gulf .r-photo {
  width: 96px; height: 118px; object-fit: cover; border-radius: 4px;
  border: 1px solid #d5d9e4; flex-shrink: 0;
}
.r-meta-strip {
  background: #eef1ff;
  background: color-mix(in srgb, var(--r-accent, #3b5bfd) 9%, #fff);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 18px;
  font-size: 13px;
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.r-meta-strip .k { color: #4a5065; font-weight: 400; }
.r-meta-strip b { font-weight: 600; }

/* ----- Japanese rirekisho template ----- */
.r-jp { font-family: var(--font-jp); color: #111; }
.r-jp .jp-titlebar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.r-jp h1 { font-size: 24px; letter-spacing: .5em; margin: 0; font-weight: 600; }
.r-jp .jp-date { font-size: 12px; }
.r-jp table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.r-jp td, .r-jp th {
  border: 1px solid #333; padding: 6px 9px; font-size: 12.5px;
  font-weight: 400; text-align: left; vertical-align: top;
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.r-jp .jp-k { background: #f2f0e9; width: 110px; font-size: 11.5px; }
.r-jp .jp-name { font-size: 18px; }
.r-jp .jp-photo-cell { width: 118px; text-align: center; vertical-align: middle; }
.r-jp .jp-photo { width: 90px; height: 120px; object-fit: cover; }
.r-jp .jp-photo-empty { width: 90px; height: 120px; border: 1px dashed #888; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #888; }
.r-jp .jp-c { text-align: center; width: 52px; }
.r-jp .jp-sec-center { text-align: center; font-weight: 600; background: #f2f0e9; }
.r-jp .jp-ijo { text-align: right; }
.r-jp .jp-box { min-height: 70px; }

/* ---------- Reviews marquee ---------- */
.reviews-section { overflow: hidden; }
.marquee { overflow: hidden; margin-bottom: 18px; }
.marquee-track { display: flex; width: max-content; animation: marq 60s linear infinite; }
.marquee-track-rev { animation: marq-rev 70s linear infinite; }
.m-half { display: flex; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marq-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee:hover .marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-track .m-half[aria-hidden="true"] { display: none; }
  .m-half { flex-wrap: wrap; justify-content: center; }
}
.review-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; width: 330px; flex-shrink: 0; margin-right: 16px;
  box-shadow: var(--shadow-sm);
}
.review-stars { color: #f0a824; font-size: 14px; letter-spacing: 2px; margin-bottom: 8px; }
.review-text { font-size: 14px; line-height: 1.5; color: var(--text); margin: 0 0 12px; }
.review-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.review-meta .flag { width: 20px; border-radius: 3px; }
.review-name { font-weight: 700; color: var(--text); }

/* ---------- Pricing ---------- */
.pricing-banner {
  text-align: center; background: var(--ok-soft); color: var(--ok);
  font-weight: 600; font-size: 14.5px; padding: 10px 18px; border-radius: 10px;
  max-width: 640px; margin: 0 auto 32px;
}
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 360px)); gap: 24px; justify-content: center; }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm); position: relative;
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-pro { border-color: var(--accent); border-width: 1.5px; box-shadow: var(--shadow); }
.plan-pro:hover { transform: translateY(-4px); }
.plan-badge {
  position: absolute; top: -13px; left: 28px;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 5px 13px; border-radius: 100px; box-shadow: var(--shadow-btn);
}
.plan h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--text-3); }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ---------- FAQ ---------- */
.faqs { max-width: 760px; margin: 0 auto; }
.faqs details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 22px; margin-bottom: 10px;
}
.faqs summary {
  cursor: pointer; font-weight: 600; font-size: 15.5px; padding: 16px 0;
  list-style: none; position: relative; padding-right: 28px;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--text-3); font-weight: 400;
}
.faqs details[open] summary::after { content: "–"; }
.faqs details p { color: var(--text-2); font-size: 15px; padding-bottom: 16px; margin: 0; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 40px 24px 48px; border-top: 1px solid var(--border); }
.footer p { margin: 0 0 6px; color: var(--text-2); font-size: 14.5px; }
.footer-fine { font-size: 13px; color: var(--text-3); }
.footer-links a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Legal pages (privacy.html, terms.html) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 24px 72px; }
.legal h1 { font-family: var(--font-display); font-size: 38px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 4px; }
.legal-updated { color: var(--text-3); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 19px; font-weight: 700; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.legal ul { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
.legal-summary {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin-bottom: 8px;
}
.legal-summary p { margin: 0; color: var(--text); }

/* ---------- Guide pages (guides/*.html) + About ---------- */
.guidepage { max-width: 880px; margin: 0 auto; padding: 48px 24px 72px; }
.guidepage h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 42px); font-weight: 600; letter-spacing: -.01em; margin-bottom: 14px; }
.guidepage h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 36px 0 14px; }
.g-crumb { font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.g-crumb a { color: var(--text-2); }
.g-intro { font-size: 17px; line-height: 1.65; color: var(--text-2); max-width: 720px; }
.g-qa dt { font-weight: 700; margin-top: 14px; }
.g-qa dd { margin: 4px 0 0; color: var(--text-2); line-height: 1.6; }
.g-cta { text-align: center; background: var(--accent-soft); border-radius: var(--radius-lg); padding: 32px 24px; margin-top: 36px; }
.g-cta-sub { color: var(--text-2); font-size: 14px; margin: 12px 0 0; }
.gchips { display: flex; flex-wrap: wrap; gap: 10px; }
.gchip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 100px;
  padding: 7px 15px; font-size: 14px; font-weight: 600; color: var(--text);
}
.gchip:hover { border-color: var(--accent); color: var(--accent); }
.gcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.gcard {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.gcard-t { font-weight: 700; font-size: 16.5px; }
.gcard-s { font-size: 13.5px; color: var(--text-3); }
@media (max-width: 640px) { .gcards { grid-template-columns: 1fr; } }

/* ---------- Checkout modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18, 22, 43, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 440px; position: relative;
  box-shadow: var(--shadow); max-height: 90vh; overflow: auto;
}
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 23px; margin-bottom: 16px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: var(--text-3); padding: 8px; min-height: 36px; min-width: 36px; border-radius: 8px;
}
.modal-close:hover { color: var(--text); background: var(--bg); }
.order-summary {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.order-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.order-desc { margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn-block { width: 100%; }
.modal-note { font-size: 13px; color: var(--text-3); text-align: center; margin: 12px 0 0; }
.modal-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--text-3); font-size: 13px; }
.modal-divider::before, .modal-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.unlock-msg { font-size: 13.5px; margin: 10px 0 0; text-align: center; min-height: 18px; color: var(--text-2); }
.unlock-msg.unlock-err { color: var(--danger); }

/* Licence status pill in the preview toolbar */
.license-pill {
  margin-right: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 100px;
  padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.license-pill:hover { border-color: var(--accent); color: var(--accent); }
.license-pill.is-unlocked {
  background: var(--ok-soft); border-color: transparent; color: var(--ok); cursor: default;
}
#checkoutDone { text-align: center; padding: 8px 0 4px; }
#checkoutDone .done-big { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
#checkoutDone p { color: var(--text-2); }
#checkoutDone .btn { margin-top: 8px; }

/* ---------- Print area (hidden on screen) ---------- */
#print-area { display: none; }

/* ============================================================
   PRINT — only the resume, real A4
   ============================================================ */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
  #print-area .sheet {
    width: 210mm; min-height: auto; box-shadow: none;
    padding: 14mm 16mm; transform: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .builder { grid-template-columns: 1fr; }
  .preview-pane { position: static; }
  .country-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-facts { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: minmax(0, 420px); }
  .topnav { display: none; }
}
@media (max-width: 560px) {
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .guide { padding: 22px 18px; }
  .guide-cols { grid-template-columns: 1fr; }
  .guide-facts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 56px 18px 48px; }
  .section { padding: 48px 18px; }

  /* Design bar: stack Colour and Font rows so nothing spills past the card */
  .design-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .design-group { justify-content: space-between; gap: 12px; }
  .swatches { flex: 1; justify-content: space-between; }
  .segmented { flex: 1; }
  .segmented button { flex: 1; padding: 8px 4px; font-size: 12.5px; }
}
