/* apps-site — one stylesheet for every page.
   No web fonts, no scripts, no third parties, no cookies.
   Every page must work with JavaScript switched off. */

/* ---------------------------------------------------------------- palette
   Light is the base. Dark overrides only what changes. */

:root {
  color-scheme: light dark;

  --ground-top:     #e6ecff;
  --ground-bottom:  #b4c6f2;

  --ink:            #0b1953;
  --ink-muted:      rgba(11, 25, 83, 0.74);
  --ink-faint:      rgba(11, 25, 83, 0.58);

  --glass-solid:    #f3f6ff;
  --glass:          rgba(255, 255, 255, 0.55);
  --glass-border:   rgba(11, 25, 83, 0.12);
  --glass-shadow:   0 24px 60px rgba(11, 25, 83, 0.18);

  --rule:           rgba(11, 25, 83, 0.14);
  --link:           #12309e;
  --link-rule:      rgba(18, 48, 158, 0.42);
  --focus:          #12309e;

  --note-bg:        rgba(11, 25, 83, 0.05);

  --radius:         18px;
  --measure:        46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground-top:    #1a3c9c;
    --ground-bottom: #0b1953;

    --ink:           #ffffff;
    --ink-muted:     rgba(255, 255, 255, 0.78);
    --ink-faint:     rgba(255, 255, 255, 0.62);

    --glass-solid:   #16307a;
    --glass:         rgba(255, 255, 255, 0.06);
    --glass-border:  rgba(255, 255, 255, 0.12);
    --glass-shadow:  0 24px 60px rgba(0, 0, 0, 0.38);

    --rule:          rgba(255, 255, 255, 0.16);
    --link:          #ffffff;
    --link-rule:     rgba(255, 255, 255, 0.5);
    --focus:         #ffffff;

    --note-bg:       rgba(255, 255, 255, 0.06);
  }
}

/* ------------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 5vw, 2rem);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);

  background-color: var(--ground-bottom);
  background-image: linear-gradient(180deg, var(--ground-top) 0%, var(--ground-bottom) 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;

  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--measure);
  margin-inline: auto;
}

/* Focus stays visible everywhere. Never removed, only made legible on blue. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.5rem 0.9rem;
  background: var(--glass-solid);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}

/* ------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(11, 25, 83, 0.28);
}

.masthead .mark { width: 40px; height: 40px; }

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
}

/* ----------------------------------------------------------------- card */

.card {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);

  /* Fallback first: a solid panel wherever backdrop-filter is missing. */
  background: var(--glass-solid);
}

@supports ((backdrop-filter: blur(30px)) or (-webkit-backdrop-filter: blur(30px))) {
  .card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
  }
}

.card + .card { margin-top: 1.25rem; }

/* --------------------------------------------------------------- motion */

.card { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

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

/* ------------------------------------------------------------ typography */

h1, h2, h3 {
  color: var(--ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.375rem);
  line-height: 1.15;
  font-weight: 700;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 600;
}

h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2rem; }

h3 {
  margin: 1.75rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.dateline {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.4rem; }
li:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-rule);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-color: currentColor; }

strong { font-weight: 600; }

code, .path {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.path {
  display: block;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--note-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  line-height: 1.5;
}

kbd {
  font-family: inherit;
  font-size: 0.9375em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  background: var(--note-bg);
  white-space: nowrap;
}

.address {
  margin: 0 0 1rem;
  font-style: normal;
  line-height: 1.7;
}

/* A block that must not reach production unfinished. Loud on purpose. */
.todo {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 2px dashed #b3261e;
  border-radius: 12px;
  background: rgba(179, 38, 30, 0.08);
  color: var(--ink);
  font-size: 0.9375rem;
}
.todo strong { color: #b3261e; }
@media (prefers-color-scheme: dark) {
  .todo { border-color: #ffb4a9; background: rgba(255, 180, 169, 0.12); }
  .todo strong { color: #ffb4a9; }
}

/* ----------------------------------------------------------- app list */

.apps { list-style: none; margin: 0; padding: 0; }

.apps li { margin-bottom: 0.75rem; }
.apps li:last-child { margin-bottom: 0; }

.app {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--note-bg);
  text-decoration: none;
  color: var(--ink);
}
.app:hover { border-color: var(--link-rule); }

.app .name { font-weight: 600; display: block; }
.app .what { display: block; font-size: 0.875rem; color: var(--ink-muted); }

/* --------------------------------------------------------------- footer */

.foot {
  margin-top: 1.75rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  text-align: center;
}

.foot a { color: var(--ink-muted); }

.foot nav { margin-bottom: 0.35rem; }
.foot nav a { margin: 0 0.4rem; }

/* ---------------------------------------------------------------- print
   Someone will want a PDF of the policy. Give them a readable one. */

@media print {
  :root {
    --ink: #000;
    --ink-muted: #222;
    --ink-faint: #444;
    --rule: #bbb;
    --glass-border: #bbb;
    --link: #000;
    --link-rule: #888;
    --note-bg: #fff;
  }

  body {
    background: #fff;
    color: #000;
    padding: 0;
    font-size: 11pt;
    line-height: 1.5;
  }

  .card {
    background: #fff;
    border: 0;
    box-shadow: none;
    padding: 0;
    animation: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .mark { box-shadow: none; }

  .skip, .foot nav { display: none; }

  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
  p, li { page-break-inside: avoid; break-inside: avoid; }
  ul, ol { page-break-inside: auto; }

  /* A printed link with no address is useless. */
  main a[href^="http"]::after,
  main a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
    word-break: break-all;
  }
}

/* ----------------------------------------------------------------- hero
   The landing pages only. Legal pages keep the small masthead. */

.hero { text-align: center; }

.hero .mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.25rem;
  border-radius: 21px;
}

.hero h1 { margin-bottom: 0.5rem; }

.hero .lede {
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.hero .status {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--note-bg);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.hero + .card h2:first-of-type { margin-top: 0; }

@media print {
  .hero .mark { width: 56px; height: 56px; }
}
