/* v1port.css — design system for the v1+v2 merged builder.
 *
 * Loads after app.css, scoped to body.v1port. Tokens mirror landing-signed-out.css
 * so the editor and dashboard feel like the same product as the marketing site.
 *
 * Specificity strategy: every selector starts with `body.v1port` (0,1,1) so it
 * cleanly beats unscoped app.css selectors without needing !important. The
 * !important war from earlier passes was fighting the cache, not the cascade.
 */

/* ============================================================================
   1. Tokens
   ============================================================================ */
body.v1port {
  --accent:        #0c4a6e;
  --accent-dark:   #083956;
  --accent-light:  #dbeafe;
  --accent-soft:   #eff6ff;
  --accent-glow:   rgba(12, 74, 110, 0.10);

  --bg:            #f5f7fb;
  --bg-soft:       #f0f3f9;
  --surface:       #ffffff;
  --surface-soft:  #f8fafc;
  --surface-warm:  #fcfaf7;     /* alternate card tone for visual hierarchy */
  --text:          #0f172a;
  --text-soft:     #1e293b;
  --muted:         #475569;
  --muted-soft:    #94a3b8;
  --muted-faint:   #cbd5e1;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --border-soft:   #eef0f4;
  --danger:        #b91c1c;
  --danger-soft:   #fca5a5;
  --danger-bg:     #fef2f2;
  --ok:            #15803d;
  --ok-soft:       #86efac;
  --ok-bg:         #f0fdf4;
  --warn:          #b45309;
  --warn-bg:       #fffbeb;
  --ai:            #6d28d9;
  --ai-soft:       #ede9fe;
  --ai-tint:       #faf7ff;
  --ai-page-bg:    linear-gradient(180deg, #f3f0ff 0%, #faf7ff 60%, #f5f7fb 100%);

  --radius-xs:     6px;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-pill:   999px;

  --shadow-xs:     0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:     0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:        0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg:     0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-glow:   0 8px 24px var(--accent-glow);
  --shadow-focus:  0 0 0 3px var(--accent-light);

  --font:          ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:     ui-monospace, SFMono-Regular, Menlo, monospace;
  --weight-display: 900;        /* one display tier — used on top h1 of each page */
  --tracking-display: -0.03em;
  --tracking-h2: -0.025em;

  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body.v1port * { box-sizing: border-box; }
body.v1port main { max-width: 1280px; padding: 0 24px; }

/* ============================================================================
   2. Topbar
   ============================================================================ */
body.v1port .topbar { padding: 14px 32px; border-bottom: 1px solid var(--border); background: var(--surface); }
body.v1port .topbar .brand { font-weight: 800; color: var(--text); font-size: 1rem; letter-spacing: -0.02em; }
body.v1port .topbar nav { gap: 4px; }
body.v1port .topbar nav a { color: var(--muted); font-size: 0.88rem; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-xs); transition: color 0.15s, background 0.15s; }
body.v1port .topbar nav a:hover { color: var(--text); background: var(--surface-soft); }
body.v1port .topbar form.inline { display: inline-flex; }
body.v1port .topbar form.inline button { background: transparent; color: var(--muted); padding: 6px 12px; border: none; border-radius: var(--radius-xs); font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: color 0.15s, background 0.15s; height: auto; }
body.v1port .topbar form.inline button:hover { color: var(--text); background: var(--surface-soft); }

/* ============================================================================
   3. Type — display tier is the single biggest "feels designed" lever.
   ============================================================================ */
body.v1port h1, body.v1port h2, body.v1port h3, body.v1port h4 { color: var(--text); line-height: 1.2; margin: 0 0 0.5em; }
body.v1port h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
body.v1port h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: var(--tracking-h2); }
body.v1port h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.015em; }

/* Display tier — applied to the topmost h1 of each major page (dashboard,
   /sites/new, editor toolbar). Pairs with `clamp()` so it scales naturally on
   small screens without media queries. */
body.v1port .h-display {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  margin: 0 0 12px;
}

body.v1port .lede { color: var(--muted); margin-top: 0; line-height: 1.55; }
body.v1port .pane-lede { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.95rem; line-height: 1.55; }
body.v1port .pane-subhead { margin: 28px 0 12px; font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
body.v1port .pane-subhead:first-of-type { margin-top: 8px; }
body.v1port .muted { color: var(--muted); }
body.v1port code { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface-soft); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }

body.v1port a:not(.btn):not(.brand):not(.tpl-card a):not(.site-row-host):not(.ddv-footer-btn-primary) { color: var(--accent); }
body.v1port a:not(.btn):not(.brand):not(.tpl-card a):not(.site-row-host):not(.ddv-footer-btn-primary):hover { color: var(--accent-dark); }

/* ============================================================================
   4. Buttons — single source of truth for every button on v1port pages.
   ============================================================================ */
body.v1port .btn,
body.v1port a.btn,
body.v1port button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; height: 36px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
  line-height: 1; white-space: nowrap; vertical-align: middle;
}
body.v1port .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: var(--shadow-sm); }
body.v1port .btn:active { transform: translateY(1px); box-shadow: none; }
body.v1port .btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
body.v1port .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

body.v1port .btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
body.v1port .btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

body.v1port .btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
body.v1port .btn.ghost:hover { background: var(--surface-soft); border-color: var(--accent); color: var(--accent); }

body.v1port .btn.danger { background: var(--surface); color: var(--danger); border-color: var(--danger-soft); }
body.v1port .btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); }

body.v1port .btn.btn-sm { height: 30px; padding: 0 12px; font-size: 0.82rem; }
body.v1port .btn.btn-lg { height: 44px; padding: 0 24px; font-size: 1rem; }

/* ============================================================================
   5. Form fields
   ============================================================================ */
body.v1port input[type=text],
body.v1port input[type=email],
body.v1port input[type=tel],
body.v1port input[type=url],
body.v1port input[type=search],
body.v1port input[type=number],
body.v1port input[type=password],
body.v1port textarea,
body.v1port select {
  width: 100%; padding: 9px 12px;
  font: inherit; font-size: 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
body.v1port input[type=text]:hover,
body.v1port input[type=email]:hover,
body.v1port input[type=tel]:hover,
body.v1port input[type=url]:hover,
body.v1port textarea:hover,
body.v1port select:hover { border-color: var(--muted-soft); }
body.v1port input[type=text]:focus,
body.v1port input[type=email]:focus,
body.v1port input[type=tel]:focus,
body.v1port input[type=url]:focus,
body.v1port input[type=search]:focus,
body.v1port input[type=number]:focus,
body.v1port input[type=password]:focus,
body.v1port textarea:focus,
body.v1port select:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
body.v1port textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

body.v1port input[type=color] {
  -webkit-appearance: none; appearance: none;
  width: 64px; height: 38px; padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
body.v1port input[type=color]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 4px; }
body.v1port input[type=color]::-webkit-color-swatch { border: none; border-radius: 4px; }

body.v1port input[type=checkbox],
body.v1port input[type=radio] { accent-color: var(--accent); }

body.v1port .toggle-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
body.v1port .toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; margin-left: 12px; }
body.v1port .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
body.v1port .toggle-track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 11px; transition: background 0.2s; cursor: pointer; }
body.v1port .toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
body.v1port .toggle-switch input:checked + .toggle-track { background: var(--accent); }
body.v1port .toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }
body.v1port .toggle-switch input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }

body.v1port .field-label,
body.v1port label.field-label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 0.92rem; color: var(--text); }
body.v1port .field-help { color: var(--muted); font-size: 0.82rem; margin: 4px 0 14px; line-height: 1.45; }

body.v1port .req-mark { color: var(--danger); margin-left: 2px; }
body.v1port .char-counter { font-size: 0.74rem; color: var(--muted-soft); display: block; text-align: right; margin-top: 4px; }
body.v1port .char-counter.over { color: var(--danger); font-weight: 600; }

/* ============================================================================
   6. Cards — varied tones for hierarchy. Don't paint everything white-on-grey.
   ============================================================================ */
body.v1port .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-xs); }
body.v1port .form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }

/* ============================================================================
   7. Auth pages
   ============================================================================ */
