/* app.css — cv.emm.sa page-local styles on top of tokens/base/components. */
.logo-mark .ic, .nav-brand .ic { width: 22px; height: 22px; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.wa-btn { background: #0e7a45; color: #fff; }
.wa-btn:hover { background: #0b6339; }
.inline-form { display: inline; }
.stack { display: grid; gap: var(--space-md); }
.section-tight { padding-block: var(--space-2xl); }
.container-wide { max-width: 1400px; }
.sec-title { text-align: center; margin-bottom: var(--space-sm); }
.sec-sub { text-align: center; color: var(--text-muted); margin-bottom: var(--space-2xl); }
.faq-wrap { max-width: var(--container-narrow); margin-inline: auto; }
.feature-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .feature-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid-3 { grid-template-columns: 1fr; } }
.steps .step h3 { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }
.cta-box { background: var(--navy-2); color: var(--on-navy); border-radius: var(--radius-lg); padding: var(--space-2xl); text-align: center; }
.cta-box .lead, .cta-box .text-muted { color: var(--on-navy-muted); }
.cta-box h1, .cta-box h2 { color: var(--on-navy, #fff); }
.card-center { text-align: center; padding: var(--space-2xl); }
.card-center h1 { font-size: var(--text-2xl); }
.waitlist-form { text-align: start; margin-top: var(--space-lg); max-width: 560px; margin-inline: auto; }
.waitlist-form .label, .waitlist-form .hint { color: var(--on-navy); }
.waitlist-form .input { background: var(--navy-700); border-color: var(--navy-500); color: var(--on-navy); }
.alert { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); margin-block: var(--space-md); font-size: var(--text-sm); border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--success) 12%, var(--surface)); border-color: var(--success); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: var(--danger); }
.alert-warning { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: var(--warning); }
.alert-neutral { background: var(--surface-2); border-color: var(--border); }
.disclosure { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); font-size: var(--text-sm); text-align: start; }
.disclosure p { margin-bottom: var(--space-2xs); }
.legal h1 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
.legal h2 { font-size: var(--text-lg); margin-top: var(--space-xl); }
.legal p, .legal li { line-height: 1.8; }
.contact-list li { margin-bottom: var(--space-2xs); }
.footer-legal li { font-size: var(--text-sm); }
.footer .footer-grid > div:first-child { color: var(--text-muted); }
.footer-legal a { text-decoration: underline; }
.checkout-embed { margin-top: var(--space-lg); }
.checkout-embed #stream-checkout { min-height: 560px; }

/* hero + template gallery */
.hero-split { padding-block: var(--space-3xl) var(--space-2xl); }
.hero-split .hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-2xl); align-items: center; }
@media (max-width: 900px) { .hero-split .hero-inner { grid-template-columns: 1fr; } }
.hero-points { margin-top: var(--space-lg); display: grid; gap: var(--space-2xs); }
.hero-points li { display: flex; gap: var(--space-2xs); align-items: flex-start; }
.hero-points .ic { color: var(--success); flex: 0 0 auto; margin-top: 4px; }
.hero-visual { display: grid; gap: var(--space-md); justify-items: center; }
.tpl-thumb { width: 300px; height: 425px; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow-lg); background: #fff; position: relative; border: 1px solid var(--border); }
.tpl-thumb iframe { width: 794px; height: 1123px; border: 0; transform: scale(0.378); transform-origin: top left; position: absolute; top: 0; left: 0; pointer-events: none; }
.hero-thumb { transform: rotate(-2deg); }
.demo-edit { background: var(--navy); color: var(--on-navy); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); width: min(360px, 90vw); font-size: var(--text-sm); transform: rotate(1deg); }
.demo-label { color: var(--on-navy-muted); font-size: var(--text-xs); }
.demo-score { color: var(--accent); font-weight: var(--weight-bold); font-size: var(--text-lg); }
.demo-score .text-muted { color: var(--on-navy-muted); } /* qa:demo-score — gray-500 on the navy hero was 2.56:1 */
.demo-arrow { margin-block: 4px; color: var(--on-navy-muted); }
.demo-new { color: var(--on-navy); font-weight: var(--weight-bold); }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl) var(--space-lg); margin-top: var(--space-xl); }
@media (max-width: 1000px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tpl-grid { grid-template-columns: 1fr; justify-items: center; } }
.tpl-card { color: inherit; text-decoration: none; display: grid; justify-items: center; gap: var(--space-xs); transition: transform var(--dur-base) var(--ease-out); }
.tpl-card:hover { transform: translateY(-4px); }
.tpl-card:hover .tpl-thumb { box-shadow: var(--shadow-xl); }
.tpl-name { font-weight: var(--weight-bold); margin: 0; }
.tpl-desc { font-size: var(--text-sm); color: var(--on-navy-muted); margin: 0; text-align: center; }

