:root {
  --bg: #ffffff;
  --ink: #111318;
  --muted: #626b77;
  --line: #d9dee7;
  --strong-line: #161a21;
  --surface: #f6f8fb;
  --surface-strong: #eef3f7;
  --navy: #0f3557;
  --accent: #14614f;
  --accent-soft: #e9f6f1;
  --amber: #8c5f00;
  --amber-soft: #fff5d8;
  --danger: #9a1a1a;
  --danger-soft: #fff0f0;
  --ok-soft: #eef8f2;
  --shadow: 0 18px 45px rgba(17, 19, 24, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(246, 248, 251, 0.9) 0, rgba(255, 255, 255, 0) 260px),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--strong-line);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.nav,
.footer-links,
.auth-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav {
  font-size: 14px;
  color: var(--muted);
}

.nav a,
.link-button {
  color: var(--muted);
}

.nav a:hover,
.link-button:hover,
.footer-links a:hover,
.muted-link:hover {
  color: var(--ink);
}

.nav-cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--strong-line);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--ink) !important;
  background: #fff;
}

.inline-form {
  display: inline;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.legal-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 10px 32px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
}

.legal-notice a {
  font-weight: 650;
  white-space: nowrap;
}

.messages {
  border-bottom: 1px solid var(--line);
}

.message {
  margin: 0;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(17, 19, 24, 0.08);
}

.message-success {
  background: var(--ok-soft);
}

.message-warning {
  background: var(--amber-soft);
}

.message-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.page {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 46px 28px 72px;
  flex: 1;
}

.split,
.home-hero,
.dashboard-grid,
.document-workflow,
.detail-grid,
.workbench-shell {
  display: grid;
  gap: 26px;
}

.home-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: 64px;
  min-height: 560px;
  padding: 58px 0 54px;
}

.dashboard-grid,
.document-workflow {
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
}

.detail-grid {
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: start;
}

.workbench-shell {
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  align-items: start;
}

.intro h1,
.hero-copy h1,
.page-head h1,
.auth-page h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--ink);
}

.hero-copy h1 {
  max-width: 720px;
  font-size: 82px;
  color: #081323;
}

.page-head h1,
.auth-page h1 {
  max-width: 760px;
  font-size: 48px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--navy);
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}

.page-subtitle {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.home-ai-scope {
  max-width: 680px;
  margin: 24px 0 0;
  color: #38404a;
  font-size: 17px;
  line-height: 1.6;
}

.home-assurance {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 24px;
  border: 1px solid #cfd9e5;
  border-radius: var(--radius);
  padding: 16px 18px 16px 54px;
  background:
    linear-gradient(90deg, rgba(20, 97, 79, 0.08), rgba(255, 255, 255, 0) 42%),
    #fff;
  color: #25303d;
  position: relative;
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.05);
}

.home-assurance::before {
  content: "";
  width: 26px;
  height: 26px;
  position: absolute;
  left: 18px;
  top: 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #fff;
}

.home-assurance::after {
  content: "";
  width: 10px;
  height: 6px;
  position: absolute;
  left: 27px;
  top: 27px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.home-assurance span {
  font-size: 14px;
  line-height: 1.35;
}

.home-fast-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 22px;
  border-left: 1px solid var(--line);
  padding-left: 44px;
}

.home-fast-panel h2 {
  max-width: 420px;
  margin: 0;
  color: #081323;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 720;
}

.home-fast-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-fast-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.home-fast-list li > span {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9c8d8;
  border-radius: var(--radius);
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
}

.home-fast-list strong {
  display: block;
  color: #081323;
  font-size: 15px;
  line-height: 1.3;
}

.home-fast-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.home-fast-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-fast-footer span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid #cfd9e5;
  border-radius: var(--radius);
  padding: 6px 10px;
  background: var(--surface);
  color: #344152;
  font-size: 12px;
  font-weight: 700;
}

.compact-lead {
  max-width: 460px;
  font-size: 16px;
}

.hero-copy .actions {
  margin-top: 28px;
}

.actions,
.form-actions,
.head-actions,
.listen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--strong-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.button.is-loading,
.button.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: #fff;
}

.button.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.button.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.button.full {
  width: 100%;
}

.panel,
.notice-block,
.meta-panel,
.output-panel,
.sections-panel,
.empty-state,
.side-panel,
.workspace-card,
.workbench-rail,
.preview-panel,
.metric-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.panel,
.notice-block,
.meta-panel,
.output-panel,
.sections-panel,
.empty-state,
.side-panel,
.workspace-card,
.workbench-rail,
.preview-panel {
  padding: 24px;
}

.panel,
.side-panel,
.workbench-rail,
.preview-panel {
  box-shadow: var(--shadow);
}

.panel h2,
.notice-block h2,
.meta-panel h2,
.output-panel h2,
.sections-panel h2,
.empty-state h2,
.feature-strip h2,
.side-panel h2,
.workspace-card h2,
.preview-panel h2,
.legal-copy h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.panel-copy,
.feature-strip p,
.notice-block p,
.sections-panel p,
.empty-state p,
.meta-panel p,
.side-panel p,
.workspace-card p,
.preview-panel p,
.legal-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.status-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.plan-quality-list {
  margin-top: 18px;
}

