/* ─── Design Tokens ─────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --bg:          #FFFFFF;
  --bg-alt:      #F5F5F7;
  --bg-dark:     #1D1D1F;
  --text:        #1D1D1F;
  --text-2:      #6E6E73;
  --text-inv:    #F5F5F7;
  --text-inv-2:  rgba(245,245,247,0.7);
  --blue:        #0071E3;
  --blue-hover:  #0077ED;
  --coral:       #F25F4C;
  --border:      rgba(0,0,0,0.08);
  --border-inv:  rgba(255,255,255,0.12);
  --surface:     #FFFFFF;

  --t-hero:      clamp(48px, 7vw, 80px);
  --t-h2:        clamp(32px, 5vw, 56px);
  --t-h3:        20px;
  --t-lead:      19px;
  --t-body:      17px;
  --t-sm:        15px;
  --t-xs:        14px;

  --section-y:   clamp(80px, 10vw, 120px);
  --max-w:       980px;
  --max-w-wide:  1200px;

  --radius-sm:   10px;
  --radius:      18px;
  --radius-lg:   24px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow:      0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 48px rgba(0,0,0,0.14);
}

html[data-theme="dark"],
html.dark {
  color-scheme: dark;
  --bg:          #000000;
  --bg-alt:      #1D1D1F;
  --bg-dark:     #161618;
  --text:        #F5F5F7;
  --text-2:      #A1A1A6;
  --text-inv:    #F5F5F7;
  --text-inv-2:  rgba(245,245,247,0.6);
  --blue:        #2997FF;
  --blue-hover:  #318CE7;
  --border:      rgba(255,255,255,0.10);
  --border-inv:  rgba(255,255,255,0.15);
  --surface:     #1C1C1E;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 48px rgba(0,0,0,0.55);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family:
    -apple-system,
    "SF Pro Display",
    "SF Pro Text",
    "Pretendard Variable",
    "Pretendard",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

html.dark .site-header {
  background: rgba(0,0,0,0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 52px;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-mark { width: 26px; height: 26px; }

.brand-wordmark {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-divider {
  display: block;
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.product-lockup {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-logo-mark { width: 18px; height: 18px; }

.product-logo-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}

.nav-links a {
  font-size: 13px;
  color: var(--text);
  padding: 5px 11px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--blue);
  background: rgba(0,113,227,0.07);
}

html.dark .nav-links a:hover {
  background: rgba(41,151,255,0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.primary-button:hover { background: var(--blue-hover); }
.primary-button:active { transform: scale(0.97); }

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--blue);
  border: 1.5px solid currentColor;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.secondary-button:hover { background: rgba(0,113,227,0.07); }

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: var(--blue);
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.ghost-button:hover { opacity: 0.7; }

.primary-button.btn-white { background: #fff; color: var(--blue); }
.primary-button.btn-white:hover { background: rgba(255,255,255,0.9); }
.ghost-button.btn-white { color: rgba(255,255,255,0.9); }
.ghost-button.btn-white:hover { color: #fff; opacity: 1; }

.size-sm  { font-size: 14px; padding: 8px 18px; }
.size-md  { font-size: 16px; padding: 11px 22px; }
.size-lg  { font-size: 17px; padding: 14px 28px; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */

.hero {
  background: var(--bg);
  padding-top: clamp(80px, 12vw, 140px);
  padding-bottom: clamp(60px, 8vw, 100px);
  text-align: center;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}

.hero-title {
  font-size: var(--t-hero);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 760px;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: var(--t-lead);
  color: var(--text-2);
  max-width: 480px;
  line-height: 1.58;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
}

/* Hero mock card */
.hero-card {
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.04),
    0 30px 80px rgba(0,0,0,0.1),
    0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

