/* Dory shared theme: font, colour tokens, base reset, header, buttons and footer.
   Loaded by every page. The homepage adds home.css; every other page adds site.css. Dark only. */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090c0b;
  --panel: #111613;
  --panel-2: #161c18;
  --line: #2a312c;
  --line-strong: #465148;
  --ink: #f0f1e9;
  --soft: #c3cbc2;
  --link: #c9cfc6;
  --code: #dfe5db;
  --muted: #9baba2;
  --faint: #7f8d84;
  --lime: #d8ff62;
  --lime-hover: #ebffaf;
  --on-lime: #11170d;
  --mint: #a8e3ce;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
code, pre { font-family: var(--mono); }
::selection { background: var(--lime); color: var(--bg); }

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

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: var(--lime); color: var(--bg); z-index: 10; }
.skip:focus { top: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; min-height: 64px; }
.brand { font-size: 26px; font-weight: 650; letter-spacing: -0.06em; line-height: 1; text-decoration: none; }
.brand span { color: var(--lime); }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.site-nav a { text-decoration: none; color: #c9cfc6; }
.site-nav a:hover { color: var(--lime); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 14px; }

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border: 1px solid var(--lime); border-radius: 6px;
  background: var(--lime); color: #11170d; font-size: 15px; font-weight: 650; text-decoration: none;
  transition: background-color .15s;
}
.button:hover { background: #ebffaf; }
.site-nav a.button { color: #11170d; }
.button-small { padding: 8px 14px; font-size: 14px; }
.button-outline { background: transparent; color: var(--ink); border-color: #465148; }
.button-outline:hover { background: #1c261d; }
.link { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid #465148; padding-bottom: 2px; }
.link:hover { color: var(--lime); border-color: var(--lime); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 14px; color: var(--muted); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-row-wide { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.footer-row p { margin-top: 10px; }
.footer-row nav { display: grid; gap: 8px; align-content: start; }
.footer-row h2 { font-size: 12.5px; font-weight: 500; color: #6f7d74; margin-bottom: 4px; }
.footer-row a { text-decoration: none; color: #c9cfc6; }
.footer-row a:hover { color: var(--lime); }
.footer-row .brand { color: var(--ink); }
.footer-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; }
.footer-base-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* Phone: the nav folds into a menu */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .menu-toggle { display: inline-block; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 16px; font-size: 16px; }
  .site-nav a { padding: 11px 0; border-top: 1px solid var(--line); }
  .site-nav a.button { margin-top: 10px; border-top-color: var(--lime); padding: 12px; }
  .site-header.open .site-nav, .no-js .site-nav { display: flex; }
  .no-js .menu-toggle { display: none; }
  .footer-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-row > div { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
