@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #f3ecdf;
  --bg-strong: #efe3cf;
  --ink: #0f1720;
  --muted: #53606b;
  --line: rgba(15, 23, 32, 0.12);
  --panel: rgba(255, 249, 241, 0.9);
  --panel-strong: rgba(255, 252, 247, 0.96);
  --accent: #d05c30;
  --accent-dark: #a53c1a;
  --accent-soft: rgba(208, 92, 48, 0.14);
  --teal: #185c62;
  --teal-soft: rgba(24, 92, 98, 0.1);
  --blue-soft: rgba(46, 86, 145, 0.08);
  --soft-fill: rgba(255, 255, 255, 0.58);
  --soft-fill-strong: rgba(255, 255, 255, 0.66);
  --input-fill: rgba(255, 255, 255, 0.9);
  --shell-border: rgba(255, 255, 255, 0.45);
  --brand-end: #f0a467;
  --brand-ring: rgba(255, 248, 239, 0.9);
  --brand-highlight: rgba(255, 255, 255, 0.4);
  --button-strong-bg: #0f1720;
  --button-strong-ink: #fff9f0;
  --button-soft-bg: rgba(255, 255, 255, 0.58);
  --button-soft-ink: #0f1720;
  --button-soft-border: rgba(15, 23, 32, 0.12);
  --body-glow-a: rgba(208, 92, 48, 0.16);
  --body-glow-b: rgba(24, 92, 98, 0.14);
  --body-start: #fbf6ee;
  --body-end: #efe5d8;
  --feedback-error: #a53c1a;
  --theme-swatch-a: #d05c30;
  --theme-swatch-b: #185c62;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 30px 70px rgba(30, 41, 52, 0.12);
}

body[data-theme="fjord"] {
  --bg: #e7eef2;
  --bg-strong: #d7e3ea;
  --ink: #112231;
  --muted: #506170;
  --line: rgba(17, 34, 49, 0.14);
  --panel: rgba(245, 249, 252, 0.88);
  --panel-strong: rgba(250, 252, 254, 0.94);
  --accent: #1f6b78;
  --accent-dark: #164c5d;
  --accent-soft: rgba(31, 107, 120, 0.13);
  --teal: #245b7a;
  --teal-soft: rgba(36, 91, 122, 0.12);
  --blue-soft: rgba(89, 132, 181, 0.12);
  --soft-fill: rgba(255, 255, 255, 0.68);
  --soft-fill-strong: rgba(255, 255, 255, 0.76);
  --input-fill: rgba(255, 255, 255, 0.92);
  --shell-border: rgba(255, 255, 255, 0.58);
  --brand-end: #8fc8d0;
  --brand-ring: rgba(241, 249, 252, 0.92);
  --button-strong-bg: #13344a;
  --button-strong-ink: #eff8fb;
  --button-soft-bg: rgba(255, 255, 255, 0.68);
  --button-soft-ink: #112231;
  --button-soft-border: rgba(17, 34, 49, 0.14);
  --body-glow-a: rgba(31, 107, 120, 0.15);
  --body-glow-b: rgba(89, 132, 181, 0.14);
  --body-start: #f2f7fa;
  --body-end: #dce8ee;
  --feedback-error: #8d3b24;
  --theme-swatch-a: #1f6b78;
  --theme-swatch-b: #8fc8d0;
}

body[data-theme="grove"] {
  --bg: #ece8db;
  --bg-strong: #dfd9c7;
  --ink: #142017;
  --muted: #59675c;
  --line: rgba(20, 32, 23, 0.13);
  --panel: rgba(248, 247, 240, 0.88);
  --panel-strong: rgba(252, 251, 247, 0.95);
  --accent: #4f7656;
  --accent-dark: #34553d;
  --accent-soft: rgba(79, 118, 86, 0.13);
  --teal: #7a5e38;
  --teal-soft: rgba(122, 94, 56, 0.12);
  --blue-soft: rgba(140, 165, 121, 0.12);
  --soft-fill: rgba(255, 255, 255, 0.64);
  --soft-fill-strong: rgba(255, 255, 255, 0.72);
  --input-fill: rgba(255, 255, 255, 0.9);
  --shell-border: rgba(255, 255, 255, 0.54);
  --brand-end: #cbb17a;
  --brand-ring: rgba(248, 244, 232, 0.94);
  --button-strong-bg: #27422d;
  --button-strong-ink: #f5f6f0;
  --button-soft-bg: rgba(255, 255, 255, 0.64);
  --button-soft-ink: #142017;
  --button-soft-border: rgba(20, 32, 23, 0.13);
  --body-glow-a: rgba(79, 118, 86, 0.15);
  --body-glow-b: rgba(203, 177, 122, 0.14);
  --body-start: #f7f3ea;
  --body-end: #e2dccd;
  --feedback-error: #7b412c;
  --theme-swatch-a: #4f7656;
  --theme-swatch-b: #cbb17a;
}

