/* CVCraftHub site styles: design tokens, layout, header/footer, content pages and shared components.
   No inline styles are used anywhere on the site (strict CSP on tool pages); dynamic values use CSS variables
   set through CSSOM. */

:root {
  --ink: #0f1f3d;
  --text: #475569;
  --muted: #5b6b82;
  --brand: #1f5fd6;
  --brand-600: #1a4fb3;
  --brand-700: #163f8f;
  --brand-50: #eef4ff;
  --brand-100: #dce8ff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --soft: #f7f9fc;
  --white: #ffffff;
  --success: #166534;
  --success-50: #ecfdf3;
  --warn: #92400e;
  --warn-50: #fff8eb;
  --danger: #b42318;
  --danger-50: #fef3f2;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgb(15 31 61 / 6%);
  --shadow: 0 1px 2px rgb(15 31 61 / 6%), 0 6px 18px rgb(15 31 61 / 7%);
  --shadow-lg: 0 2px 6px rgb(15 31 61 / 8%), 0 18px 48px rgb(15 31 61 / 12%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1200px;
  --gutter: 20px;
  --header-h: 68px;
  color-scheme: light;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, video { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-600); }
strong { color: var(--ink); font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-100); color: var(--ink); }
[hidden] { display: none !important; }

.visually-hidden, .sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 1000; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }
@media (min-width: 768px) { :root { --gutter: 28px; } }

