/* ITR Summary — responsive layout */
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0c4a6e;
  --brand-light: #0369a1;
  --accent: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --danger: #b91c1c;
  --success: #166534;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.small { font-size: 0.875rem; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header-inner {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text) !important;
  text-decoration: none !important;
}

.brand-mark {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-toggle { display: none; }

.nav-burger {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
}

.site-nav a:not(.btn) {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-user {
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-logout {
  display: inline;
  margin: 0;
}

.badge-pro {
  font-size: 0.65rem;
  vertical-align: middle;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .nav-burger { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow);
    gap: 0.5rem;
  }
  .site-nav a, .site-nav .nav-user, .site-nav form {
    padding: 0.5rem 0;
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }
}

.main-content {
  flex: 1;
  padding-bottom: 2rem;
}

.messages-wrap { padding-top: 1rem; }

.messages {
  list-style: none;
  padding: 0;
  margin: 0;
}
.messages li {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.messages .success { background: #dcfce7; color: var(--success); }
.messages .error { background: #fee2e2; color: var(--danger); }
.messages .info, .messages .warning { background: #e0f2fe; color: #0369a1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none !important;
  font-family: inherit;
}

.btn:hover { filter: brightness(0.97); text-decoration: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  border-color: transparent;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.875rem; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

/* Cards & tables */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.data-table th { background: #f8fafc; font-weight: 600; }

.stack > * + * { margin-top: 0.75rem; }

.review-table input.wide {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
}

.meta-grid {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.mono { font-family: var(--mono); font-size: 0.85rem; }

.error { color: var(--danger); }
.error-block { background: #fee2e2; padding: 1rem; border-radius: var(--radius); }
.warn-block { background: #fef9c3; padding: 1rem; border-radius: var(--radius); }

/* Marketing hero */
.hero {
  padding: 2.5rem 0 2rem;
  background: linear-gradient(165deg, #e0f2fe 0%, #f0fdfa 45%, var(--bg) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-inner {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.seo-section {
  padding: 2rem 0;
  max-width: 68ch;
  margin: 0 auto;
}

.seo-section h2 {
  font-size: 1.15rem;
  color: var(--brand);
}

.seo-section p, .seo-section li {
  color: #334155;
  font-size: 0.95rem;
}

.keyword-cloud {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Guidance + collapsible comments (marketing home) */
.guidance-section {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

.guidance-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--brand);
}

.guidance-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.comments-panel {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.comments-panel__summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.comments-panel__summary::-webkit-details-marker {
  display: none;
}

.comments-panel__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 0.15s ease;
  color: var(--muted);
  font-weight: 400;
}

.comments-panel[open] .comments-panel__summary::before {
  transform: rotate(90deg);
}

.comments-panel__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.12), rgba(13, 148, 136, 0.15));
  color: var(--brand);
}

.comments-panel__summary-text {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.comments-panel__title {
  font-size: 1.1rem;
}

.comments-panel__open {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

.comments-panel__body {
  margin: 0 1.25rem 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.comments-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.comments-textarea {
  width: 100%;
  margin-bottom: 0.75rem;
  font-family: var(--font);
}

.comments-post-btn {
  margin-top: 0.25rem;
}

.comments-thread {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.comment {
  margin-bottom: 1rem;
}

.comment--nested {
  margin-left: 1rem;
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid rgba(13, 148, 136, 0.35);
}

.comment__meta {
  margin-bottom: 0.35rem;
}

.comment__body {
  margin: 0;
  font-size: 0.95rem;
}

.comments-form--reply {
  margin-top: 0.75rem;
  max-width: 100%;
}

.comments-form--reply .comments-textarea {
  margin-bottom: 0.5rem;
}

.comments-empty {
  margin: 0;
}

.comments-jump {
  margin: 1rem 0 0;
}

.comments-signin-hint {
  margin-bottom: 0;
}

/* Forms auth */
.form-card {
  max-width: 420px;
  margin: 2rem auto;
}

.form-field {
  margin-bottom: 1rem;
}
.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.form-field input,
.form-field .form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.form-errors {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── Google OAuth button ───────────────────────────────────────────── */
.oauth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 1rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.oauth-google:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
  color: #3c4043;
  text-decoration: none;
}
.oauth-google:active {
  background: #f1f3f4;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.oauth-google__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.oauth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.125rem 0;
  color: var(--muted, #6b7280);
  font-size: 0.8125rem;
}
.oauth-or::before,
.oauth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e5e7eb);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.pricing-grid--4col {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.price-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 2px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-card.featured,
.price-card--essentials {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 40%);
}

.price-card--pro {
  border-color: var(--brand-light);
  background: linear-gradient(180deg, #eff6ff 0%, #fff 40%);
}

.price-card--enterprise {
  border-style: dashed;
}

.price-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price-card__name {
  font-weight: 700;
  font-size: 1.05rem;
}

.price-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(13, 148, 136, 0.25));
  color: #0f766e;
}

.price-card__badge--alt {
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.12), rgba(3, 105, 161, 0.22));
  color: var(--brand-light);
}

.price-card__amount {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.35rem 0 0.1rem;
}

.price-card__price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.price-card__unit {
  font-size: 0.875rem;
}

.price-card__saving {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f766e;
  margin: 0 0 0.25rem;
}

.price-card__features {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.price-card__features li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.price-card__cta {
  width: 100%;
  justify-content: center;
  text-align: center;
  margin-top: auto;
}

.price-tag {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
}

/* Pricing page hero */
.pricing-hero {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  max-width: 52ch;
  margin: 0 auto;
}

.pricing-hero__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.pricing-hero__lead {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.pricing-hero__note {
  margin: 0;
}

.pricing-free-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem auto 0;
  max-width: fit-content;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.22);
  font-size: 0.875rem;
  color: #0f766e;
}

.pricing-free-note__icon {
  flex-shrink: 0;
  color: var(--accent);
}

.pricing-credit-balance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem auto 0;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.22);
  font-size: 0.9rem;
  color: #0f766e;
  max-width: fit-content;
}

/* ── Plan status bar (documents workspace) ───────────────────── */
.plan-status-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.plan-status-bar__icon { flex-shrink: 0; line-height: 1; }
.plan-status-bar__action { margin-left: auto; }
.plan-status-bar--active {
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: #0f766e;
}
.plan-status-bar--expired {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.22);
  color: #b91c1c;
}
.plan-status-bar--payg {
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #4338ca;
}

/* Export quota note inside "Ready to generate" card */
.export-quota-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #0f766e;
  margin-bottom: 1rem;
  padding: 0.45rem 0.75rem;
  background: rgba(13, 148, 136, 0.07);
  border-radius: 6px;
  border: 1px solid rgba(13, 148, 136, 0.18);
}

/* Export pay-wall */
.export-pay-wall {
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow);
}

.export-plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.export-plan-card {
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.export-plan-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 60%);
}

.export-plan-card__top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.export-plan-card__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.export-plan-card__badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}

.export-plan-card__badge--alt {
  background: rgba(3, 105, 161, 0.12);
  color: var(--brand-light);
}

.export-plan-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.export-plan-card__desc {
  font-size: 0.8rem;
  margin: 0;
}

.export-plan-card__btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.55rem 0.75rem;
}

/* Checkout bundle */
.checkout-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.checkout-bundle-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.checkout-bundle-summary__left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkout-bundle-summary__name {
  font-weight: 700;
  font-size: 1.1rem;
}

.checkout-bundle-summary__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
  width: fit-content;
}