html.dark .hero-card {
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.hero-card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot.red    { background: #FF5F57; }
.dot.amber  { background: #FEBC2E; }
.dot.green  { background: #28C840; }

.hero-card-title {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
  text-align: center;
}

.mock-live-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #fff;
  background: #22C55E;
  border-radius: 4px;
  padding: 2px 6px;
}

.hero-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}

.mock-doc-icon {
  width: 36px;
  height: 36px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.mock-doc-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mock-doc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.mock-doc-sub {
  font-size: 12px;
  color: var(--text-2);
}

.mock-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 980px;
}

.mock-chip.success {
  background: rgba(34,197,94,0.12);
  color: #15803D;
}

html.dark .mock-chip.success {
  background: rgba(34,197,94,0.18);
  color: #4ADE80;
}

.mock-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-field-row {
  display: flex;
  gap: 8px;
}

.mock-field {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mock-field.sig {
  border-color: rgba(0,113,227,0.3);
  background: rgba(0,113,227,0.04);
}

.mock-field-type {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.mock-field-value {
  font-size: 13px;
  color: var(--text);
}

.mock-participants {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mock-participants-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.mock-participant {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
}

.mock-participant + .mock-participant {
  border-top: 1px solid var(--border);
}

.mock-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mock-p-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.mock-p-role {
  font-size: 11px;
  color: var(--text-2);
}

.mock-p-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }

.mock-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 980px;
  background: rgba(34,197,94,0.12);
  color: #15803D;
}

html.dark .mock-badge {
  background: rgba(34,197,94,0.18);
  color: #4ADE80;
}

.mock-audit {
  display: flex;
  gap: 8px;
}

.mock-audit-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 7px 10px;
}

/* ─── Stats Strip ────────────────────────────────────────────────────────────── */

.section-stats {
  background: var(--bg-alt);
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 40px;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--border);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: var(--t-xs);
  color: var(--text-2);
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */

.section {
  padding: var(--section-y) 0;
  background: var(--bg);
}

.section-alt { background: var(--bg-alt); }

.section-dark { background: var(--bg-dark); }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: block;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.eyebrow-inv { color: rgba(245,245,247,0.5); }

.section-head h2 {
  font-size: var(--t-h2);
  color: var(--text);
  max-width: 680px;
  margin: 0 auto 18px;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-dark .section-head h2 { color: var(--text-inv); }

.section-head .lead {
  font-size: var(--t-sm);
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.section-dark .section-head .lead { color: var(--text-inv-2); }

/* ─── Feature Grid ───────────────────────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 46px;
  height: 46px;
  background: rgba(0,113,227,0.08);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--blue);
}

html.dark .feature-icon {
  background: rgba(41,151,255,0.12);
  color: #2997FF;
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}

.feature-card p {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.65;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.privacy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.privacy-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
  color: var(--text);
}

.privacy-card p,
.privacy-note {
  color: var(--text-2);
  font-size: var(--t-sm);
  line-height: 1.7;
}

.privacy-note {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(0,113,227,0.16);
  border-radius: var(--radius);
  background: rgba(0,113,227,0.06);
}

.privacy-note a,
.callout a {
  color: var(--blue);
  font-weight: 600;
}

.legal-page {
  max-width: 860px;
}

.legal-page h1 {
  font-size: clamp(38px, 6vw, 64px);
  margin: 14px 0 22px;
}

.legal-page article {
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.legal-page article h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

.legal-page article p,
.legal-page article li {
  color: var(--text-2);
  font-size: var(--t-sm);
  line-height: 1.75;
}

.legal-page article p + p {
  margin-top: 10px;
}

.legal-page article ul {
  padding-left: 20px;
}

.legal-effective {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--t-xs);
}

/* Dark variant */
.section-dark .feature-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.09);
}

.section-dark .feature-card:hover {
  background: rgba(255,255,255,0.09);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.section-dark .feature-icon {
  background: rgba(41,151,255,0.14);
  color: #2997FF;
}

.section-dark .feature-card h3 { color: var(--text-inv); }
.section-dark .feature-card p  { color: var(--text-inv-2); }

/* ─── Support / Note ─────────────────────────────────────────────────────────── */

.support-note {
  margin-top: 36px;
  padding: 14px 18px;
  background: rgba(0,113,227,0.05);
  border: 1px solid rgba(0,113,227,0.12);
  border-radius: var(--radius-sm);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.6;
}

.support-note strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 5px;
}

.legal-note {
  margin-top: 36px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  font-size: var(--t-xs);
  color: rgba(245,245,247,0.45);
  line-height: 1.6;
}

.legal-note strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245,245,247,0.65);
  margin-bottom: 5px;
}

/* ─── Process ────────────────────────────────────────────────────────────────── */

.process-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}

.timeline-step {
  flex: 1;
  padding: 0 20px;
  text-align: center;
  position: relative;
}

.timeline-step::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 0;
  border-top: 1.5px dashed rgba(0,113,227,0.25);
}

.timeline-step:last-child::after { display: none; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  letter-spacing: 0;
}

.timeline-step strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.timeline-step p {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.6;
}

.process-note {
  margin-top: 48px;
  padding: 14px 18px;
  background: rgba(0,113,227,0.05);
  border: 1px solid rgba(0,113,227,0.12);
  border-radius: var(--radius-sm);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.6;
}

.process-note strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 5px;
}

/* ─── CTA Section ────────────────────────────────────────────────────────────── */

.section-cta {
  background: var(--blue);
  padding: var(--section-y) 0;
}

.cta-full-card {
  display: flex;
  align-items: center;
  gap: 56px;
}

.cta-full-body { flex: 1; }

.cta-full-title {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.07;
  margin-bottom: 14px;
}

.cta-full-desc {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.8);
  line-height: 1.65;
  margin-bottom: 22px;
}

