/* OrbitAI - sky.
   One stylesheet for every page: the site is small enough that splitting
   it would cost more requests than it saves bytes. */

:root {
  /* Sky blue on pale daylight, with deep navy for the ink. The blues run
     from almost-white to the colour of a clear sky at noon; the darkest
     is what the sky does at night, and carries the text. */
  --paper: #eef6fd;
  --paper-2: #e2eef9;
  --panel: #ffffff;
  --line: #c6dcef;
  --line-soft: #dceaf7;
  --ink: #0c2439;
  --dim: #45607a;

  /* Two accents, not one. #38a3e8 is the sky and reads beautifully as a
     border, a glow or a dot, and fails contrast as small text on a pale
     background - so anything you have to READ uses the darker one. */
  --accent: #1372b8;
  --accent-bright: #38a3e8;
  --accent-dim: #0d5a94;
  --faint: #546f86;

  --button: #1372b8;
  --button-ink: #ffffff;
  --good: #1c7a5a;
  --bad: #b3392a;

  /* Marcellus throughout. It is a Roman-inscription serif with one
     weight and no italic, so emphasis here is size, letterspacing and
     colour rather than bold - a synthetic bold on a face cut like this
     thickens the wrong strokes. Terminal output stays monospaced,
     because output that does not line up is output you cannot read. */
  --display: "Marcellus", Georgia, "Times New Roman", serif;
  --sans: "Marcellus", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1100px;
}

/* Night, for anyone whose system is set to it. Same hues, turned over:
   the pale sky becomes the dark one, and the accent brightens because a
   blue that reads well on white disappears on navy. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #08151f;
    --paper-2: #0c1e2c;
    --panel: #102434;
    --line: #1e3d54;
    --line-soft: #17303f;
    --ink: #e6f2fb;
    --dim: #9db8cd;
    --faint: #7794ab;
    --accent: #63b8f0;
    --accent-bright: #8fd0f8;
    --accent-dim: #a5d9fa;
    --button: #38a3e8;
    --button-ink: #06131c;
    --good: #4fbf95;
    --bad: #e8776a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16.5px/1.72 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* The sky: nebulae that drift, stars that don't. */
.sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%,
      color-mix(in srgb, var(--accent-bright) 18%, transparent), transparent 60%),
    var(--paper);
}
/* The faint ruled grid, as on their own pages. */
.sky::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.ring {
  width: 20px; height: 20px; border: 1px solid var(--accent);
  border-radius: 50%; position: relative; flex: none;
}
.ring::after {
  content: ""; position: absolute; width: 4px; height: 4px;
  background: var(--accent); border-radius: 50%;
  top: -2.5px; left: 50%; margin-left: -2px;
}
.brand span {
  /* Small caps rather than a heavier weight: Marcellus is cut at one
     weight, and asking a browser for 600 makes it thicken the strokes
     itself, which on a face like this lands on the wrong ones. */
  font-family: "Marcellus SC", var(--display);
  font-size: 14.5px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase;
}
.nav a.link {
  color: var(--dim); text-decoration: none; font-size: 13.5px;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.nav a.link:hover { color: var(--ink); }
.nav a.link[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent-dim); }
.nav .spacer { flex: 1; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 8px color-mix(in srgb, var(--good) 40%, transparent); }
.dot.off { background: var(--bad); }
.nav .state { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }

main { max-width: var(--wrap); margin: 0 auto; padding: 56px 28px 110px; }

/* Type */
h1 {
  font-family: var(--display);
  font-size: 62px; line-height: 1.02; font-weight: 400;
  letter-spacing: -.015em; margin: 0 0 22px;
  text-wrap: balance;
}
h2 {
  font-family: "Marcellus SC", var(--display);
  font-size: 13px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 18px; padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
h2::before {
  content: ""; width: 26px; height: 1px; background: var(--faint); flex: none;
}
h3 {
  font-family: var(--display);
  font-size: 22px; font-weight: 400; letter-spacing: -.01em; margin: 0 0 9px;
}
p { margin: 0 0 16px; }
.lede {
  font-family: var(--sans);
  font-size: 17.5px; line-height: 1.65; font-weight: 400;
  color: var(--dim); max-width: 56ch;
}
.muted { color: var(--dim); }
.note { color: var(--faint); font-size: 12.5px; margin-top: 14px; }
.note code, code { font: 12.5px var(--mono); color: var(--accent); }
section { margin-bottom: 52px; }

/* Surfaces */
.panel {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px;
  backdrop-filter: blur(12px);
}
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px;
        background: var(--panel); }
.card h3 { color: var(--ink); }
.card p { color: var(--dim); font-size: 13.5px; margin: 0; }

/* Rows and controls */
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
       padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: 0; }
