@font-face {
  font-family: "Source Sans 3";
  src: url("/public/fonts/source-sans-3-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/public/fonts/source-serif-4-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --brand-navy: #131c2e;
  --brand-slate: #1e293b;
  --brand-orange: #f97316;
  --brand-silver: #94a3b8;
  --brand-ink: #f8fafc;
  --brand-muted: #cbd5e1;
  --brand-line: #334155;
  --brand-paper: #ffffff;
  --brand-canvas: #131c2e;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--brand-navy) !important;
  color: var(--brand-ink);
  font-family: "Source Sans 3", Arial, sans-serif !important;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 3px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--brand-line);
  background: var(--brand-slate);
  color: var(--brand-muted);
  font-size: 12px;
}

.app-footer strong {
  color: #fff;
}

.app-footer strong span {
  margin-left: 6px;
  color: var(--brand-orange);
  font-size: 10px;
}

.app-footer a {
  color: var(--brand-orange);
}

/* Consistent navy/slate application chrome with paper-like document previews. */
body,
body > main,
main {
  color: #f8fafc !important;
}

header,
.site-header,
.topbar,
.page-nav,
.preview-head,
.dialog-head {
  background-color: var(--brand-navy) !important;
  color: #f8fafc !important;
}

header a,
.site-header a,
.topbar a,
.page-nav a,
nav a {
  color: #e2e8f0 !important;
}

.hero {
  background-color: var(--brand-navy) !important;
}

.content-section,
.trust-strip {
  background-color: var(--brand-navy) !important;
  color: #f8fafc !important;
}

.trust-item,
.how-step,
.document-wrap,
.preview-card,
.stat,
.search-form,
.table-frame,
.panel,
.card,
.issuer-session,
.issuer-officer-management,
.signature-panel,
.result-card,
.legal-main,
dialog,
section[aria-labelledby],
article:not(.letter-preview):not(.paper):not(.preview-document) {
  border-color: var(--brand-line) !important;
  background-color: var(--brand-slate) !important;
  color: #f8fafc !important;
}

.letter-preview,
.paper,
.letter-document,
#output,
#letterDialogOutput {
  background-color: #fff !important;
  color: #1e293b !important;
}

.letter-preview *,
.paper *,
.letter-document *,
#output *,
#letterDialogOutput * {
  color: #1e293b;
}

.letter-preview .sample-stamp,
.paper .seal {
  color: #334155;
}

h1,
h2,
h3,
h4,
legend,
.section-title,
.trust-item strong,
.how-step h3 {
  color: #f8fafc !important;
}

p,
li,
.section-intro,
.section-kicker,
.hero-copy,
.hero-detail,
.eyebrow,
.hero-notes,
.hero-notes span,
.trust-point,
.page-heading p,
.head p,
.intro,
.brand-copy small,
.brand small,
.page-heading p,
.heading p,
.helper,
.hint,
.status,
.empty,
.footer,
footer {
  color: #cbd5e1 !important;
}

a,
.legal-header a,
.legal-links a,
.footer-links a,
.reference-cell,
.docid,
.letter-section-title {
  color: var(--brand-orange) !important;
}

button,
button:not(:disabled),
.button,
.primary,
.primary-button,
.head > a,
.page-heading .button {
  border-color: var(--brand-orange) !important;
  background-color: var(--brand-orange) !important;
  color: var(--brand-navy) !important;
}

button:hover,
.button:hover,
.primary:hover,
.primary-button:hover {
  border-color: #ff9142 !important;
  background-color: #ff9142 !important;
  color: var(--brand-navy) !important;
}

input,
select,
textarea {
  border-color: #64748b !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

label,
label span,
.field label,
.filters label {
  color: #f1f5f9 !important;
}

table,
tbody,
tr,
td {
  background-color: var(--brand-slate);
  color: #f8fafc;
}

th {
  background-color: #0f2038 !important;
  color: #e2e8f0 !important;
}

td,
th {
  border-color: #334155 !important;
}

tbody tr:hover {
  background-color: #26364d !important;
}

.status-pill,
.badge,
.sample-stamp {
  border-color: var(--brand-orange) !important;
  background-color: #422b20 !important;
  color: #ffb17d !important;
}

.sample-stamp {
  border-color: var(--brand-orange) !important;
  background-color: var(--brand-orange) !important;
  color: #ffffff !important;
}

.result-status {
  color: var(--brand-orange) !important;
}

.result-status.invalid,
.error,
.status.error,
.status-error {
  color: #fca5a5 !important;
}

.notice {
  border-color: #475569 !important;
  background-color: #243247 !important;
  color: #e2e8f0 !important;
}

.notice a {
  color: var(--brand-orange) !important;
}

.legal-footer,
footer,
.app-footer {
  border-color: #334155 !important;
  background-color: var(--brand-slate) !important;
  color: #cbd5e1 !important;
}

.letter-preview,
.letter-preview *,
.paper,
.paper *,
.letter-document,
.letter-document *,
#output,
#output *,
#letterDialogOutput,
#letterDialogOutput * {
  color: #1e293b !important;
}

.letter-preview h2,
.paper h2 {
  color: #0f172a !important;
}

.letter-preview .letter-meta,
.paper .paper-meta {
  color: #475569 !important;
}

dialog::backdrop {
  background: rgb(2 6 23 / 75%);
}