.cta-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.cta-feature-item::before {
  content: '✓';
  font-weight: 700;
  color: rgba(255,255,255,0.95);
}

.cta-full-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

/* ─── Developer Section ──────────────────────────────────────────────────────── */

.integration-banner {
  display: flex;
  align-items: center;
  gap: 64px;
}

.integration-banner > div { flex: 1; }

.integration-banner h2 {
  font-size: clamp(26px, 4vw, 40px);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.integration-banner .lead {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.65;
}

/* ─── Pricing ────────────────────────────────────────────────────────────────── */

.pricing-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow);
}

.pricing-label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
}

.pricing-desc {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 28px;
}

.pricing-price {
  font-size: clamp(52px, 8vw, 72px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-unit {
  font-size: 22px;
  color: var(--text-2);
  font-weight: 400;
  letter-spacing: 0;
}

.pricing-note {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.6;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────────── */

.faq-list {
  max-width: 640px;
  margin: 0 auto;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list details:first-child {
  border-top: 1px solid var(--border);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
  transition: color 0.15s;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s;
}

.faq-list details[open] > summary { color: var(--blue); }

.faq-list details[open] > summary::after {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071E3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

html.dark .faq-list summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1A6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

html.dark .faq-list details[open] > summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232997FF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.faq-list details > p {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.65;
  padding-bottom: 20px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  font-size: var(--t-xs);
  color: var(--text-2);
}

.footer-meta {
  flex: 1 1 720px;
  min-width: 0;
}

.company-info {
  margin-top: 10px;
  display: grid;
  gap: 4px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
}

.company-info p {
  line-height: 1.6;
}

.company-info span {
  color: var(--text-1);
  font-weight: 600;
}

.footer-inner nav {
  flex: 0 0 430px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-inner nav a {
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.7;
  transition: color 0.15s;
  white-space: nowrap;
  word-break: keep-all;
}

.footer-inner nav a:hover { color: var(--blue); }

/* ─── Moram widgets ──────────────────────────────────────────────────────────── */

#moram-user-root,
#moram-preference-root {
  display: flex;
  align-items: center;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-grid { grid-template-columns: 1fr; }

  .process-grid { flex-direction: column; gap: 28px; }
  .timeline-step { text-align: left; padding: 0; display: flex; align-items: flex-start; gap: 18px; }
  .timeline-step::after { display: none; }
  .step-num { flex-shrink: 0; margin-bottom: 0; }

  .cta-full-card { flex-direction: column; gap: 32px; }
  .cta-full-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }

  .integration-banner { flex-direction: column; gap: 28px; }
  .integration-banner > a { align-self: flex-start; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { flex-basis: auto; }
  .footer-inner nav {
    flex: 0 1 auto;
    justify-content: flex-start;
    max-width: 100%;
  }

  .stats-inner { flex-direction: column; gap: 24px; }
  .stat-item { padding: 0; }
  .stat-item + .stat-item {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .privacy-card { padding: 24px; }
  .nav-links { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  .footer-inner { text-align: left; }
  .company-info { grid-template-columns: 1fr; }
  .footer-inner nav {
    width: 100%;
    justify-content: center;
  }
  .pricing-card { padding: 32px 24px; }
  .cta-full-card { text-align: center; }
  .cta-feature-row { justify-content: center; }
  .cta-full-actions { align-items: center; }
  .mock-audit { flex-direction: column; }
  .mock-field-row { flex-direction: column; }
}

/* ─── Moram Preference Widget ────────────────────────────────────────────────── */

.hidden { display: none !important; }

.moram-preference-menu {
  position: relative;
}

.moram-preference-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.moram-preference-trigger:hover {
  border-color: rgba(0,0,0,0.16);
  box-shadow: var(--shadow);
}

html.dark .moram-preference-trigger:hover {
  border-color: rgba(255,255,255,0.2);
}

.moram-preference-theme {
  font-size: 12px;
  color: var(--text-2);
}

.moram-preference-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06);
  z-index: 200;
}

html.dark .moram-preference-panel {
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.moram-preference-section + .moram-preference-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.moram-preference-section > p {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.moram-preference-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  transition: background 0.12s;
}

.moram-preference-option:hover {
  background: var(--bg-alt);
}

.moram-preference-option.active {
  background: rgba(0,113,227,0.08);
  color: var(--blue);
  font-weight: 600;
}

html.dark .moram-preference-option.active {
  background: rgba(41,151,255,0.12);
  color: var(--blue);
}

.moram-preference-meta {
  color: var(--text-2);
  font-size: 12px;
}

/* Keep the mobile header inside narrow Android/Samsung viewports. */
@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  @supports not (overflow: clip) {
    html,
    body {
      overflow-x: hidden;
    }
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .header-brand {
    gap: 7px;
    min-width: 0;
  }

  .brand-link,
  .product-lockup {
    min-width: 0;
  }

  .header-actions {
    gap: 6px;
  }

  .moram-preference-trigger {
    min-width: 36px;
    padding: 0 10px;
    gap: 5px;
  }

  .moram-preference-theme {
    display: none;
  }
}

/* ─── Moram User Widget ──────────────────────────────────────────────────────── */

@keyframes moram-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}

.moram-user-loading {
  width: 72px;
  height: 36px;
  border-radius: 980px;
  background: var(--bg-alt);
  animation: moram-pulse 1.4s ease-in-out infinite;
}

.moram-user-login-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 18px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: -0.01em;
}

.moram-user-login-btn:hover {
  background: var(--blue-hover);
}

.moram-user-menu {
  position: relative;
}

.moram-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.moram-user-trigger:hover {
  border-color: rgba(0,0,0,0.16);
  box-shadow: var(--shadow);
}

html.dark .moram-user-trigger:hover {
  border-color: rgba(255,255,255,0.2);
}

.moram-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.moram-user-name {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moram-user-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--text-2);
}

.moram-user-chevron.open {
  transform: rotate(180deg);
}

.moram-user-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(220px, calc(100vw - 32px));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  z-index: 200;
}

html.dark .moram-user-panel {
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.moram-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.moram-user-info-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moram-user-info-email {
  font-size: 11px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moram-user-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.moram-user-option:hover {
  background: var(--bg-alt);
}

.moram-user-option + .moram-user-option {
  border-top: 1px solid var(--border);
}

.moram-user-logout-btn {
  color: #FF3B30;
}

html.dark .moram-user-logout-btn {
  color: #FF453A;
}

/* ─── Nav active state ───────────────────────────────────────────────────────── */

.nav-links a.is-active {
  color: var(--blue);
  font-weight: 600;
}

/* ─── Form elements (global) ─────────────────────────────────────────────────── */

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.field textarea {
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #DC2626;
  background: rgba(239,68,68,0.06);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.field-error,
.action-error {
  font-size: 13px;
  font-weight: 600;
  color: #B91C1C;
}

.action-error {
  margin-top: -6px;
}

html.dark .field input,
html.dark .field select,
html.dark .field textarea {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
  color: var(--text);
}

html.dark .field input:focus,
html.dark .field select:focus,
html.dark .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(41,151,255,0.15);
}

html.dark .field.is-invalid input,
html.dark .field.is-invalid select,
html.dark .field.is-invalid textarea {
  border-color: #F87171;
  background: rgba(248,113,113,0.10);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.14);
}

html.dark .field-error,
html.dark .action-error {
  color: #FCA5A5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-2);
  opacity: 0.7;
}

.field-grid      { display: grid; gap: 12px; }
.field-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.field-grid.three-col { grid-template-columns: repeat(3, 1fr); }

code {
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
  font-size: 0.9em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text);
}

/* ─── Signing Page Layout ────────────────────────────────────────────────────── */

.signing-page-section {
  padding-top: 52px;
  padding-bottom: 80px;
}

.signing-page-head {
  margin-bottom: 36px;
}

.signing-page-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 10px;
  color: var(--text);
}

.signing-page-lead {
  max-width: 640px;
  margin-top: 12px;
  color: var(--text-2);
  font-size: var(--t-sm);
  line-height: 1.65;
}

.signing-stack {
  display: grid;
  gap: 20px;
  position: relative;
}

/* ─── Auth Gate Overlay ──────────────────────────────────────────────────── */

.auth-gate {
  position: absolute;
  inset: -8px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 40px 16px;
}

html.dark .auth-gate {
  background: rgba(0,0,0,0.65);
}

.auth-gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: min(360px, calc(100vw - 48px));
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
}

