:root {
  --bg: #f3efe7;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffdf8;
  --surface-dark: #17313c;
  --border: rgba(34, 54, 61, 0.12);
  --text: #102129;
  --muted: #5e6d73;
  --primary: #ea6a2a;
  --primary-deep: #cb4b0d;
  --secondary: #204b57;
  --accent: #f0c66e;
  --success: #2f8a57;
  --danger: #b14238;
  --shadow: 0 24px 70px rgba(22, 42, 48, 0.12);
}

body[data-theme="dark"] {
  --bg: #0d161b;
  --surface: rgba(18, 28, 34, 0.92);
  --surface-strong: #15242b;
  --surface-dark: #213943;
  --border: rgba(231, 240, 242, 0.08);
  --text: #edf4f5;
  --muted: #abc0c4;
  --primary: #ff8e50;
  --primary-deep: #ffb17f;
  --secondary: #7cc6d8;
  --accent: #f0c66e;
  --success: #77d99f;
  --danger: #ff7c75;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240, 198, 110, 0.45), transparent 30%),
    radial-gradient(circle at top right, rgba(32, 75, 87, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #f0e7db 100%);
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at top left, rgba(240, 198, 110, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(124, 198, 216, 0.12), transparent 28%),
    linear-gradient(180deg, #0d161b 0%, #111f26 100%);
}

button,
input,
textarea {
  font: inherit;
}

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

p,
h1,
h2,
h3 {
  margin-top: 0;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(315deg, rgba(32, 75, 87, 0.05), transparent 38%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.hero-card,
.info-card,
.section-card,
.workspace-card,
.modal-dialog {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.site-header,
.hero-card,
.info-card,
.section-card,
.workspace-card {
  padding: 24px;
}

.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
}

.brand-lockup {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(34, 54, 61, 0.08);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 13px;
}

.brand-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #f5b470);
  color: #fffaf3;
  font-weight: 700;
}

.feature-logo {
  width: min(100%, 220px);
  display: block;
  margin: 0 auto 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px;
}

.dashboard-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
  padding: 14px;
}

.site-nav,
.header-actions,
.hero-actions,
.auth-tabs,
.modal-actions,
.dashboard-nav,
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.site-nav {
  justify-content: center;
  min-width: 0;
}

.header-actions {
  justify-content: flex-end;
  min-width: 0;
}

.site-nav a {
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}

.site-header .button,
.site-nav a {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.9rem;
  line-height: 1;
}

.header-actions .button {
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 1.02;
  margin-bottom: 16px;
}

.hero-text {
  max-width: 58ch;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.hero-proof div,
.workflow-step,
.step-panel,
.summary-tile,
.dashboard-panel,
.plan-card,
.license-card,
.payment-card,
.guest-checklist div,
.terms-box,
.panel-note,
.modal-detail-grid article {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
}

.hero-proof div {
  padding: 16px;
}

.hero-proof strong,
.summary-tile strong,
.modal-detail-grid strong {
  display: block;
  margin-bottom: 6px;
}

.hero-proof span,
.summary-tile span,
.modal-detail-grid span,
.payment-card p,
.license-meta,
.panel-note,
.status-line,
.step-panel p,
.workflow-step p,
.guest-checklist span,
.feature-list,
.mini-heading p,
.section-heading p,
.info-card p,
.modal-copy,
.terms-box p {
  color: var(--muted);
}

.hero-visual {
  display: flex;
  align-items: center;
}

.workflow-card {
  width: 100%;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, #f6debb 0%, #f3c681 100%);
}

.workflow-step {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.workflow-step:last-child {
  margin-bottom: 0;
}

.workflow-step span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(234, 106, 42, 0.16);
  color: var(--primary);
  font-weight: 700;
}

.workflow-step strong,
.workflow-step p {
  color: #14313a;
}

body[data-theme="dark"] .workflow-card {
  background: linear-gradient(180deg, #2f5360 0%, #1d3740 100%);
}

body[data-theme="dark"] .workflow-step strong,
body[data-theme="dark"] .workflow-step p {
  color: #eef5f6;
}

.workflow-step.is-active {
  transform: translateX(-10px);
}

.story-grid,
.workspace-grid,
.dashboard-sections,
.steps-grid,
.pricing-grid,
.summary-grid {
  display: grid;
  gap: 18px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.docs-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-sidebar {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 18px;
}

.docs-topic-button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.docs-topic-button:hover {
  transform: translateX(2px);
}

.docs-topic-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fffaf4;
}

.docs-content {
  min-width: 0;
}

.docs-panel {
  display: grid;
  gap: 16px;
}

.docs-panel-head h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  margin-top: 4px;
}

.docs-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.docs-subsection {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.docs-subsection h4,
.docs-subgrid h4 {
  margin-bottom: 8px;
}

.docs-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}

.docs-note {
  padding: 14px 16px;
  border-left: 4px solid var(--primary);
  background: rgba(234, 106, 42, 0.08);
  border-radius: 16px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
}

.site-footer p {
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--secondary);
  font-weight: 700;
}

.dashboard-footer {
  margin-top: 24px;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.policy-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
}

.policy-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}

.privacy-shell .section-card {
  margin-top: 18px;
}

.docs-code {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  overflow-x: auto;
  white-space: pre;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.doc-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
}

.doc-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(234, 106, 42, 0.4);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(234, 106, 42, 0.12), rgba(240, 198, 110, 0.18)),
    repeating-linear-gradient(135deg, rgba(16, 33, 41, 0.06) 0 12px, transparent 12px 24px);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 16px;
}

.doc-placeholder img,
.doc-placeholder .placeholder-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  border-radius: 16px;
}

.doc-placeholder.inline {
  min-height: 110px;
  margin-top: 14px;
}

