/* ATS·Resume Designer design system.
   v2 — tight match to the brand mockup. Warm off-white, charcoal type,
   amber as the only accent. Mixed grotesque + italic serif.            */

:root {
  --ink:         #1A1A1A;     /* primary text — slightly warm near-black */
  --ink-soft:    #5C5347;     /* secondary text — warm gray, not blue-gray */
  --ink-mute:    #6E665A;     /* tertiary text (small labels like "lifetime") */
  --line:        #E8E2D5;     /* warm 1px border */
  --line-2:      #D8D0BD;
  --bg:          #FAFAF7;     /* warm off-white page bg */
  --bg-soft:     #F3EFE6;     /* slightly warmer header/chip */
  --bg-card:     #FFFFFF;     /* pure white feature + field cards */
  --amber:       #C8860A;     /* sole accent — dot, italic serif, icons */
  --amber-soft:  #FDE9C4;     /* amber-tinted icon background */
  --amber-line:  #F0D49B;     /* amber pill border */
  /* --accent kept as an alias for --ink so older selectors that
     reference the original brand still render correctly (chip.on,
     focus outlines, save status, wizard indicators, etc.). */
  --accent:      #1A1A1A;
  --accent-d:    #000000;
  --good:        #0a7c4a;
  --warn:        #b42318;
  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   20px;
  --maxw:        1180px;
  --shadow-1:    0 1px 2px rgba(28,28,28,.04), 0 2px 8px rgba(28,28,28,.04);
  --shadow-2:    0 4px 16px rgba(28,28,28,.07);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 800; }
h2 { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 700; }
.italic-serif {
  font-family: 'DM Serif Display', 'Georgia', serif;
  font-style: italic;
  /* Bright amber for the mockup's signature accent (not the dark
     text-safe variant) — visual weight > WCAG ratio here because the
     size is huge (≈40pt) and the surrounding bg is near-white. */
  color: var(--amber);
  font-weight: 400;
}

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

