:root {
  --bg: #0f0c17;
  --bg-soft: #1b1630;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f4ff;
  --muted: #c9c2e8;
  --accent: #f7b955;
  --accent-strong: #ffcf7d;
  --shadow: 0 24px 64px -36px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(167, 139, 250, 0.22), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(247, 185, 85, 0.12), transparent 18%),
    linear-gradient(180deg, #191323 0%, var(--bg) 55%, #09070f 100%);
}

body.modal-open {
  overflow: hidden;
}

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

code,
pre {
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.topbar-brand,
.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-brand {
  border-color: rgba(247, 185, 85, 0.4);
  color: var(--accent-strong);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-link.is-active {
  background: rgba(247, 185, 85, 0.14);
  border-color: rgba(247, 185, 85, 0.42);
  color: var(--accent-strong);
}

.topbar-link.is-disabled {
  opacity: 0.48;
  cursor: default;
}

.topbar-badge {
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(247, 185, 85, 0.3);
  border-radius: 999px;
  background: rgba(247, 185, 85, 0.12);
  color: var(--accent-strong);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
}

.eyebrow,
.panel-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 12px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.94;
}

.hero-text,
.panel-note,
.checklist,
.schedule-list,
.key-list {
  color: var(--muted);
  line-height: 1.6;
}

.hero-text {
  max-width: 60ch;
  margin: 16px 0 0;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button-primary {
  border-color: rgba(247, 185, 85, 0.5);
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.18), rgba(255, 207, 125, 0.34));
}

.hero-panel {
  padding: 22px;
}

.panel-value {
  margin: 18px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.panel-value code {
  font-size: 0.95em;
}

.panel-note {
  margin: 12px 0 0;
}

.content-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
  gap: 16px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.category-tab.is-active {
  background: rgba(247, 185, 85, 0.14);
  border-color: rgba(247, 185, 85, 0.42);
  color: var(--accent-strong);
}

.card {
  padding: 24px;
}

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

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

.idea-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.idea-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.idea-block p + p,
.idea-block p:last-child {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.idea-entry {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.idea-entry-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.idea-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.idea-entry-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.idea-entry-section p + p,
.idea-entry-section p:last-child {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.idea-bank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.idea-bank-headline h1 {
  margin: 12px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.idea-bank-list {
  display: grid;
  gap: 16px;
}

.idea-table-wrap {
  overflow-x: auto;
}

.idea-table {
  width: 100%;
  border-collapse: collapse;
}

.idea-table th,
.idea-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.idea-table th {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.idea-table td {
  color: var(--muted);
  line-height: 1.65;
}

.idea-table tbody tr:last-child td {
  border-bottom: none;
}

.idea-table-state {
  text-align: center;
}

.idea-card {
  padding: 22px;
}

.idea-card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}

.idea-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.idea-card-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.idea-card-section p + p,
.idea-card-section p:last-child {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.idea-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.idea-modal[hidden] {
  display: none;
}

.idea-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.72);
  backdrop-filter: blur(8px);
}

.idea-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #140f21;
  box-shadow: var(--shadow);
}

.idea-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.idea-modal-header h2 {
  margin: 12px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.idea-modal-close {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.idea-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.field-label {
  display: grid;
  gap: 8px;
}

.field-label span {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field-label input,
.field-label textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.field-label textarea {
  resize: vertical;
}

.idea-form-status {
  min-height: 1.5em;
  margin: 0;
  color: #ffb5b5;
}

.idea-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.intro-card,
.summary-card {
  background: var(--panel-strong);
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.lead-paragraph,
.flow-card p,
.summary-card p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.flow-card p + p {
  margin-top: 14px;
}

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

.api-group {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.api-group h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.resource-list li + li {
  margin-top: 12px;
}

.resource-list a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(255, 207, 125, 0.32);
  text-underline-offset: 0.16em;
}

.placeholder-card {
  min-height: 320px;
  align-content: center;
}

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

.command-block {
  min-width: 0;
}

.command-block + .command-block {
  margin-top: 18px;
}

.command-grid .command-block + .command-block {
  margin-top: 0;
}

.command-block h3 {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(4, 4, 9, 0.55);
  color: #f7f0d9;
  line-height: 1.55;
}

.checklist,
.schedule-list,
.key-list {
  margin: 18px 0 0;
  padding-left: 20px;
}

.checklist li + li,
.schedule-list li + li,
.key-list li + li {
  margin-top: 10px;
}

@media (max-width: 960px) {
  .topbar,
  .hero,
  .command-grid,
  .api-grid,
  .idea-grid,
  .idea-entry-grid,
  .idea-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 20px;
    border-radius: 22px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .idea-bank-head {
    flex-direction: column;
    align-items: stretch;
  }

  .idea-form-actions {
    flex-direction: column;
  }

  .topbar-nav {
    justify-content: stretch;
  }

  .topbar-brand,
  .topbar-link,
  .category-tab {
    justify-content: center;
  }

  .hero h1 {
    max-width: none;
  }
}
