:root {
  color-scheme: light;
  --bg: #f8faf9;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --ink: #16201c;
  --muted: #5a6962;
  --line: #cbd7d0;
  --accent: #0b6b5b;
  --accent-2: #7a3f17;
  --code-bg: #111816;
  --code-ink: #edf7f2;
  --warn-bg: #fff3d6;
  --warn-line: #e2b64a;
  font-family: Inter, Segoe UI, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.58;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

header {
  background: #16201c;
  color: #f4fbf7;
  border-bottom: 4px solid #2c8a77;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 760;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.94rem;
}

.topnav a {
  color: #d9f1e9;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

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

.side {
  position: sticky;
  top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.side h2 {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side a {
  display: block;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid #eef2ef;
}

.side a:first-of-type {
  border-top: 0;
}

.doc {
  min-width: 0;
}

.hero {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 2.7rem;
  line-height: 1.08;
}

.hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

section {
  margin-top: 28px;
}

h1, h2, h3 {
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

h3 {
  margin: 22px 0 8px;
  font-size: 1.14rem;
}

p {
  margin: 0 0 14px;
}

ul, ol {
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.card h3 {
  margin-top: 0;
}

.note {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  padding: 14px 16px;
  margin: 18px 0;
}

.warning {
  border-left: 4px solid var(--warn-line);
  background: var(--warn-bg);
  padding: 14px 16px;
  margin: 18px 0;
}

.schema {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  overflow: auto;
}

.schema img {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

th {
  background: #e8f1ed;
  font-weight: 720;
}

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

code {
  background: #e8f1ed;
  border: 1px solid #d2ddd7;
  border-radius: 5px;
  padding: 0.08rem 0.28rem;
  font-family: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

pre {
  margin: 14px 0 22px;
  padding: 16px;
  overflow: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
}

pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  margin: 2px 4px 2px 0;
  background: #eef4f1;
  color: #25352f;
  font-size: 0.88rem;
}

.footer-nav {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  background: #fff8df;
  color: #151812;
  border: 2px solid #151812;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 720;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #d68a25;
  outline-offset: 4px;
}

.processor-home,
.legal-page {
  --home-bg: #f7f3ec;
  --home-ink: #151812;
  --home-muted: #4d574f;
  --home-line: #bfc7bd;
  --home-green: #0b6b5b;
  --home-blue: #265a7d;
  --home-copper: #9b4d1f;
  --home-rust: #7f2f27;
  --home-panel: #fffaf1;
  --home-dark: #111612;
  background: var(--home-bg);
  color: var(--home-ink);
  overflow-x: hidden;
}

.landing-header {
  background: #111612;
  color: #fffaf1;
  border-bottom: 1px solid #3c463f;
}

.landing-topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fffaf1;
  text-decoration: none;
  font-weight: 780;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #d68a25;
  border-radius: 6px;
  color: #ffd28b;
  font-family: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

.landing-nav a {
  color: #e7efe8;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
}

.landing-nav a:hover,
.landing-nav a[aria-current="page"] {
  border-color: #d68a25;
}

.landing-main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.processor-hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  background-color: #151812;
  background-image: url("harvos-cpu-architecture.svg");
  background-position: center;
  background-size: cover;
  color: #fffaf1;
  position: relative;
  overflow: hidden;
  border-bottom: 8px solid #d68a25;
}

.processor-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 22, 18, 0.84);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 48px));
  min-width: 0;
  margin: 0 auto;
  padding: 96px 0 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #9b4d1f;
  font-size: 0.86rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.processor-hero .eyebrow {
  color: #ffd28b;
}

.processor-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: 4rem;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: #e8eee9;
  font-size: 1.17rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 760;
  text-decoration: none;
}

.primary-action {
  background: #ffd28b;
  border: 2px solid #ffd28b;
  color: #151812;
}

.secondary-action {
  border: 2px solid #fffaf1;
  color: #fffaf1;
}

.hero-facts {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 48px));
  margin: 0 auto 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  list-style: none;
  background: #59635c;
  border: 1px solid #59635c;
}

.hero-facts li {
  margin: 0;
  padding: 16px;
  background: rgba(255, 250, 241, 0.95);
  color: #151812;
}

.hero-facts span,
.hero-facts strong {
  display: block;
}

.hero-facts span {
  color: #59635c;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.hero-facts strong {
  margin-top: 4px;
  font-size: 1.05rem;
}

.section-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.signal-band,
.architecture-section,
.boot-section,
.docs-section,
.status-section {
  padding: 72px 0;
}

.signal-band {
  background: #fffaf1;
}

