:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --surface: #ffffff;
  --ink: #1b241f;
  --muted: #55635b;
  --line: #d7e0d9;
  --accent: #2d6a4f;
  --accent-2: #8f2d56;
  --accent-3: #cde8dc;
  --shadow: 0 16px 36px rgba(27, 36, 31, 0.08);
  --radius: 6px;
  --max: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.home-page {
  color-scheme: dark;
  --bg: #080b0a;
  --surface: #111716;
  --ink: #f3f7f4;
  --muted: #a7b7af;
  --line: #26332f;
  --accent: #2fb172;
  --accent-2: #d27a9e;
  --accent-3: #18372b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(215, 224, 217, 0.88);
}

.home-page .site-header {
  background: rgba(8, 11, 10, 0.88);
  border-bottom-color: rgba(69, 87, 80, 0.7);
}

.bar {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
  font-size: 0.92rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.home-page .nav a:hover,
.home-page .brand:hover,
.home-page .footer-links a:hover {
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 54vh;
  display: flex;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(16, 26, 21, 0.18), rgba(16, 26, 21, 0.68)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  color: #f8fbf8;
}

.home-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #f9fbf8;
  background:
    radial-gradient(circle at 74% 28%, rgba(47, 177, 114, 0.24), transparent 32rem),
    radial-gradient(circle at 20% 78%, rgba(210, 122, 158, 0.14), transparent 26rem),
    linear-gradient(135deg, #080b0a 0%, #101716 48%, #050706 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 72%);
}

.home-hero-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 6rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1.8rem, 5vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.home-hero h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.94;
}

.home-hero p {
  max-width: 44rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.profile-orb {
  --orb-size: clamp(13rem, 28vw, 20rem);
  position: relative;
  width: var(--orb-size);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  isolation: isolate;
}

.profile-orb::before,
.profile-orb::after {
  content: "";
  position: absolute;
  inset: -1.2rem;
  border-radius: 50%;
  z-index: -1;
}

.profile-orb::before {
  background:
    conic-gradient(from 0deg, rgba(47, 177, 114, 0), rgba(47, 177, 114, 0.62), rgba(210, 122, 158, 0.42), rgba(47, 177, 114, 0));
  filter: blur(1px);
  animation: orb-spin 7s linear infinite;
}

.profile-orb::after {
  inset: -2.4rem;
  background: radial-gradient(circle, rgba(47, 177, 114, 0.22), transparent 66%);
  filter: blur(18px);
}

.profile-orb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

.profile-orb-face {
  animation: face-to-avatar 8s ease-in-out infinite alternate;
}

.profile-orb-avatar {
  animation: avatar-from-face 8s ease-in-out infinite alternate;
}

.profile-orb-ring {
  position: absolute;
  inset: -0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: ring-pulse 8s ease-in-out infinite alternate;
}

.hero-copy {
  max-width: 48rem;
}

.hero-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 4.5rem 0 2.2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #d7efe2;
}

.muted-eyebrow {
  color: var(--accent-2);
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.hero p,
.page-hero p {
  max-width: 48rem;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

.hero-actions,
.inline-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-actions,
.inline-links {
  margin-top: 1.4rem;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
}

.button {
  background: var(--accent);
  color: #f8fbf8;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #f8fbf8;
}

.text-link {
  padding-inline: 0;
  min-height: auto;
  color: var(--accent);
}

.section {
  padding: 3.2rem 0;
}

.home-page .section {
  background: #080b0a;
}

.section.alt {
  background: #ebf1ec;
}

.home-page .section.alt {
  background: #101615;
}

.section.dark {
  background: #15211b;
  color: #edf5ef;
}

.home-page .section.dark {
  background: #050706;
}

.inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.section-head {
  max-width: 50rem;
  margin-bottom: 1.8rem;
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.lede {
  display: grid;
  gap: 1rem;
  font-size: 1.08rem;
}

.lede p {
  margin: 0;
}

.dark .section-head p,
.dark p,
.dark li {
  color: #d1dfd5;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 1rem;
}

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

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.home-page .panel {
  background: linear-gradient(180deg, rgba(25, 35, 32, 0.96), rgba(17, 24, 22, 0.96));
}

.dark .panel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.panel h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.feature-panel {
  min-height: 13rem;
}

.panel p,
.panel ul {
  margin: 0;
}

.panel ul {
  padding-left: 1.1rem;
}

.callout {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(143, 45, 86, 0.08);
  border-radius: var(--radius);
}

.section-callout {
  margin-top: 1rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.checklist li {
  padding-left: 1.7rem;
  position: relative;
}

.checklist li::before {
  content: "•";
  position: absolute;
  left: 0.45rem;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
}

.home-page .footer {
  background: #080b0a;
}

.footer-copy {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  text-decoration: none;
}

.fine-print {
  font-size: 0.92rem;
}

.link-list {
  display: grid;
  gap: 0.75rem;
}

.link-list a {
  display: grid;
  gap: 0.15rem;
  padding: 1rem;
  color: #edf5ef;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.link-list span {
  color: #d7efe2;
  font-size: 0.9rem;
}

.link-list strong {
  font-size: 1.03rem;
}

@keyframes face-to-avatar {
  0%,
  36% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1.04) contrast(1.04);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(0.985) rotate(-2deg);
    filter: saturate(0.82) contrast(1.12);
  }
}

@keyframes avatar-from-face {
  0%,
  38% {
    opacity: 0;
    transform: scale(1.045) rotate(3deg);
    filter: saturate(0.7) blur(2px);
  }

  72%,
  100% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1.08) blur(0);
  }
}