/* pricing */
.limit-badge { background: color-mix(in srgb, var(--warning) 16%, var(--surface)); border: 1px dashed var(--warning); color: var(--text); border-radius: var(--radius-sm); padding: 6px 10px; font-size: var(--text-xs); line-height: 1.6; margin-bottom: var(--space-sm); }
.price-card .badge { margin-inline-start: 4px; }
.price-card.current { outline: 2px solid var(--success); }
.price-card.free-card { border-top: 4px solid var(--warning); }
.pricing-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-table td { font-size: var(--text-sm); }
.pricing-table .yes { color: var(--success); font-weight: var(--weight-bold); }
.pricing-table .no { color: var(--text-muted); }

/* app */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.page-head h1 { font-size: var(--text-2xl); }
.stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-2xs); }
.plan-name { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.actions { display: flex; gap: var(--space-2xs); flex-wrap: wrap; align-items: center; }
.row-form { display: flex; gap: var(--space-2xs); align-items: center; flex-wrap: wrap; }
.row-form.wrap { align-items: end; }
.grow { flex: 1 1 200px; }
.btn-ghost.danger { color: var(--danger); }
.card-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-lg); align-items: center; }
@media (max-width: 760px) { .card-row { grid-template-columns: 1fr; } }
.btn-xs { padding: 4px 7px; font-size: var(--text-xs); }
.dashboard-top { margin-top: var(--space-md); }
.plan-facts { display: grid; gap: var(--space-2xs); margin-block: var(--space-sm); }
.plan-facts li { display: flex; gap: var(--space-2xs); align-items: flex-start; }
.plan-facts .ic { color: var(--success); flex: 0 0 auto; margin-top: 4px; }
.cv-list { display: grid; gap: var(--space-sm); margin-top: var(--space-md); }
.cv-item { display: flex; justify-content: space-between; gap: var(--space-md); align-items: center; flex-wrap: wrap; }
.cv-item-title { font-weight: var(--weight-bold); margin: 0; }
.cv-item-title a { color: var(--text); }

/* builder */
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--space-lg); align-items: start; }
@media (max-width: 1100px) { .builder-grid { grid-template-columns: 1fr; } .builder-preview { order: -1; } }
.builder-form { display: grid; gap: var(--space-md); }
.toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-md); align-items: end; position: sticky; top: calc(var(--nav-height) + 8px); z-index: 5; }
.toolbar-state { display: flex; align-items: center; min-height: 44px; }
.save-state { font-size: var(--text-sm); color: var(--text-muted); }
.save-state.ok { color: var(--success); }
.save-state.err { color: var(--danger); }
.swatches { gap: 8px; }
.swatch { position: relative; display: inline-block; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--sw); border: 3px solid transparent; box-shadow: inset 0 0 0 2px #fff; }
.swatch input:checked + span { border-color: var(--text); }
.swatch input:focus-visible + span { outline: 2px solid var(--ring); }
.cv-sec .sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.cv-sec h2 { font-size: var(--text-lg); }
.row-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); margin: 0 0 var(--space-md); display: grid; gap: var(--space-sm); }
.row-legend { display: flex; align-items: center; gap: var(--space-xs); padding: 0 4px; font-size: var(--text-sm); color: var(--text-muted); width: auto; }
.row-actions { display: inline-flex; gap: 2px; margin-inline-start: auto; }
.row-inline { grid-template-columns: 1fr 160px auto; align-items: center; }
@media (max-width: 600px) { .row-inline, .row-inline-3 { grid-template-columns: 1fr; } }
.row-inline-3 { grid-template-columns: 1fr 1fr 120px auto; align-items: center; }
.field .grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.form-foot { display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; }
.builder-preview { position: sticky; top: calc(var(--nav-height) + 8px); }
@media (max-width: 1100px) { .builder-preview { position: static; } }
.preview-card { padding: var(--space-sm); }
.preview-card iframe { width: 100%; aspect-ratio: 210 / 297; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.ai-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-xs); align-items: start; }
.ai-results:empty { display: none; }
.ai-box { background: color-mix(in srgb, var(--info) 10%, var(--surface)); border: 1px solid var(--info); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-sm); display: grid; gap: var(--space-xs); }
.ai-box.soon { border-color: var(--warning); }
.ai-line { display: grid; grid-template-columns: 1fr auto; gap: var(--space-sm); align-items: center; }
.ai-line p { margin: 0; }

