:root {
  --bg: #f7f5f0;
  --paper: #fffdf8;
  --ink: #1d2522;
  --muted: #5d6862;
  --line: #d9d4c8;
  --charcoal: #111816;
  --teal: #0b6f73;
  --green: #2f7d45;
  --amber: #b46a22;
  --cream: #f0eadf;
  --shadow: 0 16px 36px rgba(17, 24, 22, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: var(--teal);
  text-decoration-color: rgba(11, 111, 115, 0.32);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: #084e51;
  text-decoration-color: currentColor;
}

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

code {
  background: rgba(11, 111, 115, 0.08);
  border: 1px solid rgba(11, 111, 115, 0.14);
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

pre {
  margin: 1rem 0 0;
  overflow-x: auto;
  border-radius: 8px;
  background: #111816;
  color: #dcf7e7;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  padding: 0;
  white-space: pre;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: rgba(247, 245, 240, 0.92);
  border-bottom: 1px solid rgba(29, 37, 34, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border: 1px solid rgba(17, 24, 22, 0.2);
  border-radius: 8px;
  background: var(--charcoal);
  color: #ddf7e8;
  font-size: 0.78rem;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--teal);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 68vh;
  overflow: hidden;
  color: #fffdf8;
  background:
    linear-gradient(90deg, rgba(9, 13, 12, 0.9), rgba(9, 13, 12, 0.7) 38%, rgba(9, 13, 12, 0.16) 78%),
    url("assets/hero-mac-hpc.jpg") center / cover no-repeat;
}

.hero-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

.eyebrow,
.section-kicker,
.tool-label,
.release-label {
  margin: 0 0 0.65rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #83dfae;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: 4rem;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: 2.05rem;
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 690px;
  color: rgba(255, 253, 248, 0.88);
  font-size: 1.12rem;
}

.hero-actions,
.download-actions,
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0.66rem 1rem;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: #f7f5f0;
  color: #111816;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #e9f4e6;
  color: #111816;
}

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

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  color: #fffdf8;
}

.section {
  padding: 4.5rem clamp(1rem, 4vw, 3rem);
}

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

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

.review-note {
  margin-bottom: 0;
  font-size: 0.94rem;
  font-weight: 700;
}

.intro {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 2.5rem;
  align-items: start;
}

.status-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.status-list div {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
  background: var(--paper);
  padding: 1rem;
}

.status-list dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.status-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.stack {
  background: #e8efea;
  border-bottom: 1px solid var(--line);
}

.stack-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 2.25rem;
  align-items: start;
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.stack-list div {
  background: var(--paper);
  padding: 1rem;
}

.stack-list dt {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-list dd {
  margin: 0.28rem 0 0;
  color: var(--ink);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.tool-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 1.1rem;
  box-shadow: 0 8px 20px rgba(17, 24, 22, 0.06);
}

.tool-card p {
  margin-bottom: 1rem;
}

.tool-card a {
  margin-top: auto;
  font-weight: 800;
}

.compilers {
  background: var(--cream);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.text-link {
  font-weight: 800;
  white-space: nowrap;
}

.latest-release {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  border-left: 5px solid var(--green);
  background: var(--paper);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.latest-release .button-secondary {
  background: #1d2522;
  border-color: #1d2522;
  color: #fffdf8;
}

.compact-release {
  grid-template-columns: 1fr;
  align-items: start;
  margin-top: 1.15rem;
}

.compact-release .download-actions {
  justify-content: flex-start;
}

.download-actions {
  justify-content: flex-end;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.install-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 1.1rem;
}

.note {
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-size: 0.94rem;
}

.legacy-builds {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.legacy-builds summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  color: var(--ink);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

td:first-child {
  font-weight: 800;
}

td a {
  display: inline-block;
  margin-right: 0.65rem;
  font-weight: 800;
}

.supporting-link {
  margin: 1rem 0 0;
}

.split {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.split.alt {
  background: #eef3ef;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 2rem;
  align-items: start;
}

.resource-links {
  display: grid;
  gap: 0.75rem;
}

.resource-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.resource-links a:hover,
.resource-links a:focus-visible {
  border-color: rgba(11, 111, 115, 0.45);
  color: var(--teal);
}

.command-panel {
  margin-top: 1.15rem;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  padding: 1rem;
}

.command-panel h3 {
  margin-bottom: 0.6rem;
}

.plain-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.plain-list strong {
  color: var(--ink);
}

.gravsim {
  background: var(--bg);
}

.gravsim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 2rem;
  align-items: start;
}

.fact-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.fact-list div {
  background: var(--paper);
  padding: 1rem;
}

.fact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-list strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: #111816;
  color: rgba(255, 253, 248, 0.86);
}

.site-footer p {
  margin: 0.3rem 0 0;
  color: rgba(255, 253, 248, 0.68);
}

.site-footer a {
  color: #a8e6c2;
  font-weight: 800;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 3rem;
  }

  .intro-grid,
  .stack-grid,
  .latest-release,
  .install-grid,
  .split-grid,
  .gravsim-layout {
    grid-template-columns: 1fr;
  }

  .download-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }

  nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(29, 37, 34, 0.14);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
  }

  .hero {
    min-height: 62vh;
    background:
      linear-gradient(180deg, rgba(9, 13, 12, 0.92), rgba(9, 13, 12, 0.64)),
      url("assets/hero-mac-hpc.jpg") center / cover no-repeat;
  }

  .hero-inner {
    padding: 3rem 0 3.5rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 0;
  }

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

  .text-link {
    white-space: normal;
  }

  .status-list div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .stack-list {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