.checkout-bundle-summary__right {
  text-align: right;
  flex-shrink: 0;
}

.checkout-bundle-summary__price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand);
  display: block;
  line-height: 1;
}

.checkout-divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin: 1.25rem 0;
}

.checkout-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.checkout-pay-btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  border-radius: 12px;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.checkout-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.38);
}

.checkout-back-link {
  margin-top: 1.25rem;
  text-align: center;
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

@media (max-width: 480px) {
  .footer-grid { flex-direction: column; }
}

/* Sample PDF section + modal */
.sample-output-section {
  margin-bottom: 1.5rem;
}

.sample-output-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .sample-output-grid {
    grid-template-columns: 1fr minmax(200px, 0.38fr);
    align-items: start;
  }
}

.sample-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sample-output-hint {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.sample-output-hint kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

body.pdf-modal-open {
  overflow: hidden;
}

.pdf-modal[hidden] {
  display: none !important;
}

.pdf-modal:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

.pdf-modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 2rem));
  height: min(85vh, 720px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.pdf-modal-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.pdf-modal-toolbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.pdf-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.pdf-modal-close:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text);
}

.pdf-modal-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.pdf-modal-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: none;
  background: #e2e8f0;
}

.pdf-modal-fallback {
  padding: 0.5rem 1rem 0.75rem;
  margin: 0;
}