body.v1port main:has(.auth) { display: flex; align-items: flex-start; justify-content: center; padding-top: 56px; }
body.v1port .auth { max-width: 420px; width: 100%; padding: 36px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
body.v1port .auth h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
body.v1port .auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
body.v1port .auth-form > .field-label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
body.v1port .auth-form > .field-label > input { width: 100%; }
body.v1port .auth-form .btn { align-self: flex-start; padding: 0 22px; height: 40px; }
body.v1port .auth-meta { margin: 18px 0 0; color: var(--muted); font-size: 0.88rem; }

/* ============================================================================
   8. Dashboard — metric tile strip + site list
   ============================================================================ */
body.v1port main:has(.home-dash) { max-width: 1100px; padding-bottom: 0; }
body.v1port .home-dash { padding: 40px 0 64px; }

body.v1port .home-dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 32px;
}
body.v1port .home-dash-head .home-dash-title { flex: 1; min-width: 280px; }
body.v1port .home-dash-head .home-dash-title h1 { margin: 0 0 6px; }
body.v1port .home-dash-head .home-dash-title .lede { margin: 0; font-size: 0.95rem; }
body.v1port .home-dash-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Metric tiles — replaces the prose lede line */
body.v1port .metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 28px;
}
body.v1port .metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
body.v1port .metric-label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
body.v1port .metric-value { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; line-height: 1; }
body.v1port .metric-value .metric-of { color: var(--muted-soft); font-weight: 600; font-size: 1rem; }
body.v1port .metric-meta { font-size: 0.78rem; color: var(--muted); }
body.v1port .metric-meta a { color: var(--accent); font-weight: 600; }
body.v1port .metric-cta { background: var(--accent); color: #fff; border-color: var(--accent); }
body.v1port .metric-cta .metric-label { color: rgba(255,255,255,0.78); }
body.v1port .metric-cta .metric-value { color: #fff; }
body.v1port .metric-cta .metric-meta { color: rgba(255,255,255,0.85); }
body.v1port .metric-cta .metric-meta a { color: #fff; text-decoration: underline; }
@media (max-width: 720px) { body.v1port .metric-strip { grid-template-columns: 1fr; } }

/* Site list */
body.v1port .site-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
body.v1port .site-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.06s;
}
body.v1port .site-row:hover { border-color: var(--accent-light); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
body.v1port .site-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
body.v1port .site-row-host { font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--text); text-decoration: none; word-break: break-all; letter-spacing: -0.01em; }
body.v1port .site-row-host:hover { color: var(--accent); }
body.v1port .site-row-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
body.v1port .site-row-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 160px; flex-shrink: 0; justify-content: flex-end; }
body.v1port .site-row-stats {
  display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}
body.v1port .stat-block {
  text-align: center; padding: 8px 12px;
  background: var(--surface-soft); border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs); min-width: 64px;
}
body.v1port .stat-value {
  display: block; font-size: 1.05rem; font-weight: 700; color: var(--text);
  line-height: 1.2;
}
body.v1port .stat-label {
  display: block; font-size: 0.68rem; color: var(--muted-soft); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px;
}
@media (max-width: 720px) {
  body.v1port .site-row-stats { order: 3; width: 100%; justify-content: flex-start; }
  body.v1port .stat-block { flex-direction: row; display: flex; align-items: baseline; gap: 5px; padding: 5px 10px; min-width: auto; }
  body.v1port .stat-value { font-size: 0.9rem; }
  body.v1port .stat-label { font-size: 0.65rem; margin-top: 0; }
}

/* Analytics subtab */
body.v1port .analytics-cards {
  display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 24px;
}
body.v1port .analytics-card {
  flex: 1 1 120px; min-width: 100px; max-width: 200px;
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
body.v1port .analytics-card-value {
  font-size: 1.6rem; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.1;
}
body.v1port .analytics-card-label {
  font-size: 0.8rem; color: var(--muted); font-weight: 500;
}
body.v1port .analytics-chart-wrap { margin-top: 8px; }
body.v1port .analytics-chart-wrap h4 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-soft); margin: 0 0 10px;
}
body.v1port #analytics-chart { width: 100%; height: 160px; display: block; }

/* Domain subtab */
body.v1port .domain-upgrade-notice {
  padding: 16px 20px; background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--muted);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
body.v1port .domain-status-card {
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 12px 0 0;
}
body.v1port .domain-status-row {
  display: flex; align-items: center; gap: 8px; font-size: 0.92rem;
}
body.v1port .domain-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
body.v1port .domain-status-dot--ok      { background: var(--ok); }
body.v1port .domain-status-dot--pending  { background: #f59e0b; }
body.v1port .domain-status-dot--err     { background: var(--danger); }
body.v1port .domain-status-label {
  font-size: 0.78rem; font-weight: 500;
}
body.v1port .domain-dns-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 12px 16px; margin: 12px 0 0;
  font-size: 0.84rem;
}
body.v1port .domain-dns-title { font-weight: 600; margin-bottom: 6px; }
body.v1port .domain-dns-steps {
  margin: 0; padding-left: 18px; line-height: 1.7;
}
body.v1port .domain-dns-box code {
  font-size: 0.8rem; color: var(--text-soft); background: var(--bg-soft);
  padding: 1px 5px; border-radius: 3px;
}
body.v1port .domain-input-row {
  display: flex; gap: 8px; margin-top: 12px;
}
body.v1port .domain-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 8px 12px; font: inherit; font-size: 0.9rem;
}
body.v1port .domain-input-row input:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus);
}
body.v1port .domain-action-status {
  margin-top: 10px; font-size: 0.85rem; min-height: 1.2em;
}
body.v1port .domain-action-status.ok  { color: var(--ok); }
body.v1port .domain-action-status.err { color: var(--danger); }
body.v1port .domain-divider {
  border: none; border-top: 1px solid var(--border); margin: 24px 0;
}
body.v1port .domain-contact-wrap {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
}
body.v1port .domain-contact-wrap .ok  { color: var(--ok); font-size: 0.85rem; }
body.v1port .domain-contact-wrap .err { color: var(--danger); font-size: 0.85rem; }

body.v1port .pill { display: inline-flex; align-items: center; padding: 2px 9px; font-size: 0.7rem; font-weight: 700; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid transparent; }
body.v1port .pill-ok    { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-soft); }
body.v1port .pill-draft { background: var(--surface-soft); color: var(--muted); border-color: var(--border-strong); }
body.v1port .pill-info  { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-light); }
body.v1port .pill-warn  { background: var(--warn-bg);   color: var(--warn);   border-color: #fbbf24; }

body.v1port .home-dash-foot { margin-top: 24px; text-align: center; color: var(--muted); font-size: 0.92rem; }
body.v1port .home-dash-foot strong { color: var(--text); }

/* Inline create section on dashboard */
body.v1port .dash-create { margin: 48px 0 0; }
body.v1port .dash-create > .h-display { margin: 0 0 6px; }
body.v1port .dash-create > .lede { margin: 0 0 24px; }

/* Empty state */
body.v1port .home-empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-xl); padding: 56px 28px; text-align: center; }
body.v1port .home-empty h2 { font-size: 1.4rem; margin-bottom: 6px; letter-spacing: -0.02em; }
body.v1port .home-empty .muted { max-width: 480px; margin: 0 auto 28px; }

/* ============================================================================
   9. Template thumbnails — proper browser-chrome mockups (mirrors landing's pattern)
   ============================================================================ */
body.v1port .tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
body.v1port .tpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.06s;
  display: flex; flex-direction: column;
}
body.v1port .tpl-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow); transform: translateY(-2px); }
body.v1port .tpl-thumb {
  width: 100%; height: 160px; display: flex; flex-direction: column;
  border-bottom: 1px solid var(--border);
}
body.v1port .tpl-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
body.v1port .tpl-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
body.v1port .tpl-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; flex: 1; }
body.v1port .tpl-card .btn { margin-top: 8px; align-self: flex-start; }

