:root {
  color-scheme: dark;
  --bg: #050814;
  --bg-soft: #07101d;
  --panel: rgba(9, 18, 34, 0.88);
  --panel-strong: rgba(14, 26, 48, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #f8fafc;
  --muted: #bac5d8;
  --quiet: #8190a9;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --green: #5ee6a8;
  --amber: #f6c35f;
  --rose: #fb7185;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 79% 8%, rgba(34, 211, 238, 0.16), transparent 28%),
    radial-gradient(circle at 14% 34%, rgba(94, 230, 168, 0.08), transparent 26%),
    linear-gradient(180deg, #050814 0%, #07101d 48%, #050814 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.public-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.public-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.public-brand,
.public-links,
.public-actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.public-brand {
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
}

.public-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.public-links {
  gap: 18px;
}

.public-links a,
.public-footer a,
.text-link,
.back-link {
  color: var(--muted);
  text-decoration: none;
}

.public-links a {
  font-size: 14px;
}

.public-links a:hover,
.public-links a:focus,
.public-footer a:hover,
.text-link:hover,
.back-link:hover {
  color: var(--text);
}

.public-actions,
.hero-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.public-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.58);
}

.public-button.primary,
.auth-primary {
  color: #03111f;
  border-color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.landing-hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  padding: 44px 0 76px;
}

.landing-copy h1,
.editorial-hero h1,
.article-hero h1,
.auth-copy h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.96;
}

.landing-copy h1 {
  font-size: clamp(4rem, 9vw, 8.8rem);
}

.landing-copy p,
.editorial-hero p,
.article-hero p,
.section-head p,
.case-band p,
.final-cta p,
.auth-copy p {
  color: var(--muted);
  line-height: 1.62;
}

.landing-copy p {
  max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 24px 0 28px;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.proof-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.44);
  font-size: 13px;
}

.product-preview {
  position: relative;
  min-height: 570px;
}

.preview-frame {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.preview-frame span {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.preview-frame.main {
  inset: 8% 4% 10% 0;
}

.preview-frame.side {
  right: 0;
  bottom: 0;
  width: 42%;
  height: 34%;
}

.preview-frame.top {
  right: 8%;
  top: 0;
  width: 40%;
  height: 28%;
}

.public-section {
  padding: 78px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-head.compact {
  margin-bottom: 22px;
}

.section-head h2,
.case-band h2,
.final-cta h2,
.supporting-gallery h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.workflow-grid,
.article-grid,
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.workflow-grid article,
.article-card,
.note-card,
.featured-card,
.proof-list article,
.auth-card,
.rail-panel,
.stat-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 18, 34, 0.72);
}

.workflow-grid article {
  padding: 22px;
}

.workflow-grid h3,
.proof-list h3,
.article-card h3,
.note-card h3,
.featured-card h2,
.rail-panel h2 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

.workflow-grid p,
.proof-list p,
.article-card p,
.note-card p,
.featured-card p,
.rail-panel li {
  color: var(--muted);
  line-height: 1.56;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: start;
}

.split-section .section-head {
  grid-column: 1 / -1;
}

.proof-media img,
.case-band img,
.editorial-hero figure img,
.article-hero figure img,
.supporting-gallery img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.58);
}

.proof-list {
  display: grid;
  gap: 14px;
}

.proof-list article {
  padding: 20px;
}

.proof-list a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.case-band {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 30px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.final-cta {
  max-width: 760px;
}

.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 36px;
  padding: 84px 0 54px;
}

.editorial-hero h1,
.article-hero h1 {
  font-size: clamp(3.4rem, 8vw, 7.2rem);
}

.featured-card,
.article-card a,
.note-card a {
  display: block;
  height: 100%;
  padding: 18px;
  text-decoration: none;
}

.featured-card {
  padding: 26px;
}

.featured-card span,
.article-card span,
.note-card span,
.article-meta,
.stat-strip span {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-card img,
.note-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  background: rgba(2, 6, 23, 0.44);
}

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

.notes-hero figure {
  margin: 0;
}

.article-shell {
  padding-bottom: 72px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 0.8fr);
  gap: 36px;
  align-items: center;
  padding: 76px 0 40px;
}

.article-hero figure {
  margin: 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
}

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