html.dark .auth-gate-card {
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.auth-gate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0,113,227,0.08);
  color: var(--blue);
  flex-shrink: 0;
}

html.dark .auth-gate-icon {
  background: rgba(41,151,255,0.12);
}

.auth-gate-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.auth-gate-desc {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.65;
}

/* ─── Flash Messages ─────────────────────────────────────────────────────────── */

.flash {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
}

.flash-info {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.flash-success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.22);
  color: #15803D;
}

html.dark .flash-success { color: #4ADE80; }

.flash-error {
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.22);
  color: #B91C1C;
}

html.dark .flash-error { color: #FCA5A5; }

/* ─── Billing Gate ─────────────────────────────────────────────────────────── */

.billing-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(245,158,11,0.34);
  border-radius: var(--radius);
  background: color-mix(in srgb, #FFF7ED 82%, var(--surface));
  color: #92400E;
  box-shadow: 0 16px 38px rgba(146,64,14,0.12);
}

.billing-gate strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.billing-gate p {
  margin-top: 4px;
  color: inherit;
  font-size: 13px;
  line-height: 1.6;
}

html.dark .billing-gate {
  border-color: rgba(251,191,36,0.36);
  background: rgba(120,53,15,0.28);
  color: #FDE68A;
  box-shadow: 0 16px 38px rgba(0,0,0,0.28);
}

/* ─── Step Guidance ─────────────────────────────────────────────────────────── */

.step-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(0,113,227,0.22);
  border-radius: var(--radius-sm);
  background: rgba(0,113,227,0.07);
  color: var(--text);
}