.no-js-message { margin: 0; padding: 12px var(--gutter); background: var(--warn-50); color: var(--warn); border-bottom: 1px solid #f6d9a8; text-align: center; font-weight: 600; }
.js .no-js-message { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 10px;
  font-weight: 650; font-size: 0.98rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer; user-select: none;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgb(31 95 214 / 25%); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f2c4bf; }
.btn-danger:hover { background: var(--danger-50); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #912018; color: #fff; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; border-radius: 8px; }
.btn-block { width: 100%; }
/* On a narrow screen a label too long for the line wraps inside its button instead of pushing the page sideways. */
@media (max-width: 479.98px) {
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .btn-lg { padding-inline: 18px; }
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 0.18em; font: inherit; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); padding-block: 4px; }
.logo { display: inline-flex; flex: none; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.22rem; letter-spacing: -0.02em; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; }
.logo-text span { color: var(--brand); }
/* The link list may shrink and wrap onto a second row, so a wide system font can never push the header past the viewport. */
.site-nav { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn) { display: block; padding: 8px 9px; border-radius: 8px; color: var(--ink); font-weight: 560; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.site-nav a:not(.btn):hover { background: var(--soft); color: var(--brand-600); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.header-cta { flex: none; margin-left: 8px; }
.nav-toggle { display: none; flex: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Keep this breakpoint in step with DESKTOP_NAV in js/ui/site.js. */
@media (max-width: 1199.98px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px; margin: 0;
    padding: 12px var(--gutter) 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav:not(.open) { display: none; }
  .no-js .site-nav { position: static; box-shadow: none; border: 0; padding: 0 0 12px; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .nav-toggle { display: none; }
  .site-nav ul { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 1rem; }
  .header-cta { margin: 6px 0 0; }
}

/* ---- Sections ---- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-sm { padding: clamp(36px, 5vw, 56px) 0; }
.section-alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 0 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--brand); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem); color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }

.card-list { margin: 0; padding: 0; list-style: none; }
.card-list > li { margin: 0; }
/* Single-column grids use a minmax(0, 1fr) track so wide content (tables, long words) cannot widen the page. */
.example-cats { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 60px); }
.example-cat > h2 { margin-bottom: 6px; }
.example-cat > .muted { max-width: 720px; margin-bottom: 22px; }
.example-cat > p:last-child { margin: 18px 0 0; font-weight: 650; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--brand); box-shadow: var(--shadow); color: inherit; }
.card-link:hover h3 { color: var(--brand-600); }
.card .more { display: inline-block; margin-top: 10px; color: var(--brand); font-weight: 650; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 12px; background: var(--brand-50); color: var(--brand); }
.feature-icon .icon { width: 22px; height: 22px; }

/* ---- Hero ---- */
.hero { position: relative; padding: clamp(40px, 6vw, 84px) 0 clamp(48px, 6vw, 88px); background: linear-gradient(180deg, var(--brand-50) 0%, #fff 78%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.hero h1 { margin-bottom: 18px; }
.hero .tagline { color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.hero .lead { max-width: 620px; margin-bottom: 26px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--ink); font-weight: 560; font-size: 0.95rem; }
.trust-list li { display: inline-flex; align-items: center; gap: 8px; }
.trust-list .icon { width: 18px; height: 18px; color: var(--success); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-stack { position: relative; width: min(100%, 470px); aspect-ratio: 816 / 1000; }
.hero-stack .rs-thumb { position: absolute; border-radius: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.hero-stack .rs-thumb:nth-child(1) { width: 74%; left: 0; top: 7%; transform: rotate(-3deg); }
.hero-stack .rs-thumb:nth-child(2) { width: 74%; right: 0; top: 0; }
@media (max-width: 999.98px) { .hero-visual { display: none; } }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { position: relative; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; }

.check-list { margin: 0 0 1em; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 30px; margin: 0 0 10px; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: var(--success-50); border: 1.5px solid var(--success); }
.check-list li::after { content: ""; position: absolute; left: 8px; top: calc(0.3em + 4px); width: 5px; height: 9px; border: solid var(--success); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; } .split.reverse > :first-child { order: 2; } }
.panel { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-soft { background: var(--soft); box-shadow: none; }

/* Mini score/match illustrations on the homepage */
.meter { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.meter li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 0.95rem; color: var(--ink); }
.meter .bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter .bar span { display: block; height: 100%; width: var(--w, 50%); border-radius: inherit; background: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--brand-50); color: var(--brand-600); font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.chip-ok { background: var(--success-50); color: var(--success); }
.chip-miss { background: var(--warn-50); color: var(--warn); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ---- Template gallery ---- */
.tpl-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tpl-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.tpl-card:hover, .tpl-card:focus-within { border-color: var(--brand); box-shadow: var(--shadow); }
.tpl-card .tpl-preview { display: block; padding: 18px 18px 0; background: var(--soft); border-bottom: 1px solid var(--line); }
.tpl-card .rs-thumb { border-radius: 6px 6px 0 0; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.tpl-card .tpl-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.tpl-card h3 { margin: 0; font-size: 1.1rem; }
.tpl-card p { margin: 0; font-size: 0.93rem; }
.tpl-card .btn { margin-top: auto; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.tag-ats { background: var(--success-50); border-color: #bfe5cc; color: var(--success); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.filter-bar button { min-height: 40px; padding: 7px 15px; border-radius: 99px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.filter-bar button:hover { border-color: var(--brand); color: var(--brand-600); }
.filter-bar button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ats-note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin: 0 0 26px; border-radius: var(--radius-sm); background: var(--success-50); color: var(--success); border: 1px solid #bfe5cc; font-weight: 560; }

/* ---- Breadcrumbs ---- */
.breadcrumbs { margin: 0 0 18px; font-size: 0.9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); margin-right: 2px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---- Page header (content pages) ---- */
.page-hero { padding: clamp(28px, 4vw, 52px) 0 clamp(24px, 3vw, 40px); background: linear-gradient(180deg, var(--brand-50), #fff); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; }
.page-hero .lead { max-width: 780px; margin-bottom: 0; }
.page-hero .btn-row { margin-top: 24px; }
.meta-line { margin: 14px 0 0; color: var(--muted); font-size: 0.9rem; }

/* ---- Article layout ---- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: clamp(32px, 4vw, 56px) 0 clamp(56px, 6vw, 88px); }
@media (min-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.article-aside { display: none; }
@media (min-width: 1080px) {
  .article-aside { display: block; }
  .article-aside .sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
}
.toc { padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 0.92rem; }
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.aside-cta { padding: 20px; border-radius: var(--radius); background: var(--ink); color: #dbe4f3; }
.aside-cta h2 { color: #fff; font-size: 1.1rem; }
.aside-cta p { font-size: 0.93rem; }

.prose { max-width: 760px; font-size: 1.05rem; line-height: 1.75; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 0.6em; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 1.2rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: 0 0 0.45em; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand-100); color: var(--ink); }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 1px 5px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.table-wrap { width: 100%; margin: 1.4em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table, .table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.prose th, .prose td, .table th, .table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th, .table th { background: var(--soft); color: var(--ink); font-weight: 650; }
.prose tr:last-child td, .table tr:last-child td { border-bottom: 0; }

.callout { margin: 1.6em 0; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--ink); font-size: 0.98rem; line-height: 1.6; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 4px; font-weight: 700; }
.callout-tip { border-color: #bfe5cc; background: var(--success-50); }
.callout-warn { border-color: #f6d9a8; background: var(--warn-50); }
.do-dont { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 1.4em 0; }
@media (min-width: 700px) { .do-dont { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.do-dont > div { padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 0.97rem; }
.do-dont .do { background: var(--success-50); border-color: #bfe5cc; }
.do-dont .dont { background: var(--danger-50); border-color: #f5c6c1; }
.do-dont h3, .do-dont h4 { margin: 0 0 8px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.do-dont .do h3, .do-dont .do h4 { color: var(--success); }
.do-dont .dont h3, .do-dont .dont h4 { color: var(--danger); }
.do-dont ul { margin: 0; padding-left: 1.2em; }

/* Example blocks: copyable text */
.copy-block { position: relative; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); }
.copy-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); font-size: 0.85rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.copy-block-body { margin: 0; padding: 14px 16px 16px; color: var(--ink); font-size: 0.98rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 650; text-transform: none; letter-spacing: 0; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand-600); }
.no-js .copy-btn { display: none; }
.example-list { margin: 0.6em 0 1.4em; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.example-list li { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-xs); background: #fff; font-size: 1rem; line-height: 1.65; color: var(--ink); }
.example-list li .label { display: block; margin-bottom: 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Example resume preview on example pages */
.example-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; margin: 1.4em 0 2em; }
@media (min-width: 900px) { .example-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.example-preview .rs-thumb { border-radius: 8px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.resume-text { max-height: 640px; overflow: auto; }

/* ---- FAQ ---- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; color: var(--ink); font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform 0.15s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq .answer { padding: 0 18px 16px; }
.faq .answer > :last-child { margin-bottom: 0; }
.section-alt .faq details { background: #fff; }

/* ---- CTA band ---- */
.cta-band { padding: clamp(36px, 5vw, 56px); border-radius: 22px; background: linear-gradient(135deg, var(--ink) 0%, #16336b 100%); color: #d6e0f2; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 640px; margin: 0 auto 24px; font-size: 1.08rem; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: #5c75a5; }
.cta-band .btn-secondary:hover { background: #fff; color: var(--ink); }
.cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 2em 0; padding: 22px 24px; border-radius: var(--radius); background: var(--brand-50); border: 1px solid var(--brand-100); }
.cta-inline p { margin: 0; color: var(--ink); font-weight: 600; font-size: 1.05rem; max-width: 520px; }
/* The label may wrap when a wide system font makes it longer than a narrow phone screen. */
.cta-inline .btn { max-width: 100%; white-space: normal; text-align: center; }

/* ---- Link lists (related content) ---- */
.link-grid { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.link-grid a { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.link-grid a:hover { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); }
.link-grid a::after { content: ""; flex: none; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: 0.6; }
.related { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.35rem; }

/* ---- Ads (content pages only). Empty or unfilled slots collapse. ---- */
.ad-slot { margin: 2.4em 0; text-align: center; }
.ad-slot:empty, .ad-slot:not(:has(ins)) { display: none; }
.ad-slot::before { content: "Advertisement"; display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-slot ins.adsbygoogle { display: block; min-height: 0; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-slot.is-empty { display: none; }

/* ---- Forms ---- */
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field > label, .label { color: var(--ink); font-weight: 620; font-size: 0.93rem; }
.field .hint { color: var(--muted); font-size: 0.86rem; margin: 0; }
.field .error-text { color: var(--danger); font-size: 0.88rem; margin: 0; font-weight: 560; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: #94a3b8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: #8a97ab; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; color: var(--ink); font-weight: 650; }

/* ---- Notices ---- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--ink); font-size: 0.95rem; line-height: 1.55; }
.notice .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--brand); }
.notice p { margin: 0; }
.notice-success { border-color: #bfe5cc; background: var(--success-50); }
.notice-success .icon { color: var(--success); }
.notice-warn { border-color: #f6d9a8; background: var(--warn-50); }
.notice-warn .icon { color: var(--warn); }
.notice-error { border-color: #f5c6c1; background: var(--danger-50); color: #7a1a12; }
.notice-error .icon { color: var(--danger); }

/* ---- Dialogs ---- */
dialog.dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 16px;
  background: #fff; color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden;
}
dialog.dialog.wide { width: min(880px, calc(100vw - 24px)); }
dialog.dialog.xwide { width: min(1120px, calc(100vw - 24px)); }
dialog.dialog::backdrop { background: rgb(15 31 61 / 55%); }
.dialog-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-body { padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: var(--soft); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--soft); border-color: var(--line); }
.icon-btn .icon { width: 20px; height: 20px; }
@media (max-width: 599.98px) {
  dialog.dialog, dialog.dialog.wide, dialog.dialog.xwide { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-inner { max-height: 100dvh; height: 100%; }
  .dialog-body { flex: 1; }
}

/* ---- Toasts ---- */
.toast-region { position: fixed; left: 50%; bottom: 20px; z-index: 1200; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: 0.95rem; pointer-events: auto; animation: toast-in 0.18s ease-out; }
.toast p { margin: 0; flex: 1; }
.toast-error { background: #7a1a12; }
.toast button { flex: none; min-height: 32px; padding: 4px 10px; border-radius: 7px; border: 1px solid rgb(255 255 255 / 35%); background: transparent; color: #fff; font-weight: 650; font-size: 0.88rem; }
.toast button:hover { background: rgb(255 255 255 / 12%); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Consent (fallback when the Google CMP is not shown) ---- */
.consent-options { display: grid; gap: 14px; margin: 16px 0 0; }
.consent-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.consent-option input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.consent-option strong { display: block; }
.consent-option span { font-size: 0.92rem; }

/* ---- Footer ---- */
.site-footer { margin-top: 0; padding: 56px 0 28px; background: var(--ink); color: #b9c6dc; font-size: 0.95rem; }
.site-footer a { color: #dfe7f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); } }
.footer-brand .logo { color: #fff; }
.footer-brand .logo-text span { color: #8fb3ff; }
.footer-brand p { margin: 14px 0 0; max-width: 300px; }
.site-footer h2 { margin: 0 0 12px; color: #fff; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.site-footer .link-btn { color: #dfe7f5; text-decoration: none; }
.site-footer .link-btn:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid #243659; font-size: 0.88rem; }
.footer-bottom p { margin: 0; }
.site-footer :focus-visible { outline-color: #8fb3ff; }

/* ---- 404 ---- */
.error-page { padding: clamp(56px, 10vw, 120px) 0; text-align: center; }
.error-code { display: block; font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; color: var(--brand-100); letter-spacing: -0.04em; }
.error-page .link-grid { max-width: 760px; margin: 28px auto 0; text-align: left; }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.w-40 { --w: 40%; } .w-50 { --w: 50%; } .w-60 { --w: 60%; } .w-70 { --w: 70%; }
.w-80 { --w: 80%; } .w-90 { --w: 90%; } .w-100 { --w: 100%; }
.mt-2 { margin-top: 2rem; }
.stack > * + * { margin-top: 1rem; }
.nowrap { white-space: nowrap; }
.icon { width: 20px; height: 20px; }

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

@media print {
  .site-header, .site-footer, .ad-slot, .skip-link, .article-aside, .cta-band, .cta-inline, .copy-btn, .toast-region { display: none !important; }
  body { color: #000; }
  a { color: #000; }
}