.stat-strip div {
  padding: 18px;
}

.stat-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.article-rail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.article-rail nav,
.rail-panel {
  padding: 18px;
}

.article-rail h2 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--quiet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-rail a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 0;
  line-height: 1.35;
}

.article-rail a.level-3 {
  padding-left: 12px;
}

.article-rail a.level-4 {
  padding-left: 22px;
}

.rail-panel ul {
  margin: 0;
  padding-left: 18px;
}

.article-body {
  max-width: 820px;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  letter-spacing: 0;
  line-height: 1.12;
  margin: 38px 0 14px;
}

.article-body h1 {
  font-size: 2.4rem;
}

.article-body h2 {
  font-size: 2rem;
}

.article-body h3 {
  font-size: 1.45rem;
}

.article-body p,
.article-body li {
  color: #d8e1ee;
  font-size: 1.04rem;
  line-height: 1.76;
}

.article-body a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.article-body blockquote {
  margin: 0 0 28px;
  padding: 22px 24px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: rgba(94, 230, 168, 0.08);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.5;
}

.article-body code,
.article-body pre {
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.76);
}

.article-body code {
  padding: 2px 5px;
}

.article-body pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-body img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.55);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-body th,
.article-body td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

.build-notes-interactive-embed {
  margin: 28px 0;
}

.build-notes-interactive-embed iframe {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.62);
}

.build-notes-interactive-embed__fallback {
  font-size: 0.94rem;
}

.supporting-gallery {
  margin-top: 56px;
}

.supporting-gallery > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.auth-page {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: clamp(32px, 6vw, 92px);
  align-items: center;
  padding: 42px 0;
}

.auth-copy img {
  width: min(360px, 70vw);
  margin-bottom: 32px;
}

.auth-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.auth-card {
  padding: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.auth-card h2 {
  margin: 0 0 8px;
}

.auth-caption,
.auth-reset {
  color: var(--muted);
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.auth-mode button {
  appearance: none;
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 11px 12px;
  font: inherit;
  cursor: pointer;
}

.auth-mode button.active {
  color: var(--text);
  background: rgba(96, 165, 250, 0.18);
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.field input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.hidden {
  display: none;
}

.auth-alert {
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-alert.error {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.22);
}

.auth-alert.info {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(20, 83, 45, 0.2);
}

.auth-primary {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(15, 23, 42, 0.54);
}

.auth-reset {
  margin: 16px 0 0;
  text-align: center;
}

.auth-reset a {
  color: var(--muted);
}

.public-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 0 42px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.public-footer span:last-child {
  display: flex;
  gap: 16px;
}

@media (max-width: 980px) {
  .public-links {
    display: none;
  }

  .landing-hero,
  .split-section,
  .case-band,
  .editorial-hero,
  .article-hero,
  .article-layout,
  .auth-page {
    grid-template-columns: 1fr;
  }

  .product-preview {
    min-height: 440px;
  }

  .workflow-grid,
  .article-grid,
  .note-grid,
  .supporting-gallery > div,
  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-rail {
    position: static;
  }
}

@media (max-width: 640px) {
  .public-shell {
    width: min(100% - 28px, 1180px);
  }

  .public-nav {
    min-height: 66px;
    gap: 12px;
  }

  .public-brand span {
    display: none;
  }

  .public-actions .public-button:not(.primary) {
    display: none;
  }

  .landing-copy h1 {
    font-size: clamp(3.1rem, 18vw, 4.4rem);
  }

  .landing-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .product-preview {
    min-height: 360px;
  }

  .preview-frame.main {
    inset: 4% 0 18% 0;
  }

  .preview-frame.side,
  .preview-frame.top {
    width: 54%;
  }

  .public-section {
    padding: 58px 0;
  }

  .workflow-grid,
  .article-grid,
  .note-grid,
  .note-grid.two,
  .supporting-gallery > div,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .article-hero {
    padding-top: 48px;
  }

  .editorial-hero h1,
  .article-hero h1 {
    font-size: clamp(2.8rem, 16vw, 4.6rem);
  }

  .auth-copy {
    display: none;
  }

  .auth-card {
    padding: 24px;
  }

  .build-notes-interactive-embed iframe {
    min-height: 560px;
  }

  .public-footer {
    flex-direction: column;
  }
}