.step-guidance strong {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.step-guidance span {
  flex: 1;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}

html.dark .step-guidance {
  border-color: rgba(41,151,255,0.3);
  background: rgba(41,151,255,0.11);
}

/* ─── Step Panel ─────────────────────────────────────────────────────────────── */

.step-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

#step-2-placement {
  scroll-margin-top: 88px;
}

.step-panel:focus {
  outline: none;
}

.step-panel.is-placement-ready {
  border-color: rgba(0,113,227,0.42);
  animation: step-placement-pulse 1.15s ease-in-out 3;
}

.placement-toolbar.is-placement-ready {
  animation: toolbar-placement-pulse 1.15s ease-in-out 3;
}

@keyframes step-placement-pulse {
  0%, 100% {
    box-shadow: var(--shadow-sm);
  }
  45% {
    box-shadow: 0 0 0 5px rgba(0,113,227,0.14), var(--shadow);
  }
}

@keyframes toolbar-placement-pulse {
  0%, 100% {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
  }
  45% {
    box-shadow: 0 0 0 4px rgba(0,113,227,0.12), var(--shadow-sm);
    border-color: rgba(0,113,227,0.34);
  }
}

.step-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.step-heading > div { flex: 1; }

.step-heading h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.step-heading p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(0,113,227,0.08);
  color: var(--blue);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

html.dark .step-chip {
  background: rgba(41,151,255,0.12);
  color: var(--blue);
}

/* ─── Status Chip ────────────────────────────────────────────────────────────── */

.status-chip,
.summary-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
}

.status-chip.success {
  border-color: rgba(34,197,94,0.28);
  background: rgba(34,197,94,0.10);
  color: #15803D;
}

html.dark .status-chip.success { color: #4ADE80; background: rgba(34,197,94,0.15); }

.status-chip.warning {
  border-color: rgba(245,158,11,0.28);
  background: rgba(245,158,11,0.10);
  color: #B45309;
}

html.dark .status-chip.warning { color: #FCD34D; }

.status-chip.error {
  border-color: rgba(239,68,68,0.28);
  background: rgba(239,68,68,0.10);
  color: #B91C1C;
}

html.dark .status-chip.error { color: #FCA5A5; }

.status-chip.muted { color: var(--text-2); }

.summary-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: rgba(0,113,227,0.08);
  border-radius: 980px;
  padding: 2px 9px;
  min-height: unset;
}

/* ─── Stack card (form) ──────────────────────────────────────────────────────── */

.stack-card {
  display: grid;
  gap: 16px;
}

/* ─── Inline head ────────────────────────────────────────────────────────────── */

.inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ─── Nested card (participant) ──────────────────────────────────────────────── */

.nested-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

/* ─── Stack list ─────────────────────────────────────────────────────────────── */

.stack-list {
  display: grid;
  gap: 12px;
}

/* ─── Action row ─────────────────────────────────────────────────────────────── */

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.submit-action-row {
  justify-content: center;
  margin-top: 1.5rem;
}

.submit-action-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(520px, 100%);
}

.button-warning {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(245,158,11,0.34);
  background: color-mix(in srgb, #FFF7ED 78%, var(--surface));
  color: #92400E;
  box-shadow: 0 14px 34px rgba(146,64,14,0.12);
}

.button-warning strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.button-warning p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.55;
}

.button-warning-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: #92400E;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.button-warning-link:hover {
  background: #78350F;
}

html.dark .button-warning {
  border-color: rgba(251,191,36,0.36);
  background: rgba(120,53,15,0.28);
  color: #FDE68A;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

html.dark .button-warning-link {
  background: #FBBF24;
  color: #111827;
}

/* ─── Prepare progress bar ───────────────────────────────────────────────────── */

.prepare-progress-bar {
  margin-top: 12px;
  width: 100%;
  height: 4px;
  border-radius: 980px;
  overflow: hidden;
  background: rgba(0,113,227,0.10);
}

.prepare-progress-bar-fill {
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #5BABFF);
  animation: preview-loading-slide 1.1s ease-in-out infinite;
}

/* ─── Drop Zone ──────────────────────────────────────────────────────────────── */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: rgba(0,113,227,0.4);
  background: rgba(0,113,227,0.03);
}