.feature-strip,
.workflow-strip {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.feature-strip article,
.workflow-strip article {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.feature-strip article:last-child,
.workflow-strip article:last-child {
  border-right: 0;
}

.workflow-strip {
  margin-top: 18px;
  box-shadow: 0 18px 45px rgba(17, 19, 24, 0.06);
}

.workflow-strip article {
  min-height: 180px;
}

.workflow-strip article > span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.home-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.65fr);
  gap: 38px;
  align-items: center;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}

.home-proof h2 {
  max-width: 640px;
  margin: 0 0 14px;
  color: #081323;
  font-size: 34px;
  line-height: 1.15;
}

.home-proof p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.proof-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.proof-list span {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: #283241;
  font-size: 13px;
  font-weight: 700;
}

.credit-tier-strip {
  grid-template-columns: repeat(4, 1fr);
}

.billing-plan-strip {
  grid-template-columns: repeat(2, 1fr);
}

.billing-plan-strip h3,
.credit-tier-strip h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.billing-plan-strip strong,
.credit-tier-strip strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
}

.billing-plan-strip em {
  display: inline-flex;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 9px;
  color: var(--navy);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.billing-plan-strip small,
.credit-tier-strip small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 13px;
}

.form label {
  font-weight: 700;
  font-size: 14px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  min-height: 44px;
  border-radius: var(--radius);
  outline: none;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 97, 79, 0.12);
}

.form textarea {
  resize: vertical;
  line-height: 1.5;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: end;
}

.help,
.muted-link {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.field-grid.two {
  grid-template-columns: 1fr 1fr;
}

.checkline {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.checkline input {
  min-height: auto;
  width: auto;
  margin-top: 3px;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #b9c2cf;
  border-radius: var(--radius);
  font-weight: 750;
  color: var(--navy);
  background: var(--surface-strong);
}

.footer {
  display: grid;
  gap: 24px;
  padding: 36px 32px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: #fbfcfe;
}

.footer-grid {
  width: min(1360px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(170px, 0.7fr));
  gap: 28px;
}

.footer section,
.footer nav,
.footer-brand {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer strong {
  color: var(--ink);
}

.footer h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.footer p {
  max-width: 360px;
  margin: 0;
  line-height: 1.55;
}

.footer a {
  width: fit-content;
  color: #334050;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #c5ced9;
  text-underline-offset: 4px;
}

.footer a:hover {
  color: var(--accent);
}

.footer-logo {
  width: fit-content;
  font-size: 20px;
  text-decoration: none !important;
}

.freefuture-link {
  margin-top: 6px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #111318 !important;
  font-size: 24px;
  font-weight: 800 !important;
  letter-spacing: 0;
  text-decoration: none !important;
}

.footer-bottom {
  width: min(1360px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .home-hero,
  .dashboard-grid,
  .document-workflow,
  .detail-grid,
  .workbench-shell {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .workbench-rail,
  .workbench-preview {
    position: static;
  }

  .workbench-rail {
    max-height: none;
  }

  .home-fast-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 28px 0 0;
  }

  .home-proof,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro h1 {
    font-size: 52px;
  }

  .hero-copy h1 {
    font-size: 58px;
  }
}

@media (max-width: 760px) {
  .topbar,
  .footer,
  .page-head,
  .document-row,
  .output-toolbar,
  .section-item summary,
  .team-row,
  .legal-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    min-height: 0;
    gap: 12px;
    padding: 12px 18px;
  }

  .brand {
    width: 100%;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px 12px;
    flex-wrap: wrap;
  }

  .legal-notice,
  .message {
    padding-left: 18px;
    padding-right: 18px;
  }

  .legal-notice {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  .legal-notice span {
    flex: 1;
  }

  .legal-notice a {
    white-space: nowrap;
  }

  .page {
    padding: 30px 18px 48px;
  }

  .feature-strip,
  .workflow-strip,
  .credit-tier-strip,
  .billing-plan-strip,
  .field-grid,
  .field-grid.two,
  .metric-strip,
  .upload-row {
    grid-template-columns: 1fr;
  }

  .feature-strip article,
  .workflow-strip article,
  .metric-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-strip article:last-child,
  .workflow-strip article:last-child,
  .metric-strip div:last-child {
    border-bottom: 0;
  }

  .intro h1,
  .page-head h1,
  .auth-page h1 {
    font-size: 38px;
  }

  .lead {
    font-size: 17px;
  }

  .home-hero {
    min-height: 0;
    padding-top: 14px;
    gap: 28px;
  }

  .home-assurance {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .home-fast-panel h2 {
    font-size: 28px;
  }

  .home-fast-list li {
    grid-template-columns: 1fr;
  }

  .home-proof h2 {
    font-size: 28px;
  }

  .proof-list {
    grid-template-columns: 1fr;
  }

  .head-actions,
  .actions,
  .listen-controls,
  .form-actions {
    width: 100%;
  }

  .button,
  .head-actions form,
  .head-actions .button {
    width: 100%;
  }

  .meta-panel dl {
    grid-template-columns: 1fr;
  }

  .data-list {
    grid-template-columns: 1fr;
  }

  .compact-meta {
    grid-template-columns: 1fr;
  }

  .section-item small {
    text-align: left;
  }

  .footer-links,
  .auth-links {
    flex-wrap: wrap;
  }

  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