/* ATS */
.ats-head { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xl); align-items: center; }
@media (max-width: 600px) { .ats-head { grid-template-columns: 1fr; justify-items: center; } }
.score-ring { --pct: 0; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--success) calc(var(--pct) * 1%), var(--surface-2) 0); display: grid; place-items: center; position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.score-ring-in { position: relative; text-align: center; }
.score-ring .num { font-size: var(--text-3xl); font-weight: var(--weight-black); }
.score-ring small { color: var(--text-muted); }
.ats-list { list-style: none; padding: 0; display: grid; gap: var(--space-sm); }
.ats-item { display: grid; grid-template-columns: 28px 1fr; gap: var(--space-sm); align-items: start; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); }
.ats-item.pass { border-color: var(--success); }
.ats-item.fail { border-color: var(--warning); }
.ats-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.ats-item.pass .ats-mark { background: var(--success); color: #fff; }
.ats-item.fail .ats-mark { background: var(--warning); color: #fff; }
.ats-tip { color: var(--text-muted); margin-top: 2px; }
.ats-item p { margin: 0; }

/* ---- platform upgrade: API keys / docs / agents / sitemap / cover letter ---- */
.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.code-block { position: relative; display: flex; flex-direction: column; /* qa:code-block-flow */ margin: var(--space-sm) 0 var(--space-md); }
.code-block pre { direction: ltr; text-align: left; font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--text-xs); line-height: 1.6; background: var(--surface-2, #f3f4f6); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }
.code-block .btn { position: static; align-self: flex-start; margin: 0 0 var(--space-2xs); } /* qa:copy-btn-flow — the overlay used to cover the first line of the command */
.key-reveal { border: 2px solid var(--success); border-radius: var(--radius-lg); padding: var(--space-lg); background: var(--success-bg); margin-block: var(--space-md); }
.key-reveal .key-value { direction: ltr; text-align: left; font-family: var(--font-num, ui-monospace), ui-monospace, monospace; font-size: var(--text-sm); word-break: break-all; display: block; padding: var(--space-sm); background: var(--surface); border-radius: var(--radius-sm); border: 1px dashed var(--border); margin-block: var(--space-sm); }
.method { display: inline-block; font-family: var(--font-num, monospace), monospace; font-size: var(--text-xs); font-weight: var(--weight-bold); padding: 2px 8px; border-radius: var(--radius-pill); direction: ltr; min-width: 56px; text-align: center; }
.method-get { background: var(--info-bg); color: var(--info); }
.method-post { background: var(--success-bg); color: var(--success); }
.method-patch, .method-put { background: var(--warning-bg); color: #8a5a0b; } /* qa:method-contrast */
[data-theme="dark"] .method-patch, [data-theme="dark"] .method-put { color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .method-patch, :root:not([data-theme="light"]) .method-put { color: #fcd34d; } }
.method-delete { background: var(--danger-bg); color: #b91c1c; } /* qa:method-contrast */ [data-theme="dark"] .method-delete { color: #fca5a5; }
.scope { display: inline-block; font-size: var(--text-xs); padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-muted); direction: ltr; font-family: var(--font-num, monospace), monospace; }
.endpoint { padding: var(--space-md) 0; border-bottom: 1px solid var(--border); }
.endpoint:last-child { border-bottom: 0; }
.endpoint-head { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-2xs); }
.endpoint-path { direction: ltr; font-family: var(--font-num, monospace), monospace; font-size: var(--text-sm); }
.compare-table td, .compare-table th { vertical-align: top; }
.compare-table tr:first-child td { font-weight: var(--weight-bold); background: var(--success-bg); }
.agents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
@media (max-width: 900px) { .agents-grid { grid-template-columns: 1fr; } }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md) var(--space-lg); }
.stat-card strong { font-size: var(--text-xl); }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.key-row:last-child { border-bottom: 0; }
.key-prefix { direction: ltr; font-family: var(--font-num, monospace), monospace; }
.letter-list { display: grid; gap: var(--space-sm); margin-top: var(--space-sm); }
.letter-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-sm) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.letter-item:last-child { border-bottom: 0; }
.letter-item-main p { margin: 0; }

/* qa:nav-toggle — Mobile navigation (hamburger) — the desktop .nav-links is hidden ≤760px */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-md, 10px); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-toggle .ic { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .nav-inner { position: relative; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .nav-links { display: none; }
  .nav.nav-open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-sm); position: absolute; top: 100%; inset-inline: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--space-md); z-index: 50; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.08)); max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.nav-open .nav-links li { width: 100%; }
  .nav.nav-open .nav-links a, .nav.nav-open .nav-links .btn { display: block; width: 100%; text-align: start; padding: var(--space-sm) var(--space-md); }
  .nav.nav-open .nav-links form { width: 100%; }
}
