:root {
  --ink: #14201d;
  --muted: #60706b;
  --line: #dce5e2;
  --panel: #ffffff;
  --paper: #f6f9f7;
  --deep: #0d2b27;
  --teal: #0f8b7f;
  --green: #79b55b;
  --amber: #c8882d;
  --danger: #b83f3f;
  --shadow: 0 24px 70px rgba(21, 38, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: var(--teal);
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: rgba(246, 249, 247, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand,
.top-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  margin-right: auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--deep);
  border-radius: 8px;
}

.top-nav a {
  color: var(--muted);
  font-weight: 650;
}

.top-nav a.active {
  color: var(--ink);
}

.header-actions form {
  margin: 0;
}

.page-shell,
.wide-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.wide-shell {
  width: min(1320px, calc(100% - 32px));
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.primary-button {
  background: var(--deep);
  color: white;
}

.secondary-button {
  background: white;
  color: var(--deep);
  border-color: var(--line);
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: var(--danger);
  color: white;
}

.google-button {
  width: 100%;
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.hero {
  min-height: min(650px, calc(100svh - 220px));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 42px;
  padding: clamp(34px, 6vh, 54px) 0 28px;
}

.hero h1,
.page-intro h1,
.dashboard-head h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

.page-intro h1,
.dashboard-head h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.hero-lede,
.page-intro p,
.section-band p,
.dashboard-head p {
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  text-transform: uppercase;
  font-weight: 850;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero-actions,
.hero-metrics,
.stats-row,
.inline-form,
.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-metrics {
  margin-top: 28px;
  color: var(--muted);
}

.hero-metrics span {
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

.hero-metrics span:last-child {
  border-right: 0;
}

.console-visual {
  background: #0a1513;
  color: #eaf4ef;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.console-visual.image-asset {
  background: transparent;
  border: 0;
}

.console-visual.image-asset img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.console-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  background: #10211e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-header span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
}

.console-header span:nth-child(2) {
  background: var(--green);
}

.console-header span:nth-child(3) {
  background: var(--teal);
  margin-right: 12px;
}

.console-body {
  padding: 24px;
}

.console-body b {
  color: var(--green);
}

.console-body pre {
  overflow-x: auto;
  padding: 20px;
  background: #07100f;
  border-radius: 8px;
  color: #d6f2e5;
  min-height: 210px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.source-grid span,
.source-grid button {
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b8cec7;
  font: inherit;
  text-align: left;
}

.source-grid button {
  cursor: pointer;
}

.source-grid button:hover,
.source-grid button.active {
  color: white;
  background: rgba(15, 139, 127, 0.28);
  border-color: rgba(121, 181, 91, 0.45);
}

.console-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #a8bdb6;
  font-size: 14px;
}

.console-note a {
  color: #aee7d9;
  font-weight: 800;
  white-space: nowrap;
}

.publication-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: center;
  padding: 52px 0 64px;
}

.publication-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.publication-copy p {
  color: var(--muted);
  font-size: 18px;
}

.publication-stack {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: repeat(2, minmax(180px, 1fr));
  gap: 16px;
}

.publication-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--deep);
  color: white;
  box-shadow: var(--shadow);
}

.publication-card.lead {
  grid-row: span 2;
}

.publication-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}

.publication-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 18, 16, 0.05), rgba(7, 18, 16, 0.86));
}

.publication-card div {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 18px;
}

.publication-card span {
  display: block;
  margin-bottom: 8px;
  color: #bde5d8;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.publication-card h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.08;
}

.section-band,
.page-intro,
.dashboard-head {
  padding: 64px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2,
.section-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.feature-grid,
.pricing-grid,
.billing-grid,
.dashboard-grid,
.docs-grid,
.contact-options,
.plan-admin-list {
  display: grid;
  gap: 18px;
}

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

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

.feature-grid article,
.plan-panel,
.panel,
.form-panel,
.stat,
.contact-option,
.user-row,
.plan-admin {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.contact-option {
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.contact-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-option strong {
  overflow-wrap: anywhere;
}

.feature-grid h3,
.plan-panel h3,
.panel h2 {
  margin-top: 0;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
}

.code-block {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 20px;
  background: #0b1715;
  color: #d9f7eb;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.pricing-grid.compact .plan-panel {
  min-height: 100%;
}

.plan-panel.featured {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.plan-topline,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f5ef;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.price {
  margin: 14px 0;
  font-size: 40px;
  font-weight: 850;
}

.price span {
  color: var(--muted);
  font-size: 16px;
}

.plan-metrics {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.plan-metrics div,
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 750;
}

.feature-list {
  padding-left: 18px;
  color: var(--muted);
}

.auth-shell {
  min-height: calc(100svh - 140px);
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.form-panel {
  width: min(520px, 100%);
  box-shadow: var(--shadow);
}

.form-panel h1 {
  margin-top: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  resize: vertical;
}

.stack-form,
.form-panel {
  display: grid;
  gap: 16px;
}

.divider {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.divider span {
  background: white;
  padding: 0 10px;
  transform: translateY(-50%);
}

.form-note,
.notice span {
  color: var(--muted);
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.notice.success {
  border-color: #a9d9c4;
  background: #edf8f2;
}

.notice.warning {
  border-color: #efd09d;
  background: #fff8ea;
}

.notice.error {
  border-color: #edb8b8;
  background: #fff0f0;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats-row {
  align-items: stretch;
  margin-bottom: 18px;
}

.stat {
  flex: 1 1 220px;
}

.stat span,
.stat small {
  display: block;
  color: var(--muted);
}

.stat strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
}

.dashboard-grid,
.docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

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

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

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.link-button,
.inline-button {
  padding: 0;
  color: var(--teal);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inline-form {
  margin-bottom: 16px;
}

.meter {
  height: 8px;
  width: 100%;
  overflow: hidden;
  background: #e7eeeb;
  border-radius: 999px;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.paypal-slot {
  min-height: 92px;
  margin-top: 14px;
}

.paypal-slot span,
.inline-error {
  color: var(--danger);
}

.admin-user-list,
.plan-admin-list {
  display: grid;
  gap: 14px;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr 220px 260px;
  gap: 18px;
  align-items: start;
}

.user-row h2 {
  margin: 0;
  font-size: 20px;
}

.user-row form,
.plan-admin {
  display: grid;
  gap: 10px;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 60px auto 0;
  min-height: 84px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer div,
.site-footer nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
}

@media (max-width: 980px) {
  .site-header {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .top-nav {
    order: 3;
    width: 100%;
  }

  .hero,
  .split,
  .publication-band,
  .dashboard-grid,
  .docs-grid,
  .user-row {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .pricing-grid,
  .billing-grid,
  .contact-options,
  .plan-admin-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .section-band,
  .page-intro,
  .dashboard-head {
    padding: 44px 0;
  }

  .hero {
    gap: 24px;
    padding: 28px 0 18px;
  }

  .hero-metrics {
    margin-top: 18px;
  }

  .console-visual.image-asset {
    max-height: 120px;
  }

  .console-visual.image-asset img {
    height: 120px;
    object-fit: cover;
    object-position: top;
  }

  .header-actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .dashboard-head,
  .plan-topline,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .console-body {
    padding: 16px;
  }

  .console-body pre {
    min-height: 170px;
    font-size: 12px;
  }

  .console-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-stack {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .publication-card.lead {
    grid-row: auto;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