@media (max-width: 640px) {
  .pdf-modal-dialog {
    width: calc(100vw - 1rem);
    height: min(88vh, 640px);
  }
}

/* --- Beta homepage focal (anonymous try-first layout) --- */
.home-beta-focal .main-content {
  padding-bottom: 0;
}

.beta-spotlight {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 3.75rem) 0 clamp(2rem, 5vw, 3rem);
  isolation: isolate;
}

.beta-spotlight__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(56, 189, 248, 0.38), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 40%, rgba(45, 212, 191, 0.22), transparent 52%),
    radial-gradient(ellipse 45% 38% at 0% 75%, rgba(14, 165, 233, 0.14), transparent 48%),
    linear-gradient(185deg, #eff6ff 0%, #ecfeff 38%, #f0fdfa 72%, var(--bg) 100%);
  z-index: -2;
}

.beta-spotlight__mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
  pointer-events: none;
}

.beta-spotlight__glow {
  position: absolute;
  width: min(760px, 110vw);
  height: min(760px, 110vw);
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(13, 148, 136, 0.22) 0%, transparent 62%);
  filter: blur(48px);
  z-index: -1;
  animation: beta-glow-pulse 9s ease-in-out infinite alternate;
}

@keyframes beta-glow-pulse {
  from {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beta-spotlight__glow {
    animation: none;
    opacity: 0.8;
  }
}

.beta-spotlight__inner {
  width: min(680px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.beta-spotlight__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #0f766e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.95));
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  margin: 0 auto 1.1rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 22px rgba(13, 148, 136, 0.12);
}

.beta-spotlight__eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.35);
  animation: beta-dot 2s ease-in-out infinite;
}

@keyframes beta-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beta-spotlight__eyebrow-dot {
    animation: none;
  }
}