/* Brand wordmark ---------------------------------------------------- */
.brand { display: inline-flex; align-items: baseline; gap: 0; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-ats, .brand-rd {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.55rem;
}
.brand-dot {
  color: var(--amber);
  font-weight: 700;
  font-size: 1.55rem;
  padding: 0 7px;
  line-height: 1;
  /* The dot sits slightly above the baseline for a centered visual */
  position: relative; top: -0.04em;
}
.footer-brand { font-weight: 700; }

/* Header ------------------------------------------------------------ */
.site-head {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(250,250,247,.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 50;
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav { display: flex; gap: 36px; align-items: center; }
.nav a {
  color: var(--ink); font-size: 1rem; font-weight: 500;
  opacity: .65; white-space: nowrap; letter-spacing: -.01em;
}
.nav a:hover { color: var(--ink); opacity: 1; text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; opacity: 1; }
/* Marketing nav (Features/Examples/Pricing) hides on mobile, auth nav stays. */
.nav-marketing { display: flex; gap: 36px; align-items: center; }
@media (max-width: 720px) { .nav-marketing { display: none; } }
/* On small screens, trim the CTA so the brand fits next to it. */
@media (max-width: 460px) {
  .nav-cta { padding: 9px 14px; font-size: .85rem; }
  .site-head .wrap { height: 58px; }
  .brand-ats, .brand-rd, .brand-dot { font-size: 1.2rem; }
}

/* Hamburger menu — visible ≤768px (covers mobile + small tablets).
   Hides all nav links behind a toggle button. The button is part of the
   header so it inherits the sticky header positioning. */
.hamburger-btn {
  display: none;            /* hidden on desktop; mobile media query below opts in */
  background: transparent; border: 1.5px solid var(--line);
  color: var(--ink); width: 44px; height: 44px;
  border-radius: 10px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1;
}
.hamburger-btn:hover { background: var(--bg-soft); }
.hamburger-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hamburger-btn[aria-expanded="true"] { background: var(--bg-soft); }

@media (max-width: 768px) {
  .hamburger-btn { display: inline-flex; }
  .site-head .nav { display: none; }
  .site-head .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 12px 24px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(28,28,28,.06);
    z-index: 50; gap: 4px;
  }
  .site-head .nav.open .nav-marketing { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
  .site-head .nav.open a { padding: 12px 8px; border-radius: 8px; min-height: 44px; display: flex; align-items: center; }
  .site-head .nav.open a:hover { background: var(--bg-soft); text-decoration: none; }
  .site-head .nav.open a.nav-cta { justify-content: center; }
  /* Stacked nav items lose the .hide-sm rule that the marketing links
     carry — they're now shown inside the panel. */
  .site-head .nav.open a.hide-sm { display: flex; }
}

/* Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid transparent; transition: background .12s, border-color .12s, color .12s, transform .12s;
  text-decoration: none; line-height: 1.2; letter-spacing: -.005em;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #000; color: #FAFAF7; border-color: #000; }
.btn-primary:hover { background: #1f1f1f; border-color: #1f1f1f; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.btn-sm { padding: 11px 18px; font-size: .88rem; border-radius: 10px; min-height: 44px; }
.btn-lg { padding: 18px 32px; font-size: 1.05rem; border-radius: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }

/* Generic blocks ---------------------------------------------------- */
.section { padding: 64px 0; }
.muted { color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  /* Darker amber for text contrast on the amber-soft chip background (>=4.5:1). */
  color: #6f4a06;
  font-weight: 700; margin: 0 0 14px;
  background: var(--amber-soft); border: 1px solid var(--amber-line);
  padding: 6px 12px; border-radius: 999px;
}

/* Hero (landing) --------------------------------------------------- */
.hero { padding: 80px 0 96px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: .14em; font-size: .75rem;
  /* Darker amber for text contrast on the amber-soft chip background (>=4.5:1). */
  color: #6f4a06;
  font-weight: 700; margin: 0 0 24px;
  background: var(--amber-soft); border: 1px solid var(--amber-line);
  padding: 8px 16px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  margin: 0 0 24px; line-height: 1.04; letter-spacing: -0.035em;
  font-weight: 800; color: var(--ink);
  max-width: 13ch;
}
.hero h1 .italic-serif {
  display: block; margin-top: 2px; font-size: 1.05em;
  letter-spacing: -0.01em; line-height: 1;
}
.hero-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 50ch; margin: 0 0 36px; line-height: 1.55; }
.hero-price {
  display: flex; align-items: center; gap: 18px; padding: 18px 24px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--bg-card); max-width: 320px; margin: 0 0 28px;
}
.hero-price .amount { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -0.04em; }
.hero-price .meta { font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards ------------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: #fff;
}
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card .price { font-weight: 700; font-size: 1.4rem; margin: 12px 0 4px; }
.card .price small { font-weight: 500; font-size: .8rem; color: var(--ink-soft); }
.lock { font-size: .8rem; color: var(--ink-soft); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700;
         padding: 3px 9px; border-radius: 999px; }
.badge-owned { background: #e7f6ee; color: var(--good); }
.badge-locked { background: #f2f4f7; color: var(--ink-soft); }

/* Feature list (hero right column) -------------------------------- */
.feature-stack { display: flex; flex-direction: column; gap: 16px; }
.feature {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--line); border-radius: 16px;
  padding: 22px 24px;
}
.feature-icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px;
  background: var(--amber-soft); color: var(--amber);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature-body { flex: 1; min-width: 0; }
.feature-title {
  font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; color: var(--ink);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; letter-spacing: -.005em;
}
.feature-desc { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; margin: 0; }
.feature-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; color: var(--ink-soft);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 999px; letter-spacing: .04em;
  text-transform: uppercase;
}

/* Forms ------------------------------------------------------------- */
.auth-card { max-width: 400px; margin: 56px auto; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin: 0 0 5px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=month],
select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
textarea { min-height: 76px; resize: vertical; }
.alert { padding: 11px 14px; border-radius: 8px; font-size: .9rem; margin: 0 0 16px; }
.alert-error { background: #fef3f2; color: var(--warn); border: 1px solid #fecdca; }
.alert-good  { background: #e7f6ee; color: var(--good); border: 1px solid #a6e9c5; }

/* Dashboard --------------------------------------------------------- */
.dash-head { display: flex; justify-content: space-between; align-items: baseline;
             margin: 32px 0 18px; }
.resume-row { display: flex; justify-content: space-between; align-items: center;
              padding: 14px 0; border-bottom: 1px solid var(--line); }
.resume-row .meta { color: var(--ink-soft); font-size: .85rem; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft);
         border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* Editor ------------------------------------------------------------ */
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 0;
          height: calc(100vh - 60px); }
.editor-form { overflow-y: auto; padding: 24px 28px; border-right: 1px solid var(--line); }
.editor-preview { overflow-y: auto; background: var(--bg-soft); padding: 24px; }
.editor-preview iframe { width: 100%; height: 1056px; border: 1px solid var(--line);
                         background: #fff; box-shadow: var(--shadow); }
.save-status { font-size: .82rem; color: var(--ink-soft); }
.save-status.saving { color: var(--accent); }
.save-status.saved { color: var(--good); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
           position: sticky; top: 0; background: #fff; padding: 0 0 14px;
           border-bottom: 1px solid var(--line); margin: 0 0 18px; z-index: 5; }
.toolbar .spacer { flex: 1; }
.sec { margin: 0 0 22px; }
.sec > h2 { font-size: 1.02rem; margin: 0 0 3px; }
.sec > .help { color: var(--ink-soft); font-size: .84rem; margin: 0 0 12px; }
.repeat-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px;
               margin: 0 0 12px; position: relative; }
.repeat-item .remove { position: absolute; top: 8px; right: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .9rem; }
.chk input { width: auto; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: .82rem; padding: 12px 14px; border: 1px solid var(--line-2);
        border-radius: 999px; cursor: pointer; user-select: none; background:#fff; }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* On a chip click, the .on class swaps to black-ink + white text.
   We deliberately don't use --amber here: chips are dense form inputs
   that need high contrast, and black-on-white reads as "selected"
   more clearly than amber-on-amber-soft. */
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 1023px) { .chip { min-height: 44px; } }

/* tag_groups selected-items panel + custom-item row.
   Shown above the chips so the user can see and undo their picks
   without scrolling through a long list of category groups. */
.tag-selected {
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); padding: 14px 16px; margin: 0 0 16px;
}
.tag-selected-empty { margin: 0; color: var(--ink-soft); font-size: .9rem; font-style: italic; }
.tag-selected-label { margin: 0 0 8px; font-size: .78rem; font-weight: 700;
                       text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.tag-selected-list { list-style: none; padding: 0; margin: 0;
                     display: flex; flex-wrap: wrap; gap: 6px; }
.tag-selected-list li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 4px 6px 4px 12px; font-size: .82rem; line-height: 1.2;
}
.tag-selected-cat { opacity: .7; font-weight: 500; }
.tag-selected-item { font-weight: 500; }
.tag-selected-rm {
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 1.05rem; line-height: 1; display: inline-flex;
  align-items: center; justify-content: center; padding: 0;
}
.tag-selected-rm:hover { background: rgba(255,255,255,.3); }

.tag-custom-row {
  display: flex; gap: 8px; margin: 8px 0 0;
}
.tag-custom-row input {
  flex: 1; font: inherit; font-size: .9rem;
  padding: 8px 12px; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--bg-card);
  color: var(--ink);
}
.tag-custom-row input:focus { outline: 0; border-color: var(--ink); }
.tag-custom-add {
  font: inherit; font-size: .85rem; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
  background: var(--bg-card); color: var(--ink);
  border: 1.5px solid var(--ink); cursor: pointer;
}
.tag-custom-add:hover { background: var(--ink); color: #fff; }

/* Popular custom-skill chips. Sits inside the same .chip-wrap as the
   curated suggestions but gets a subtle "popular" treatment so the
   user knows these were picked by other users in this profession,
   not hand-curated. The badge shows the count; clicking toggles the
   chip like any other. */
.chip-wrap-popular { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.chip-popular-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-soft); width: 100%;
  margin: 0 0 8px;
}
.chip.chip-popular {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-soft); color: var(--ink);
  border-color: var(--line-2);
}
.chip.chip-popular.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.chip-popular .chip-popular-badge {
  font-size: .7rem; font-weight: 700;
  background: var(--amber-soft); color: #8a5e08;
  padding: 1px 6px; border-radius: 999px; line-height: 1.3;
}
.chip.chip-popular.on .chip-popular-badge { background: rgba(255,255,255,.18); color: #fff; }
.bullet-row { display: flex; gap: 8px; margin: 0 0 7px; }
.bullet-row input { flex: 1; }

/* Mobile ------------------------------------------------------------ */
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; height: auto; padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 16px); }
  .editor-form { border-right: none; height: auto; }
  .editor-preview { display: none; }     /* preview via toggle button on mobile */
  .editor-preview.show { display: block; height: auto; }
  .row-2 { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
}

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-soft);
          font-size: .85rem; margin-top: 40px; }