@keyframes ring-pulse {
  0%,
  35% {
    transform: scale(1);
    opacity: 0.42;
  }

  100% {
    transform: scale(1.075);
    opacity: 0.85;
  }
}

@keyframes orb-spin {
  to {
    transform: rotate(1turn);
  }
}

.page-hero {
  padding: 4rem 0 2rem;
  background: linear-gradient(180deg, #dbece2 0%, #f4f7f4 100%);
}

.copy {
  width: min(100% - 2rem, 860px);
  margin: 0 auto 3rem;
}

.page-meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.copy h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.1;
}

.copy p,
.copy li {
  color: var(--ink);
}

.copy ul {
  padding-left: 1.15rem;
}

.stack-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stack-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.stack-table th,
.stack-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.stack-table th {
  color: var(--muted);
  font-size: 0.9rem;
}

.stack-table tr:last-child td {
  border-bottom: 0;
}

.stack-table a,
.copy a {
  color: var(--accent);
  font-weight: 700;
}

.nav-copy-button {
  font: inherit;
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
}

.diagnostic-page .site-header {
  background: rgba(244, 247, 244, 0.95);
}

.diagnostic-hero {
  background:
    linear-gradient(180deg, rgba(219, 236, 226, 0.94), rgba(244, 247, 244, 0.98)),
    url("https://images.unsplash.com/photo-1634394367878-f6e5b7fb8566?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
}

.diagnostic-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: end;
}

.copy-agent-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.copy-agent-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.copy-agent-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.copy-agent-card .copy-status {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: var(--accent);
  font-weight: 700;
}

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

.warning-panel {
  border-color: rgba(143, 45, 86, 0.42);
  background: #fff9fb;
}

.diagnostic-table td:first-child {
  font-weight: 800;
}

.diagnostic-steps {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding-left: 1.35rem;
}

.diagnostic-steps li {
  padding-left: 0.25rem;
}

.agent-prompt {
  margin: 0;
  white-space: pre-wrap;
  background: #111716;
  color: #edf5ef;
  border-radius: var(--radius);
  padding: 1.1rem;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.agent-prompt code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.reference-list .panel {
  box-shadow: none;
}

.reference-list a {
  display: inline-block;
  margin: 0.75rem 0.85rem 0 0;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .diagnostic-hero-grid,
  .diagnostic-grid,
  .reference-list {
    grid-template-columns: 1fr;
  }

  .copy-agent-card {
    align-self: stretch;
  }
}

.form-shell {
  display: grid;
  gap: 0.9rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field-group {
  display: grid;
  gap: 0.4rem;
}

.field-group label,
.checkbox-row {
  font-weight: 600;
}

.field-group input,
.field-group textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6faf7;
}

.checkbox-row input {
  margin-top: 0.22rem;
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 820px) {
  .grid-3,
  .grid-2,
  .split,
  .home-hero-inner {
    grid-template-columns: 1fr;
  }

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

  .nav {
    justify-content: start;
  }

  .hero {
    min-height: 48vh;
  }

  .home-hero {
    min-height: 82vh;
  }

  .home-hero-inner {
    gap: 1.7rem;
    padding: 4.4rem 0 3.1rem;
  }

  .profile-orb {
    --orb-size: clamp(10rem, 52vw, 14rem);
  }

  .hero-inner {
    padding-top: 3.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-orb::before,
  .profile-orb-face,
  .profile-orb-avatar,
  .profile-orb-ring {
    animation: none;
  }

  .profile-orb-face {
    opacity: 1;
  }

  .profile-orb-avatar {
    opacity: 0;
  }
}