body[data-theme="nocturne"] {
  --bg: #0f1418;
  --bg-strong: #171d22;
  --ink: #ebf1f5;
  --muted: #a7b3bd;
  --line: rgba(235, 241, 245, 0.12);
  --panel: rgba(20, 26, 31, 0.9);
  --panel-strong: rgba(16, 22, 27, 0.96);
  --accent: #f2a45d;
  --accent-dark: #dc8740;
  --accent-soft: rgba(242, 164, 93, 0.15);
  --teal: #78c0cc;
  --teal-soft: rgba(120, 192, 204, 0.15);
  --blue-soft: rgba(92, 131, 177, 0.14);
  --soft-fill: rgba(255, 255, 255, 0.06);
  --soft-fill-strong: rgba(255, 255, 255, 0.1);
  --input-fill: rgba(255, 255, 255, 0.08);
  --shell-border: rgba(255, 255, 255, 0.08);
  --brand-end: #f5c27c;
  --brand-ring: rgba(255, 242, 229, 0.88);
  --brand-highlight: rgba(255, 255, 255, 0.16);
  --button-strong-bg: #f2a45d;
  --button-strong-ink: #21150d;
  --button-soft-bg: rgba(255, 255, 255, 0.06);
  --button-soft-ink: #ebf1f5;
  --button-soft-border: rgba(235, 241, 245, 0.12);
  --body-glow-a: rgba(242, 164, 93, 0.12);
  --body-glow-b: rgba(120, 192, 204, 0.12);
  --body-start: #12171b;
  --body-end: #182028;
  --feedback-error: #ffba8a;
  --theme-swatch-a: #f2a45d;
  --theme-swatch-b: #78c0cc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--body-glow-a), transparent 25%),
    radial-gradient(circle at 85% 10%, var(--body-glow-b), transparent 24%),
    linear-gradient(180deg, var(--body-start) 0%, var(--body-end) 100%);
  transition:
    background 180ms ease,
    color 180ms ease;
}

body[data-theme="nocturne"] {
  color-scheme: dark;
}

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

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

button {
  cursor: pointer;
}

.mono {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--brand-end));
  box-shadow: inset 0 1px 0 var(--brand-highlight);
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand-ring);
}

.brand-mark::after {
  inset: 19px 10px 10px 19px;
  border-radius: 10px;
}

.brand-copy strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--soft-fill);
  color: var(--ink);
}