.footer a.footer-link { text-decoration: underline; }
.footer a.footer-link:hover { text-decoration: none; }
/* Links in body copy need underline to be distinguishable from surrounding
   text without relying on color alone (WCAG 1.4.1). The brand/nav/button
   selectors above already style their links; this catches the rest. */
p a, li a, .muted a { text-decoration: underline; text-underline-offset: 2px; }

.cat-head { font-size:.78rem; font-weight:700; text-transform:uppercase;
            letter-spacing:.08em; color:var(--accent); margin:0 0 10px;
            padding-bottom:5px; border-bottom:1px solid var(--line); }

.phrase-panel { margin:8px 0 0; padding:10px 12px; border:1px solid var(--line);
  border-radius:8px; background:var(--bg-soft); max-height:280px; overflow:auto; }
.phrase-cat { font-size:.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.05em; color:var(--accent); margin:8px 0 4px; }
.phrase-cat:first-child { margin-top:0; }
.phrase-chip { font-size:.85rem; padding:6px 8px; margin:2px 0; border-radius:6px;
  cursor:pointer; border:1px solid transparent; }
.phrase-chip:hover { background:#fff; border-color:var(--line); }

/* Editor — bottom tab bar (mobile Edit / Preview).  Spec: MOBILE_FIRST_SPEC.md
   Priority 1.  On >=1024px the bar hides and the existing two-pane layout
   takes over (CSS-only desktop fallback; JS is a no-op when the bar is
   absent). */
.bottom-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -1px 3px rgba(16,24,40,.04);
  overflow: hidden;
}
.bottom-tabs button {
  flex: 1; min-height: 48px;  /* 44x44 tap target, with 8px breathing room */
  background: transparent; border: 0; font: inherit; font-weight: 600;
  font-size: 1rem; color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-top: 2px solid transparent;
}
.bottom-tabs button + button { border-left: 1px solid var(--line); }
.bottom-tabs button[aria-pressed="true"] {
  color: var(--accent); border-top-color: var(--accent);
  background: rgba(28, 79, 214, 0.06);
}
.bottom-tabs button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}

