:root {
  /* Semantic palette */
  --brand: #2f5c4c;          /* primary actions, links, active */
  --brand-deep: #26493c;     /* primary hover / pressed */
  --brand-2: #3f7d54;        /* success / completed moments */
  --ink: #1d211c;            /* headings, body */
  --muted: #526052;          /* secondary text — darkened for AA on sage */
  --faint: #526052;          /* was too light (#7f8a7e); match muted for WCAG */
  --warning: #9a6a2c;        /* out of credits, low balance */
  --warning-bg: rgba(154, 106, 44, 0.12);
  --danger: #a8432c;         /* errors, failed payment, destructive */
  --danger-ink: #8f3a24;     /* danger text on light backgrounds */
  --danger-bg: rgba(168, 67, 44, 0.1);
  --paper: #e7eae2;
  --bg-sage: #d4ddd3;
  --bg-cream: #ece7db;
  --line: rgba(29, 33, 28, 0.14);
  --card: rgba(255, 255, 255, 0.55);
  --card-solid: rgba(255, 255, 255, 0.7);
  --chip: rgba(47, 92, 76, 0.1);

  /* Aliases (legacy classnames) */
  --accent: var(--brand);
  --accent-deep: var(--brand-deep);
  --warn: var(--danger-ink);
  --warn-amber: var(--warning);
  --warn-amber-bg: var(--warning-bg);

  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --maxw: 1160px;
  --pad: clamp(20px, 5vw, 64px);
  --studio-gap: clamp(20px, 3vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  position: relative;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; }

.atmosphere {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(29, 33, 28, 0.028) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(29, 33, 28, 0.028) 0 1px, transparent 1px 64px),
    radial-gradient(120% 90% at 8% 0%, var(--bg-sage) 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 0%, var(--bg-cream) 0%, transparent 60%),
    var(--paper);
  background-attachment: fixed;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 1;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(231, 234, 226, 0.85), rgba(231, 234, 226, 0));
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
}
.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.05;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-tagline {
  font-family: var(--font);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav-actions[hidden] { display: none !important; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Buttons — hierarchy: primary fill · secondary outline · danger · text */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { opacity: 0.92; }
.btn.primary,
.btn-pill {
  background: var(--brand);
  color: #f4f6f0;
  border-radius: 999px;
  padding: 0.72em 1.4em;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.btn.primary:hover,
.btn-pill:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
  opacity: 1;
}
.btn-lg { font-size: 1.05rem; padding: 0.85em 1.7em; }
.btn.large { padding: 0.9rem 1.6rem; font-size: 1.02rem; }
.btn.secondary,
.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(47, 92, 76, 0.35);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.62em 1.25em;
  font-weight: 600;
}
.btn.secondary:hover,
.btn-ghost:hover {
  background: rgba(47, 92, 76, 0.08);
  border-color: var(--brand);
  opacity: 1;
}
.btn.danger {
  background: var(--danger);
  color: #faf6f3;
  border-radius: 999px;
  padding: 0.72em 1.4em;
}
.btn.danger:hover {
  background: var(--danger-ink);
  opacity: 1;
  transform: translateY(-1px);
}
.btn.danger-ghost {
  background: transparent;
  border: 1.5px solid rgba(168, 67, 44, 0.45);
  color: var(--danger-ink);
  border-radius: 999px;
  padding: 0.62em 1.25em;
  font-weight: 600;
}
.btn.danger-ghost:hover {
  background: var(--danger-bg);
  opacity: 1;
}
.btn.text {
  color: var(--ink);
  padding: 0.35rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(29, 33, 28, 0.25);
  font-weight: 500;
}
.btn.text:hover { text-decoration-color: var(--brand); }
.btn.subtle { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.textlink {
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.18s;
}
.textlink:hover { border-color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Landing hero */
#landingPanel { position: relative; z-index: 1; }
.hero { padding-block: clamp(48px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.65rem, 5.6vw, 4.25rem);
  line-height: 1.02;
  margin: 0.55rem 0 0;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero .lede {
  margin-top: 1.35rem;
  font-size: clamp(1.06rem, 1.55vw, 1.22rem);
  color: var(--muted);
  max-width: 38ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 2rem;
}
.trust { margin-top: 1.15rem; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.trust b { color: var(--ink); font-weight: 600; }
.hero-secondary { margin-top: 1.1rem; }

.hero-stage {
  position: relative;
}
.hero-stage::before {
  content: '';
  position: absolute;
  inset: -14% -10% -8% -6%;
  background:
    radial-gradient(55% 50% at 70% 30%, rgba(47, 92, 76, 0.16), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(236, 231, 219, 0.7), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-try {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow:
    0 40px 80px -48px rgba(29, 33, 28, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  display: grid;
  gap: 14px;
}
.hero-try-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: rgba(29, 33, 28, 0.05);
  border-radius: 999px;
}
.hero-try-tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.hero-try-tab.has-content:not([aria-selected="true"]) {
  color: var(--ink);
}
.hero-try-tab.has-content::after {
  content: '';
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.hero-try-tab[aria-selected="true"] {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.hero-try-pane {
  min-height: 0;
  animation: heroPaneIn 0.28s ease;
}
@keyframes heroPaneIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-try-pane { animation: none; }
}
.hero-try-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.hero-try-resume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.hero-try-resume-head .hero-try-label { margin-bottom: 0; }
.hero-upload {
  cursor: pointer;
  font-size: 0.82rem !important;
}
.hero-try-input {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
}
.hero-try-input:focus {
  outline: 2px solid rgba(47, 92, 76, 0.35);
  outline-offset: 1px;
  border-color: rgba(47, 92, 76, 0.45);
}
.hero-try-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.hero-try-foot {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.hero-try-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.hero-try-hint.warn { color: var(--warning); }
.hero-try-foot .btn { width: 100%; }
.hero-try-foot .btn.ready {
  box-shadow: 0 10px 28px -14px rgba(47, 92, 76, 0.65);
  transform: translateY(-1px);
}

.hero-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: none;
  transition: box-shadow 0.35s ease;
}
.hero-card.is-tailored {
  box-shadow: 0 18px 40px -28px rgba(47, 92, 76, 0.45);
}
#heroPanePreview .hero-card-tab { top: -12px; left: 16px; }
.hero-card-tab {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--brand);
  color: #f4f6f0;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}
.hero-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.hero-card-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
}
.hero-toggle {
  display: inline-flex;
  background: rgba(29, 33, 28, 0.05);
  border-radius: 999px;
  padding: 3px;
  margin-top: 2px;
}
.hero-toggle button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s;
}
.hero-toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.hero-match { text-align: right; min-width: 118px; }
.hero-match .lab {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-match .val {
  font-family: var(--display);
  font-size: 2.35rem;
  font-weight: 500;
  color: var(--brand);
  line-height: 1;
  margin-top: 2px;
  transition: color 0.35s ease;
}
.meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(29, 33, 28, 0.1);
  margin-top: 8px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 62%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-sec { margin-top: 16px; }
.hero-sec .sec-lab {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.hero-summary,
.hero-exp {
  font-size: 0.96rem;
  color: var(--ink);
  min-height: 2.9em;
  transition: opacity 0.35s;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(29, 33, 28, 0.06);
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
  will-change: transform;
}
.chip .ck { color: transparent; transition: color 0.3s; }
.chip.on {
  background: var(--chip);
  color: var(--brand);
  border-color: rgba(47, 92, 76, 0.24);
}
.chip.on .ck { color: var(--brand); }
.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s;
}
.hero-note.show { opacity: 1; }
.hero-note .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  flex: none;
}

/* legacy preview bits kept for any leftover markup */
.preview {
  position: relative;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 50px -30px rgba(29, 33, 28, 0.5);
}
.preview-tab {
  position: absolute;
  top: -13px;
  left: 22px;
  background: var(--brand);
  color: #f4f6f0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.doc-name { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.doc-role { font-size: 0.82rem; color: var(--muted); }
.doc-section { margin-top: 16px; }
.doc-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.doc-line {
  height: 9px;
  border-radius: 5px;
  background: rgba(29, 33, 28, 0.1);
  margin: 7px 0;
}
.doc-line.short { width: 62%; }
.doc-line.mid { width: 82%; }
.preview-foot {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
}

#landingPanel section { padding-block: clamp(52px, 8vw, 88px); }
.section-head { max-width: 52ch; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  margin-top: 0.5rem;
}
.section-head p { margin-top: 0.9rem; color: var(--muted); font-size: 1.05rem; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  margin-top: 44px;
}
.step-num {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.step h3 { font-size: 1.2rem; margin-top: 14px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 0.98rem; }

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-arrow { color: var(--brand); font-weight: 500; text-transform: none; letter-spacing: 0; }

.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 40px;
}
.diff-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
}
.diff-card.diff-after {
  border-color: rgba(47, 92, 76, 0.35);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 50px -40px rgba(47, 92, 76, 0.55);
}
.diff-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.diff-after .diff-label { color: var(--brand); }
.diff-body { font-size: 1.02rem; line-height: 1.5; min-height: 4.2em; }
.diff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.diff-chips span {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(29, 33, 28, 0.06);
  color: var(--muted);
}
.diff-chips span.on {
  background: var(--chip);
  color: var(--brand);
  border: 1px solid rgba(47, 92, 76, 0.22);
}
.diff-changes {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.diff-changes li::before {
  content: '✓ ';
  color: var(--brand);
  font-weight: 700;
}
.diff-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 44px;
}
.trust-item h3 { font-size: 1.12rem; margin-top: 8px; }
.trust-item p { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }
.trust-item .k {
  font-family: var(--display);
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
}

.layout-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 36px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.layout-tile {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}
.layout-tile .layout-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.layout-tile .tpl-preview {
  transform: scale(0.92);
  transform-origin: top left;
  width: 108.7%;
  pointer-events: none;
  max-height: 220px;
  overflow: hidden;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
}
.feature h3 { font-size: 1.15rem; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 0.98rem; }
.feature .k {
  font-family: var(--display);
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}
.foot-about {
  margin: 4px 0 0;
  font-size: 0.85rem;
}
.foot-about a { color: var(--muted); border-bottom: 1px solid transparent; }
.foot-about a:hover { color: var(--brand); border-color: rgba(47, 92, 76, 0.35); }

.keyword-coverage {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}
.keyword-coverage .kc-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.keyword-coverage .kc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.keyword-coverage .kc-row:last-child { margin-bottom: 0; }
.kc-chip {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}
.kc-chip.matched {
  background: rgba(63, 125, 84, 0.12);
  color: var(--brand-2);
  border: 1px solid rgba(63, 125, 84, 0.28);
}
.kc-chip.missing {
  background: rgba(154, 106, 44, 0.1);
  color: var(--warning);
  border: 1px solid rgba(154, 106, 44, 0.28);
}

.history-panel {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.history-head h2 {
  font-size: 1.25rem;
  margin: 0;
}
.history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}
.history-item:hover { border-color: rgba(47, 92, 76, 0.35); }
.history-item .hi-title { font-weight: 600; }
.history-item .hi-meta { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.history-item .hi-match { font-family: var(--display); font-size: 1.35rem; color: var(--brand); }

.review-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Plans / pricing */
.plans-section { padding-block: clamp(52px, 8vw, 88px); }
.plans-head {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto;
}
.plans-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  margin-top: 0.5rem;
}
.plans-head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}
.plans-free {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 22px;
  width: max-content;
  max-width: 100%;
}
.plans-free .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}
.plans-free b { font-weight: 600; }
.plans-free span { color: var(--muted); font-size: 0.96rem; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
  align-items: stretch;
}
.plan-card {
  position: relative;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.plan-card.featured {
  border-color: var(--brand);
  box-shadow: 0 20px 50px -34px rgba(29, 33, 28, 0.55);
}
.plan-card .tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #f4f6f0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-card .name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
}
.plan-card .credits {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 20px;
}
.plan-price .amt {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.plan-price .cur {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--muted);
  margin-right: 2px;
}
.plan-card .per {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 8px;
}
.plan-card ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plan-card li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--muted);
}
.plan-card li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 700;
  flex: none;
}
.plan-card .cta { margin-top: 26px; }
.plan-card .cta .btn { width: 100%; }
.credit-explain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}
.ce h3 { font-size: 1.1rem; }
.ce p { color: var(--muted); font-size: 0.95rem; margin-top: 7px; }
.ce .k {
  font-family: var(--display);
  color: var(--brand);
  font-size: 1.5rem;
  line-height: 1;
}