.row .help { display: block; color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.row .control { flex: none; }

input[type=text], input[type=number], input[type=password], select, textarea {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 11px; border-radius: 7px; font: 13px var(--mono); min-width: 230px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-dim); }
textarea { width: 100%; min-height: 90px; resize: vertical; }

/* A link that acts as a button is a link, not a <button> inside an <a> -
   that nesting is invalid and browsers disagree about whether the click
   ever reaches the href. */
button, .btn {
  background: var(--button); border: 1px solid var(--button); color: var(--button-ink);
  padding: 8px 16px; border-radius: 7px; font: 500 13px inherit; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn { display: inline-flex; align-items: center; text-decoration: none; }
button:hover, .btn:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
button.quiet, .btn.quiet { border-color: var(--line); color: var(--dim); background: transparent; }
button.quiet:hover, .btn.quiet:hover { color: var(--ink); border-color: var(--faint); }
button.big, .btn.big { padding: 11px 22px; font-size: 14px; }
button:focus-visible, .btn:focus-visible, .switch:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.switch { width: 42px; height: 24px; border-radius: 12px; border: 1px solid var(--line);
          background: var(--panel); position: relative; cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
                 border-radius: 50%; background: var(--faint); transition: transform .18s, background .18s; }
.switch[aria-checked=true] { border-color: var(--accent-dim); background: var(--button); }
.switch[aria-checked=true]::after { transform: translateX(18px); background: var(--accent); }

.bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Status tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
         gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: 12px; overflow: hidden; }
.tile { background: var(--panel); padding: 18px 20px; }
.tile .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.tile .v {
  font-family: var(--display);
  font-size: 21px; margin-top: 6px; font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.tile .v.on { color: var(--good); }
.tile .v.off { color: var(--bad); }

pre { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
      padding: 16px 18px; font: 12.5px/1.65 var(--mono); color: var(--dim);
      overflow-x: auto; white-space: pre-wrap; margin: 16px 0 0; }
pre:empty { display: none; }

table { width: 100%; border-collapse: collapse; }
td { padding: 5px 6px 5px 0; vertical-align: top; }
td.slim { width: 32%; }
td.act { width: 36px; }
td input { width: 100%; min-width: 0; }

.pairs-head { display: flex; gap: 10px; color: var(--faint); font-size: 11px;
              letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }

.say { display: flex; gap: 10px; }
.say input { flex: 1; min-width: 0; }

.cmd-list { display: grid; gap: 10px; }
.cmd { border: 1px solid var(--line); border-radius: 9px; padding: 13px 16px;
       background: var(--panel); }
.cmd .phrase { font: 13.5px var(--mono); color: var(--ink); }
.cmd .what { color: var(--faint); font-size: 12.5px; margin-top: 4px; }
.cmd .tag { float: right; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
            color: var(--accent-dim); }

.offline { opacity: .35; pointer-events: none; }
.banner { border: 1px solid var(--accent-dim); background: var(--panel);
          border-radius: 10px; padding: 14px 18px; color: var(--dim); font-size: 13px;
          margin-bottom: 28px; }
.hero { padding: 40px 0 20px; }
.hero .bar { margin-top: 28px; }
footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px;
         padding: 26px 0 0; margin-top: 20px; }

/* Fraunces is a variable face; without it the serif fallbacks still read
   correctly, they just lose the optical sizing. */
@media (max-width: 620px) {
  .nav-inner { gap: 16px; padding: 12px 18px; flex-wrap: wrap; }
  main { padding: 36px 18px 80px; }
  h1 { font-size: 38px; }
  .row { flex-direction: column; align-items: stretch; gap: 8px; }
  input[type=text], input[type=number], input[type=password] { min-width: 0; width: 100%; }
}


/* ------------------------------------------------- "A DailyOS company"
   Set the way Sitefold sets it in their own header: the sentence in
   small letterspaced caps, the wordmark itself left in DailyOS's own
   type - blue "Daily", ink "OS", bold and tight - beside the brand
   glyph. The words around it are quiet so the name is the thing you
   read. */
.affiliate {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap;
}
.affiliate a {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: opacity .15s;
}
.affiliate a:hover, .affiliate a:focus-visible { opacity: .72; }
.affiliate a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.affiliate svg { width: 17px; height: 17px; flex: none; }
.affiliate .name {
  font-size: 15.5px; font-weight: 400; letter-spacing: .01em; text-transform: none;
}
.affiliate .name .d { color: var(--accent); }
.affiliate .name .os { color: var(--ink); }

/* In the nav it sits behind a hairline, as theirs does. */
.nav .affiliate {
  padding-left: 22px; border-left: 1px solid var(--line);
}
footer .affiliate { margin-top: 14px; }

@media (max-width: 860px) {
  .nav .affiliate { display: none; }   /* it lives in the footer on narrow screens */
}
