/*
  Geode's website: one stylesheet, in the app's dark look.
  The tokens are F1–F3 on the design canvas, as CLAUDE.md lists them under
  "Building the design". No inline styles anywhere: the Content-Security-Policy
  in _headers allows only this file.
*/

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Regular.otf") format("opentype");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Medium.otf") format("opentype");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-SemiBold.otf") format("opentype");
}

:root {
  color-scheme: dark;

  /* Surfaces (F1) */
  --base: #0b1220;
  --glass: rgba(180, 205, 255, 0.07);
  --control: rgba(180, 205, 255, 0.1);
  --control-pressed: rgba(180, 205, 255, 0.16);
  --rim: rgba(200, 220, 255, 0.14);
  --divider: rgba(200, 220, 255, 0.1);
  --highlight: rgba(255, 255, 255, 0.1);
  --solid: #172238;

  /* Text (F1) */
  --text: #e8eef6;
  --text-secondary: #aebbcd;
  --text-tertiary: #8392a8;

  /* Brand and status (F1) */
  --blue: #8aaef5;
  --blue-pressed: #7699e0;
  --blue-underline: rgba(138, 174, 245, 0.5);
  --amber: #f4bc5a;

  /* Type (F2) */
  --sans: "IBM Plex Sans", -apple-system, system-ui, sans-serif;

  /* Space and shape (F3) */
  --margin: 20px;
  --card-padding: 16px;
  --radius-strip: 16px;
  --radius-card: 22px;
  --column: 680px;
  --column-wide: 960px;
}

@media (min-width: 720px) {
  :root {
    --card-padding: 24px;
  }
}

/* Solid #172238 stands in for glass when Reduce Transparency is on. */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: var(--solid);
    --control: var(--solid);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Body: 16/24 400, in secondary text. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--base);
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

img {
  display: block;
}

.column {
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--margin));
  margin: 0 auto;
  padding: 0 var(--margin);
}

.column-wide {
  max-width: calc(var(--column-wide) + 2 * var(--margin));
}

a {
  color: var(--blue);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--blue-underline);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:active {
  color: var(--blue-pressed);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Header: the glyph beside the wordmark, and Support as a glass capsule. */

.site-header .column {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.brand img {
  width: 24px;
  height: 24px;
}

.capsule {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rim);
  border-radius: 999px;
  background: var(--control);
  box-shadow: inset 0 1px 0 var(--highlight);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.375rem;
  font-weight: 500;
  text-decoration: none;
}

.capsule:hover,
.capsule:active {
  background: var(--control-pressed);
  color: var(--text);
}

/* Page titles: display 32/38 600 −0.8. */

.page-head {
  padding-top: 24px;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 2rem;
  line-height: 2.375rem;
  font-weight: 600;
  letter-spacing: -0.8px;
}

.page-date {
  margin: 4px 0 0;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

/* Status: a small icon and plain words, here on a glass strip. */

.status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--rim);
  border-radius: var(--radius-strip);
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.status svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.status strong {
  color: var(--text);
  font-weight: 500;
}

.attention svg {
  color: var(--amber);
}

/* Long text: the legal pages and Support. */

.prose {
  padding-top: 24px;
  padding-bottom: 56px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 12px 0 0;
}

.prose > :first-child {
  margin-top: 0;
}

.lead {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.625rem;
}

/* Section headings: title 2 22/28 600 −0.3, 28 before. */
.prose h2 {
  margin: 28px 0 0;
  color: var(--text);
  font-size: 1.375rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.prose h2 + * {
  margin-top: 8px;
}

ul,
ol {
  padding-left: 1.375rem;
}

li {
  margin-top: 8px;
  padding-left: 2px;
}

li::marker {
  color: var(--text-tertiary);
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* The Terms' plan table, on a glass card. */

.table {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--rim);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.prose .table + ul {
  margin-top: 16px;
}

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

th,
td {
  padding: 12px var(--card-padding);
  text-align: left;
  vertical-align: top;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

thead th {
  padding-top: 14px;
  padding-bottom: 10px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.125rem;
  font-weight: 600;
}

tbody th {
  color: var(--text);
  font-weight: 500;
}

tbody tr {
  border-top: 1px solid var(--divider);
}

@media (max-width: 480px) {
  th,
  td {
    padding-left: 12px;
    padding-right: 12px;
  }

  tbody th {
    width: 40%;
  }
}

/* Home */

.hero {
  padding-top: 32px;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 21.5px;
  box-shadow: 0 0 0 1px var(--rim), 0 12px 32px rgba(0, 0, 0, 0.32);
}

.hero h1 {
  margin-top: 24px;
  font-size: 2.75rem;
  line-height: 3.125rem;
  letter-spacing: -1.2px;
}

.tagline {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 1.375rem;
  line-height: 1.75rem;
  letter-spacing: -0.3px;
}

.hero .lead {
  max-width: 640px;
  margin: 24px 0 0;
}

.hero p:not(.tagline):not(.lead) {
  max-width: 640px;
  margin: 12px 0 0;
}

.hero .meta {
  margin-top: 16px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 40px;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-wide {
    grid-column: 1 / -1;
  }
}

.card {
  padding: var(--card-padding);
  border: 1px solid var(--rim);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--highlight);
}

/* Card titles: section 17/22 600 −0.2. */
.card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card ul,
.card p {
  margin: 12px 0 0;
}

.card p + p {
  margin-top: 8px;
}

.card-wide p {
  max-width: 46rem;
}

.fine {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

.home {
  padding-bottom: 56px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--divider);
}

.site-footer .column {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 12px;
  padding-bottom: 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.375rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration-line: underline;
}

.site-footer a[aria-current="page"] {
  color: var(--text);
}

.site-footer p {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

@media print {
  :root {
    color-scheme: light;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  h1,
  .prose h2,
  .card h2,
  strong,
  .lead,
  a,
  tbody th,
  .brand {
    color: #000;
  }

  .status,
  .table,
  .card {
    border-color: #999;
    background: none;
    box-shadow: none;
  }

  .site-header nav,
  .site-footer nav {
    display: none;
  }
}