.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 1.08rem;
  font-family: var(--font);
}
.faq summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 16px; height: 16px; flex: none; }
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  background: var(--faint);
  transition: transform 0.2s;
}
.plus::before { top: 7px; left: 0; width: 16px; height: 2px; }
.plus::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq details[open] .plus::after { transform: scaleY(0); }
.faq details[open] summary { color: var(--accent); }
.faq-body {
  padding: 0 0 22px;
  color: var(--muted);
  max-width: 60ch;
  font-size: 0.98rem;
  line-height: 1.55;
}
.faq-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cta-band {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(40px, 6vw, 64px);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-band p { margin-top: 0.8rem; color: var(--muted); }
.cta-band .btn { margin-top: 1.6rem; }

.auth-section {
  padding-top: 0;
  padding-bottom: clamp(52px, 8vw, 88px);
}
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 20px 50px -30px rgba(29, 33, 28, 0.45);
}
.auth-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-top: 0.45rem;
}
.auth-lede {
  margin: 0.65rem 0 1.35rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.auth-form { display: grid; gap: 0.9rem; }
.auth-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.site-footer { border-top: 1px solid var(--line); margin-top: 20px; }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 36px;
}
.foot-brand-block {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
}
.foot-brand { font-size: 1.2rem; }
.foot-brand-block .brand-tagline { font-size: 0.54rem; }
.foot-trust {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 26ch;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-links a:hover { color: var(--ink); }
.foot-meta { font-size: 0.85rem; color: var(--faint); }

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* Legal pages */
.legal-page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem var(--pad) 4rem;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0.4rem 0 1.25rem;
}
.legal-page h2 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}
.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}
.legal-page ul { padding-left: 1.2rem; }
.legal-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
}

