/* Trusted Marketing Client Portal
   Components built on tm-tokens.css (the TM design system). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar { background: var(--tm-deep-charcoal); color: #fff; border-bottom: 1px solid var(--tm-charcoal-700); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark { width: 22px; height: 22px; background: var(--tm-performance-green); flex: none; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap; }
.brand-sub { white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tm-stone-400); }
@media (max-width: 520px) { .brand-sub { display: none; } }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button.linklike {
  color: var(--tm-stone-400); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 10px; border-radius: var(--radius-md); background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.linklike:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; }
.nav .who { font-size: 13px; color: var(--fg3); padding: 0 6px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .nav .who, .nav .hide-sm { display: none; } }
@media (max-width: 440px) { .brand-name { display: none; } .nav { gap: 0; flex-wrap: nowrap; } .nav a, .nav button.linklike { padding: 8px 8px; font-size: 13px; } }

/* ── Hero ────────────────────────────────────────────────── */
.hero { background: var(--tm-deep-charcoal); color: #fff; padding: 56px 0 48px; }
.hero .eyebrow { color: var(--tm-stone-400); }
.hero h1 {
  font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: 1.04;
  letter-spacing: -0.01em; margin: 14px 0 0; color: #fff;
}
.hero h1 em { font-style: italic; color: var(--tm-performance-green); }
.hero p.lede { margin: 18px 0 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--tm-stone-400); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { font-size: 13px; font-weight: 500; padding: 7px 13px; border: 1px solid var(--tm-charcoal-700); border-radius: var(--radius-pill); color: var(--tm-stone-400); }
@media (max-width: 640px) { .hero { padding: 40px 0 36px; } .hero h1 { font-size: 40px; } }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.2;
  border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.btn-primary { background: var(--tm-performance-green); color: var(--tm-deep-charcoal); }
.btn-primary:hover { background: var(--tm-green-deep); }
.tm-dark .btn-primary:hover, .hero .btn-primary:hover { background: var(--tm-performance-green); opacity: .92; }
.btn-secondary { background: #fff; color: var(--fg1); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--tm-deep-charcoal); }
.btn-ghost { background: transparent; color: var(--fg2); padding-left: 12px; padding-right: 12px; }
.btn-ghost:hover { color: var(--fg1); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Cards ───────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg2); }
.card .card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; }
.card .arrow { color: var(--fg1); }
.card-feature { background: var(--tm-stone-100); }
.icon-box { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--tm-deep-charcoal); color: var(--tm-performance-green); display: flex; align-items: center; justify-content: center; }
.icon-box svg { width: 20px; height: 20px; }

/* ── Status badges ───────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--tm-stone-100); color: var(--fg2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-done { background: var(--tm-green-soft); color: #2d4a00; }
.badge-progress { background: #FFF4D6; color: #6b5000; }
.badge-new { background: var(--tm-stone-100); color: var(--fg3); }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 26px; }
.section-head p { margin: 0; color: var(--fg2); max-width: 640px; }

/* ── Forms ───────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 15px; font-weight: 600; color: var(--fg1); }
.field-hint { font-size: 13px; line-height: 1.5; color: var(--fg3); }
input[type=text], input[type=email], input:not([type]), textarea, select {
  width: 100%; padding: 12px 14px; font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  color: var(--fg1); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--tm-deep-charcoal); box-shadow: 0 0 0 3px rgba(199,255,106,.7); }
input::placeholder, textarea::placeholder { color: #A3A79E; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--tm-green-deep); margin: 2px 0 0; flex: none; }

.notice { border: 1px solid var(--border); background: var(--tm-stone-100); border-radius: var(--radius-lg); padding: 16px 18px; font-size: 14px; line-height: 1.55; color: var(--fg2); }
.notice strong { color: var(--fg1); }
.notice-warn { background: #FFF8E6; border-color: #F0DFA8; }
.notice-dark { background: var(--tm-charcoal-800); border-color: var(--tm-charcoal-700); color: var(--tm-stone-400); }

/* ── Auth card ───────────────────────────────────────────── */
.auth-shell { padding: 64px 0; }
.auth-card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.05; margin: 0; }
.auth-card h1 em { font-style: italic; }
.auth-card p { margin: 0; color: var(--fg2); }
@media (max-width: 520px) { .auth-card { padding: 24px 20px; } .auth-shell { padding: 32px 0; } }