@media (min-width: 1024px) {
  .bottom-tabs { display: none; }
}

/* Bottom-sheet picker — MOBILE_FIRST_SPEC.md Priority 2 Option B.
   Replaces <select> on mobile for fields with options.length <= 12.
   The native <select> stays in the DOM and is what users see on >=1024px
   (see the @media block at the bottom of this section). */
.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 70vh; margin: 0; padding: 16px;
  border: none; border-top-left-radius: 16px; border-top-right-radius: 16px;
  background: var(--bg); color: var(--ink);
  box-shadow: 0 -4px 16px rgba(16,24,40,.10);
}
.bottom-sheet::backdrop { background: rgba(0,0,0,0.4); }
.bottom-sheet button {
  display: block; width: 100%; text-align: left;
  padding: 14px 16px; min-height: 48px;
  border: none; background: transparent;
  font: inherit; font-size: 16px; color: var(--ink);
  border-radius: 8px;
}
.bottom-sheet button:hover,
.bottom-sheet button:focus { background: var(--bg-soft); }
.bottom-sheet button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (min-width: 1024px) {
  /* On desktop the native <select> is the picker; hide the dialog entirely
     (it is still in the DOM, just not displayed). */
  .bottom-sheet { display: none; }
}

/* Field selector (landing) ------------------------------------------ */
.field-selector { margin: 0 0 64px; }
.field-selector-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin: 0 0 28px; }
.field-selector-head h2 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -.02em; }
.field-selector-head p { color: var(--ink-soft); margin: 0; max-width: 60ch; }
.field-count { color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }
.field-count b { color: var(--ink); font-weight: 700; }