/* Browser chrome shared across mockups */
body.v1port .browser-chrome { background: #e8edf5; padding: 8px 14px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #d1d9e6; flex-shrink: 0; }
body.v1port .browser-dot { width: 9px; height: 9px; border-radius: 50%; }
body.v1port .browser-dot--red { background: #ff5f56; }
body.v1port .browser-dot--yellow { background: #ffbd2e; }
body.v1port .browser-dot--green { background: #27c93f; }
body.v1port .browser-url { margin-left: 8px; font-size: 0.66rem; color: #64748b; background: #fff; border: 1px solid #d1d9e6; border-radius: 4px; padding: 2px 9px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); }

/* Per-template mockup palettes */
body.v1port .mockup { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
body.v1port .mockup .mock-nav { display: flex; justify-content: space-between; align-items: center; }
body.v1port .mockup .mock-logo { font-size: 0.62rem; font-weight: 800; }
body.v1port .mockup .mock-btn { font-size: 0.55rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; color: #fff; }
body.v1port .mockup .mock-h1 { font-size: 0.78rem; font-weight: 900; line-height: 1.2; letter-spacing: -0.02em; }
body.v1port .mockup .mock-sub { font-size: 0.6rem; color: #6b7280; line-height: 1.35; }
body.v1port .mockup .mock-ctas { display: flex; gap: 5px; margin-top: 2px; }
body.v1port .mockup .mock-cta-p { font-size: 0.55rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; color: #fff; }
body.v1port .mockup .mock-cta-o { font-size: 0.55rem; font-weight: 600; border: 1px solid #e2e8f0; color: #374151; padding: 2px 8px; border-radius: 4px; background: #fff; }

body.v1port .mockup--agency             { background: linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%); }
body.v1port .mockup--agency .mock-logo,
body.v1port .mockup--agency .mock-h1    { color: #0f172a; }
body.v1port .mockup--agency .mock-btn,
body.v1port .mockup--agency .mock-cta-p { background: #0f172a; }

body.v1port .mockup--consultant         { background: linear-gradient(135deg,#f0f9ff 0%,#dbeafe 100%); }
body.v1port .mockup--consultant .mock-logo,
body.v1port .mockup--consultant .mock-h1    { color: #1e3a8a; }
body.v1port .mockup--consultant .mock-btn,
body.v1port .mockup--consultant .mock-cta-p { background: #1e3a8a; }

body.v1port .mockup--event              { background: linear-gradient(135deg,#fdf2f8 0%,#fbcfe8 100%); }
body.v1port .mockup--event .mock-logo,
body.v1port .mockup--event .mock-h1     { color: #9d174d; }
body.v1port .mockup--event .mock-btn,
body.v1port .mockup--event .mock-cta-p  { background: #be185d; }

body.v1port .mockup--landing-saas       { background: linear-gradient(135deg,#ecfeff 0%,#a5f3fc 100%); }
body.v1port .mockup--landing-saas .mock-logo,
body.v1port .mockup--landing-saas .mock-h1    { color: #0e7490; }
body.v1port .mockup--landing-saas .mock-btn,
body.v1port .mockup--landing-saas .mock-cta-p { background: #0891b2; }

body.v1port .mockup--link-bio           { background: linear-gradient(135deg,#fef3c7 0%,#fde68a 100%); }
body.v1port .mockup--link-bio .mock-logo,
body.v1port .mockup--link-bio .mock-h1    { color: #92400e; }
body.v1port .mockup--link-bio .mock-btn,
body.v1port .mockup--link-bio .mock-cta-p { background: #b45309; }

body.v1port .mockup--personal-portfolio { background: linear-gradient(135deg,#f5f3ff 0%,#ddd6fe 100%); }
body.v1port .mockup--personal-portfolio .mock-logo,
body.v1port .mockup--personal-portfolio .mock-h1    { color: #4c1d95; }
body.v1port .mockup--personal-portfolio .mock-btn,
body.v1port .mockup--personal-portfolio .mock-cta-p { background: #6d28d9; }

/* ============================================================================
   10. /sites/new — creation form
   ============================================================================ */
body.v1port .builder-onboarding { max-width: 920px; margin: 40px auto 80px; padding: 0 16px; }
body.v1port .builder-onboarding > h1 { margin-bottom: 14px; }
body.v1port .builder-onboarding > .lede { font-size: 1.05rem; max-width: 640px; margin: 0 0 36px; }

body.v1port .create-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 28px 24px; box-shadow: var(--shadow-sm); margin-bottom: 56px; }
body.v1port .create-form .field-label { margin: 0 0 8px; font-size: 0.95rem; }
body.v1port .create-form > textarea { font-size: 1rem; padding: 12px 14px; }

body.v1port .details-expander { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); margin: 20px 0 22px; }
body.v1port .details-expander > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; user-select: none; font-size: 0.92rem; list-style: none; position: relative; padding-right: 36px; }
body.v1port .details-expander > summary::-webkit-details-marker { display: none; }
body.v1port .details-expander > summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.3rem; line-height: 1; }
body.v1port .details-expander[open] > summary { border-bottom: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
body.v1port .details-expander[open] > summary::after { content: "−"; }
body.v1port .details-body { padding: 16px; }

body.v1port .section-grid { border: none; padding: 0; margin: 14px 0 4px; }
body.v1port .section-grid legend { font-weight: 600; font-size: 0.92rem; padding: 0; }
body.v1port .section-grid .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
body.v1port .check-pill {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 14px 10px 12px; min-height: 110px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  gap: 0; position: relative;
}
body.v1port .check-pill:hover { border-color: var(--muted-soft); background: var(--surface-soft); }
body.v1port .check-pill input[type=checkbox] {
  position: absolute; top: 8px; right: 8px; margin: 0;
  width: 15px; height: 15px; accent-color: var(--accent);
}
body.v1port .check-pill-visual {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-soft); color: var(--muted);
  margin-bottom: 8px; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
body.v1port .check-pill-visual .section-icon { display: block; }
body.v1port .check-pill-text { display: flex; flex-direction: column; gap: 2px; }
body.v1port .check-pill .title { font-weight: 600; font-size: 0.82rem; color: var(--text); line-height: 1.3; }
body.v1port .check-pill .desc { color: var(--muted-soft); font-size: 0.72rem; line-height: 1.35; }
body.v1port .check-pill:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-xs);
}
body.v1port .check-pill:has(input:checked) .check-pill-visual {
  background: var(--accent-light); color: var(--accent);
}

body.v1port .form-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
body.v1port .status { font-size: 0.88rem; color: var(--muted); min-height: 1.2em; }
body.v1port .status.ok { color: var(--ok); }
body.v1port .status.err, body.v1port .status.error { color: var(--danger); }

/* "Or pick a template yourself" — section-label style instead of an h2 mid-form */
body.v1port .new-site-section-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 8px 0 14px; }
body.v1port .new-site-section-label::after { content: ""; display: block; height: 1px; background: var(--border); margin-top: 14px; }

body.v1port .template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
body.v1port .template-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.06s;
  display: flex; flex-direction: column;
  cursor: pointer;
}
body.v1port .template-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow); transform: translateY(-2px); }
body.v1port .template-card .tpl-thumb { height: 150px; }
body.v1port .template-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
body.v1port .template-card-body h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
body.v1port .template-card-body p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; flex: 1; }
body.v1port .template-card-body small { color: var(--muted-soft); font-size: 0.76rem; }
body.v1port .template-card .use-template-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 4px; align-self: flex-start;
  height: 32px; padding: 0 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
body.v1port .template-card:hover .use-template-btn { border-color: var(--accent); color: var(--accent); }

/* ============================================================================
   11. /sites/:id/preview — post-gen device-toggle preview
   ============================================================================ */
body.v1port .post-gen-preview { max-width: 1280px; margin: 28px auto 60px; padding: 0 16px; }
body.v1port .preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
body.v1port .preview-title h1 { margin: 0; }
body.v1port .preview-title .muted { font-size: 0.92rem; margin: 4px 0 0; line-height: 1.4; max-width: 540px; }
body.v1port .preview-actions { display: flex; gap: 8px; }

body.v1port .device-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 3px; margin: 8px 0 16px; box-shadow: var(--shadow-xs); }
body.v1port .device-btn { background: transparent; border: none; padding: 7px 18px; font: inherit; font-size: 0.85rem; font-weight: 500; color: var(--muted); cursor: pointer; border-radius: var(--radius-pill); transition: background 0.15s, color 0.15s; }
body.v1port .device-btn:hover { color: var(--text); }
body.v1port .device-btn.is-active { background: var(--accent); color: #fff; }

body.v1port .frame-wrap { display: flex; justify-content: center; }
body.v1port .frame { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; transition: width 0.2s, height 0.2s; }
body.v1port .frame.device-desktop { width: 100%; height: calc(100vh - 230px); min-height: 560px; }
body.v1port .frame.device-tablet  { width: 768px; max-width: 100%; height: calc(100vh - 230px); min-height: 600px; }
body.v1port .frame.device-mobile  { width: 375px; height: calc(100vh - 230px); min-height: 640px; }
body.v1port .frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* ============================================================================
   12. /sites/:id/edit — editor
   ============================================================================ */
body.v1port main:has(.editor) { max-width: none; padding: 0; }
body.v1port .editor { max-width: 1400px; margin: 0 auto 24px; padding: 0; }

/* Toolbar groups so the eight things in the header have actual rhythm */
body.v1port .editor-toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
body.v1port .editor-toolbar-title { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
body.v1port .editor-toolbar-title h1 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
body.v1port .editor-toolbar-title .editor-host { color: var(--muted); font-family: var(--font); font-size: 0.85rem; word-break: break-all; font-weight: 500; }
body.v1port .editor-toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
body.v1port .editor-toolbar-actions::before { content: ""; width: 1px; height: 20px; background: var(--border); margin-right: 4px; }
body.v1port .editor-status { font-size: 0.85rem; color: var(--muted); min-width: 80px; text-align: right; font-weight: 500; }
body.v1port .editor-status.ok { color: var(--ok); }
body.v1port .editor-status.error { color: var(--danger); }
body.v1port .editor-status.saving { color: var(--muted); }
body.v1port .editor-budget {
  background: var(--ai-soft); color: var(--ai);
  padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 700;
  border: 1px solid #ddd6fe;
  height: 28px; display: inline-flex; align-items: center; gap: 4px;
}

body.v1port .editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr);
  gap: 24px;
  padding: 24px 32px 60px;
  max-height: calc(100vh - 110px);
  overflow: hidden;
}
body.v1port .editor-pane {
  min-width: 0; max-width: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px 28px;
  box-shadow: var(--shadow-xs);
  overflow-y: auto;
}
body.v1port .editor-preview { position: sticky; top: 16px; align-self: stretch; min-width: 0; }
@media (max-width: 980px) {
  body.v1port .editor-layout { grid-template-columns: 1fr; padding: 16px 12px 40px; gap: 16px; }
  body.v1port .editor-pane { padding: 16px 14px 18px; }
  body.v1port .editor-preview { position: static; }
  body.v1port .editor-toolbar { padding: 12px 14px; gap: 8px; }
  body.v1port .editor-toolbar-title {
    flex-direction: column; align-items: flex-start; gap: 2px;
    flex-basis: 100%; min-width: 0;
  }
  body.v1port .editor-toolbar-title h1 { font-size: 0.95rem; }
  body.v1port .editor-toolbar-title .editor-host {
    word-break: normal; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 100%; display: block; font-size: 0.78rem;
  }
  body.v1port .editor-toolbar-actions { width: 100%; justify-content: flex-start; }
  body.v1port .editor-toolbar-actions::before { display: none; }
  body.v1port .preview-frame-wrap { min-height: 280px; max-height: 400px; }
  body.v1port .tab-row { margin: 0 0 16px; padding: 3px; }
  body.v1port .tab-row .tab-btn { padding: 8px 12px; font-size: 0.82rem; }
  body.v1port .section-fields { padding: 0 10px 10px; }
  body.v1port .editor-section > summary { padding: 10px 12px; font-size: 0.9rem; }
  body.v1port .editor-section-actions { gap: 4px; }
  body.v1port .ai-rewrite-btn { font-size: 0.72rem; padding: 3px 8px; }
  body.v1port .section-remove-btn { font-size: 0.72rem; padding: 3px 8px; }
}

/* AI tab: the page background and the editor pane both shift. Strong cue,
   matches v1's "color change when ai edit" pattern. */
body.v1port:has(.tab-row .tab-btn[data-tab=ai].active) { background: var(--ai-page-bg); }
body.v1port:has(.tab-row .tab-btn[data-tab=ai].active) .editor-pane { background: var(--ai-tint); border-color: #ddd6fe; }

/* TABS — clean specificity, no !important */
body.v1port .tab-row {
  display: flex; gap: 4px;
  border-bottom: none;
  margin: 0 0 24px;
  padding: 4px;
  flex-wrap: wrap;
  background: var(--bg-soft, #f1f5f9);
  border-radius: var(--radius-sm, 8px);
}
body.v1port .editor .tab-row .tab-btn,
body.v1port .tab-row .tab-btn {
  background: transparent;
  border: none;
  border-bottom: none;
  border-radius: var(--radius-xs, 6px);
  padding: 9px 18px;
  margin: 0;
  font: inherit; font-size: 0.88rem; font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  height: auto;
}
body.v1port .editor .tab-row .tab-btn:hover,
body.v1port .tab-row .tab-btn:hover { color: var(--text); background: rgba(0,0,0,0.04); }
body.v1port .editor .tab-row .tab-btn.active,
body.v1port .tab-row .tab-btn.active {
  color: var(--accent);
  background: var(--surface, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-weight: 600;
  border-bottom: none;
}
body.v1port .editor .tab-row .tab-btn[data-tab=ai].active,
body.v1port .tab-row .tab-btn[data-tab=ai].active {
  color: var(--ai);
  background: var(--surface, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body.v1port .tab-panel { display: none; }
body.v1port .tab-panel.is-active { display: block; }

/* Settings subtabs */
body.v1port .subtab-row {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 20px; padding: 4px;
  background: var(--bg-soft); border-radius: var(--radius-sm);
}
body.v1port .subtab-btn {
  padding: 7px 14px; font-size: 0.85rem; font-weight: 500;
  border: none; border-radius: var(--radius-xs);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
body.v1port .subtab-btn:hover { color: var(--text); background: var(--surface); }
body.v1port .subtab-btn.active {
  background: var(--surface); color: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
body.v1port .subtab-btn--danger { color: var(--danger); }
body.v1port .subtab-btn--danger.active { color: var(--danger); }
body.v1port .danger-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px; border: 1px solid var(--danger-soft); border-radius: var(--radius-sm);
  background: var(--danger-bg);
}
body.v1port .danger-card-info { flex: 1; }
body.v1port .danger-card-info strong { display: block; margin-bottom: 4px; }
body.v1port .danger-card-info p { margin: 0; font-size: 0.9rem; color: var(--muted); }
body.v1port .delete-confirm {
  margin-top: 16px; padding: 20px;
  border: 1px solid var(--danger-soft); border-radius: var(--radius-sm);
  background: var(--danger-bg);
}
body.v1port .delete-confirm p { margin: 0 0 10px; font-size: 0.92rem; }
body.v1port .delete-confirm-name { color: var(--danger); }
body.v1port .delete-confirm-input {
  display: block; width: 100%; max-width: 340px;
  padding: 8px 12px; margin-bottom: 14px;
  font: inherit; font-size: 0.92rem;
  border: 1px solid var(--danger-soft); border-radius: var(--radius-sm);
  background: var(--surface);
}
body.v1port .delete-confirm-input:focus {
  outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}
body.v1port .delete-confirm-actions { display: flex; gap: 10px; align-items: center; }
body.v1port .subtab-panel { display: none; }
body.v1port .subtab-panel.is-active { display: block; }

/* AI steer row */
body.v1port .ai-steer-row { margin: 0 0 22px; }
body.v1port .ai-steer-row .field-label { margin-bottom: 6px; }
body.v1port .ai-steer-row textarea { min-height: 56px; font-size: 0.92rem; }

/* Editor sections (collapsible <details>) */
body.v1port .editor-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 0 14px;
  background: var(--surface);
}
body.v1port .editor-section > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700; font-size: 0.95rem;
  list-style: none;
  user-select: none;
}
body.v1port .editor-section > summary::-webkit-details-marker { display: none; }
body.v1port .editor-section > summary::before {
  content: "▸"; display: inline-block; width: 16px; margin-right: 6px;
  transition: transform 0.15s;
}
body.v1port .editor-section[open] > summary::before { transform: rotate(90deg); }
body.v1port .editor-section-title { flex: 1; }
body.v1port .editor-section-actions { display: flex; gap: 8px; align-items: center; }
body.v1port .section-fields { padding: 0 16px 12px; }
body.v1port .section-fields .field-help { margin: 2px 0 4px; }
body.v1port .editor-section--cleared { opacity: 0.5; }

/* Rewrite button inside section header */
body.v1port .ai-rewrite-btn {
  font: inherit; font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--ai, #a78bfa);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ai, #a78bfa);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
body.v1port .ai-rewrite-btn:hover:not(:disabled) { background: var(--ai-soft, #f0ebff); }
body.v1port .ai-rewrite-btn:disabled { opacity: 0.6; cursor: progress; }

/* Remove button inside section header */
body.v1port .section-remove-btn {
  font: inherit; font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--danger, #ef4444);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--danger, #ef4444);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
body.v1port .section-remove-btn:hover { background: rgba(239,68,68,0.08); }

/* Empty section card (v1-style "add" card) */
body.v1port .section-card--empty {
  border: 2px dashed var(--border-strong, #ccc);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 0 0 14px;
  text-align: center;
  background: var(--bg, #fafafa);
}
body.v1port .section-card-head { margin-bottom: 12px; }
body.v1port .section-card-title { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
body.v1port .section-card-desc { display: block; color: var(--muted); font-size: 0.85rem; }
body.v1port .section-generate-prompt {
  width: 100%; max-width: 400px;
  margin: 8px auto 12px;
  display: block;
  min-height: 48px; font-size: 0.88rem;
}
body.v1port .section-generate-btn {
  font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 8px 20px;
  border: 1px solid var(--ai, #a78bfa);
  border-radius: var(--radius-pill);
  background: var(--ai-soft, #f0ebff);
  color: var(--ai, #a78bfa);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
body.v1port .section-generate-btn:hover:not(:disabled) { box-shadow: var(--shadow-xs); background: var(--ai, #a78bfa); color: #fff; }
body.v1port .section-generate-btn:disabled { opacity: 0.6; cursor: progress; }

/* Section status (rewrite/generate feedback) */
body.v1port .ai-section-status { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; margin: 8px 16px 0; }
body.v1port .ai-section-status.ok { color: var(--ok); }
body.v1port .ai-section-status.error { color: var(--danger); }

/* Choice pills */
body.v1port .choice-group { border: none; padding: 0; margin: 12px 0 18px; }
body.v1port .choice-group legend { font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; padding: 0; color: var(--text); }
body.v1port .choice-pill { display: inline-block; padding: 6px 14px; margin: 4px 6px 0 0; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); cursor: pointer; font-size: 0.85rem; color: var(--text); transition: border-color 0.15s, background 0.15s; }
body.v1port .choice-pill:hover { border-color: var(--accent); }
body.v1port .choice-pill input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
body.v1port .choice-pill.is-checked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Palette swatches — visual color picker (replaces text-only pills for palette) */
body.v1port .palette-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; padding: 0; border: none; }
body.v1port .palette-grid legend { font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; padding: 0; color: var(--text); width: 100%; }
body.v1port .palette-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
body.v1port .palette-opt:hover { border-color: var(--muted-soft); box-shadow: var(--shadow-xs); }
body.v1port .palette-opt input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
body.v1port .palette-opt.is-checked { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
body.v1port .palette-dots { display: flex; gap: 4px; flex-shrink: 0; }
body.v1port .palette-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.08); background: #999; }
body.v1port .palette-dot[data-c="slate-1"]   { background: #334155; }
body.v1port .palette-dot[data-c="slate-2"]   { background: #1e293b; }
body.v1port .palette-dot[data-c="slate-3"]   { background: #64748b; }
body.v1port .palette-dot[data-c="indigo-1"]  { background: #4f46e5; }
body.v1port .palette-dot[data-c="indigo-2"]  { background: #4338ca; }
body.v1port .palette-dot[data-c="indigo-3"]  { background: #818cf8; }
body.v1port .palette-dot[data-c="emerald-1"] { background: #059669; }
body.v1port .palette-dot[data-c="emerald-2"] { background: #047857; }
body.v1port .palette-dot[data-c="emerald-3"] { background: #34d399; }
body.v1port .palette-dot[data-c="rose-1"]    { background: #e11d48; }
body.v1port .palette-dot[data-c="rose-2"]    { background: #be123c; }
body.v1port .palette-dot[data-c="rose-3"]    { background: #fb7185; }
body.v1port .palette-dot[data-c="amber-1"]   { background: #b45309; }
body.v1port .palette-dot[data-c="amber-2"]   { background: #92400e; }
body.v1port .palette-dot[data-c="amber-3"]   { background: #f59e0b; }
body.v1port .palette-name { font-size: 0.82rem; font-weight: 600; color: var(--text); text-transform: capitalize; }
body.v1port .palette-opt.is-checked .palette-name { color: var(--accent); }

/* Per-slot ✨ AI trigger */
body.v1port [data-ai-trigger] { background: var(--ai-soft); border: 1px solid #ddd6fe; color: var(--ai); padding: 0 10px; border-radius: var(--radius-pill); font-size: 0.76rem; font-weight: 700; cursor: pointer; margin-left: 6px; height: 24px; transition: background 0.15s; line-height: 1; }
body.v1port [data-ai-trigger]:hover { background: #ddd6fe; }

/* AI floating menu */
body.v1port .ai-menu { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px; min-width: 200px; z-index: 100; }
body.v1port .ai-menu button { display: block; width: 100%; padding: 7px 12px; background: transparent; color: var(--text); border: none; border-radius: var(--radius-xs); font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; transition: background 0.15s; height: auto; }
body.v1port .ai-menu button:hover { background: var(--surface-soft); }

/* Editor preview pane */
body.v1port .editor-preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
  font-size: 0.85rem; color: var(--muted); font-weight: 500;
}
body.v1port .editor-preview-bar > div { display: flex; gap: 8px; align-items: center; }
body.v1port .preview-stale { color: var(--warn); font-size: 0.78rem; font-style: italic; }
body.v1port .editor-preview { display: flex; flex-direction: column; }
body.v1port .editor-preview-bar { flex-shrink: 0; }
body.v1port .preview-frame-wrap {
  flex: 1 1 0; min-height: 520px; position: relative; overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
}
body.v1port iframe#preview-frame {
  position: absolute; top: 0; left: 0;
  width: 1280px; height: 100%;
  transform-origin: 0 0;
  border: none; display: block;
}

/* List editor (record items) */
body.v1port .list-editor { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 8px 0 16px; }
body.v1port .list-editor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.88rem; }
body.v1port .list-editor-head [data-list-add] { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); padding: 0 12px; height: 30px; border-radius: var(--radius-xs); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
body.v1port .list-editor-head [data-list-add]:hover { background: var(--accent-soft); }
body.v1port [data-list-item] { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 12px; margin: 8px 0; }
body.v1port .list-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
body.v1port .list-item-action { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 4px 8px; height: auto; border-radius: var(--radius-xs); cursor: pointer; font-size: 0.85rem; }
body.v1port .list-item-action:hover { color: var(--text); background: var(--surface-soft); }
body.v1port .list-empty { color: var(--muted); font-size: 0.88rem; padding: 10px; text-align: center; font-style: italic; }

/* Image upload box */
body.v1port .image-uploader { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-soft); }
body.v1port .image-uploader [data-upload-trigger] { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); padding: 0 14px; height: 32px; border-radius: var(--radius-xs); font-size: 0.85rem; cursor: pointer; }
body.v1port .image-uploader [data-upload-trigger]:hover { border-color: var(--accent); color: var(--accent); }
body.v1port .image-uploader [data-upload-clear] { background: transparent; color: var(--muted); border: 1px solid var(--border-strong); padding: 0 14px; height: 32px; border-radius: var(--radius-xs); font-size: 0.85rem; cursor: pointer; margin-left: 6px; }
body.v1port .upload-status { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
body.v1port .upload-status.ok { color: var(--ok); }
body.v1port .upload-status.error { color: var(--danger); }
body.v1port .image-current img { max-width: 120px; max-height: 80px; border-radius: var(--radius-xs); margin-top: 8px; }

/* AI image generation panel — only rendered for invitation_card preset */
body.v1port .ai-gen-panel { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
body.v1port .ai-gen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
body.v1port .ai-gen-title { font-weight: 600; font-size: 0.9rem; color: var(--text); }
body.v1port .ai-gen-hint { font-size: 0.78rem; color: var(--muted); }
body.v1port .ai-gen-controls { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: end; }
body.v1port .ai-gen-field { display: grid; gap: 4px; }
body.v1port .ai-gen-field span { font-size: 0.76rem; color: var(--muted); font-weight: 500; }
body.v1port .ai-gen-field select,
body.v1port .ai-gen-field input { width: 100%; height: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); padding: 0 10px; background: var(--surface); color: var(--text); font-size: 0.85rem; }
body.v1port .ai-gen-controls [data-ai-generate] { height: 32px; padding: 0 14px; font-size: 0.85rem; }
body.v1port .ai-gen-controls [data-ai-generate]:disabled { opacity: 0.6; cursor: progress; }
body.v1port .ai-gen-status { font-size: 0.82rem; color: var(--muted); margin-top: 8px; min-height: 1em; }
body.v1port .ai-gen-status.ok { color: var(--ok); }
body.v1port .ai-gen-status.error { color: var(--danger); }
body.v1port .ai-gen-status.loading { color: var(--accent); }
body.v1port .ai-gen-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
body.v1port .ai-gen-thumb { padding: 0; border: 2px solid var(--border-strong); border-radius: var(--radius-xs); overflow: hidden; cursor: pointer; background: var(--bg); aspect-ratio: 2 / 3; transition: border-color 120ms ease, transform 120ms ease; }
body.v1port .ai-gen-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
body.v1port .ai-gen-thumb.picked { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent); }
body.v1port .ai-gen-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.v1port .ai-gen-locked { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
body.v1port .ai-gen-locked p { margin: 0; font-size: 0.85rem; color: var(--muted); }
@media (max-width: 640px) {
  body.v1port .ai-gen-controls { grid-template-columns: 1fr; }
  body.v1port .ai-gen-thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* Add-translation form spacing */
body.v1port .form-card .field-label + .field-help { margin-bottom: 10px; }
body.v1port .form-card input + .btn,
body.v1port .form-card input[type=text] + .btn { margin-top: 12px; }

/* ============================================================================
   13. Footer
   ============================================================================ */
body.v1port footer:not(.ddv-footer) { padding: 24px 32px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); font-size: 0.85rem; text-align: center; }
body.v1port footer:not(.ddv-footer) a { color: var(--muted); }
body.v1port footer:not(.ddv-footer) a:hover { color: var(--text); }

/* ─── DDV branded footer (app-wide) ─────────────────────────────────────── */
body.v1port .ddv-footer { margin-top: 60px; background: var(--surface); border-top: 1px solid var(--border); padding: 56px 24px 0; color: var(--muted); font-size: 0.92rem; text-align: left; }
body.v1port .ddv-footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.3fr; gap: 48px; align-items: start; padding-bottom: 32px; }
body.v1port .ddv-footer-brand { max-width: 340px; display: grid; gap: 12px; }
body.v1port .ddv-footer-logo { font-size: 1.1rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
body.v1port .ddv-footer-desc { margin: 0; line-height: 1.55; font-size: 0.9rem; }
body.v1port .ddv-footer-copy, body.v1port .ddv-footer-parent { margin: 0; font-size: 0.82rem; color: var(--muted); }
body.v1port .ddv-footer-logo-img { display: block; width: 40px; height: auto; margin-top: 4px; opacity: 0.9; }
body.v1port .ddv-footer-head { margin: 0 0 12px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
body.v1port .ddv-footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
body.v1port .ddv-footer-links a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; font-size: 0.92rem; }
body.v1port .ddv-footer-links a:hover { color: var(--accent); }
body.v1port .ddv-footer-account { display: grid; gap: 10px; }
body.v1port .ddv-footer-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-decoration: none; border: 1.5px solid var(--border); cursor: pointer; transition: all 0.15s ease; font-family: inherit; }
body.v1port .ddv-footer-btn-ghost { background: transparent; color: var(--text); }
body.v1port .ddv-footer-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
body.v1port .ddv-footer-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
body.v1port .ddv-footer-btn-primary:hover { filter: brightness(1.08); }
body.v1port .ddv-footer-apps { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.88rem; transition: all 0.15s ease; }
body.v1port .ddv-footer-apps:hover { background: var(--accent-light); color: var(--accent); }
body.v1port .ddv-footer-apps-icon { fill: currentColor; flex-shrink: 0; }
body.v1port .ddv-footer-newsletter { max-width: 1200px; margin: 0 auto; padding: 28px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 24px; align-items: center; }
body.v1port .ddv-footer-newsletter-head { margin: 0 0 4px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
body.v1port .ddv-footer-newsletter-sub { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
body.v1port .ddv-footer-newsletter-form { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
body.v1port .ddv-footer-newsletter-input { flex: 1 1 220px; min-width: 180px; padding: 9px 14px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; color: var(--text); font-size: 0.92rem; outline: none; transition: border-color 0.15s ease; font-family: inherit; }
body.v1port .ddv-footer-newsletter-input:focus { border-color: var(--accent); }
body.v1port .ddv-footer-newsletter-button { padding: 9px 18px; border-radius: 8px; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: filter 0.15s ease; font-family: inherit; }
body.v1port .ddv-footer-newsletter-button:hover { filter: brightness(1.08); }
body.v1port .ddv-footer-newsletter-button:disabled { opacity: 0.6; cursor: not-allowed; }
body.v1port .ddv-footer-newsletter-status { grid-column: 1 / -1; margin: 0; font-size: 0.84rem; color: var(--muted); min-height: 1.25em; }
body.v1port .ddv-footer-newsletter-status[data-status="error"] { color: #b91c1c; }
body.v1port .ddv-footer-newsletter-status[data-status="success"] { color: #166534; }
body.v1port .ddv-footer-attribution { max-width: 1200px; margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
body.v1port .ddv-footer-attribution p { margin: 0; }
@media (max-width: 960px) {
  body.v1port .ddv-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  body.v1port .ddv-footer-brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 640px) {
  body.v1port .ddv-footer-inner, body.v1port .ddv-footer-newsletter { grid-template-columns: 1fr; gap: 24px; }
  body.v1port .ddv-footer { padding: 40px 20px 0; }
}

/* ============================================================================
   14. Admin — pro operator dashboard
   ============================================================================ */
body.v1port main:has(.admin) { max-width: 1200px; padding: 0 24px; }
body.v1port .admin { padding: 32px 0 64px; }
body.v1port .admin h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
body.v1port .admin h1 .muted { font-weight: 600; font-size: 1rem; color: var(--muted); }
body.v1port .admin h2 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; letter-spacing: -0.01em; }
body.v1port .admin h2:first-of-type { margin-top: 0; }

/* Admin nav — underline tab strip (not pills — pills eat the label on short words) */
body.v1port .admin-nav {
  display: flex; gap: 0; flex-wrap: wrap;
  margin: 0 0 28px;
  border-bottom: 2px solid var(--border);
  background: transparent;
  border-radius: 0;
  padding: 0;
}
body.v1port .admin-nav a {
  font-size: 0.88rem; font-weight: 500;
  padding: 10px 16px;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted); text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
body.v1port .admin-nav a:hover { color: var(--text); background: transparent; }
body.v1port .admin-nav a.is-active {
  color: var(--accent); border-bottom-color: var(--accent);
  font-weight: 600; background: transparent;
}

/* Admin cards */
body.v1port .admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
body.v1port .admin-card h2 { margin: 0 0 14px; }
body.v1port .admin-card .muted { margin-top: 0; }

/* Admin stat cards */
body.v1port .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
body.v1port .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.v1port .stat-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow-sm); }
body.v1port .stat-label {
  font-size: 0.68rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}
body.v1port .stat-value {
  font-size: 1.6rem; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
body.v1port .stat-card--accent {
  background: var(--accent); border-color: var(--accent);
}
body.v1port .stat-card--accent .stat-label { color: rgba(255,255,255,0.7); }
body.v1port .stat-card--accent .stat-value { color: #fff; }
body.v1port .stat-card--accent:hover { border-color: var(--accent-dark); }

/* Admin two-column row */
body.v1port .admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
body.v1port .admin-card--flex { display: flex; flex-direction: column; }
body.v1port .admin-card--flex h2 { flex-shrink: 0; }
@media (max-width: 800px) { body.v1port .admin-row { grid-template-columns: 1fr; } }

/* Compact table variant (for small data sets like signup series) */
body.v1port .admin-table--compact { max-width: 100%; }
body.v1port .admin-table--compact td strong { font-variant-numeric: tabular-nums; }

/* Announcement form */
body.v1port .announce-form { display: flex; flex-direction: column; gap: 10px; flex: 1; }
body.v1port .announce-form textarea { flex: 1; min-height: 60px; }
body.v1port .announce-form .btn { align-self: flex-start; }

/* Admin tables */
body.v1port .admin-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
body.v1port .admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
}
body.v1port .admin-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
body.v1port .admin-table tbody tr:last-child td { border-bottom: none; }
body.v1port .admin-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3%, transparent); }
body.v1port .admin-table td a { color: var(--accent); font-weight: 500; }
body.v1port .admin-table td a:hover { color: var(--accent-dark); }
body.v1port .admin-table code {
  font-family: var(--font-mono); font-size: 0.8rem;
  background: var(--surface-soft); padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border-soft);
}
body.v1port .admin-table pre {
  margin: 0; white-space: pre-wrap; word-break: break-all;
  max-width: 480px; font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--muted);
}
body.v1port .admin-table.audit code { word-break: break-all; }

/* Stat card warning variant */
body.v1port .stat-card--warn {
  background: var(--danger-bg); border-color: var(--danger-soft);
}
body.v1port .stat-card--warn .stat-label { color: var(--danger); }
body.v1port .stat-card--warn .stat-value { color: var(--danger); }

/* Detail grid (user-detail, etc.) — key-value rows */
body.v1port .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
body.v1port .detail-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.92rem;
  display: flex; flex-direction: column; gap: 4px;
}
body.v1port .detail-label {
  font-size: 0.68rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}
body.v1port .detail-item code {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text); word-break: break-all;
}

/* Checklist pills */
body.v1port .cl-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid transparent;
}
body.v1port .cl-pill.ok   { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-soft); }
body.v1port .cl-pill.warn { background: var(--warn-bg);   color: var(--warn);   border-color: #fbbf24; }
body.v1port .cl-pill.fail { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-soft); }
body.v1port .cl-pill.na   { background: var(--surface-soft); color: var(--muted); border-color: var(--border); }

/* Checklist summary bar */
body.v1port .checklist-summary {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
body.v1port .checklist-summary a { text-decoration: none; display: flex; gap: 6px; align-items: center; }
body.v1port .checklist-summary strong { color: var(--danger); margin-left: 8px; font-size: 0.88rem; }

/* Admin filter forms (search, filter bars) */
body.v1port .admin-filter,
body.v1port .admin form[method="get"],
body.v1port .admin form[method="GET"] {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 16px 0 20px;
}
body.v1port .admin-filter input,
body.v1port .admin-filter select,
body.v1port .admin form[method="get"] input,
body.v1port .admin form[method="get"] select,
body.v1port .admin form[method="GET"] input,
body.v1port .admin form[method="GET"] select {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem;
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.v1port .admin-filter input:focus,
body.v1port .admin form[method="get"] input:focus,
body.v1port .admin form[method="GET"] input:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus);
}
body.v1port .admin-filter input[type="text"],
body.v1port .admin form[method="get"] input[name="q"],
body.v1port .admin form[method="GET"] input[name="q"] {
  flex: 1; min-width: 200px;
}
body.v1port .admin-filter button,
body.v1port .admin form[method="get"] button,
body.v1port .admin form[method="GET"] button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px; height: 36px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
body.v1port .admin-filter button:hover,
body.v1port .admin form[method="get"] button:hover,
body.v1port .admin form[method="GET"] button:hover {
  background: var(--accent-dark);
}

/* Admin pagination */
body.v1port .admin > p:last-of-type:has(a[href*="page="]),
body.v1port .admin-pagination {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  margin: 24px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 0.88rem; color: var(--muted);
}
body.v1port .admin > p:last-of-type:has(a[href*="page="]) a {
  color: var(--accent); font-weight: 600; text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s;
}
body.v1port .admin > p:last-of-type:has(a[href*="page="]) a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Admin detail page grid */
body.v1port .admin .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
body.v1port .admin .grid > section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
body.v1port .admin .grid > section h2 { margin: 0 0 10px; font-size: 0.95rem; }
body.v1port .admin .grid > section p { font-size: 0.88rem; line-height: 1.55; margin: 0 0 6px; }
body.v1port .admin .grid > section p:last-child { margin-bottom: 0; }

/* Admin back links */
body.v1port .admin > p:first-of-type > a[href*="/admin/"] {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color 0.15s;
}
body.v1port .admin > p:first-of-type > a[href*="/admin/"]:hover { color: var(--accent); }

/* Admin inline muted text */
body.v1port .admin > .muted { font-size: 0.88rem; color: var(--muted); margin: -2px 0 16px; }

/* Admin announcement/textarea forms */
body.v1port .admin-card textarea {
  width: 100%; max-width: 600px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.92rem;
  background: var(--surface); color: var(--text);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.v1port .admin-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }

/* Admin badge (provisioning status etc) */
body.v1port .badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--warn-bg); color: var(--warn); border: 1px solid #fbbf24;
}

/* Admin error pre */
body.v1port .admin .err {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger-soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Admin analytics list */
body.v1port .admin .analytics-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px;
  font-size: 0.82rem; color: var(--muted);
}
body.v1port .admin .analytics-list li { padding: 4px 8px; border-radius: 4px; }
body.v1port .admin .analytics-list li:hover { background: var(--surface-soft); }
body.v1port .admin .analytics-list strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Admin events list (provisioning) */
body.v1port .admin .events {
  font-family: var(--font-mono); font-size: 0.82rem;
  padding-left: 22px; margin: 0;
}
body.v1port .admin .events li { padding: 3px 0; }
body.v1port .admin .events time { color: var(--muted-soft); }
body.v1port .admin .events code {
  background: var(--surface-soft); padding: 1px 6px;
  border-radius: 4px; font-size: 0.78rem;
  border: 1px solid var(--border-soft);
}

/* Admin danger zone */
body.v1port .admin hr {
  border: none; border-top: 1px solid var(--border);
  margin: 32px 0 16px;
}
body.v1port .admin button.danger,
body.v1port .admin .btn.danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; height: 36px;
  background: var(--surface); color: var(--danger);
  border: 1px solid var(--danger-soft);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
body.v1port .admin button.danger:hover {
  background: var(--danger-bg); border-color: var(--danger); color: var(--danger);
}

/* Admin action forms (role change, ban/unban) */
body.v1port .admin form[method="post"]:not(.inline) {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 8px 0 16px;
}
body.v1port .admin form[method="post"] select {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem;
  background: var(--surface); color: var(--text);
}
body.v1port .admin form[method="post"] input[name="reason"] {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem;
  background: var(--surface); color: var(--text);
  flex: 1; min-width: 200px;
}
body.v1port .admin form[method="post"] button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px; height: 36px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
body.v1port .admin form[method="post"] button[type="submit"]:hover { background: var(--accent-dark); }

/* Admin email-preview list */
body.v1port .admin ul:not(.analytics-list):not(.events) {
  padding: 0; margin: 8px 0; list-style: none;
}
body.v1port .admin ul:not(.analytics-list):not(.events) li {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--surface);
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}
body.v1port .admin ul:not(.analytics-list):not(.events) li:hover {
  border-color: var(--accent-light);
  background: var(--accent-soft);
}
body.v1port .admin ul:not(.analytics-list):not(.events) li a { font-weight: 500; }

/* Admin checklist table row coloring */
body.v1port .admin-table.checklist tr.cl-fail td:first-child { border-left: 3px solid var(--danger); }
body.v1port .admin-table.checklist tr.cl-warn td:first-child { border-left: 3px solid var(--warn); }
body.v1port .admin-table.checklist td small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }

/* ============================================================================
   15. Account page
   ============================================================================ */
body.v1port .account { max-width: 640px; margin: 40px auto 64px; padding: 0 16px; }
body.v1port .account h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
body.v1port .account > p { font-size: 0.92rem; color: var(--muted); margin: 0 0 6px; line-height: 1.55; }
body.v1port .account > p code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--surface-soft); padding: 2px 8px;
  border-radius: 4px; border: 1px solid var(--border);
}
body.v1port .account > p strong { color: var(--text); }
body.v1port .account h2 {
  font-size: 1rem; font-weight: 700;
  margin: 28px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}
body.v1port .account h2:first-of-type { margin-top: 24px; }
body.v1port .account form { margin: 10px 0 0; }
body.v1port .account form button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; height: 36px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
body.v1port .account form button[type="submit"]:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
}
body.v1port .account form[action*="delete"] button[type="submit"] {
  color: var(--danger); border-color: var(--danger-soft);
}
body.v1port .account form[action*="delete"] button[type="submit"]:hover {
  background: var(--danger-bg); border-color: var(--danger);
}
body.v1port .account .form-stack { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
body.v1port .account .form-stack label { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-top: 4px; }
body.v1port .account .form-stack input[type="password"] { font: inherit; font-size: 0.88rem; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
body.v1port .account .form-msg { font-size: 0.84rem; padding: 6px 10px; border-radius: var(--radius-sm); margin-top: 4px; }
body.v1port .account .form-msg.ok { background: var(--success-bg, #dcfce7); color: var(--success, #166534); }
body.v1port .account .form-msg.error { background: var(--danger-bg); color: var(--danger); }

/* ============================================================================
   16. Contact page
   ============================================================================ */
body.v1port .contact { max-width: 560px; margin: 40px auto 64px; padding: 0 16px; }
body.v1port .contact h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
body.v1port .contact p { font-size: 0.95rem; color: var(--ok); font-weight: 600; }
body.v1port .contact form { display: flex; flex-direction: column; gap: 16px; }
body.v1port .contact label {
  display: flex; flex-direction: column; gap: 6px;
  font-weight: 600; font-size: 0.92rem; color: var(--text);
}
body.v1port .contact input,
body.v1port .contact textarea {
  width: 100%; max-width: none;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.95rem;
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.v1port .contact input:focus,
body.v1port .contact textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus);
}
body.v1port .contact textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
body.v1port .contact form button[type="submit"] {
  align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 24px; height: 40px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
body.v1port .contact form button[type="submit"]:hover { background: var(--accent-dark); }

/* ============================================================================
   17. Billing return page
   ============================================================================ */
body.v1port .billing {
  max-width: 520px; margin: 80px auto 64px; padding: 0 16px;
  text-align: center;
}
body.v1port .billing h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
body.v1port .billing p { font-size: 0.95rem; color: var(--muted); line-height: 1.55; }
body.v1port .billing a {
  color: var(--accent); font-weight: 600; text-decoration: none;
  padding: 2px 0; border-bottom: 1px solid var(--accent-light);
  transition: border-color 0.15s;
}
body.v1port .billing a:hover { border-color: var(--accent); }

/* ============================================================================
   18. Legal pages refinement
   ============================================================================ */
body.v1port .legal { max-width: 56ch; margin: 40px auto 64px; padding: 0 16px; }
body.v1port .legal h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
body.v1port .legal h2 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 8px; }
body.v1port .legal p, body.v1port .legal li { font-size: 0.92rem; line-height: 1.65; color: var(--text-soft); }
body.v1port .legal-draft-banner {
  padding: 12px 16px; margin-bottom: 24px;
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem; color: var(--warn);
}

/* ============================================================================
   19. Announcement banner
   ============================================================================ */
body.v1port .announcement-banner {
  padding: 8px 16px;
  background: var(--warn-bg); color: var(--warn);
  text-align: center; font-size: 0.88rem; font-weight: 500;
  border-bottom: 1px solid #fbbf24;
}

/* ============================================================================
   20. Cookie banner
   ============================================================================ */
body.v1port #ddv-cookie-banner {
  background: var(--text); color: var(--bg);
  padding: 14px 24px; border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.18);
}
body.v1port #ddv-cookie-banner a { color: var(--accent-light); }
body.v1port #ddv-cookie-banner button {
  background: var(--accent); color: #fff; border: none;
  padding: 0 16px; height: 32px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem;
}

/* ============================================================================
   21. Responsive refinements
   ============================================================================ */
/* ============================================================================
   22. Translation page
   ============================================================================ */
body.v1port .translate { max-width: 1200px; margin: 28px auto 64px; padding: 0 16px; }
body.v1port .translate-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
body.v1port .translate-hdr h1 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
body.v1port .translate-hdr .muted { color: var(--muted); font-size: 0.88rem; margin: 6px 0 0; max-width: 640px; line-height: 1.5; }
body.v1port .translate-hdr a:first-child { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; display: inline-block; }
body.v1port .translate-hdr a:first-child:hover { color: var(--accent); }
body.v1port .translate-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
body.v1port .translate h2 { font-size: 1rem; font-weight: 700; margin: 28px 0 12px; letter-spacing: -0.01em; }
body.v1port .translate h3 { font-size: 0.92rem; font-weight: 600; color: var(--muted); margin: 20px 0 8px; }
body.v1port .trow {
  display: grid; grid-template-columns: 200px 1fr 1fr;
  gap: 12px; margin-bottom: 12px; align-items: start;
}
body.v1port .trow-label { font-size: 0.85rem; font-weight: 600; color: var(--text); padding-top: 10px; }
body.v1port .trow-label strong { font-family: var(--font-mono); font-size: 0.82rem; }
body.v1port .trow-label .hash {
  display: inline-block; margin-left: 6px;
  color: var(--muted-soft); font-size: 0.72rem;
}
body.v1port .trow-label .hash.stale::before {
  content: "stale";
  color: var(--warn); background: var(--warn-bg);
  padding: 1px 7px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
}
body.v1port .trow textarea {
  width: 100%; min-height: 60px; padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.92rem;
  background: var(--surface); color: var(--text);
  resize: vertical; box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.v1port .trow textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
body.v1port .trow-primary textarea { background: var(--surface-soft); color: var(--text-soft); }
body.v1port .trow-secondary textarea[data-stale="true"] { border-color: #f59e0b; background: var(--warn-bg); }
body.v1port .translate #status { font-size: 0.88rem; margin: 0 0 16px; min-height: 1.2em; }
body.v1port .translate #status.error { color: var(--danger); }
body.v1port .translate #status.ok { color: var(--ok); }
@media (max-width: 900px) {
  body.v1port .trow { grid-template-columns: 1fr; }
  body.v1port .trow-label { padding-top: 0; }
  body.v1port .translate-hdr { flex-direction: column; }
}

/* ============================================================================
   23. Responsive refinements
   ============================================================================ */
@media (max-width: 720px) {
  body.v1port .admin-nav { gap: 0; }
  body.v1port .admin-nav a { padding: 8px 10px; font-size: 0.78rem; }
  body.v1port .admin .grid { grid-template-columns: 1fr; }
  body.v1port .admin-stats { grid-template-columns: repeat(2, 1fr); }
  body.v1port .admin-table { font-size: 0.78rem; }
  body.v1port .admin-table th, body.v1port .admin-table td { padding: 6px 8px; }
  body.v1port .account, body.v1port .contact, body.v1port .billing { margin-top: 24px; }
}
@media (max-width: 640px) {
  body.v1port main { padding: 0 10px; }
  body.v1port .topbar { padding: 10px 12px; }
  body.v1port .topbar .brand { font-size: 0.88rem; }
  body.v1port .topbar nav a { padding: 4px 6px; font-size: 0.8rem; }
  body.v1port .topbar form.inline button { padding: 4px 6px; font-size: 0.8rem; }
  body.v1port h1 { font-size: 1.3rem; }
  body.v1port .h-display { font-size: clamp(1.5rem, 5vw, 2rem); }
}

/* ─── Help Center ──────────────────────────────────────────────────────────── */

body.v1port .help-hero {
  padding: 64px 24px 48px;
  text-align: center;
  background: radial-gradient(circle at 0 0, var(--accent-light), var(--bg) 60%);
}
body.v1port .help-hero-inner { max-width: 1080px; margin: 0 auto; }
body.v1port .help-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
body.v1port .help-hero .lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
}
body.v1port .help-search-wrap {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
body.v1port .help-search {
  width: 100%;
  padding: 12px 18px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
body.v1port .help-search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
body.v1port .help-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
body.v1port .help-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
body.v1port .help-category { margin-bottom: 48px; }
body.v1port .help-cat-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
body.v1port .help-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
body.v1port .help-article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
  display: block;
  text-decoration: none;
  color: inherit;
}
body.v1port .help-article-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.08);
  transform: translateY(-1px);
  border-color: #93c5fd;
}
body.v1port .help-article-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent);
}
body.v1port .help-article-card p {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0;
}
body.v1port .help-no-results {
  display: none;
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
body.v1port .help-no-results a { color: var(--accent); }

body.v1port .breadcrumbs {
  padding: 12px 0;
  font-size: 0.82rem;
  color: var(--muted);
}
body.v1port .breadcrumbs a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
body.v1port .breadcrumbs a:hover { text-decoration: underline; }
body.v1port .breadcrumbs .sep { margin: 0 6px; }

body.v1port .article-wrap {
  max-width: 720px;
  padding: 32px 0 64px;
}
body.v1port .article-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
body.v1port .article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
body.v1port .article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 10px;
}
body.v1port .article-body p {
  margin: 0 0 14px;
  font-size: 0.92rem;
}
body.v1port .article-body ul,
body.v1port .article-body ol {
  margin: 0 0 16px 24px;
  font-size: 0.92rem;
}
body.v1port .article-body li { margin-bottom: 6px; }
body.v1port .article-body code {
  background: #e8edf5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}
body.v1port .article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}
body.v1port .article-body th,
body.v1port .article-body td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  font-size: 0.88rem;
}
body.v1port .article-body a {
  color: var(--accent);
  font-weight: 500;
}

body.v1port .faq-list-help {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.v1port .faq-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
body.v1port .faq-details summary {
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
body.v1port .faq-details summary::-webkit-details-marker { display: none; }
body.v1port .faq-details summary::before {
  content: "+ ";
  color: var(--accent);
  font-weight: 800;
  margin-right: 4px;
}
body.v1port .faq-details[open] summary::before { content: "- "; }
body.v1port .faq-details p {
  padding: 0 18px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

body.v1port .related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
body.v1port .related-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
body.v1port .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
body.v1port .related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
body.v1port .related-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(15,23,42,0.06);
}
body.v1port .related-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
body.v1port .related-card p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
body.v1port .back-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
body.v1port .back-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
  body.v1port .help-article-grid { grid-template-columns: 1fr; }
  body.v1port .related-grid { grid-template-columns: 1fr; }
}

/* ---- Inbox ---- */
.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.inbox-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
}
.inbox-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.inbox-card-date {
  font-size: 0.82rem;
  color: var(--muted);
}
.inbox-delete-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
  line-height: 1;
}
.inbox-delete-btn:hover { color: var(--danger); }
.inbox-field {
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.inbox-field:last-child { border-bottom: none; }
.inbox-field-key {
  font-weight: 600;
  min-width: 80px;
  flex-shrink: 0;
  color: var(--fg);
}
.inbox-field-val {
  color: var(--fg-secondary, var(--fg));
  word-break: break-word;
}

/* History cards */
.history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.history-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-label { font-weight: 600; font-size: 0.92rem; }
.history-date { font-size: 0.82rem; }
.history-current { font-size: 0.82rem; font-style: italic; }