.beta-spotlight h1 {
  font-size: clamp(1.95rem, 5.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 0.85rem;
  background: linear-gradient(120deg, var(--text) 0%, #0e7490 55%, var(--brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.beta-spotlight__lead {
  font-size: 1.08rem;
  color: #475569;
  max-width: 46ch;
  margin: 0 auto 1.85rem;
  line-height: 1.55;
}

.beta-spotlight__card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: clamp(1.35rem, 3.8vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 4px 6px -2px rgba(15, 23, 42, 0.04),
    0 22px 48px -14px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(13, 148, 136, 0.07);
  text-align: left;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.beta-spotlight__card:hover {
  box-shadow:
    0 4px 6px -2px rgba(15, 23, 42, 0.05),
    0 28px 56px -16px rgba(13, 148, 136, 0.16),
    0 0 0 1px rgba(13, 148, 136, 0.1);
}

.beta-spotlight__card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.beta-spotlight__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--brand-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    0 10px 28px rgba(13, 148, 136, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.beta-spotlight__icon-svg {
  display: block;
}

.beta-spotlight__card-intro {
  flex: 1;
  min-width: 0;
}

.beta-spotlight__card-title {
  margin: 0 0 0.4rem;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}

.beta-spotlight__card-desc {
  margin: 0;
  line-height: 1.5;
}

.beta-upload-field label {
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.beta-upload-field input[type="file"] {
  width: 100%;
  padding: 1rem 1rem;
  border: 2px dashed rgba(13, 148, 136, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer;
  font-size: 0.88rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.beta-upload-field input[type="file"]:hover {
  border-color: rgba(13, 148, 136, 0.75);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #fff;
}

.beta-upload-field input[type="file"]::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1.05rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
}

.beta-upload-field input[type="file"]::file-selector-button:hover {
  filter: brightness(1.05);
}

.beta-spotlight__submit {
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.88rem 1.35rem;
  font-size: 1.06rem;
  border-radius: 13px;
  box-shadow:
    0 10px 32px rgba(13, 148, 136, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.beta-spotlight__submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(13, 148, 136, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.beta-spotlight__trust {
  list-style: none;
  padding: 0;
  margin: 1.3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  justify-content: center;
  font-size: 0.82rem;
  color: #64748b;
}

.beta-spotlight__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.beta-spotlight__trust li span[aria-hidden="true"] {
  color: var(--accent);
  font-weight: 700;
}

.beta-spotlight__secondary {
  margin-top: 1.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  align-items: center;
  font-size: 0.94rem;
}

.beta-spotlight__sep {
  color: #cbd5e1;
  user-select: none;
}

.beta-spotlight__oauth {
  margin: 1.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
  align-items: center;
}

.home-features-strip {
  padding: 2.25rem 0 2.75rem;
  background: linear-gradient(180deg, var(--bg) 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.home-features-strip__title {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 1.35rem;
}

.home-features-strip .feature-grid {
  margin-top: 0;
}

@media (max-width: 540px) {
  .beta-spotlight__card-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .beta-spotlight__card {
    text-align: center;
  }

  .beta-upload-field input[type="file"] {
    text-align: left;
  }
}

/* --- Upload page --- */
.upload-page-shell {
  display: flex;
  flex-direction: column;
}

.upload-steps-bar {
  background: var(--surface);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.75rem 0;
}

.upload-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  counter-reset: steps;
}

.upload-steps__step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.upload-steps__step + .upload-steps__step::before {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: rgba(148, 163, 184, 0.4);
  margin: 0 0.65rem;
  flex-shrink: 0;
}

.upload-steps__step--active {
  color: var(--accent);
  font-weight: 700;
}

.upload-steps__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
  line-height: 1;
}

.upload-steps__step--active .upload-steps__num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.upload-wrap {
  padding-top: 2.25rem;
  padding-bottom: 3rem;
  max-width: min(600px, calc(100% - 2rem));
}

.upload-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.upload-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.upload-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.32);
}

.upload-card__heading {
  flex: 1;
  min-width: 0;
}

.upload-card__title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
}

.upload-card__subtitle {
  margin: 0;
}

.upload-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.upload-format-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.07), rgba(13, 148, 136, 0.1));
  border: 1px solid rgba(13, 148, 136, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.upload-format-pill__note {
  font-weight: 400;
  color: var(--muted);
}

.upload-form {
  margin-top: 0;
}

.upload-submit-btn {
  width: 100%;
  padding: 0.8rem 1.25rem;
  font-size: 1rem;
  border-radius: 12px;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.3);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.upload-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(13, 148, 136, 0.4);
}

.upload-info-strip {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.875rem;
  color: #475569;
}

.upload-info-item p {
  margin: 0;
  line-height: 1.5;
}

.upload-info-item__icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .upload-steps__label {
    display: none;
  }

  .upload-steps__step--active .upload-steps__label {
    display: inline;
  }
}

/* --- Export PDF confirmation (CA WeasyPrint) --- */
.page-export-pdf .main-content {
  padding-top: 0;
}

.export-confirm-shell {
  min-height: min(70vh, 640px);
}

.export-confirm-hero {
  background: linear-gradient(165deg, #e0f2fe 0%, #f0fdfa 48%, var(--bg) 100%);
  padding: clamp(1.75rem, 4.5vw, 2.75rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.export-confirm-inner {
  max-width: 34rem;
  margin: 0 auto;
}

.export-confirm-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0d9488;
  margin: 0 0 0.4rem;
}

.export-confirm-hero h1 {
  font-size: clamp(1.5rem, 3.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.export-doc-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.export-doc-name {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  word-break: break-all;
}

.export-doc-id {
  font-size: 0.82rem;
}

.export-retention-card {
  margin-top: 1.35rem;
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(13, 148, 136, 0.06);
}

.export-retention-lead {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #334155;
}

.export-retention-sub {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

.export-status-block {
  margin-top: 1.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
}

.export-status-title {
  margin: 0 0 0.65rem;
}

.export-issue-list {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  line-height: 1.5;
  font-size: 0.92rem;
}

.export-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.export-warnings-only {
  border: 1px solid rgba(234, 179, 8, 0.45);
}

.export-form-card {
  margin-top: 1.5rem;
  padding: 1.35rem 1.35rem 1.45rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow:
    0 12px 36px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(13, 148, 136, 0.07);
}

.export-form-title {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.export-form-desc {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.export-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-export-primary {
  padding: 0.72rem 1.45rem;
  font-size: 1.02rem;
  border-radius: 12px;
  box-shadow:
    0 10px 28px rgba(13, 148, 136, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.btn-export-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 32px rgba(13, 148, 136, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

@media (max-width: 480px) {
  .export-doc-pill {
    flex-direction: column;
    align-items: flex-start;
  }
}