/* Search row */
.field-search { position: relative; margin: 0 0 18px; }
.field-search input {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 14px 18px 14px 48px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg-card);
  color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.field-search input:focus {
  outline: 0; border-color: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}
.field-search .search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-mute); pointer-events: none;
}
.field-search .search-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.field-search .clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--ink-soft); width: 28px; height: 28px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: .9rem; line-height: 1; cursor: pointer; padding: 0;
}
.field-search.has-value .clear-btn { display: inline-flex; }
.field-search .clear-btn:hover { background: var(--line); color: var(--ink); }

/* Category tabs */
.field-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px;
  scrollbar-width: thin; margin: 0;
  scroll-snap-type: x proximity;
}
.field-tabs::-webkit-scrollbar { height: 6px; }
.field-tabs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.field-tab {
  flex: 0 0 auto; scroll-snap-align: start;
  font: inherit; font-size: .92rem; font-weight: 500;
  padding: 10px 18px; border-radius: 999px;
  background: transparent; color: var(--ink); border: 1.5px solid var(--line);
  cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
  display: inline-flex; align-items: center; gap: 7px;
}
.field-tab:hover { background: var(--bg-soft); }
.field-tab[aria-selected="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.field-tab[aria-selected="true"]:hover { background: #b07807; }
.field-tab .count { font-size: .75rem; opacity: .65; }
.field-tab[aria-selected="true"] .count { opacity: .8; }
.field-tab .ic {
  display: inline-block; font-size: 1rem; line-height: 1;
  width: 1.1em; opacity: .75; transition: opacity .12s;
}
.field-tab[aria-selected="true"] .ic { opacity: 1; }

/* Results grid */
.field-results { min-height: 200px; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .field-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }
.field-card {
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 20px 22px; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 6px; min-height: 152px;
}
/* The display:flex above overrides the user-agent [hidden] { display: none },
   so the field-selector's hidden-attribute filter would do nothing visually.
   Force a more specific selector to actually hide cards. */
.field-card[hidden] { display: none; }
.field-card h3 { font-size: 1.05rem; margin: 0; letter-spacing: -.005em; }
.field-card .muted { font-size: .88rem; line-height: 1.45; }
.field-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.field-card-foot .price { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.field-card-foot .price small { font-weight: 500; font-size: .72rem; color: var(--ink-mute); margin-left: 4px; }
.field-card-foot .btn { padding: 8px 16px; font-size: .85rem; }

/* Empty state */
.field-empty {
  text-align: center; padding: 56px 20px; color: var(--ink-soft);
  border: 1.5px dashed var(--line); border-radius: 14px;
}
.field-empty h3 { color: var(--ink); font-size: 1.1rem; margin: 0 0 6px; }
.field-empty p { margin: 0; font-size: .92rem; }

/* All-access sticky CTA */
.all-access-cta {
  margin: 36px 0 0; padding: 26px 30px;
  background: var(--bg-card); border: 1.5px solid var(--line); border-radius: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.all-access-cta h3 { font-size: 1.15rem; margin: 0 0 4px; letter-spacing: -.01em; }
.all-access-cta p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.all-access-cta .cta-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.all-access-cta .price { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.all-access-cta .price small { font-weight: 500; font-size: .8rem; color: var(--ink-mute); display: block; }

/* Security Clearance editor section ----------------------------------------
   Top-level candidate attribute section. Visual treatment matches .sec
   sections above; .row-2 handles the field grid. Bumped ?v=8 (CSS) + ?v=7
   (JS) — re-deploy the static asset cache-bust when editing here. */
.clearance-section {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}
.clearance-section > h2 { font-size: 1.02rem; margin: 0 0 3px; }
.clearance-section > .help { color: var(--ink-soft); font-size: .84rem; margin: 0 0 12px; }
.clearance-toggle {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: .92rem; cursor: pointer;
}
.clearance-toggle input { width: auto; }
.clearance-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.clearance-fields[hidden] { display: none; }
.clearance-fields .field {
  display: flex; flex-direction: column; gap: 5px;
}
.clearance-fields .field-label {
  font-size: .82rem; font-weight: 600; color: var(--ink);
}
.clearance-fields .field-label .muted {
  font-weight: 400; font-size: .78rem;
}
.clearance-fields select,
.clearance-fields input[type="text"],
.clearance-fields input[type="number"] {
  font: inherit; font-size: .92rem;
  padding: 9px 12px; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--bg-card);
  color: var(--ink); width: 100%;
}
.clearance-fields select:focus,
.clearance-fields input:focus { outline: 0; border-color: var(--ink); }
@media (max-width: 720px) {
  .clearance-section { padding: 14px; }
}

/* --- Phase 1: 1.2 Word count caption (under textareas) ------------------- */
.wordcount {
  font-size: .78rem;
  color: var(--ink-soft);
  text-align: right;
  padding: 2px 2px 6px;
  font-variant-numeric: tabular-nums;
}

/* --- Phase 1: 1.3 Empty state (dashed card) ------------------------------- */
.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-soft);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  margin: 12px 0 24px;
  background: var(--bg-soft);
}
.empty-state .empty-icon {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 10px;
  opacity: .6;
}
.empty-state .empty-title {
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 4px;
}
.empty-state .empty-text {
  font-size: .9rem;
  margin: 0;
}

/* --- Phase 1: 1.4 Shortcuts cheat-sheet modal ----------------------------- */
.shortcuts-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.shortcuts-modal[hidden] { display: none; }
.shortcuts-overlay {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
}
.shortcuts-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  max-width: 480px; width: calc(100% - 32px);
  max-height: calc(100vh - 64px); overflow-y: auto;
  padding: 22px 24px 18px;
}
.shortcuts-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.shortcuts-card h2 {
  margin: 0; font-size: 1.05rem; font-weight: 700;
}
.shortcuts-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
  margin: 0;
}
.shortcuts-list dt { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.shortcuts-list dd { margin: 0; color: var(--ink-soft); font-size: .9rem; align-self: center; }
.shortcuts-foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
}
.shortcuts-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.4rem; line-height: 1; padding: 4px 8px;
  color: var(--ink-soft); border-radius: 6px;
}
.shortcuts-close:hover, .shortcuts-close:focus {
  color: var(--ink); background: var(--bg-soft);
  outline: 0;
}
kbd {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1;
  padding: 4px 7px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--ink);
  min-width: 18px;
  text-align: center;
}

/* --- Phase 1: 1.7 History link in editor toolbar ------------------------- */
.history-link {
  font-size: .82rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  padding: 2px 4px;
}
.history-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Phase 1: 1.6 Print stylesheet ---------------------------------------- */
@media print {
  .site-head, .footer, nav.bottom-tabs, .hamburger-btn,
  button, .btn, .save-status, .toolbar .history-link { display: none !important; }
  main { display: block !important; }
  ul, ol { page-break-inside: avoid; }
  section, .card, .resume-row { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; color: #000; }
}