/* ── Access guides ───────────────────────────────────────── */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jump a { font-size: 13px; font-weight: 600; text-decoration: none; color: #fff; padding: 7px 13px; border: 1px solid var(--tm-charcoal-700); border-radius: var(--radius-pill); }
.jump a:hover { border-color: var(--tm-performance-green); }

.group { padding-top: 48px; scroll-margin-top: 16px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.group-head h2 { margin: 0; font-size: 26px; }
.group-head .eyebrow { margin-bottom: 6px; display: block; }

.guide { border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; margin-bottom: 12px; scroll-margin-top: 16px; }
.guide[open] { border-color: var(--border-strong); }
.guide > summary {
  list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; gap: 14px;
}
.guide > summary::-webkit-details-marker { display: none; }
.guide-title { flex: 1; min-width: 0; }
.guide-title strong { display: block; font-size: 17px; }
.guide-title span { display: block; font-size: 14px; color: var(--fg3); margin-top: 2px; }
.chev { width: 20px; height: 20px; flex: none; color: var(--fg3); transition: transform var(--t-base) var(--ease-out); }
.guide[open] .chev { transform: rotate(180deg); }
.guide-body { padding: 0 22px 24px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--border); padding-top: 20px; }
.guide-body ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.guide-body ol li { counter-increment: step; position: relative; padding-left: 38px; font-size: 15px; line-height: 1.6; }
.guide-body ol li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  background: var(--tm-performance-green); color: var(--tm-deep-charcoal); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.path { font-weight: 600; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--tm-stone-100); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.copy-row .k { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); }
.copy-row code { background: none; padding: 0; font-size: 15px; color: var(--fg1); word-break: break-all; }
.copy-row .btn { margin-left: auto; }
.guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.done-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.guide-extra { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ── Worksheet ───────────────────────────────────────────── */
.progressbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border); }
.progressbar .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.bar { flex: 1; min-width: 60px; height: 6px; background: var(--tm-stone-100); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--tm-performance-green); transition: width var(--t-base) var(--ease-out); }
.progress-count { font-size: 13px; font-weight: 600; color: var(--fg2); white-space: nowrap; }
.save-state { font-size: 12px; color: var(--fg3); white-space: nowrap; min-width: 88px; text-align: right; }
.save-state.err { color: var(--danger); }
@media (max-width: 520px) { .save-state { min-width: 0; } }