.header-cta,
.primary-button,
.ghost-button,
.plan-button,
.login-option,
.action-pill,
.app-tab,
.chat-submit,
.link-button,
.theme-option {
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.header-cta,
.primary-button,
.chat-submit,
.plan-button[data-emphasis="high"] {
  background: var(--button-strong-bg);
  color: var(--button-strong-ink);
  padding: 12px 18px;
}

.ghost-button,
.login-option,
.plan-button,
.action-pill,
.app-tab,
.link-button {
  background: var(--button-soft-bg);
  color: var(--button-soft-ink);
  border-color: var(--button-soft-border);
  padding: 12px 18px;
}

.header-cta:hover,
.primary-button:hover,
.ghost-button:hover,
.plan-button:hover,
.login-option:hover,
.action-pill:hover,
.app-tab:hover,
.chat-submit:hover,
.link-button:hover,
.theme-option:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-card,
.content-card,
.domain-card,
.plan-card,
.login-card,
.shell-frame,
.panel-card,
.table-card,
.theme-dock {
  background: var(--panel);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 34px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft-fill);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card h1,
.content-card h1,
.content-card h2,
.section-title {
  margin: 18px 0 12px;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.content-card h2,
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.hero-copy,
.lead,
.card-copy,
.muted-copy {
  color: var(--muted);
  line-height: 1.65;
  max-width: 56ch;
}

.hero-actions,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-side {
  padding: 26px;
  display: grid;
  gap: 14px;
}

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

.status-chip,
.metric-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.status-chip strong,
.metric-chip strong {
  font-size: 0.96rem;
}

.status-chip span,
.metric-chip span {
  color: var(--muted);
  font-size: 0.9rem;
}

.grid-two,
.grid-three {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

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

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

.content-card,
.domain-card,
.plan-card,
.table-card {
  padding: 26px;
}

.domain-card h3,
.plan-card h3,
.table-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.domain-label,
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}

.price-tag strong {
  font-size: 2.4rem;
  letter-spacing: -0.08em;
}

.price-tag span {
  color: var(--muted);
}

.list-clean {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.list-clean li {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.list-clean li strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.site-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-card {
  width: min(480px, 100%);
  padding: 30px;
  text-align: center;
}

.login-card p {
  color: var(--muted);
}

.login-options {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.login-option {
  width: 100%;
  padding: 14px 18px;
}

.api-key-panel {
  margin-top: 10px;
  display: none;
  gap: 10px;
}

.api-key-panel.is-open {
  display: grid;
}

.api-key-panel input,
.composer textarea {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--input-fill);
  color: var(--ink);
}

.login-feedback {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
}

.shell-frame {
  width: min(1240px, calc(100% - 26px));
  margin: 16px auto 32px;
  padding: 18px;
}

.shell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.shell-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  padding-top: 18px;
}

.shell-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.app-tab {
  text-align: left;
}

.app-tab.is-active {
  background: var(--button-strong-bg);
  color: var(--button-strong-ink);
}

.shell-main {
  display: grid;
  gap: 18px;
}

.chat-card {
  display: grid;
  gap: 18px;
}

.chat-feed,
.jobs-list,
.outputs-list,
.apps-grid,
.account-grid {
  display: grid;
  gap: 14px;
}

.feed-item,
.job-item,
.output-item,
.app-item,
.account-item {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.feed-item strong,
.job-item strong,
.output-item strong,
.app-item strong,
.account-item strong {
  display: block;
  margin-bottom: 4px;
}

.feed-item span,
.job-item span,
.output-item span,
.app-item span,
.account-item span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.composer {
  display: grid;
  gap: 12px;
}

.composer textarea {
  min-height: 120px;
  resize: vertical;
}

.composer-row,
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-pill {
  padding: 10px 14px;
}

.section-block[hidden] {
  display: none !important;
}

.empty-state {
  color: var(--muted);
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

.theme-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
  padding: 12px;
  width: min(360px, calc(100% - 24px));
}

.theme-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-dock-title {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-dock-copy {
  color: var(--muted);
  font-size: 0.88rem;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 10px 12px;
  background: var(--button-soft-bg);
  color: var(--button-soft-ink);
  border-color: var(--button-soft-border);
}

.theme-option::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--theme-swatch-a), var(--theme-swatch-b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  flex: none;
}

.theme-option[data-theme-value="canvas"] {
  --theme-swatch-a: #d05c30;
  --theme-swatch-b: #185c62;
}

.theme-option[data-theme-value="fjord"] {
  --theme-swatch-a: #1f6b78;
  --theme-swatch-b: #8fc8d0;
}

.theme-option[data-theme-value="grove"] {
  --theme-swatch-a: #4f7656;
  --theme-swatch-b: #cbb17a;
}

.theme-option[data-theme-value="nocturne"] {
  --theme-swatch-a: #f2a45d;
  --theme-swatch-b: #78c0cc;
}

.theme-option-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.theme-option-label strong {
  font-size: 0.94rem;
}

.theme-option-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.theme-option.is-active {
  background: var(--button-strong-bg);
  color: var(--button-strong-ink);
  border-color: transparent;
}

.theme-option.is-active .theme-option-label span {
  color: color-mix(in srgb, var(--button-strong-ink) 72%, transparent);
}

@media (max-width: 920px) {
  .hero,
  .grid-two,
  .grid-three,
  .shell-body,
  .theme-options {
    grid-template-columns: 1fr;
  }

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

  .theme-dock {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}