.story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.accent-card {
  background: linear-gradient(180deg, rgba(240, 198, 110, 0.46), rgba(255, 252, 246, 0.9));
}

.section-card {
  margin-top: 18px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.info-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 10px;
}

.compact h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.step-panel,
.plan-card,
.payment-card,
.license-card,
.summary-tile,
.dashboard-panel,
.guest-checklist div,
.terms-box,
.modal-detail-grid article {
  padding: 18px;
}

.step-number {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(234, 106, 42, 0.12);
  color: var(--primary-deep);
  font-weight: 700;
}

.pricing-grid .plan-card.highlight {
  background: linear-gradient(180deg, rgba(234, 106, 42, 0.12), rgba(255, 255, 255, 0.82));
}

.plan-card h3,
.license-card h3,
.payment-card h3,
.mini-heading h3 {
  margin-bottom: 8px;
}

.plan-card-price {
  font-size: 2rem;
  margin: 12px 0;
}

.plan-card small {
  color: var(--muted);
}

.plan-card ul {
  margin: 14px 0 18px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.plan-card {
  min-width: 0;
  height: 100%;
}

.workspace-grid {
  grid-template-columns: 420px minmax(0, 1fr);
  margin-top: 18px;
}

.auth-shell {
  max-width: 1120px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 18px;
}

.auth-aside {
  display: grid;
  align-content: start;
  gap: 18px;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 18px;
}

.dashboard-sections-single {
  grid-template-columns: 1fr;
}

.dashboard-nav {
  margin-bottom: 18px;
}

.dashboard-view {
  display: block;
}

.overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
}

.overview-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.overview-card strong {
  display: block;
  margin-bottom: 8px;
}

.auth-panel {
  display: block;
}

.info-note {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  line-height: 1.6;
}

.info-note strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.info-note span {
  display: block;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.support-form {
  max-width: 760px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 54, 61, 0.16);
  background: #fffdf9;
  color: var(--text);
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(234, 106, 42, 0.5);
  box-shadow: 0 0 0 4px rgba(234, 106, 42, 0.12);
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  border-color: rgba(255, 255, 255, 0.16);
  background: #0f1e25;
  color: #f5fbfc;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: rgba(245, 251, 252, 0.58);
}

.button,
.tab-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--primary), #f6a763);
  color: #fffaf4;
  box-shadow: 0 14px 30px rgba(234, 106, 42, 0.22);
}

.button-secondary {
  background: var(--surface-dark);
  color: #fffdf8;
}

.button-ghost,
.tab-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid rgba(34, 54, 61, 0.12);
}

.tab-button.active {
  background: var(--secondary);
  color: #fffdf8;
}

.button-wide {
  width: 100%;
}

.status-line {
  margin: 16px 0 0;
  min-height: 24px;
}

.guest-checklist {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.guest-checklist div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.guest-checklist strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(32, 75, 87, 0.12);
  color: var(--secondary);
}

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

.feature-list {
  padding-left: 18px;
  line-height: 1.7;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-sections {
  grid-template-columns: 1.15fr 0.85fr;
}

.license-key {
  display: block;
  margin: 14px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f5ede2;
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.license-actions,
.license-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(32, 75, 87, 0.1);
  color: var(--secondary);
}

.pill.success {
  background: rgba(47, 138, 87, 0.12);
  color: var(--success);
}

.pill.warn {
  background: rgba(240, 198, 110, 0.22);
  color: #7b5d1a;
}

.mini-heading {
  margin-bottom: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
}

body[data-theme="dark"] .button-ghost,
body[data-theme="dark"] .tab-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

body[data-theme="dark"] .brand-logo,
body[data-theme="dark"] .feature-logo,
body[data-theme="dark"] .dashboard-logo {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .license-key {
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .workflow-step {
  background: rgba(14, 23, 28, 0.32);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 33, 41, 0.45);
}

.modal-dialog {
  position: relative;
  width: min(640px, calc(100vw - 24px));
  padding: 26px;
  background: var(--surface-strong);
  color: var(--text);
}

body[data-theme="dark"] .modal-dialog {
  background: #14242b;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

body[data-theme="dark"] .modal-backdrop {
  background: rgba(2, 8, 12, 0.72);
}

body[data-theme="dark"] .terms-box,
body[data-theme="dark"] .modal-detail-grid article {
  background: #0f1e25;
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .modal-copy,
body[data-theme="dark"] .terms-box p,
body[data-theme="dark"] .modal-detail-grid span,
body[data-theme="dark"] .checkbox-row span {
  color: #c5d6da;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(16, 33, 41, 0.06);
  color: var(--text);
}

body[data-theme="dark"] .modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: #f5fbfc;
}

.modal-copy {
  margin-bottom: 18px;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 12px;
  z-index: 1200;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fffdf8;
  box-shadow: 0 16px 30px rgba(16, 33, 41, 0.18);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.hidden {
  display: none !important;
}

.button:disabled,
.tab-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 1040px) {
  .hero-card,
  .workspace-grid,
  .auth-layout,
  .dashboard-sections,
  .docs-shell,
  .policy-grid,
  .doc-grid,
  .story-grid,
  .steps-grid,
  .pricing-grid,
  .summary-grid,
  .hero-proof,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: calc(100vw - 16px);
    padding-top: 16px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .header-actions,
  .hero-actions,
  .auth-tabs,
  .license-actions,
  .modal-actions,
  .dashboard-nav,
  .quick-actions {
    width: 100%;
  }

  .header-actions .button,
  .hero-actions .button,
  .auth-tabs .tab-button,
  .license-actions .button,
  .modal-actions .button,
  .dashboard-nav .tab-button,
  .quick-actions .button {
    flex: 1 1 100%;
  }

  .modal-detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-subgrid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