/* Studio shell */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
input, textarea {
  width: 100%;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
}
.pane textarea,
.review textarea,
.review input,
.modal-card input,
.auth-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.55);
}
textarea { resize: vertical; min-height: 200px; line-height: 1.5; }
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(47, 92, 76, 0.45);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.error { color: var(--danger-ink); font-size: 0.9rem; margin: 0.5rem 0; }
.status { color: var(--brand-deep); font-size: 0.9rem; margin: 0.5rem 0; }
.status.success {
  color: var(--brand-2);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.status.success::before {
  content: "✓";
  font-weight: 700;
  line-height: 1;
}
.hint { color: var(--muted); font-size: 0.82rem; min-height: 1.1em; }

.studio { animation: rise 0.5s ease both; padding-top: 0.5rem; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.studio-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.meta-text { margin: 0; color: var(--muted); font-size: 0.9rem; }
.meta-actions { display: flex; align-items: center; gap: 1.1rem; }
.meta-actions strong { font-weight: 700; }

.stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  min-height: 52vh;
}
.pane { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.pane-divider {
  width: 1px;
  background: var(--line);
  margin: 0 1.25rem;
  align-self: stretch;
}
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pane-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.pane-tools { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.linkish {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}
.linkish:hover { color: var(--accent-deep); text-decoration-color: currentColor; }

.studio-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.check input { width: auto; }

.review {
  margin-top: 0;
  padding: 1.25rem 0 2.5rem;
  animation: rise 0.45s ease both;
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--pad)) 1.1rem;
  padding: 0.85rem var(--pad) 1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 64px;
  z-index: 20;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(29, 33, 28, 0.06);
}
.review-head .eyebrow { margin-bottom: 6px; }
.review-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 400;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.review-insights {
  margin-bottom: 1.25rem;
}
.review-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 1rem;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.review-match-copy .lab {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.review-match-copy .hint {
  margin: 4px 0 0;
  max-width: 42ch;
  min-height: 0;
}
.review-match-meter {
  min-width: min(220px, 100%);
  text-align: right;
}
.review-match-meter .vals {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--display);
  line-height: 1;
}
.review-match-meter .before {
  font-size: 1.35rem;
  color: var(--muted);
}
.review-match-meter .arrow {
  color: var(--muted);
  font-size: 1rem;
}
.review-match-meter .after {
  font-size: 2rem;
  color: var(--brand-2);
  font-weight: 500;
}
.review-match-meter .delta {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-2);
}
.review-match-meter .meter {
  margin-top: 8px;
  width: 100%;
}
.notes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 1rem;
}
.note-pill {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.45;
  border: 1px solid transparent;
}
.note-pill.note-strong {
  background: rgba(63, 125, 84, 0.12);
  color: var(--brand-deep);
  border-color: rgba(63, 125, 84, 0.22);
}
.note-pill.note-gap {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(154, 106, 44, 0.28);
}
.note-pill.note-nice {
  background: rgba(29, 33, 28, 0.05);
  color: var(--muted);
  border-color: var(--line);
}
.note-pill.note-neutral {
  background: rgba(47, 92, 76, 0.08);
  color: var(--muted);
  border-color: rgba(47, 92, 76, 0.12);
}
.changes {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
  padding: 0.85rem 0.95rem;
  background: rgba(29, 33, 28, 0.03);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.changes-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.15rem;
}
.changes-label span {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  opacity: 0.85;
}
.change {
  border-left: 2px solid rgba(47, 92, 76, 0.28);
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: transparent;
  border-radius: 0 8px 8px 0;
}
.change-head { margin-bottom: 2px; }
.change-sec {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.change-why {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}
.change-snip {
  margin: 0.2rem 0 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--faint);
  font-style: italic;
}
.review-editor {
  display: grid;
  gap: 0.35rem;
}
.field-block { margin-bottom: 0.9rem; display: grid; gap: 0.4rem; }
.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.role-block {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-bottom: 0.75rem;
}
.role-block h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-family: var(--display);
  font-weight: 500;
}
.bullet-edit {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.bullet-edit textarea {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
}
.review textarea.autosize,
.review .bullet-edit textarea {
  min-height: 0;
  height: auto;
  resize: none;
  overflow: hidden;
  field-sizing: content;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.review textarea.skills-field {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.review-foot {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(29, 33, 28, 0.38);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem;
  max-width: 400px;
  width: 100%;
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 24px 60px rgba(29, 33, 28, 0.16);
}
.modal-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
}
.modal-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.pack-grid { display: grid; gap: 0.65rem; }
.pack-btn {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.pack-btn:hover { border-color: rgba(47, 92, 76, 0.45); }
.pack-btn:disabled { opacity: 0.65; cursor: wait; }
.pack-btn strong { font-size: 1.05rem; }
.pack-price {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--accent-deep);
}
.pack-blurb { font-size: 0.82rem; color: var(--muted); }

.template-modal {
  max-width: min(920px, 96vw);
  max-height: 90vh;
  overflow: auto;
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.template-picker-layout {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) minmax(260px, 1.15fr);
  gap: 0.9rem;
  align-items: start;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}
.template-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.template-card:hover { border-color: rgba(47, 92, 76, 0.4); }
.template-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 92, 76, 0.18);
  background: rgba(47, 92, 76, 0.05);
}
.template-card strong { display: block; font-size: 0.88rem; margin-bottom: 0.15rem; }
.template-card span { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.template-card .kind {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  font-weight: 700;
}

.tpl-preview {
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 16px 18px;
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tpl-preview .p-name { font-weight: 800; color: #111; }
.tpl-preview .p-contact { color: #444; margin-top: 4px; line-height: 1.4; font-size: 11px; }
.tpl-preview .p-sec { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; margin-top: 12px; color: #111; }
.tpl-preview .p-body { font-size: 12px; line-height: 1.45; margin-top: 4px; color: #111; }
.tpl-preview .p-exp { margin-top: 8px; }
.tpl-preview .p-exp-title { font-size: 12.5px; font-weight: 700; color: #111; }
.tpl-preview .p-exp-meta { font-weight: 400; color: #555; }
.tpl-preview .p-bullet { font-size: 12px; line-height: 1.45; margin-top: 3px; }
.tpl-preview .p-foot { margin-top: 14px; font-size: 11px; color: #888; border-top: 1px dashed #ddd; padding-top: 10px; }
.tpl-preview.classic .p-name { font-size: 18px; text-align: center; }
.tpl-preview.classic .p-contact { text-align: center; }
.tpl-preview.classic .p-rule { height: 1px; background: #111; margin: 10px 0 8px; }
.tpl-preview.modern .p-name { font-size: 19px; text-align: left; }
.tpl-preview.modern .p-accent { height: 2px; background: #2563EB; margin: 10px 0; width: 100%; }
.tpl-preview.modern .p-sec { color: #2563EB; }
.tpl-preview.modern .p-sec-bar { height: 2px; width: 32px; background: #2563EB; margin: 4px 0 6px; }
.tpl-preview.minimal .p-name { font-size: 16px; font-weight: 500; text-align: center; letter-spacing: 0.04em; }
.tpl-preview.minimal .p-contact { color: #888; text-align: center; margin-bottom: 14px; }
.tpl-preview.minimal .p-sec { font-size: 10px; font-weight: 500; color: #999; letter-spacing: 0.22em; margin-top: 16px; }
.tpl-preview.technical .p-name { font-size: 16px; font-family: ui-monospace, Menlo, monospace; }
.tpl-preview.technical .p-contact { font-family: ui-monospace, Menlo, monospace; }
.tpl-preview.technical .p-sec { font-size: 10px; border-bottom: 1px solid #111; padding-bottom: 2px; }
.tpl-preview.executive .p-name { font-family: Georgia, serif; font-size: 22px; text-align: center; }
.tpl-preview.executive .p-contact { text-align: center; }
.tpl-preview.executive .p-rule { height: 1px; background: #333; margin: 12px 0; }
.tpl-preview.executive .p-sec { font-family: Georgia, serif; font-size: 12px; }
.tpl-preview.executive .p-summary-box { background: #f6f4ef; padding: 12px 14px; margin: 8px 0 4px; border-left: 3px solid #333; }
.tpl-preview.creative { border-left: 8px solid #16a34a; padding-left: 20px; }
.tpl-preview.creative .p-name { font-size: 20px; color: #14532d; }
.tpl-preview.creative .p-sec { color: #16a34a; text-transform: uppercase; }
.tpl-preview.creative .p-sec-bar { height: 3px; width: 40px; background: #16a34a; margin: 4px 0 8px; border-radius: 2px; }
.tpl-preview.academic .p-name { font-size: 17px; text-align: center; }
.tpl-preview.academic .p-contact { text-align: center; }
.tpl-preview.academic .p-rule { height: 1px; background: #444; margin: 10px auto; width: 60%; }
.tpl-preview.academic .p-sec { text-align: center; letter-spacing: 0.12em; }
.tpl-preview.entry_level .p-name { font-size: 17px; color: #1e3a5f; }
.tpl-preview.entry_level .p-sec { color: #1e3a5f; border-bottom: 2px solid #93c5fd; padding-bottom: 3px; }
.tpl-preview.professional { padding: 0; overflow: hidden; }
.tpl-preview.professional .p-header-band { background: #0f172a; color: #fff; padding: 18px 22px 16px; }
.tpl-preview.professional .p-header-band .p-name { color: #fff; font-size: 18px; }
.tpl-preview.professional .p-header-band .p-contact { color: #cbd5e1; }
.tpl-preview.professional .p-body-wrap { padding: 16px 20px 18px; border-left: 3px solid #1B4D3E; }
.tpl-preview.professional .p-sec { color: #1B4D3E; }

/* Studio workspace */
.studio-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}
.studio-nav[hidden] { display: none !important; }
.studio-nav .spacer { flex: 1; }
.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-solid);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.credit-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.credit-badge.warn {
  background: var(--warning-bg);
  border-color: rgba(154, 106, 44, 0.35);
  color: var(--warning);
}
.credit-badge.warn .dot { background: var(--warning); }
.credit-badge.danger {
  background: var(--danger-bg);
  border-color: rgba(168, 67, 44, 0.35);
  color: var(--danger-ink);
}
.credit-badge.danger .dot { background: var(--danger); }
.layout-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}
.layout-control .chev {
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--faint);
  border-bottom: 1.6px solid var(--faint);
  transform: rotate(45deg);
  margin-top: -3px;
}
.layout-control .lbl-key { color: var(--faint); }
.avatar-wrap { position: relative; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #f4f6f0;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.avatar-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(29, 33, 28, 0.14);
  z-index: 25;
  display: grid;
  gap: 8px;
}
.avatar-menu[hidden] { display: none !important; }
.avatar-email {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

body.in-studio {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}
body.in-studio #landingPanel { display: none !important; }
body.in-studio .site-nav { flex: none; }
body.in-studio .atmosphere { position: fixed; }
body.in-review {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}
body.in-review .work {
  height: auto;
  max-height: none;
  overflow: visible;
}
body.in-review .work .studio-wrap {
  height: auto;
  display: block;
}
body.in-review #studioMain,
#studioMain[hidden] {
  display: none !important;
}
#reviewPanel[hidden] {
  display: none !important;
}
body.in-review #appStatus,
body.in-review #appError {
  position: relative;
  z-index: 1;
  margin: 0 0 0.75rem;
}

.work {
  position: relative;
  z-index: 1;
  display: block;
  padding-top: 4px;
  padding-bottom: calc(4px + var(--keyboard-inset, 0px));
  box-sizing: border-box;
  height: calc(100dvh - 72px);
  max-height: calc(100dvh - 72px);
  overflow: hidden;
}
#appPanel[hidden],
.work[hidden] {
  display: none !important;
}
.work .studio-wrap {
  max-width: var(--maxw);
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--pad);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
/* Fill viewport: panels grow, action row pinned under them */
.studio-main {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: var(--studio-gap);
  align-items: stretch;
  flex: 1 1 0;
  min-height: 0;
}
.pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  gap: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 36px;
}
.panel-head h2 {
  font-size: 1.35rem;
  font-weight: 500;
}
.panel-acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 30px;
  align-items: center;
}
.panel-acts-spacer {
  visibility: hidden;
  pointer-events: none;
}
.mini {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.mini:hover { background: rgba(255, 255, 255, 0.5); color: var(--ink); }

/* Grid row sizes the box — empty + filled stay identical */
.field,
.field.is-empty {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  align-self: stretch;
}
.field:not(.is-empty)::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 36px;
  border-radius: 0 0 13px 13px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.field.is-scrollable::after { opacity: 1; }
.field.is-scrollable-end::after { opacity: 0; }
.field.invalid {
  border-color: rgba(168, 67, 44, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 67, 44, 0.12);
}
.field textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  max-height: none;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 4px 2px 12px !important;
  resize: none;
  font-size: 16px; /* iOS: avoid focus zoom */
  line-height: 1.55;
  color: var(--ink);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 92, 76, 0.35) transparent;
}
.field textarea::-webkit-scrollbar { width: 8px; }
.field textarea::-webkit-scrollbar-thumb {
  background: rgba(47, 92, 76, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.field textarea:focus { outline: none; }
.field.is-empty textarea {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}
.pane-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.pane-meta .hint {
  margin: 0;
  min-height: 1.1em;
}
.pane-meta.metaline,
.metaline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  font-size: 0.82rem;
  color: var(--faint);
  gap: 10px;
  min-height: 1.2em;
}
.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 32px;
  gap: 6px;
  cursor: text;
}
.empty[hidden] { display: none !important; }
.empty .ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px dashed var(--faint);
  display: grid;
  place-items: center;
  color: var(--faint);
  margin-bottom: 8px;
}
.empty h3 { font-size: 1.15rem; }
.empty p { color: var(--muted); font-size: 0.92rem; max-width: 32ch; }
.empty .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.example-link {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 500;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(47, 92, 76, 0.35);
  cursor: pointer;
  padding: 0 0 2px;
  font-family: inherit;
}
.validate {
  color: var(--danger-ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.validate[hidden],
.field-warn[hidden] { display: none !important; }
.field-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 3;
  font-size: 0.72rem;
  color: var(--faint);
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.85) 20%);
  padding-left: 12px;
}
.field.is-empty .field-count { display: none; }
.field-warn {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  z-index: 3;
  font-size: 0.78rem;
  color: var(--danger-ink);
  pointer-events: none;
}

/* One space-between row: master left, create right — shared baseline */
.studio-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--studio-gap);
  margin-top: 14px;
  flex: 0 0 auto;
  width: 100%;
}
.savewrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  flex: 0 1 auto;
}
.savewrap label {
  font-weight: 500;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.3;
}
.savewrap input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--accent);
  margin: 0;
}
.save-hint {
  margin: 4px 0 0;
  margin-left: 24px; /* 16px checkbox + 8px gap — hangs under label text */
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.35;
}
.foot-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0;
  flex: 0 0 auto;
}
.foot-cta .btn { margin: 0; }
.cta-help {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.3;
}
.cta-help.warn { color: var(--warning); }

.studio-toast {
  position: absolute;
  left: 0;
  bottom: 78px;
  max-width: min(40ch, calc(50% - 12px));
  margin: 0;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(29, 33, 28, 0.08);
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  z-index: 6;
}
.studio-toast.is-on {
  opacity: 1;
  transform: none;
}
.studio-toast[hidden] {
  display: none !important;
}

.actionrow,
.cta-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

/* Paywall overlay */
/* Tailoring progress screen */
.tailor-progress {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 8% 0%, var(--bg-sage) 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 0%, var(--bg-cream) 0%, transparent 60%),
    var(--paper);
}
.tailor-progress[hidden] { display: none !important; }
.tailor-progress-card {
  width: min(420px, 100%);
  animation: rise 0.35s ease both;
}
.tailor-progress-title {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tailor-progress-sub {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 36ch;
}
.tailor-progress-track {
  margin-top: 1.5rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(29, 33, 28, 0.1);
  overflow: hidden;
}
.tailor-progress-track i {
  display: block;
  height: 100%;
  width: 8%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tailor-steps {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.tailor-step {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.38;
  transition: opacity 0.25s;
}
.tailor-step.is-active,
.tailor-step.is-done {
  opacity: 1;
}
.tailor-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid var(--line);
  position: relative;
}
.tailor-step.is-active .tailor-step-icon {
  color: var(--brand);
  border-color: rgba(47, 92, 76, 0.45);
  background: rgba(47, 92, 76, 0.08);
}
.tailor-step.is-done .tailor-step-icon {
  color: var(--brand-2);
  border-color: rgba(63, 125, 84, 0.4);
  background: rgba(63, 125, 84, 0.12);
}
.tailor-step-icon .spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(47, 92, 76, 0.2);
  border-top-color: var(--brand);
  animation: tailor-spin 0.7s linear infinite;
}
.tailor-step-label {
  flex: 1;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}
.tailor-step.is-active .tailor-step-label,
.tailor-step.is-done .tailor-step-label {
  color: var(--ink);
  font-weight: 600;
}
.tailor-step-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand-2);
  background: rgba(63, 125, 84, 0.12);
  border: 1.5px solid rgba(63, 125, 84, 0.4);
}
@keyframes tailor-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .tailor-step-icon .spin { animation: none; border-top-color: var(--brand); }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 33, 28, 0.34);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}
.overlay[hidden] { display: none !important; }
.paywall-modal {
  position: relative;
  background: #f3f4ee;
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 40px 90px -40px rgba(29, 33, 28, 0.6);
  animation: rise 0.28s ease both;
}
.paywall-modal .ey {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warning);
}
.paywall-modal h2 {
  font-size: 1.55rem;
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 500;
}
.paywall-modal .sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.96rem;
}
.reassure {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}
.reassure .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex: none;
}
.packs { display: grid; gap: 10px; margin-top: 18px; }
.pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, transform 0.15s;
  font: inherit;
  color: var(--ink);
  text-align: left;
  width: 100%;
  position: relative;
}
.pack:hover { border-color: var(--accent); transform: translateY(-1px); }
.pack:disabled { opacity: 0.65; cursor: wait; transform: none; }
.pack.best { border-color: var(--accent); }
.pack .name { font-weight: 600; }
.pack .per { font-size: 0.8rem; color: var(--faint); }
.pack .price {
  font-family: var(--display);
  font-size: 1.2rem;
}
.pack .tag {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.modal-foot .note { font-size: 0.75rem; color: var(--faint); }
.x {
  background: none;
  border: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--faint);
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 18px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero-try-input { min-height: 180px; }
  .hero-try-tabs { border-radius: 16px; }
  .hero-try-tab { flex: 1 1 auto; text-align: center; padding-inline: 10px; }
  .preview { order: 0; }
  .hero-card { order: 0; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .diff-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr 1fr; gap: 18px; }
  .layout-strip { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }
  .credit-explain {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  body.in-studio {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
  .work {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .work .studio-wrap {
    height: auto;
    display: block;
  }
  .studio-main {
    height: auto;
    max-height: none;
    min-height: 0;
    flex: none;
    overflow: visible;
  }
  .panels {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    flex: none;
  }
  .pane {
    height: auto;
    grid-template-rows: auto auto;
  }
  .field,
  .field.is-empty {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
  .studio-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .foot-cta {
    align-items: stretch;
    text-align: center;
  }
  .foot-cta .btn { width: 100%; }
  .cta-help { text-align: center; }
  .studio-toast {
    left: 0;
    right: 0;
    max-width: none;
    bottom: auto;
    top: 8px;
  }
  .studio-nav { gap: 8px; }
  .layout-control .lbl-key { display: none; }
  .template-picker-layout { grid-template-columns: 1fr; }
  .atmosphere { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
