/* CVPilot mobile-first finishing layer. Loaded after the feature stylesheets intentionally. */
:root {
  --cv-mobile-gutter: 16px;
  --cv-mobile-header: 66px;
  --cv-mobile-radius: 18px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--cv-mobile-header) + 16px);
}

body {
  min-width: 320px;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

main,
section,
article,
aside,
.workspace,
.app-shell,
.admin-console-main,
.admin-console-root,
.panel,
.editor-panel,
.preview-panel,
.career-panel,
.checkout-layout,
.shell-grid,
.builder-grid,
.admin-console-grid,
.footer-top,
.wrap {
  min-width: 0;
}

img,
video,
canvas,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
  touch-action: manipulation;
}

button,
a,
select,
input[type="checkbox"],
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary, #6558e9) 55%, white);
  outline-offset: 3px;
}

.mobile-menu {
  display: none;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(115, 111, 164, .17);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  color: #34364f;
  box-shadow: 0 5px 16px rgba(41, 38, 83, .06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  cursor: pointer;
  z-index: 2;
}

.mobile-menu:active { transform: scale(.96); }
.mobile-menu svg { width: 20px; height: 20px; }
.mobile-nav-account { display: none; }
.mobile-nav-backdrop { display: none; }

/* The full desktop navigation becomes a proper drawer before its contents can collide. */
@media (max-width: 960px) {
  :root { --cv-mobile-header: 66px; }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(255, 253, 249, .93) !important;
    border-bottom: 1px solid rgba(225, 221, 210, .88) !important;
    box-shadow: 0 7px 26px rgba(39, 43, 54, .065) !important;
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
  }

  .site-header .header-inner {
    display: flex;
    width: 100%;
    height: 66px;
    min-height: 66px;
    gap: 9px !important;
    padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
  }

  .site-header .brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(52vw, 280px);
    gap: 9px;
    font-size: 19px;
    letter-spacing: -.6px;
  }

  .site-header .brand-logo-image { max-width: min(44vw, 150px); max-height: 38px; }
  .site-header .brand-mark { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; }
  .site-header .brand-wordmark { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .mobile-menu { display: grid; order: 2; margin-left: auto; }

  .site-header .header-actions {
    display: flex;
    flex: 0 0 auto;
    order: 3;
    align-items: center;
    gap: 7px !important;
    margin-left: 0;
  }

  .site-header .header-actions > .nav-quiet,
  .site-header .header-actions > .avatar,
  .site-header .header-actions > .inline-form,
  .site-header .header-actions > .btn:not(.theme-toggle) {
    display: none !important;
  }

  .site-header .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(115, 111, 164, .16);
    background: rgba(255, 255, 255, .78);
    color: #51516b;
  }

  .site-header .theme-toggle svg { width: 18px; height: 18px; }
  .site-header .theme-toggle [data-theme-label] { display: none; }

  .site-header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    width: 100%;
    max-height: min(74dvh, 680px);
    margin: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    border: 1px solid rgba(229, 224, 214, .95);
    border-top: 0;
    border-radius: 0 0 24px 24px;
    background: rgba(255, 253, 248, .985) !important;
    box-shadow: 0 24px 44px rgba(32, 34, 49, .14);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: cvpilot-mobile-drawer-in .2s ease both;
  }

  .site-header .main-nav.open { display: flex; }
  .site-header .main-nav > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 13px;
    border: 0;
    border-radius: 13px;
    color: #42445b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
    transition: color .16s ease, background .16s ease;
  }

  .site-header .main-nav > a:hover,
  .site-header .main-nav > a.is-current {
    color: var(--primary-dark, #4d42ce);
    background: #f0eee8;
  }

  .site-header .main-nav a:after { display: none !important; }
  .site-header .nav-dropdown { display: block; min-width: 0; }
  .site-header .nav-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #42445b;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
  }

  .site-header .nav-dropdown-trigger:hover,
  .site-header .nav-dropdown.open .nav-dropdown-trigger { background: #f0eee8; color: var(--primary-dark, #4d42ce); }
  .site-header .nav-dropdown-menu,
  .site-header .nav-dropdown.open .nav-dropdown-menu,
  .site-header .nav-dropdown:focus-within .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    margin: 3px 0 8px;
    padding: 6px;
    border: 1px solid #eee8dd;
    border-radius: 16px;
    background: #faf8f2 !important;
    box-shadow: none;
  }
  .site-header .nav-dropdown.open .nav-dropdown-menu,
  .site-header .nav-dropdown:focus-within .nav-dropdown-menu { display: grid; }
  .site-header .nav-dropdown-menu a {
    display: flex;
    align-items: center;
    min-height: 52px;
    gap: 11px;
    padding: 10px;
    border: 0;
    border-radius: 11px;
    white-space: normal;
  }
  .site-header .nav-dropdown-menu a > svg { flex: 0 0 20px; width: 20px; }
  .site-header .nav-dropdown-menu a span { min-width: 0; }
  .site-header .nav-dropdown-menu a strong { display: block; font-size: 12px; line-height: 1.4; }
  .site-header .nav-dropdown-menu a small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.45; color: #797a87; white-space: normal; }

  .mobile-nav-account {
    display: grid;
    gap: 7px;
    margin-top: 10px;
    padding-top: 13px;
    border-top: 1px solid #e9e4d9;
  }
  .mobile-nav-account-link {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 47px;
    padding: 11px 13px;
    border: 1px solid #e9e4d9;
    border-radius: 13px;
    background: rgba(255, 255, 255, .76);
    color: #45465c;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
  }
  .mobile-nav-account-link svg { width: 17px; height: 17px; color: #7770b5; flex: 0 0 17px; }
  .mobile-nav-logout { margin: 0; }
  .mobile-nav-primary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 49px !important;
    padding: 12px 15px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(120deg, var(--primary, #6558e9), color-mix(in srgb, var(--primary, #6558e9) 65%, #8c7cf5)) !important;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary, #6558e9) 18%, transparent);
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  .mobile-nav-primary svg { width: 17px; height: 17px; }

  .mobile-nav-backdrop.is-visible {
    display: block;
    position: fixed;
    z-index: 999;
    inset: calc(66px + env(safe-area-inset-top, 0px)) 0 0;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(28, 30, 42, .32);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  body.mobile-nav-open { overflow: hidden; }
  body.mobile-nav-open .site-header { z-index: 1000; }
  body.mobile-nav-open .mobile-menu { background: #f0eee8; border-color: rgba(111, 103, 162, .24); }

  .site-footer .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .site-footer .footer-brand,
  .site-footer .footer-note { grid-column: 1 / -1; }
  .site-footer .footer-note { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line, #e3e7f1); }

  /* Dashboard workspace navigation stays compact from phone through tablet widths. */
  .dashboard-page .sidebar:not(.admin-console-sidebar) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--line, #e3e7f1);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 28px rgba(45, 43, 82, .045);
  }
  .dashboard-page .sidebar-brandline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
  }
  .dashboard-page .sidebar-brandline:after {
    content: "Swipe to explore →";
    margin-left: auto;
    color: var(--muted, #777d91);
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
  }
  .dashboard-page .dashboard-sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 7px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 2px 1px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8c3e1 transparent;
  }
  .dashboard-page .dashboard-sidebar-nav .sidebar-label { display: none !important; }
  .dashboard-page .dashboard-sidebar-nav .sidebar-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    width: auto;
    min-width: max-content;
    max-width: 205px;
    min-height: 43px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(222, 224, 235, .9);
    border-radius: 13px;
    background: rgba(255, 255, 255, .86);
    white-space: nowrap;
    line-height: 1.25;
    font-size: 11px;
    font-weight: 650;
    scroll-snap-align: start;
  }
  .dashboard-page .dashboard-sidebar-nav .sidebar-link.active {
    border-color: rgba(102, 92, 230, .26);
    background: linear-gradient(135deg, rgba(103, 92, 232, .12), rgba(151, 129, 245, .08));
    color: var(--primary, #5b55db);
  }
  .dashboard-page .dashboard-sidebar-nav .sidebar-link svg { flex: 0 0 16px; width: 16px; height: 16px; }
  .dashboard-page .dashboard-sidebar-nav .sidebar-link-trailing { display: none; }
  .dashboard-page .sidebar-plan,
  .dashboard-page .sidebar-security { display: none; }
  .dark .dashboard-page .sidebar:not(.admin-console-sidebar) {
    border-color: rgba(120, 125, 160, .24);
    background: rgba(28, 30, 48, .86);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  }
  .dark .dashboard-page .sidebar-brandline { border-bottom-color: rgba(135, 141, 175, .16); }
  .dark .dashboard-page .sidebar-brandline strong { color: #f0efff; }
  .dark .dashboard-page .sidebar-brandline small,
  .dark .dashboard-page .sidebar-brandline:after { color: #a9adc5; }
  .dark .dashboard-page .dashboard-sidebar-nav .sidebar-link {
    border-color: rgba(135, 141, 175, .24);
    background: rgba(35, 38, 60, .9);
    color: #c5c9df;
  }
  .dark .dashboard-page .dashboard-sidebar-nav .sidebar-link.active {
    border-color: rgba(157, 149, 255, .4);
    background: linear-gradient(135deg, rgba(113, 102, 238, .24), rgba(151, 129, 245, .13));
    color: #d7d1ff;
  }

}

@media (max-width: 760px) {
  :root { --cv-mobile-gutter: 13px; }
  .wrap { width: calc(100% - 26px) !important; max-width: 100%; }
  main { overflow-x: clip; }
  .page-hero { padding: 42px 0 30px; }
  .page-hero h1,
  .workspace-top h1,
  .career-page-header h1 { font-size: clamp(28px, 7vw, 38px); line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
  .page-hero p,
  .workspace-top p,
  .career-page-header p { font-size: 14px; line-height: 1.7; }

  .workspace-top { display: flex; align-items: flex-start !important; flex-direction: column; gap: 15px !important; margin-bottom: 20px; }
  .workspace-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; width: 100%; }
  .workspace-actions .editor-save-status { width: 100%; }
  .panel,
  .account-panel,
  .career-panel,
  .admin-table-panel,
  .admin-settings-panel,
  .admin-gateways-panel,
  .admin-pricing-panel,
  .admin-template-ops-panel { padding: 17px !important; border-radius: 18px; }
  .panel-head,
  .panel-head-large { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .panel-head h2,
  .panel h2 { font-size: 17px; line-height: 1.3; }
  .panel-head p { font-size: 12px; }

  .field-row,
  .grid-2,
  .form-grid,
  .checkout-layout,
  .account-settings-grid,
  .admin-settings-grid,
  .admin-provider-form-grid,
  .admin-mail-form-grid,
  .admin-ai-field-grid,
  .brand-config-grid,
  .brand-assets-grid,
  .admin-price-grid,
  .admin-price-currency-row,
  .admin-gateway-dashboard-summary,
  .admin-gateway-options,
  .admin-mail-grid,
  .account-export-grid,
  .job-form-grid { grid-template-columns: minmax(0, 1fr) !important; }

  .field,
  .form-field,
  .grid > *,
  .field-row > *,
  .form-grid > * { min-width: 0; }
  input,
  select,
  textarea { font-size: 16px; }
  .field input,
  .field select,
  .field textarea,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  select,
  textarea { width: 100%; min-width: 0; min-height: 48px; border-radius: 13px; }
  textarea { min-height: 112px; }
  .field label { line-height: 1.45; }
  .field-hint { font-size: 11px; line-height: 1.6; }
  .btn,
  .btn-sm { min-height: 44px; }
  .btn-sm { padding-inline: 13px; font-size: 12px; }
  .btn-block,
  form .btn-block { width: 100%; justify-content: center; }
  .notice,
  .flash { overflow-wrap: anywhere; }

  .hero { padding: 38px 0 30px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-copy { min-width: 0; }
  .hero .display { max-width: 100%; font-size: clamp(35px, 10vw, 53px) !important; line-height: 1.05; letter-spacing: -.055em; overflow-wrap: normal; }
  .hero .subhead { font-size: 14px; line-height: 1.7; }
  .hero-actions,
  .hero-cta-row { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .hero-actions .btn,
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .hero-art { width: 100%; max-width: 500px; min-height: 350px; margin-inline: auto; overflow: hidden; }
  .resume-window { max-width: 80%; }
  .feature-grid,
  .steps,
  .checkout-layout,
  .builder-grid,
  .tool-page-grid,
  .pdf-workspace-layout,
  .career-content-grid,
  .admin-content-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .template-grid,
  .template-gallery,
  .template-library-grid,
  .template-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .template-card,
  .template-card-premium { min-width: 0; }
  .template-filter-panel { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; padding: 12px; }
  .template-quick-filters { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 2px 1px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .template-filter-chip { flex: 0 0 auto; min-height: 39px; scroll-snap-align: start; }
  .template-library-title-row { align-items: flex-start !important; flex-direction: column; gap: 12px; }
  .template-document-grid { gap: 10px; }
  .template-document-shell { min-width: 0; height: clamp(225px, 65vw, 310px); }
  .template-document-page { max-width: 92%; }
  .template-preview-shell { min-width: 0; }

  .app-shell { padding-top: 20px; padding-bottom: 38px; }
  .shell-grid,
  .admin-shell-grid,
  .admin-console-grid { width: calc(100% - 26px) !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px; }
  .sidebar { position: static !important; min-width: 0; max-width: 100%; }
  .sidebar-link { min-height: 43px; }
  .workspace { width: 100%; }
  .stats-grid,
  .admin-stats-grid,
  .admin-console-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .stat-card,
  .admin-stat-card { min-width: 0; padding: 14px; }
  .stat-value { font-size: clamp(22px, 6vw, 29px); overflow-wrap: anywhere; }
  .workspace-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px; border-radius: 20px; }
  .workspace-hero-visual { order: -1; min-height: 150px; }
  .hero-visual-orbit { width: 150px; height: 150px; }
  .hero-document { width: 112px; height: 140px; padding: 10px 12px; }
  .hero-score-chip { max-width: 84%; }
  .workspace-hero h1 { font-size: clamp(26px, 7.3vw, 34px); letter-spacing: -.045em; }
  .workspace-hero .workspace-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-hero .workspace-actions .btn { width: 100%; justify-content: center; }
  .sidebar { border-radius: 18px; }
  .sidebar-plan { display: none; }

  .builder-grid { gap: 15px !important; }
  .editor-tabs { display: flex; max-width: 100%; overflow-x: auto; gap: 7px; padding: 3px 1px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .editor-tab { flex: 0 0 auto; min-height: 42px; scroll-snap-align: start; }
  .builder-toolbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
  .builder-toolbar .btn { flex: 1 1 100%; justify-content: center; }
  .builder-toolbar .field-hint { width: 100%; }
  .preview-panel { min-width: 0; max-width: 100%; overflow: hidden; position: static !important; }
  .preview-panel .preview-top { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .resume-preview { width: 100% !important; max-width: 100%; min-width: 0; min-height: 0; overflow: hidden; padding-top: 24px !important; padding-bottom: 24px !important; }
  .resume-preview:not(.layout-bold):not(.layout-sidebar):not(.layout-sidebar-photo):not(.layout-creative-photo):not(.layout-two-column):not(.layout-data):not(.layout-code) { padding-left: 18px !important; padding-right: 18px !important; }
  .resume-preview .preview-name { font-size: clamp(19px, 5vw, 26px) !important; overflow-wrap: anywhere; }
  .resume-preview .resume-preview-head { gap: 10px; }
  .resume-preview .preview-contact { flex-wrap: wrap; overflow-wrap: anywhere; }
  .resume-preview .preview-entry-top { gap: 5px; flex-wrap: wrap; }
  .resume-preview .preview-entry-top > * { min-width: 0; overflow-wrap: anywhere; }
  .resume-preview.layout-sidebar,
  .resume-preview.layout-sidebar-photo,
  .resume-preview.layout-creative-photo,
  .resume-preview.layout-two-column,
  .resume-preview.layout-data,
  .resume-preview.layout-code { padding-left: 18px !important; }
  .resume-preview .preview-sidebar-content {
    display: flex !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-height: none;
    margin: 0 0 14px;
    padding: 11px 12px !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px;
  }
  .resume-preview .preview-sidebar-group { min-width: 0; flex: 1 1 120px; }
  .resume-preview .preview-sidebar-group h3 { margin: 0 0 5px; font-size: 8px; letter-spacing: .5px; }
  .resume-preview .preview-sidebar-group p { margin: 0 0 4px; font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
  .resume-preview .preview-sidebar-skill { font-size: 8px; padding: 3px 5px; }

  .admin-console-root { padding-top: 10px !important; }
  .admin-console-grid { gap: 13px !important; }
  .admin-console-sidebar { padding: 13px !important; border-radius: 18px !important; }
  .admin-console-brand { min-width: 0; }
  .admin-console-brand strong { max-width: 65vw; font-size: 13px; overflow-wrap: anywhere; }
  .admin-console-workspace-tag { flex-wrap: wrap; font-size: 10px; }
  .admin-console-nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px !important; overflow: visible !important; padding: 4px 0 !important; }
  .admin-console-sidebar .admin-nav-link { display: flex; align-items: center; min-width: 0; min-height: 44px; padding: 10px !important; white-space: normal; font-size: 11px !important; }
  .admin-console-sidebar .admin-nav-link span:first-of-type { overflow-wrap: anywhere; }
  .admin-console-topbar { position: static !important; align-items: flex-start; gap: 12px; padding: 8px 0 12px !important; }
  .admin-breadcrumb { flex-wrap: wrap; font-size: 11px; }
  .admin-console-top-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .admin-console-top-actions .theme-toggle { flex: 0 0 auto; }
  .admin-console-top-actions .admin-console-logout { margin-left: auto; }
  .admin-console-top-actions .admin-console-logout .btn { min-height: 42px; }
  .admin-section-heading { display: flex; align-items: flex-start !important; flex-direction: column; gap: 12px; margin-bottom: 17px !important; padding-bottom: 14px; }
  .admin-section-heading h1 { font-size: clamp(26px, 7vw, 34px) !important; line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
  .admin-section-heading p { font-size: 12px; line-height: 1.65; }
  .admin-section-heading-actions { width: 100%; justify-content: flex-start; }
  .admin-console-main .admin-hero { padding: 20px; border-radius: 19px; }
  .admin-table-panel { overflow-x: auto; }
  .admin-table-panel table { min-width: 640px; }
  .admin-console-footer { font-size: 11px; line-height: 1.5; }

  .career-page { padding: 26px 0 52px; }
  .career-page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .career-page-header h1 { margin-top: 8px; }
  .career-header-actions { width: 100%; flex-wrap: wrap; }
  .career-header-actions .btn { flex: 1 1 100%; justify-content: center; }
  .career-hero { padding: 20px; border-radius: 20px; }
  .career-hero h1 { font-size: clamp(28px, 7.5vw, 36px); overflow-wrap: anywhere; }
  .career-panel { padding: 16px !important; }
  .job-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-stat-card { min-width: 0; }

  .pdf-hero .pdf-hero-inner { padding-top: 12px; }
  .pdf-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pdf-tool-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .pdf-tool-card.tool-option { min-width: 0; padding: 12px; }
  .pdf-tool-card strong { overflow-wrap: anywhere; }
  .pdf-workspace-layout { grid-template-columns: minmax(0, 1fr) !important; }

  .pricing-grid { grid-template-columns: minmax(0, 1fr) !important; max-width: 480px; }
  .price-card { padding: 19px; }
  .price-description { min-height: 0; }
  .cta-box { width: 100%; align-items: stretch; flex-direction: column; padding: 21px 18px !important; }
  .cta-box .btn { width: 100%; justify-content: center; }
  .site-footer .footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 16px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 11px; }
}

@media (max-width: 480px) {
  :root { --cv-mobile-gutter: 11px; }
  .wrap { width: calc(100% - 22px) !important; }
  .site-header .header-inner { gap: 7px !important; min-height: 62px; height: 62px; }
  .site-header .brand { max-width: 47vw; gap: 7px; font-size: 17px; }
  .site-header .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; }
  .site-header .brand-logo-image { max-width: 38vw; max-height: 34px; }
  .site-header .mobile-menu,
  .site-header .theme-toggle { width: 39px; min-width: 39px; height: 39px; min-height: 39px; border-radius: 12px; }
  .site-header .main-nav { max-height: min(78dvh, 680px); }
  .hero { padding-top: 30px; }
  .hero-art { min-height: 305px; }
  .hero .display { font-size: clamp(33px, 10vw, 45px) !important; }
  .feature-card,
  .tool-card,
  .pricing-card,
  .price-card { padding: 16px !important; border-radius: 17px; }
  .template-grid,
  .template-gallery,
  .template-library-grid,
  .template-document-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .template-document-shell { height: clamp(280px, 86vw, 360px); }
  .template-document-page { max-width: 75%; }
  .template-preview-shell { height: auto; min-height: 255px; }
  .template-preview-page { width: 76%; }
  .template-library-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .stats-grid,
  .admin-stats-grid,
  .admin-console-metrics,
  .job-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .admin-console-sidebar .admin-nav-link { padding: 9px 8px !important; font-size: 10px !important; }
  .admin-console-brand small { font-size: 8px; }
  .admin-console-top-actions .admin-console-logout { margin-left: 0; }
  .admin-console-main .admin-stats-grid { gap: 8px; }
  .admin-console-main .admin-stat-card { padding: 11px; }
  .admin-console-main .admin-stat-card .stat-value { font-size: 21px; }
  .panel,
  .account-panel,
  .admin-table-panel,
  .admin-settings-panel,
  .admin-gateways-panel,
  .admin-pricing-panel,
  .admin-template-ops-panel { padding: 14px !important; }
  .pdf-tool-catalog { grid-template-columns: minmax(0, 1fr) !important; }
  .pdf-tool-card.tool-option { grid-template-columns: 38px minmax(0, 1fr); }
  .site-footer .footer-top { grid-template-columns: minmax(0, 1fr); }
  .site-footer .footer-brand,
  .site-footer .footer-note { grid-column: auto; }
}

@media (max-width: 360px) {
  .dashboard-page .sidebar-brandline:after { content: "Swipe →"; font-size: 9px; }
  .site-header .brand-wordmark { max-width: 31vw; }
  .site-header .header-inner { gap: 5px !important; padding-inline: 10px !important; }
  .site-header .mobile-menu,
  .site-header .theme-toggle { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .stats-grid,
  .admin-stats-grid,
  .admin-console-metrics { grid-template-columns: minmax(0, 1fr) !important; }
  .mobile-nav-account-link { font-size: 12px; }
}

html.dark .site-header .main-nav,
html.dark .site-header .nav-dropdown-menu { background: rgba(31, 32, 27, .985) !important; border-color: #404136; }
html.dark .site-header .main-nav > a,
html.dark .site-header .nav-dropdown-trigger,
html.dark .mobile-nav-account-link { color: #f0eee5; }
html.dark .site-header .main-nav > a:hover,
html.dark .site-header .main-nav > a.is-current,
html.dark .site-header .nav-dropdown-trigger:hover,
html.dark .site-header .nav-dropdown.open .nav-dropdown-trigger { background: #33352b; color: #d7e3c4; }
html.dark .site-header .nav-dropdown-menu,
html.dark .mobile-nav-account-link { background: #25271f !important; border-color: #414235; }
html.dark .mobile-nav-account { border-color: #3a3c30; }
html.dark .mobile-nav-primary { color: #fff !important; }

@keyframes cvpilot-mobile-drawer-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .main-nav { animation: none !important; }
  .mobile-menu { transition: none !important; }
}