.drop-zone.is-over {
  border-color: var(--blue);
  border-style: solid;
  background: rgba(0,113,227,0.06);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

html.dark .drop-zone {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

html.dark .drop-zone:hover {
  border-color: rgba(41,151,255,0.4);
}

html.dark .drop-zone.is-over {
  border-color: var(--blue);
  background: rgba(41,151,255,0.08);
}

.drop-zone-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 24px;
  text-align: center;
}

.drop-zone-icon {
  color: var(--text-2);
  opacity: 0.6;
}

.drop-zone.is-over .drop-zone-icon {
  color: var(--blue);
  opacity: 1;
}

.drop-zone-hint {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}

.drop-zone-pick {
  position: relative;
  z-index: 1;
  pointer-events: all;
}

.drop-zone-types {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.drop-zone-done {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.drop-zone-file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #DC2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.drop-zone-file-badge[data-ext="docx"] { background: #2563EB; }
.drop-zone-file-badge[data-ext="hwpx"],
.drop-zone-file-badge[data-ext="hwp"]  { background: #0F766E; }

.drop-zone-file-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.drop-zone-change {
  flex-shrink: 0;
  font-size: 13px;
}

/* ─── Placement Toolbar ──────────────────────────────────────────────────────── */

.placement-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tool-group {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-field {
  min-width: 160px;
  display: grid;
  gap: 5px;
}

.compact-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.compact-field select {
  min-height: 38px;
  font-size: 13px;
}

/* ─── Step 2 Meta Row ────────────────────────────────────────────────────────── */

.step2-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.preview-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.preview-status-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.preview-status-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

.field-summary-panel {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.placed-fields-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.placed-fields-list.empty {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.placed-fields-list.empty p {
  font-size: 13px;
  color: var(--text-2);
}

.placed-field-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.placed-field-item.active {
  border-color: rgba(0,113,227,0.35);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.10);
}

.placed-field-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.placed-field-meta {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.placed-field-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
}

.placed-field-page-control { min-width: 100px; }
.placed-field-page-select  { min-width: 100px; }
.placed-field-page-control span { font-size: 12px; }

/* ─── Signing Preview ────────────────────────────────────────────────────────── */

.signing-preview-wrap {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.signing-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.signing-preview-head strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.signing-preview-head p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── PDF Preview Shell ──────────────────────────────────────────────────────── */

.pdf-preview-shell {
  position: relative;
  min-height: 520px;
  padding: 16px;
  border-radius: 0;
  border: none;
  background: var(--bg-alt);
}

.pdf-preview-shell.empty {
  display: grid;
  place-items: center;
}

.pdf-preview-shell:not(.empty) .preview-empty,
.pdf-preview-shell.is-loading .preview-empty {
  display: none;
}

.pdf-preview-shell--full {
  min-height: 640px;
  padding: 24px;
}

.pdf-preview-shell--full .pdf-page-stage {
  max-width: 100%;
}

.preview-empty {
  max-width: 280px;
  text-align: center;
}

.preview-empty strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.preview-empty p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.preview-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
}

html.dark .preview-loading {
  background: rgba(0,0,0,0.7);
}

.preview-loading-card {
  width: min(400px, 100%);
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,113,227,0.2);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}

.preview-loading-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.preview-loading-card p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

.preview-loading-bar {
  position: relative;
  margin-top: 14px;
  width: 100%;
  height: 4px;
  border-radius: 980px;
  overflow: hidden;
  background: rgba(0,113,227,0.10);
}

.preview-loading-bar-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #5BABFF);
  animation: preview-loading-slide 1.1s ease-in-out infinite;
}

@keyframes preview-loading-slide {
  0%   { transform: translateX(-110%); }
  60%  { transform: translateX(135%); }
  100% { transform: translateX(135%); }
}

.pdf-preview-pages {
  display: grid;
  gap: 18px;
}

.pdf-page-card {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pdf-page-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.pdf-page-stage {
  position: relative;
  width: 100%;
  max-width: 840px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.pdf-page-card.is-active .pdf-page-stage {
  border-color: rgba(0,113,227,0.4);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.pdf-page-stage canvas {
  display: block;
  width: 100%;
  height: auto;
}

.pdf-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.pdf-text-layer > span,
.pdf-text-layer > br {
  position: absolute;
  color: rgba(0,0,0,0.01);
  white-space: pre;
  transform-origin: 0 0;
  line-height: 1;
  pointer-events: none;
}

.page-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ─── Sign Fields (drag & drop) ──────────────────────────────────────────────── */

.sign-field {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 34px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(0,0,0,0.07);
  cursor: move;
  user-select: none;
  touch-action: none;
}

.sign-field[data-type="signature"] {
  background: rgba(0,113,227,0.10);
  border-color: rgba(0,113,227,0.45);
}

.sign-field[data-type="name"] {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.45);
}

.sign-field[data-type="date"] {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.45);
}

.sign-field.is-active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.10);
}

.sign-field-label {
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.sign-field-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--text);
  cursor: nwse-resize;
}

/* ─── Result Panel ───────────────────────────────────────────────────────────── */

.result-panel {
  min-height: 140px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  background: var(--bg-alt);
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}

.result-panel.muted-panel {
  display: grid;
  place-items: center;
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.result-grid > div {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.result-grid strong,
.result-links strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 5px;
}

.result-grid span,
.result-links a,
.result-link a {
  font-size: 13px;
  line-height: 1.55;
  word-break: break-all;
  color: var(--text);
}

.result-links a { color: var(--blue); }
.result-links a:hover { text-decoration: underline; }

.result-link { margin-top: 12px; }

.result-links {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.result-links ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   API DOCS PAGE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── API Hero ───────────────────────────────────────────────────────────────── */

.api-hero {
  background: var(--bg);
  padding: clamp(60px, 8vw, 100px) 0 0;
  text-align: center;
}

.api-hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 12px 0 20px;
}

.api-hero-lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 32px;
}

.api-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.api-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  flex-wrap: wrap;
  gap: 0;
}

.api-flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
}