.ws { display: flex; flex-direction: column; gap: 56px; padding: 48px 0 24px; }
.ws-section { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--border); padding-top: 40px; scroll-margin-top: 64px; }
.ws-section:first-child { border-top: 0; padding-top: 0; }
.ws-head { display: flex; gap: 16px; align-items: flex-start; }
.ws-num { flex: none; width: 34px; height: 34px; background: var(--tm-performance-green); color: var(--tm-deep-charcoal); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.ws-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.01em; }
.ws-head h2 em { font-family: var(--font-display); font-weight: 400; font-style: italic; font-size: 1.2em; }
.ws-head p { margin: 8px 0 0; color: var(--fg2); line-height: 1.6; }
.ws-fields { display: flex; flex-direction: column; gap: 24px; }
.ws-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ws-panel { background: var(--tm-stone-100); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ws-panel .eyebrow { display: block; }
.ws-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 16px; }
.ws-inline input { flex: 1 1 200px; min-width: 0; width: auto; }
.ws-panel p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--fg2); }
.ws-summary { background: var(--tm-deep-charcoal); color: #fff; border-radius: var(--radius-lg); padding: 32px; }
.ws-summary .ws-head h2 { color: #fff; }
.ws-summary .ws-head h2 em { color: var(--tm-performance-green); }
.ws-summary .ws-head p, .ws-summary .field-hint { color: var(--tm-stone-400); }
.ws-summary .field-label { color: #fff; }
.ws-summary textarea { background: var(--tm-charcoal-800); border-color: var(--tm-charcoal-700); color: #fff; }
.ws-summary textarea:focus { border-color: var(--tm-performance-green); }
@media (max-width: 640px) { .ws-summary { padding: 22px 16px; margin: 0 -4px; } .ws-head h2 { font-size: 22px; } }
.checks { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 15px; line-height: 1.5; cursor: pointer; background: #fff; }
.check:has(input:checked) { border-color: var(--tm-green-deep); background: #FBFFF4; }
.submitted-banner { display: flex; gap: 12px; align-items: center; }

.credit { font-size: 13px; line-height: 1.6; color: var(--fg3); margin: 0; }

/* ── Admin ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--tm-stone-100); }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: #FBFBF9; }
.muted { color: var(--fg3); }
.mini-bar { width: 80px; height: 4px; background: var(--tm-stone-100); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--tm-green-deep); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input { max-width: 320px; }
.answers { display: flex; flex-direction: column; gap: 28px; }
.answers h3 { margin: 0 0 10px; font-size: 18px; }
.answer { padding: 12px 0; border-bottom: 1px solid var(--border); }
.answer:last-child { border-bottom: 0; }
.answer .q { font-size: 13px; font-weight: 600; color: var(--fg3); margin-bottom: 4px; }
.answer .a { white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.answer .a.empty { color: #B0B3AA; }

/* ── Footer + toast ──────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 48px; font-size: 13px; color: var(--fg3); }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--fg2); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--tm-deep-charcoal); color: #fff; font-size: 14px; font-weight: 500; padding: 12px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); transition: all var(--t-base) var(--ease-out); pointer-events: none; z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.demo-banner { background: var(--tm-performance-green); color: var(--tm-deep-charcoal); font-size: 13px; font-weight: 600; text-align: center; padding: 8px 16px; }

.loading { padding: 80px 0; text-align: center; color: var(--fg3); }

@media print {
  .no-print, .topbar, .progressbar, .footer, .demo-banner, .toast { display: none !important; }
  .hero { background: #fff !important; color: #000 !important; padding: 0 0 16px; }
  .hero h1, .hero p.lede { color: #000 !important; }
  .ws-summary { background: #fff !important; color: #000 !important; border: 1px solid #ccc; }
  .ws-summary * { color: #000 !important; }
  .ws-summary textarea { background: #fff !important; }
  textarea, input { border-color: #C9CCC1 !important; box-shadow: none !important; }
  .ws-section { break-inside: avoid-page; }
}

/* ── Brand profile ───────────────────────────────────────── */
.pf { display: flex; flex-direction: column; gap: 0; }
.pf-section { padding: 36px 0; border-top: 1px solid var(--border); scroll-margin-top: 16px; display: flex; flex-direction: column; gap: 22px; }
.pf-section:first-child { border-top: 0; padding-top: 8px; }
.pf-h { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; }
.pf-field { display: flex; flex-direction: column; gap: 8px; }
.pf-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); }
.pf-text { margin: 0; font-size: 17px; font-weight: 500; }
.pf-para { margin: 0; font-size: 16px; line-height: 1.65; max-width: 720px; white-space: pre-wrap; }
.pf-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; }
.pf-list li::marker { color: var(--tm-green-deep); }
.pf-swatches { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pf-swatch { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.pf-chip { width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1px solid rgba(0,0,0,.08); flex: none; }
.pf-swatch strong { display: block; font-size: 14px; }
.pf-hex { font-family: var(--font-mono); font-size: 13px; background: none; border: 0; padding: 0; color: var(--fg2); cursor: pointer; }
.pf-hex:hover { color: var(--fg1); text-decoration: underline; }
.pf-use { display: block; font-size: 12px; color: var(--fg3); margin-top: 2px; line-height: 1.4; }
.pf-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.pf-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg3); padding: 10px 14px; background: var(--tm-stone-100); border-bottom: 1px solid var(--border); }
.pf-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pf-table tr:last-child td { border-bottom: 0; }
.pf-table td:first-child { font-weight: 600; min-width: 120px; }
@media (max-width: 640px) { .pf-h { font-size: 28px; } .pf-table { font-size: 13px; } .pf-table td, .pf-table th { padding: 10px; } }
.jump-light { display: flex; flex-wrap: wrap; gap: 8px; }
.jump-light a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--fg1); padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: #fff; }
.jump-light a:hover { border-color: var(--tm-deep-charcoal); }

/* ── Files ───────────────────────────────────────────────── */
.files-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.file-col { border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.file-col h3 { margin: 0; font-size: 16px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.file-item:first-child { border-top: 0; }
.file-ico { width: 34px; height: 34px; flex: none; border-radius: var(--radius-sm); background: var(--tm-stone-100); color: var(--fg2); font-size: 10px; font-weight: 700; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; text-transform: uppercase; }
.file-meta { flex: 1; min-width: 0; }
.file-name { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; padding: 0; color: var(--fg1); cursor: pointer; text-align: left; max-width: 100%; font-family: inherit; }
.file-name:hover { text-decoration: underline; text-decoration-color: var(--tm-green-deep); }
.file-sub { font-size: 12px; color: var(--fg3); }
.file-actions { display: flex; gap: 2px; flex: none; }
.icon-btn { background: none; border: 0; border-radius: var(--radius-sm); padding: 6px; color: var(--fg3); cursor: pointer; display: inline-flex; }
.icon-btn:hover { color: var(--fg1); background: var(--tm-stone-100); }
.icon-btn svg { width: 16px; height: 16px; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); padding: 20px; text-align: center; font-size: 14px; color: var(--fg2); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.dropzone:hover, .dropzone.over { border-color: var(--tm-deep-charcoal); background: #FBFFF4; }
.dropzone strong { color: var(--fg1); }
.empty { font-size: 14px; color: var(--fg3); padding: 6px 0; }

/* ── Admin tabs + editor ─────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 -28px; padding: 0 28px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--fg3); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--fg1); border-bottom-color: var(--tm-deep-charcoal); }
.pf-editor { display: flex; flex-direction: column; gap: 28px; }
.pf-editor fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.pf-editor legend { font-family: var(--font-display); font-size: 26px; margin-bottom: 4px; padding: 0; }
.pf-editor textarea { min-height: 72px; font-size: 14px; }
.pf-editor textarea.mono { font-family: var(--font-mono); font-size: 13px; line-height: 1.55; }
.sticky-save { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 12px 0; margin: 0 -28px -28px; padding-left: 28px; padding-right: 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; margin-bottom: 16px; }
.inline-form input { flex: 1 1 200px; width: auto; }
@media (max-width: 640px) { .tabs, .sticky-save { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; } }
@media print { .tabs, .sticky-save, .dropzone, .file-actions { display: none !important; } }
@media (max-width: 640px) { .card { padding: 20px; } }