@media (max-width: 600px) {
  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

body {
  min-width: 0;
  overflow-x: clip;
  background-color: #131c2e !important;
  color: #f8fafc !important;
}

main {
  width: 100% !important;
  max-width: 1200px !important;
  min-width: 0;
  margin-inline: auto !important;
}

.shell,
.header-inner,
.topbar-inner,
.footer-inner {
  box-sizing: border-box;
  width: min(1200px, 100%) !important;
  max-width: 1200px !important;
  padding: 24px !important;
  margin-inline: auto;
}

footer {
  box-sizing: border-box;
  width: min(1200px, 100%);
  max-width: 1200px;
  margin: 24px auto;
  padding: 32px 24px;
  border-radius: 12px;
}

header,
.site-header,
.topbar,
.page-nav,
.hero,
.content-section,
.trust-strip {
  background-color: #131c2e !important;
  color: #f8fafc !important;
}

.card,
.panel,
.stat,
.trust-item,
.how-step,
.pricing-card,
.workspace-card,
.workspace-form,
.issuer-session,
.issuer-officer-management,
.signature-panel,
.result-card,
.legal-main,
section[aria-labelledby],
article:not(.letter-preview):not(.paper):not(.preview-document) {
  border-color: #334155 !important;
  border-radius: 12px;
  background: #1e293b !important;
  color: #f8fafc !important;
}

.workspace-card,
.workspace-form,
.workspace-preview,
.pricing-card,
.how-step,
.trust-item,
.payment-modal-panel,
.signup-panel {
  border-radius: 12px;
}

.workspace-preview,
.letter-preview,
.preview-document,
.paper,
.letter-document,
#output,
#letterDialogOutput {
  background-color: #fff !important;
  color: #1e293b !important;
}

.letter-preview *,
.preview-document *,
.paper *,
.letter-document *,
#output *,
#letterDialogOutput * {
  color: #1e293b !important;
}

.letter-preview h2,
.letter-preview h3,
.preview-document h3,
.paper h2 {
  color: #1e293b !important;
}

.letter-preview p,
.preview-document p,
.paper p {
  color: #334155 !important;
}

.price strong,
.section-kicker,
.trust-point b,
.preview-document-head small,
.preview-document h3,
.app-footer strong span {
  color: #f97316 !important;
}

button,
button:not(:disabled),
.button,
.primary,
.primary-button,
.head > a,
.page-heading .button,
.button-light,
.button-orange {
  border-color: #f97316 !important;
  background-color: #f97316 !important;
  color: #131c2e !important;
}

.button-outline {
  border-color: #f97316 !important;
  background: transparent !important;
  color: #f97316 !important;
}

.button-outline:hover {
  background: #f97316 !important;
  color: #131c2e !important;
}

button:hover,
.button:hover,
.primary:hover,
.primary-button:hover {
  border-color: #ff9142 !important;
  background-color: #ff9142 !important;
  color: #131c2e !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f97316 !important;
  outline-offset: 2px;
}

input,
select,
textarea {
  border-color: #475569 !important;
  border-radius: 8px;
  background: #111a2a !important;
  color: #f8fafc !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f97316 !important;
  outline: 2px solid #f97316 !important;
  outline-offset: 2px;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

label,
label span,
.field label,
.filters label {
  color: #f1f5f9 !important;
}

a,
.legal-header a,
.legal-links a,
.footer-links a,
.reference-cell,
.docid,
.letter-section-title {
  color: #f97316 !important;
}

[data-plan-status],
[data-plan-status] strong,
[data-plan-status] p {
  color: #f8fafc !important;
}

[data-plan-status] {
  background: #1e293b !important;
  border-color: #475569 !important;
}

[data-plan-status] a {
  color: #fdba74 !important;
}

.actions button,
.actions button:hover,
.actions button:not(:disabled),
.actions button:disabled,
td.actions button,
td.actions button:hover,
td.actions button:disabled {
  background-color: #f97316 !important;
  color: #131c2e !important;
}

.expired-notice[hidden],
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
legend,
.section-title,
.trust-item strong,
.how-step h3 {
  color: #f8fafc !important;
}

p,
li,
.section-intro,
.hero-copy,
.hero-detail,
.eyebrow,
.hero-notes,
.trust-point,
.page-heading p,
.head p,
.intro,
.brand-copy small,
.brand small,
.heading p,
.helper,
.hint,
.status,
.empty,
.footer,
footer {
  color: #cbd5e1 !important;
}

.app-footer,
.legal-footer,
footer {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

.status-pill,
.badge {
  border: 1px solid #f97316 !important;
  background: #422b20 !important;
  color: #ffb17d !important;
}

.notice {
  border-color: #475569 !important;
  background: #243247 !important;
  color: #e2e8f0 !important;
}

.payment-modal-panel,
.signup-panel,
.checkout-summary,
.payment-option,
.close-modal {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #f8fafc !important;
}

.payment-modal-panel h3,
.payment-modal-panel h4,
.checkout-summary strong {
  color: #f8fafc !important;
}

p {
  max-width: 65ch;
}

footer p {
  max-width: 65ch;
}

@media (max-width: 1024px) {
  .workspace-grid,
  .hero-inner,
  .pricing-grid,
  .how-grid,
  .trust-grid,
  .payment-layout,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .workspace-form,
  .workspace-preview {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .shell,
  .header-inner,
  .topbar-inner,
  .footer-inner {
    width: 100% !important;
  }
}