.api-flow-step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.api-flow-step > div span {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  font-family: ui-monospace, "SF Mono", monospace;
  margin-top: 2px;
}

.api-flow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.api-flow-arrow {
  font-size: 18px;
  color: var(--text-2);
  flex-shrink: 0;
}

/* ─── API Body Layout ────────────────────────────────────────────────────────── */

.api-body {
  background: var(--bg);
}

.api-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  align-items: start;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */

.api-sidebar {
  position: sticky;
  top: 60px;
  padding: 40px 0;
  border-right: 1px solid var(--border);
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.api-toc {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 20px;
}

.api-toc-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.api-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
  padding-left: 12px;
}

.api-toc-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  font-weight: 450;
}

.api-toc-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.api-toc-link.active {
  background: rgba(0,113,227,0.08);
  color: var(--blue);
  font-weight: 600;
}

html.dark .api-toc-link.active {
  background: rgba(41,151,255,0.12);
}

.toc-method {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  flex-shrink: 0;
}

.toc-post { background: rgba(0,113,227,0.1); color: var(--blue); }
.toc-get  { background: rgba(52,168,83,0.1); color: #34a853; }

html.dark .toc-get { color: #4ade80; background: rgba(74,222,128,0.1); }

/* ─── Content Area ───────────────────────────────────────────────────────────── */

.api-content {
  padding: 40px 0 80px 48px;
  min-width: 0;
}

.api-section {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.api-section:last-child {
  border-bottom: none;
}

.api-section-head {
  margin-bottom: 28px;
}

.api-section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}

.api-section-head p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.api-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 16px 0 24px;
}

/* ─── Endpoint Header ────────────────────────────────────────────────────────── */

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.endpoint-path {
  font-size: 15px;
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
  color: var(--text);
  background: none;
  padding: 0;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", monospace;
  flex-shrink: 0;
}

.method-badge.post { background: rgba(0,113,227,0.1); color: var(--blue); }
.method-badge.get  { background: rgba(52,168,83,0.1); color: #34a853; }
.method-badge.delete { background: rgba(234,67,53,0.1); color: #ea4335; }

html.dark .method-badge.get { color: #4ade80; background: rgba(74,222,128,0.1); }
html.dark .method-badge.delete { color: #f87171; background: rgba(248,113,113,0.12); }

/* ─── Steps ──────────────────────────────────────────────────────────────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 28px;
}

.step-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
}

.step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 6px 0 8px;
}

.step-body p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0 0 12px;
}

/* ─── Code Blocks ────────────────────────────────────────────────────────────── */

.code-tabs-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
}

.code-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}

.code-tab-btn:hover { color: var(--text); }
.code-tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

.code-tabs-container .code-block {
  border: none;
  border-radius: 0;
}

.code-block {
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

html.dark .code-block {
  background: #0d0d0f;
  border-color: rgba(255,255,255,0.08);
}

.code-block pre {
  margin: 0;
  padding: 20px 20px 20px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}

.code-block code {
  font-family: ui-monospace, "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: #e6edf3;
  background: none;
  padding: 0;
  font-size: 13px;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  z-index: 2;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ─── Parameter Tables ───────────────────────────────────────────────────────── */

.param-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 28px 0 12px;
}

.param-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.param-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.param-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  line-height: 1.5;
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-table code {
  font-size: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ─── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 980px;
  white-space: nowrap;
}

.badge.req  { background: rgba(255,59,48,0.1); color: #FF3B30; }
.badge.opt  { background: rgba(0,0,0,0.06); color: var(--text-2); }
.badge.cond { background: rgba(255,149,0,0.1); color: #FF9500; }

html.dark .badge.req  { background: rgba(255,69,58,0.15); color: #FF453A; }
html.dark .badge.opt  { background: rgba(255,255,255,0.08); }
html.dark .badge.cond { background: rgba(255,159,10,0.15); color: #FF9F0A; }

/* ─── Callouts ───────────────────────────────────────────────────────────────── */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}

.callout svg { flex-shrink: 0; margin-top: 1px; }

.callout-blue {
  background: rgba(0,113,227,0.06);
  border: 1px solid rgba(0,113,227,0.15);
  color: var(--text);
}

.callout-blue svg { color: var(--blue); }

.callout-privacy {
  background: rgba(242,95,76,0.07);
  border: 1px solid rgba(242,95,76,0.18);
  color: var(--text);
}

.callout-privacy svg { color: var(--coral); }

.callout-yellow {
  background: rgba(255,149,0,0.06);
  border: 1px solid rgba(255,149,0,0.2);
  color: var(--text);
}

.callout-yellow svg { color: #FF9500; }

html.dark .callout-yellow svg { color: #FF9F0A; }

.callout a { color: var(--blue); }

/* ─── Environment Cards ──────────────────────────────────────────────────────── */

.env-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.env-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.env-test { background: var(--bg-alt); }
.env-live { background: rgba(0,113,227,0.04); border-color: rgba(0,113,227,0.15); }

html.dark .env-live { background: rgba(41,151,255,0.05); }

.env-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.env-test .env-badge { background: rgba(0,0,0,0.08); color: var(--text-2); }
.env-live .env-badge { background: rgba(0,113,227,0.1); color: var(--blue); }

.env-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.env-card p {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 12px;
  line-height: 1.5;
}

.env-url {
  display: block;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text-2);
  word-break: break-all;
  background: none;
  padding: 0;
}

/* ─── Tips Grid ──────────────────────────────────────────────────────────────── */

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tip-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.tip-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.tip-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.tip-card a { color: var(--blue); }

/* ─── API Page Responsive ────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .api-layout {
    grid-template-columns: 1fr;
  }

  .api-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
  }

  .api-toc {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 0;
  }

  .api-toc-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .api-toc-label { display: none; }

  .api-content {
    padding: 32px 0 60px;
  }

  .api-flow-strip {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 24px;
  }

  .api-flow-arrow {
    transform: rotate(90deg);
    margin-left: 8px;
  }

  .tips-grid { grid-template-columns: 1fr; }
  .env-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .step-item { grid-template-columns: 28px 1fr; gap: 12px; }
  .step-badge { width: 28px; height: 28px; font-size: 12px; }
  .api-hero-title { font-size: 36px; }
}

/* ─── API Key Modal ──────────────────────────────────────────────────────────── */

.key-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.key-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(520px, calc(100vw - 32px));
  box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.08);
  overflow: hidden;
}

html.dark .key-modal {
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.key-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.key-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.key-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s;
}

.key-modal-close:hover { background: var(--border); }

.key-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 120px;
  justify-content: center;
}

.key-modal-body .callout,
.key-modal-body .key-field-group {
  text-align: left;
  width: 100%;
}

.key-modal-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.key-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.key-field-note {
  font-weight: 400;
  color: var(--text-2);
}

.key-env-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.key-env-test { background: rgba(0,0,0,0.07); color: var(--text-2); }
.key-env-live { background: rgba(0,113,227,0.1); color: var(--blue); }

html.dark .key-env-test { background: rgba(255,255,255,0.08); }

.key-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
}

.key-value {
  flex: 1;
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  color: #e6edf3;
  background: none;
  padding: 0;
  word-break: break-all;
  min-width: 0;
}

.key-copy-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.key-copy-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ─── requires-auth dim ──────────────────────────────────────────────────────── */

.requires-auth[disabled],
.requires-auth:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ─── Start page responsive ──────────────────────────────────────────────────── */

@media (max-width: 780px) {
  .step2-meta-row { grid-template-columns: 1fr; }
  .pdf-preview-shell--full { min-height: 400px; padding: 12px; }
  .field-grid.two-col,
  .field-grid.three-col { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .placement-toolbar { flex-direction: column; align-items: flex-start; }
  .preview-status-card { flex-direction: column; align-items: flex-start; }
  .billing-gate { flex-direction: column; align-items: flex-start; }
  .step-guidance { flex-direction: column; align-items: flex-start; }
  .step-guidance strong { white-space: normal; }
  .billing-gate .button-warning-link { width: 100%; }
  .button-warning { flex-direction: column; align-items: flex-start; }
  .button-warning-link { width: 100%; }
}