.signal-band h2,
.architecture-section h2,
.boot-section h2,
.docs-section h2,
.status-section h2 {
  margin: 0 0 24px;
  max-width: 780px;
  font-size: 2.25rem;
  line-height: 1.12;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--home-line);
  border: 1px solid var(--home-line);
}

.signal-list article {
  background: #fffaf1;
  padding: 22px;
  min-height: 270px;
}

.signal-code {
  display: inline-block;
  margin-bottom: 26px;
  color: #0b6b5b;
  font-family: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 760;
}

.signal-list h3,
.boot-steps h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.signal-list p,
.boot-steps p,
.status-section p,
.architecture-section p,
.legal-document p {
  color: var(--home-muted);
}

.architecture-section {
  background: #f7f3ec;
}

.architecture-grid,
.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 42px;
  align-items: start;
}

.detail-list {
  margin: 30px 0 0;
}

.detail-list div {
  border-top: 1px solid var(--home-line);
  padding: 18px 0;
}

.detail-list dt {
  font-weight: 780;
}

.detail-list dd {
  margin: 4px 0 0;
  color: var(--home-muted);
}

.architecture-figure {
  margin: 0;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: #fffaf1;
  padding: 12px;
}

.architecture-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.architecture-figure figcaption {
  margin: 12px 4px 4px;
  color: var(--home-muted);
  font-size: 0.95rem;
}

.boot-section {
  background: #111612;
  color: #fffaf1;
}

.boot-section .eyebrow {
  color: #ffd28b;
}

.boot-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #3c463f;
  border: 1px solid #3c463f;
}

.boot-steps li {
  margin: 0;
  min-height: 245px;
  padding: 22px;
  background: #151b16;
}

.boot-steps span {
  display: inline-block;
  margin-bottom: 34px;
  color: #ffd28b;
  font-family: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
}

.boot-steps p {
  color: #d8e2db;
}

.boot-steps code {
  background: #263027;
  border-color: #485349;
  color: #fffaf1;
}

.docs-section {
  background: #fffaf1;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.text-link {
  font-weight: 760;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--home-line);
  border: 1px solid var(--home-line);
}

.doc-grid a {
  display: block;
  min-height: 150px;
  padding: 22px;
  background: #fffaf1;
  color: var(--home-muted);
  text-decoration: none;
}

.doc-grid a:hover {
  background: #f2eadf;
}

.doc-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--home-ink);
  font-size: 1.1rem;
  font-weight: 780;
}

.status-section {
  background: #f7f3ec;
}

.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--home-line);
}

.status-list li {
  margin: 0;
  border-bottom: 1px solid var(--home-line);
  padding: 18px 0 18px 30px;
  position: relative;
}

.status-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 27px;
  width: 12px;
  height: 12px;
  background: #9b4d1f;
}

.landing-footer {
  background: #111612;
  color: #d8e2db;
  border-top: 1px solid #3c463f;
}

.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-inner a {
  color: #fffaf1;
}

.legal-main {
  max-width: none;
  margin: 0;
  padding: 64px 24px 76px;
}

.legal-document {
  width: min(840px, 100%);
  margin: 0 auto;
  background: #fffaf1;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  padding: 42px;
}

.legal-document h1 {
  margin: 0 0 18px;
  font-size: 2.6rem;
  line-height: 1.08;
}

.legal-document h2 {
  margin-top: 34px;
}

.muted-copy {
  color: var(--home-muted);
}

@media (max-width: 980px) {
  .landing-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .processor-hero h1 {
    font-size: 3rem;
  }

  .hero-facts,
  .signal-list,
  .boot-steps,
  .doc-grid,
  .architecture-grid,
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-grid,
  .status-grid {
    gap: 30px;
  }
}

@media (max-width: 680px) {
  .landing-topbar,
  .section-inner,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .hero-copy,
  .hero-facts {
    width: min(358px, calc(100vw - 32px));
    max-width: min(358px, calc(100vw - 32px));
    min-width: 0;
    margin-left: 16px;
    margin-right: auto;
  }

  .processor-hero {
    min-height: 0;
  }

  .hero-copy {
    padding-top: 64px;
  }

  .processor-hero h1 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .hero-facts,
  .signal-list,
  .boot-steps,
  .doc-grid,
  .architecture-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions a {
    width: 100%;
  }

  .section-heading-row,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .signal-band,
  .architecture-section,
  .boot-section,
  .docs-section,
  .status-section {
    padding: 52px 0;
  }

  .signal-band h2,
  .architecture-section h2,
  .boot-section h2,
  .docs-section h2,
  .status-section h2 {
    font-size: 1.8rem;
  }

  .legal-main {
    padding: 34px 16px 52px;
  }

  .legal-document {
    padding: 28px 20px;
  }

  .legal-document h1 {
    font-size: 2.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
