/* CVPilot Royal — a refined, responsive visual layer over the existing PHP application. */
:root {
  --bg: #f4f6fb;
  --paper: #ffffff;
  --ink: #141a2b;
  --muted: #5f6b81;
  --line: #dfe5ef;
  --soft: #eef2f8;
  --navy: #101a31;
  --royal-gold: #ad8c54;
  --royal-gold-soft: #f3ecdf;
  --royal-blue: #3148b5;
  --royal-violet: #7664dc;
  --shadow: 0 22px 64px rgba(18, 29, 54, .10);
  --shadow-sm: 0 10px 28px rgba(18, 29, 54, .07);
  --radius: 20px;
  --font: "Segoe UI", Inter, Arial, sans-serif;
  --display: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color-scheme: light;
}

html.dark {
  --bg: #101827;
  --paper: #182337;
  --ink: #f4f6fb;
  --muted: #b4bfd0;
  --line: #2d3a50;
  --soft: #202d43;
  --navy: #0b1220;
  --royal-gold-soft: #2c2a27;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.public-site-body {
  background:
    radial-gradient(ellipse at 6% 0%, rgba(80, 99, 190, .055), transparent 34rem),
    radial-gradient(ellipse at 95% 16%, rgba(173, 140, 84, .045), transparent 30rem),
    var(--bg) !important;
}
html.dark body.public-site-body,
html.dark body.admin-console-body { background: var(--bg) !important; color: var(--ink); }
.wrap { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.ambient { display: none !important; }

/* Keyboard users can jump past the persistent header. */
.skip-link { position: fixed; z-index: 100001; top: 12px; left: 12px; padding: 12px 16px; border-radius: 10px; background: var(--navy); color: #fff; transform: translateY(-160%); transition: transform .18s ease; }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #5b8dff !important; outline-offset: 3px; }

/* Shared actions and controls. */
.btn { min-height: 46px; border-radius: 12px; font-family: var(--font); font-weight: 700; letter-spacing: .01em; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff !important; background: linear-gradient(135deg, var(--primary, var(--royal-blue)), var(--primary-dark, #26378f)) !important; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary, var(--royal-blue)) 24%, transparent) !important; }
.btn-primary:hover { box-shadow: 0 12px 25px color-mix(in srgb, var(--primary, var(--royal-blue)) 32%, transparent) !important; }
.btn-outline, .btn-ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn-outline:hover, .btn-ghost:hover { border-color: color-mix(in srgb, var(--primary, var(--royal-blue)) 44%, var(--line)); background: var(--soft); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-color: var(--line); border-radius: 11px; background-color: var(--paper); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #7f899c; opacity: 1; }
html.dark input::placeholder, html.dark textarea::placeholder { color: #9aa7ba; }
.field label { color: var(--ink); font-size: 12px; font-weight: 700; }
.field-hint, .muted, .subhead { color: var(--muted); }

/* Calm, polished masthead and a clearer tools menu. */
.site-header {
  z-index: 100;
  background: rgba(250, 251, 254, .94) !important;
  border-color: rgba(211, 219, 232, .9) !important;
  box-shadow: 0 5px 22px rgba(18, 29, 54, .045);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}
html.dark .site-header { background: rgba(17, 26, 42, .94) !important; border-color: var(--line) !important; }
.header-inner { width: min(1480px, calc(100% - 48px)); min-height: 82px; height: auto; gap: clamp(12px, 1.8vw, 28px); }
.brand { gap: 11px; color: var(--ink); font-family: var(--font); font-size: 19px; font-weight: 750; letter-spacing: -.045em; }
.brand-mark { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.55); border-radius: 13px; background: linear-gradient(145deg, #263f9f, #6856cf); box-shadow: 0 7px 17px rgba(45, 61, 150, .22); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-wordmark { color: var(--ink); }
.brand-logo-image { max-width: 176px; max-height: 43px; }
.main-nav { gap: clamp(13px, 1.5vw, 22px); }
.main-nav a, .nav-quiet { color: var(--muted); font-size: 13px; font-weight: 650; }
.main-nav a:hover, .main-nav a.is-current, .nav-quiet:hover { color: var(--primary, var(--royal-blue)); }
.main-nav a.is-current { position: relative; }
.nav-dropdown-menu { left: 50%; width: min(570px, calc(100vw - 32px)); padding: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); transform: translateX(-50%); }
.nav-dropdown-menu a { min-width: 0; padding: 12px; border-radius: 12px; color: var(--ink) !important; }
.nav-dropdown-menu a:hover { background: var(--soft); transform: translateY(-1px); }
.nav-dropdown-menu a > svg { color: var(--primary, var(--royal-blue)); }
.nav-dropdown-menu a small { color: var(--muted); }
.theme-toggle { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); }
.mobile-menu { width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.mobile-nav-backdrop { z-index: 98; background: rgba(10, 17, 30, .48); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

/* A cinematic but restrained royal-blue home hero. */
body.public-site-body .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 7vw, 96px) 0 72px;
  background: linear-gradient(112deg, #101a31 0%, #182747 58%, #202c56 100%) !important;
  color: #f8f9ff;
}
body.public-site-body .hero::before { position: absolute; z-index: -1; inset: 0; content: ""; background: radial-gradient(ellipse at 76% 45%, rgba(121, 104, 221, .25), transparent 34rem), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: auto, 90px 100%; opacity: .7; pointer-events: none; }
.hero-grid { grid-template-columns: minmax(0, .95fr) minmax(430px, 1.05fr); gap: clamp(36px, 6vw, 88px); }
.hero .eyebrow { color: #dbc69f; letter-spacing: .16em; }
.hero .eyebrow .pulse { background: #d8bf8b; box-shadow: 0 0 0 4px rgba(216,191,139,.14); }
.hero .display { max-width: 680px; margin: 18px 0 22px; color: #fff; font-family: var(--display); font-size: clamp(46px, 5.2vw, 72px); font-weight: 600; line-height: 1.04; letter-spacing: -.045em; }
.hero .display em { color: #c6b5ff; font-style: italic; }
.hero .display em::after { height: 3px; background: linear-gradient(90deg, #af9bf3, rgba(173,140,84,.8)); }
.hero .subhead { max-width: 570px; color: #d2d9e8; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.75; }
.hero .btn-outline { border-color: rgba(255,255,255,.3); background: transparent; color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }
.hero-proof { color: #d2d9e8; }
.hero-proof .muted { color: #d2d9e8; }
.hero-art { min-height: 500px; }
.art-orbit { border-color: rgba(207, 196, 244, .27); }
.art-orbit::before, .art-orbit::after { background: #b7a4f3; box-shadow: 0 0 22px rgba(152, 130, 237, .36); }
.resume-window { width: min(470px, 92%); height: 452px; border-color: rgba(255,255,255,.6); border-radius: 15px; box-shadow: 0 30px 90px rgba(0,0,0,.3); transform: rotate(0deg); }
.float-card { border: 1px solid rgba(229,233,244,.9); border-radius: 14px; box-shadow: 0 14px 35px rgba(4, 10, 24, .2); }

/* More breathing room, sharper hierarchy, and consistent surfaces. */
.section { padding: clamp(58px, 7vw, 88px) 0; }
.section-head { align-items: end; gap: 24px; margin-bottom: 34px; }
.section-head h2, .section-title, .page-hero h1, .career-page-header h1 { color: var(--ink); font-family: var(--display); font-weight: 600; letter-spacing: -.035em; }
.section-head h2, .section-title { font-size: clamp(30px, 3.3vw, 43px); line-height: 1.12; }
.section-head p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.eyebrow { color: var(--primary, var(--royal-blue)); font-size: 10px; letter-spacing: .16em; }
.feature-card, .tool-tile, .panel, .stat-card, .dashboard-card, .career-panel, .auth-card, .editor-panel, .preview-panel {
  border-color: var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(18,29,54,.025);
}
.feature-card { min-height: 230px; padding: 28px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.feature-card:hover, .tool-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary, var(--royal-blue)) 34%, var(--line)); box-shadow: var(--shadow-sm); }
.feature-icon { border-radius: 13px; background: #edf0ff; color: var(--primary, var(--royal-blue)); }
html.dark .feature-icon { background: #28325a; }
.feature-card h3, .tool-tile strong, .step h3 { color: var(--ink); }
.feature-card p, .tool-tile span, .step p { color: var(--muted); }
.steps { gap: 18px; }
.step { border-top: 1px solid var(--line); }
.step-number { color: var(--royal-gold); }
.trust-strip { border-color: var(--line) !important; background: color-mix(in srgb, var(--paper) 84%, var(--soft)) !important; }

/* Template gallery: an editorial catalogue with the resume designs in focus. */
.template-document-hero, .template-library-hero {
  background: linear-gradient(112deg, #111b33 0%, #182747 64%, #242d58 100%) !important;
  color: #f7f8fc;
}
.template-document-hero .template-library-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(420px, .95fr); gap: clamp(36px, 5vw, 72px); padding-block: 40px; }
.template-document-hero .template-library-copy h1 { max-width: 700px; color: #fff; font: 600 clamp(42px, 5vw, 66px)/1.05 var(--display); letter-spacing: -.045em; }
.template-document-hero .template-library-copy h1 span { color: #c6b5ff; }
.template-document-hero .template-library-copy > p { max-width: 590px; color: #d3d9e7; font-size: 16px; line-height: 1.75; }
.template-document-hero .eyebrow { color: #dbc69f; }
.template-library-stats { border-color: rgba(255,255,255,.2); }
.template-library-stats strong { color: #fff; }
.template-library-stats small, .template-library-note { color: #ccd4e5; }
.template-library-stats > span + span { border-color: rgba(255,255,255,.2); }
.template-library-hero .btn-outline { border-color: rgba(255,255,255,.28); background: transparent; color: #fff; }
.template-document-showcase { min-height: 490px; }
.doc-showcase-label { border-color: rgba(255,255,255,.2); background: rgba(14,22,42,.86); color: #f8f8fc; }
.template-document-main { background: var(--bg) !important; }
.template-library-title-row { margin-bottom: 28px; }
.template-library-title-row h2 { color: var(--ink); font: 600 clamp(28px, 3vw, 40px)/1.15 var(--display); letter-spacing: -.03em; }
.template-library-title-row p { max-width: 700px; color: var(--muted); }
.template-filter-panel { position: relative; margin-bottom: 24px; border-color: var(--line) !important; border-radius: 18px !important; background: var(--paper) !important; box-shadow: var(--shadow-sm) !important; }
.template-search-box input, .filter-select { min-height: 46px; }
.template-quick-filters { gap: 8px; }
.template-filter-chip { min-height: 38px; border-radius: 999px; border-color: var(--line); background: var(--paper); color: var(--muted); }
.template-filter-chip.active { border-color: var(--primary, var(--royal-blue)); background: var(--primary, var(--royal-blue)); color: #fff; }
.template-document-grid { gap: 22px; }
.template-document-card { border-color: var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 6px 20px rgba(18,29,54,.045); }
.template-document-card:hover { border-color: color-mix(in srgb, var(--primary, var(--royal-blue)) 38%, var(--line)); box-shadow: var(--shadow); transform: translateY(-4px); }
.template-document-shell { min-height: 330px; height: 360px; padding: 18px 14px 22px; border-color: var(--line); background: linear-gradient(145deg, #edf1f7, #f7f8fb); }
.template-document-page { box-shadow: 0 12px 28px rgba(20,29,48,.13); }
.template-premium-meta { padding: 18px 18px 16px; }
.template-premium-heading strong { color: var(--ink); font-size: 15px; }
.template-premium-heading span:not(.template-tone-dot) { color: var(--muted); }
.template-premium-meta > p { min-height: 44px; color: var(--muted); line-height: 1.6; }
.template-tone-dot { border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.template-badge.badge-featured { background: var(--royal-gold-soft); color: #71562d; }
.template-tier-badge { border-radius: 99px; }
.template-library-bottom-cta { border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: linear-gradient(115deg, #121d37, #24315c); box-shadow: var(--shadow); }
.template-library-bottom-cta strong { color: #fff; }
.template-library-bottom-cta p { color: #d1d8e8; }
.template-bottom-icon { color: #d2c19a; }

/* Clear, consistent commercial pages. */
.price-card { border-color: var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 8px 24px rgba(18,29,54,.04); }
.price-card.popular { border-color: var(--royal-gold); box-shadow: 0 18px 44px rgba(42,51,113,.12); }
.popular-label { background: var(--royal-gold-soft); color: #735b31; }
.price-name { color: var(--ink); }
.price-description, .price-note { color: var(--muted); }
.price-value { color: var(--ink); }
.price-divider { border-color: var(--line); }
.price-features li { color: var(--ink); }
.price-features li svg { color: var(--royal-gold); }
.cta-section .cta-box { border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: linear-gradient(118deg,#121d37,#26345f); box-shadow: var(--shadow); }
.cta-box h2 { color: #fff; font-family: var(--display); font-weight: 600; }
.cta-box p { color: #d2d9e8; }
.faq-item { border-color: var(--line); }
.faq-question { color: var(--ink); }
.faq-answer { color: var(--muted); }

/* Workspace, account, builder and admin surfaces. */
.app-shell { padding-block: 32px 72px; background: var(--bg) !important; color: var(--ink); }
.workspace-top, .career-page-header { margin-bottom: 25px; }
.workspace-top h1, .career-page-header h1, .admin-console-main h1 { color: var(--ink); font-family: var(--display); font-weight: 600; letter-spacing: -.035em; }
.workspace-top > div > p { color: var(--muted); }
.dashboard-hero, .workspace-hero { border: 1px solid rgba(255,255,255,.13); border-radius: 22px; background: linear-gradient(116deg, #111b33, #1c2b50 72%, #2a3260); box-shadow: var(--shadow); }
.dashboard-hero h1, .workspace-hero h1, .dashboard-hero h2, .workspace-hero h2 { color: #fff; }
.dashboard-hero p, .workspace-hero p { color: #d1d9e8; }
.dashboard-hero .eyebrow, .workspace-hero .eyebrow { color: #dbc69f; }
.dashboard-hero .btn-light, .workspace-hero .btn-light { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; }
.dashboard-hero .btn-accent, .workspace-hero .btn-accent { background: #fff; color: #1d2c59; }
.panel, .editor-panel, .preview-panel, .career-panel, .account-panel { border-color: var(--line) !important; border-radius: 18px !important; background: var(--paper) !important; box-shadow: 0 7px 24px rgba(18,29,54,.035) !important; }
.panel-head { border-color: var(--line); }
.panel-head h2, .panel-head h3, .editor-section-title { color: var(--ink); }
.panel-head p, .editor-section-sub { color: var(--muted); }
.stat-card, .quick-tool-card, .follow-up-panel, .dashboard-resumes-panel { border-color: var(--line); border-radius: 16px; background: var(--paper); }
.sidebar, .dashboard-sidebar-nav { border-color: var(--line); border-radius: 18px; background: var(--paper); }
.sidebar-link, .admin-nav-link { border-radius: 11px; color: var(--muted); }
.sidebar-link:hover, .sidebar-link.active, .admin-nav-link:hover, .admin-nav-link.active { background: var(--soft); color: var(--primary, var(--royal-blue)); }
.builder-grid { gap: 22px; }
.editor-tabs { border-color: var(--line); }
.editor-tab { min-height: 42px; color: var(--muted); }
.editor-tab.active { color: var(--primary, var(--royal-blue)); }
.resume-preview { border-color: var(--line); box-shadow: var(--shadow-sm); }
.data-table th { color: var(--muted); }
.data-table td, .data-table th { border-color: var(--line); }
.table-wrap, .table-container { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.admin-console-body { background: var(--bg) !important; color: var(--ink); }
.admin-console-root { background: var(--bg) !important; }
.admin-console-grid { gap: 22px; }
.admin-console-sidebar, .admin-sidebar { border-color: var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 8px 24px rgba(18,29,54,.04); }
.admin-console-topbar { border-color: var(--line); border-radius: 16px; background: var(--paper); }
.admin-console-main .panel, .admin-console-main .stat-card { background: var(--paper); }

/* Royal footer that keeps policy, catalogue and support links easy to find. */
.site-footer { padding-top: 56px; border-color: #293652 !important; background: #101a31 !important; color: #f2f4fa; }
.site-footer .brand-wordmark { color: #fff; }
.site-footer .brand-mark { box-shadow: none; }
.footer-brand p { max-width: 310px; color: #b8c2d5; font-size: 13px; }
.footer-col strong { margin-bottom: 7px; color: #d8c39c; font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.footer-col a { width: fit-content; color: #c2cad9; font-size: 13px; transition: color .16s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-color: rgba(255,255,255,.14); color: #aeb9cc; }
.footer-bottom-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-bottom-links a, .cookie-settings-trigger { color: #d6c29a; font: inherit; }
.footer-bottom-links a:hover, .cookie-settings-trigger:hover { color: #fff; }
.cookie-settings-trigger { padding: 3px 0; border: 0; background: transparent; cursor: pointer; }

/* Cookie consent: essential-only by default, with an optional theme preference. */
.cookie-consent-banner[hidden] { display: none !important; }
.cookie-consent-banner {
  position: fixed;
  z-index: 99990;
  inset: auto 22px max(20px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(930px, calc(100% - 44px));
  margin-inline: auto;
  padding: 17px 19px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: #121e37;
  color: #f7f8fc;
  box-shadow: 0 22px 70px rgba(5,12,27,.35);
}
.cookie-consent-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(218,196,151,.32); border-radius: 13px; color: #e2c995; font-size: 20px; }
.cookie-consent-copy strong { display: block; margin-bottom: 3px; color: #fff; font-size: 14px; }
.cookie-consent-copy p { max-width: 540px; margin: 0; color: #c8d0df; font-size: 12px; line-height: 1.55; }
.cookie-consent-copy a { color: #e3cfaa; text-decoration: underline; text-underline-offset: 3px; }
.cookie-consent-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.cookie-consent-actions .btn-outline { border-color: rgba(255,255,255,.26); background: transparent; color: #f5f6fb; }
.cookie-consent-actions .cookie-settings-trigger { padding: 0 8px; color: #e0c99c; font-size: 12px; }
.cookie-settings-dialog { width: min(520px, calc(100% - 28px)); max-width: 520px; max-height: min(86dvh, 720px); padding: 26px; overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 28px 90px rgba(5,12,27,.32); }
.cookie-settings-dialog::backdrop { background: rgba(9,15,27,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cookie-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cookie-settings-head h2 { margin: 5px 0 0; color: var(--ink); font: 600 30px/1.15 var(--display); letter-spacing: -.025em; }
.cookie-dialog-close { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 25px; line-height: 1; }
.cookie-settings-intro, .cookie-settings-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.cookie-category strong, .cookie-category small { display: block; }
.cookie-category strong { color: var(--ink); font-size: 13px; }
.cookie-category small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.cookie-always-on { flex: none; color: var(--royal-gold); font-size: 11px; font-weight: 750; }
.cookie-category-toggle { cursor: pointer; }
.cookie-category-toggle input { width: 20px; height: 20px; flex: none; accent-color: var(--primary, var(--royal-blue)); }
.cookie-settings-note { margin: 14px 0 20px; }
.cookie-settings-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }

/* Laptop and phone layouts share the same hierarchy without horizontal overflow. */
@media (max-width: 1200px) {
  .header-inner { gap: 14px; }
  .main-nav { gap: 13px; }
  .main-nav a, .nav-quiet { font-size: 12px; }
}
@media (max-width: 1120px) {
  .header-inner { min-height: 72px; width: min(100% - 32px, 1480px); gap: 10px; }
  .mobile-menu { display: grid; flex: none; }
  .main-nav {
    position: fixed;
    z-index: 101;
    top: 82px;
    right: 16px;
    left: 16px;
    display: grid;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100dvh - 98px);
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav > a, .nav-dropdown-trigger { display: flex; min-height: 46px; align-items: center; padding: 10px 12px; border-radius: 11px; }
  .main-nav > a:hover, .main-nav > a.is-current { background: var(--soft); }
  .nav-dropdown { display: block; }
  .nav-dropdown-trigger { width: 100%; justify-content: space-between; border: 0; background: transparent; color: var(--ink); font: 650 13px var(--font); }
  .nav-dropdown-menu { position: static; display: none; width: 100%; margin: 0; padding: 4px; grid-template-columns: 1fr; border: 0; border-radius: 12px; background: var(--soft); box-shadow: none; transform: none; }
  .nav-dropdown.open .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: grid; }
  .mobile-nav-account { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
  .mobile-nav-account-link, .mobile-nav-primary { min-height: 44px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); gap: 34px; }
}
@media (max-width: 900px) {
  .hero-grid, .template-document-hero .template-library-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .hero-art { min-height: 430px; }
  .template-document-showcase { min-height: 390px; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .pricing-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cookie-consent-banner { grid-template-columns: 40px minmax(0, 1fr); }
  .cookie-consent-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 32px, 600px); }
  .header-inner { width: calc(100% - 28px); min-height: 68px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-logo-image { max-width: min(138px, 36vw); max-height: 36px; }
  .header-actions { gap: 7px; }
  .header-actions .nav-quiet, .header-actions .btn-admin-shortcut, .header-actions .avatar, .header-actions .inline-form, .header-actions > .btn-primary { display: none !important; }
  .theme-toggle { width: 42px; min-width: 42px; min-height: 42px; padding: 0; justify-content: center; }
  .theme-toggle [data-theme-label] { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
  .main-nav { top: 76px; right: 10px; left: 10px; max-height: calc(100dvh - 88px); }
  .hero { padding: 55px 0 42px !important; }
  .hero .display { font-size: clamp(40px, 11vw, 54px); line-height: 1.07; letter-spacing: -.04em; }
  .hero .subhead { font-size: 15px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-art { min-height: 370px; margin-inline: -6px; }
  .resume-window { width: min(390px, 89vw); height: 368px; }
  .resume-sheet { padding: 20px 23px; }
  .float-card { max-width: 205px; padding: 10px 12px; }
  .float-two { right: 0; }
  .section { padding: 56px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 25px; }
  .section-head h2, .section-title { font-size: clamp(29px, 8vw, 37px); }
  .section-head p { font-size: 14px; }
  .feature-grid, .pricing-grid, .template-document-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card { min-height: 0; padding: 22px; }
  .template-document-hero .template-library-hero-grid { width: min(100% - 32px, 600px); padding-block: 28px 18px; gap: 14px; }
  .template-document-hero .template-library-copy h1 { font-size: clamp(38px, 10vw, 52px); }
  .template-library-stats { gap: 12px; }
  .template-document-showcase { min-height: 325px; transform: scale(.94); transform-origin: top center; margin-bottom: -14px; }
  .template-document-shell { height: 350px; }
  .template-library-title-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .template-quick-filters { flex-wrap: nowrap; max-width: 100%; padding-bottom: 4px; overflow-x: auto; overscroll-behavior-inline: contain; }
  .template-filter-chip { flex: none; }
  .template-library-bottom-cta { align-items: flex-start; flex-direction: column; padding: 22px; }
  .template-library-bottom-cta .btn { width: 100%; }
  .price-card { padding: 22px; }
  .cta-box { align-items: flex-start; flex-direction: column; gap: 20px; }
  .cta-box .btn { width: 100%; }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 18px; padding-bottom: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 18px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .footer-bottom-links { gap: 12px 18px; }
  .app-shell { padding-block: 24px 52px; }
  .workspace-top h1, .career-page-header h1 { font-size: clamp(30px, 8vw, 40px); }
  .workspace-actions { width: 100%; flex-wrap: wrap; }
  .workspace-actions > * { flex: 1 1 auto; }
  .builder-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-tabs { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
  .editor-tab { flex: none; }
  .table-wrap, .table-container { border-radius: 12px; }
  .data-table { min-width: 650px; }
  .admin-console-root { padding: 12px 0 34px !important; }
  .admin-console-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-console-sidebar { position: static; max-height: none; }
  .cookie-consent-banner { inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; grid-template-columns: 34px minmax(0,1fr); gap: 11px; padding: 14px; border-radius: 16px; }
  .cookie-consent-mark { width: 34px; height: 34px; }
  .cookie-consent-copy strong { font-size: 13px; }
  .cookie-consent-copy p { font-size: 11px; }
  .cookie-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .cookie-consent-actions .cookie-settings-trigger { min-height: 42px; grid-column: 1 / -1; order: 3; }
  .cookie-consent-actions .btn { min-height: 43px; padding-inline: 9px; font-size: 11px; }
  .cookie-settings-dialog { padding: 22px 18px; }
  .cookie-settings-head h2 { font-size: 27px; }
}
@media (max-width: 400px) {
  .header-actions { display: none; }
  .hero-proof { align-items: flex-start; flex-wrap: wrap; }
  .hero-art { min-height: 330px; }
  .resume-window { height: 335px; }
  .resume-sheet { padding: 17px 19px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .cookie-consent-banner, .cookie-settings-dialog, .skip-link { display: none !important; }
}
