@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Zilla+Slab:wght@500;700&display=swap");

:root {
  --bark: #1e1813;
  --ash: #2a221c;
  --grate: #4b3d33;
  --paper: #f1e6d4;
  --smoke: #a69584;
  --ember: #f4a340;
  --ember-dim: #b9752a;
  /* States (docs/standards.md): text, and fills for dots, bars and borders. */
  --good: #7fd39b;
  --good-fill: #6cc28a;
  --bad: #ee8a73;
  --bad-fill: #e0705a;
  --ember-hi: #ffb65c;
  --info: #9ab3d6;
  /* The Cube tile's sticker colors: the cube's own, not the site's. */
  --cube-w: #f4f4f0;
  --cube-y: #ffd500;
  --cube-r: #c41e3a;
  --cube-o: #ff6a13;
  --cube-g: #009e60;
  --cube-b: #0051ba;
  --cube-x: #6b6058;
  --cube-plastic: #111111;
  /* Lanternfall's item rarities on the character pages, the game's own
     colors (its theme.json); Epic is a touch lighter so its names read at
     4.5:1 on a card. */
  --rarity-junk: #9d9d9d;
  --rarity-common: #d8d2c4;
  --rarity-uncommon: #5fd35a;
  --rarity-rare: #4a90e8;
  --rarity-epic: #c77df0;
  --rarity-legendary: #ff8a2a;
  --rarity-glow: rgba(255, 138, 42, 0.55);
  /* Trivia categories (the Trivia tile's wheel and question chips): six
     colors that read on the dark grate, plus the wheel's crown wedge. */
  --cat-science: #5aa9e6;
  --cat-history: #e0b04a;
  --cat-geography: #6cc07a;
  --cat-entertainment: #c57be0;
  --cat-sports: #ef8a4c;
  --cat-food: #e06666;
  --cat-ink: #1e1813;

  /* Mortgage Calculator: the parts of a payment, in this order, checked
     for color blind separation on the dark card (with gaps and a legend). */
  --loan-principal: #3f9fd9;
  --loan-interest: #d9772a;
  --loan-tax: #34a06a;
  --loan-ins: #a977d6;
  --loan-pmi: #e0607e;
  --loan-hoa: #a99528;

  /* QR codes: black on white whatever the theme, the way phone cameras
     read them best (the Judo tile's Friends tab). */
  --qr-dark: #000000;
  --qr-light: #ffffff;
  /* Judo belt colors, for the Judo tile's belt swatches. */
  --belt-white: #f4f1ea;
  --belt-yellow: #f2c81f;
  --belt-orange: #f08a24;
  --belt-green: #2f9a4c;
  --belt-blue: #2f6fd1;
  --belt-purple: #7a4bc2;
  --belt-brown: #7a4a26;
  --belt-black: #111111;
  --belt-red: #c8262b;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display: "Zilla Slab", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --measure: 72ch;
  /* The wordmark's coal bed glow; a holiday look changes it. */
  --glow-soft: rgba(244, 163, 64, 0.35);
  --glow-core: rgba(244, 163, 64, 0.6);
  color-scheme: dark;
}

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

html {
  background: var(--bark);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bark);
  color: var(--paper);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ember);
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 2rem;
  }
}

/* Masthead: the one bold moment. Grill marks under a wordmark that glows
   like a coal bed. */
.masthead {
  border-bottom: 1px solid var(--grate);
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 46px,
      rgba(244, 163, 64, 0.06) 46px 52px
    ),
    linear-gradient(180deg, #261e18, var(--bark));
}

.masthead .wrap {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}


.wordmark {
  margin: 0;
  font: 700 clamp(2.75rem, 9vw, 5.5rem) / 0.95 var(--display);
  letter-spacing: -0.01em;
  color: var(--paper);
  text-shadow:
    0 0 18px var(--glow-soft),
    0 0 2px var(--glow-core);
}

.wordmark .amp {
  color: var(--ember);
}

/* Under the wordmark: one line, then what the site is (November 15, 2026,
   for visitors from Chris's business card). */
.tagline {
  margin: 0.9rem 0 0;
  font: 700 1.25rem/1.3 var(--display);
  color: var(--ember-hi);
  letter-spacing: 0.01em;
}

.intro {
  max-width: 40rem;
  margin: 0.5rem 0 0;
  color: var(--smoke);
  font-size: 1rem;
  line-height: 1.55;
}

@media (min-width: 640px) {
  .tagline {
    font-size: 1.75rem;
  }
}

.masthead .wrap {
  position: relative;
}

/* Sign in, or who is signed in, sits in the top right corner. */
.session {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin: 0;
  color: var(--smoke);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
  text-align: right;
}

@media (min-width: 640px) {
  .session {
    right: 2rem;
  }
}

.session a {
  color: var(--paper);
}

.session a:hover {
  color: var(--ember);
}

/* Signed in: who, and Sign out, at the bottom of the home page. */
.account {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  border-top: 1px solid var(--grate);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  color: var(--smoke);
  font-size: 0.875rem;
}

.account[hidden] {
  display: none;
}

/* Always shown, signed in or not. */
.site-foot {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  font-size: 0.8125rem;
}

.site-foot a {
  color: var(--smoke);
  /* A link on its own: the 40px tap height (docs/standards.md). */
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
}

.site-foot a:hover {
  color: var(--ember);
}

/* The card's email (November 15, 2026), then Privacy beside it. */
.site-foot a + a {
  margin-left: 1.25rem;
}

.site-foot .contact {
  color: var(--paper);
}

.account .signout {
  color: var(--paper);
  border: 1px solid var(--grate);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
}

.account .signout:hover {
  border-color: var(--ember);
  color: var(--ember);
}

@media (min-width: 640px) {
  .account,
  .site-foot {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Compact header used inside tiles */
.bar {
  border-bottom: 1px solid var(--grate);
}

.bar .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.bar .home {
  font: 700 1.375rem/1 var(--display);
  color: var(--paper);
  text-decoration: none;
}

.bar .home .amp {
  color: var(--ember);
}

.bar .back {
  font-size: 0.9375rem;
  /* A full size tap target on a phone. */
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.25rem;
}

/* The page's title: the tile's name (docs/standards.md). */
h1.page-title {
  font: 700 1.75rem/1.2 var(--display);
  margin: 0 0 0.25rem;
}

/* Text for screen readers only. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

main {
  padding: 2.5rem 0 4rem;
}

h2 {
  font: 700 1.75rem/1.2 var(--display);
  margin: 0 0 1.25rem;
}

.lede {
  max-width: var(--measure);
  color: var(--smoke);
  margin: 0 0 2rem;
}

/* Tiles */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.tile a {
  display: block;
  height: 100%;
  padding: 1.5rem 1.5rem 1.375rem;
  background: var(--ash);
  border: 1px solid var(--grate);
  border-left: 4px solid var(--ember-dim);
  border-radius: 6px;
  color: var(--paper);
  text-decoration: none;
}

.tile a:hover,
.tile a:focus-visible {
  border-color: var(--ember);
  border-left-color: var(--ember);
  background: #30271f;
}

/* An arrow in the card's corner that warms up on hover, so a card reads as
   something to open without making it taller. */
.tile a {
  position: relative;
  padding-right: 2.75rem;
}

.tile a::after {
  content: "\2192" / "";
  position: absolute;
  top: 1.55rem;
  right: 1.25rem;
  color: var(--smoke);
  font: 700 1rem/1 var(--body);
}

.tile a:hover::after,
.tile a:focus-visible::after {
  color: var(--ember);
}

/* A tile's name sits under its section heading, so it is the smaller of
   the two. */
.tile h3 {
  margin: 0 0 0.5rem;
  font: 700 1.25rem/1.2 var(--display);
}

.tile p {
  margin: 0;
  color: var(--smoke);
  font-size: 0.9375rem;
}

.notice {
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--grate);
  border-radius: 6px;
  color: var(--smoke);
}

.notice strong {
  color: var(--paper);
  font-weight: 600;
}

.loading {
  color: var(--smoke);
}

@media (prefers-reduced-motion: no-preference) {
  .tile a {
    transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
  }

  .tile a:hover {
    transform: translateY(-2px);
  }
}

.notice p {
  margin: 0.25rem 0 0;
}

/* Private tiles say so, since only signed in people with access see them. */
.tile.private h3::after {
  content: "Private";
  margin-left: 0.6rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--grate);
  border-radius: 4px;
  font: 500 0.75rem/1.4 var(--body);
  color: var(--smoke);
  vertical-align: middle;
}

/* Home page sections */
.tile-section + .tile-section {
  margin-top: 2.75rem;
}

.section-title {
  font: 700 1.75rem/1.2 var(--display);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--grate);
}

/* A section heading with its one line: the line sits under the rule. */
.section-head {
  margin: 0 0 1.25rem;
}

.section-head .section-title {
  margin-bottom: 0.6rem;
}

.section-blurb {
  margin: 0;
  color: var(--smoke);
  font-size: 0.9375rem;
}

/* Over a holiday scene the lines under the wordmark and the headings sit
   on the moving picture, so they get a soft shadow to keep them readable. */
html[data-theme] .intro,
html[data-theme] .section-blurb,
html[data-theme] .tagline {
  color: var(--paper);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7);
}

html[data-theme] .tagline {
  color: var(--ember-hi);
}

/* The add to home screen tip (app.js), signed in visitors only. */
.app-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 2rem;
  padding: 0.75rem 1rem;
  background: var(--ash);
  border: 1px solid var(--grate);
  border-left: 4px solid var(--info);
  border-radius: 6px;
  color: var(--paper);
  font-size: 0.9375rem;
}

.app-tip p {
  margin: 0;
}

.app-tip button {
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--grate);
  border-radius: 6px;
  background: none;
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}

.app-tip button:hover {
  border-color: var(--ember);
  color: var(--ember);
}

/* Needs You, at the top of the home page (Chris only) */
.needs {
  margin-bottom: 2rem;
}

.needs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.needs a {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.7rem 0.9rem;
  background: var(--ash);
  border: 1px solid var(--ember-dim);
  border-left: 4px solid var(--ember);
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
}

.needs a:hover {
  border-color: var(--ember);
}

.needs-icon {
  flex: none;
  width: 1.4rem;
  text-align: center;
}

/* Holiday looks (public/assets/theme.js, docs/standards.md "Holiday
   looks"). The default look above is untouched; on a holiday the page gets
   that holiday's accent and glow, and its moving scene on a canvas behind
   everything. Cards keep their own background, so what is in them reads as
   always. Only the accent changes: good, bad and the other state colors
   never do. */
.theme-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

html[data-theme] body {
  background: transparent;
}

html[data-theme] .masthead {
  background: linear-gradient(180deg, rgba(14, 10, 8, 0.55), rgba(14, 10, 8, 0)) border-box;
  border-bottom-color: transparent;
}

/* A tile page: the scene frames the page. It is dimmed, and fades to
   almost nothing behind the reading column, so the page reads first. */
html[data-theme][data-theme-quiet] .theme-scene {
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(90deg, black 0, black calc(50% - 38rem), rgba(0, 0, 0, 0.22) calc(50% - 31rem), rgba(0, 0, 0, 0.22) calc(50% + 31rem), black calc(50% + 38rem));
  mask-image: linear-gradient(90deg, black 0, black calc(50% - 38rem), rgba(0, 0, 0, 0.22) calc(50% - 31rem), rgba(0, 0, 0, 0.22) calc(50% + 31rem), black calc(50% + 38rem));
}

html[data-theme] .bar {
  background: rgba(14, 10, 8, 0.72);
}

/* On their birthday, the person signed in is greeted under the wordmark. */
.birthday-greeting {
  margin: 0.75rem 0 0;
  font: 700 clamp(1.25rem, 4vw, 1.75rem) / 1.2 var(--display);
  color: var(--ember-hi);
  text-shadow: 0 0 14px var(--glow-soft);
  animation: birthday-in 1.6s ease-out both;
}

@keyframes birthday-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-greeting {
    animation: none;
  }
}

.theme-switch {
  margin-left: 1.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--smoke);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  min-height: 2.5rem;
}

.theme-switch:hover {
  color: var(--ember);
}

html[data-theme="newyear"] {
  --ember: #f3d38a;
  --ember-hi: #ffe7ad;
  --ember-dim: #b89a55;
  --glow-soft: rgba(243, 211, 138, 0.45);
  --glow-core: rgba(255, 231, 173, 0.7);
}

html[data-theme="valentines"] {
  --ember: #ff8fb1;
  --ember-hi: #ffb3ca;
  --ember-dim: #c25f80;
  --glow-soft: rgba(255, 110, 160, 0.45);
  --glow-core: rgba(255, 179, 202, 0.7);
}

html[data-theme="stpatricks"] {
  --ember: #f2c94c;
  --ember-hi: #ffdd77;
  --ember-dim: #b8952f;
  --glow-soft: rgba(90, 200, 120, 0.45);
  --glow-core: rgba(242, 201, 76, 0.7);
}

html[data-theme="easter"] {
  --ember: #f5d77a;
  --ember-hi: #ffe8a3;
  --ember-dim: #b99d4f;
  --glow-soft: rgba(200, 170, 255, 0.45);
  --glow-core: rgba(255, 232, 163, 0.7);
}

html[data-theme="july4"] {
  --ember: #9cc8ff;
  --ember-hi: #c2ddff;
  --ember-dim: #6a92c4;
  --glow-soft: rgba(230, 70, 80, 0.45);
  --glow-core: rgba(194, 221, 255, 0.75);
}

html[data-theme="halloween"] {
  --ember: #ff8a2a;
  --ember-hi: #ffab5e;
  --ember-dim: #c4621a;
  --glow-soft: rgba(160, 80, 255, 0.5);
  --glow-core: rgba(255, 138, 42, 0.8);
}

html[data-theme="thanksgiving"] {
  --ember: #f0a04b;
  --ember-hi: #ffbf75;
  --ember-dim: #b7712d;
  --glow-soft: rgba(214, 110, 40, 0.5);
  --glow-core: rgba(255, 191, 117, 0.7);
}

html[data-theme="christmas"] {
  --ember: #f2c14e;
  --ember-hi: #ffd97a;
  --ember-dim: #b88e2c;
  --glow-soft: rgba(230, 60, 70, 0.45);
  --glow-core: rgba(255, 245, 220, 0.75);
}

html[data-theme="birthday"] {
  --ember: #f6b8c8;
  --ember-hi: #ffd6e0;
  --ember-dim: #c0828f;
  --glow-soft: rgba(240, 200, 120, 0.5);
  --glow-core: rgba(255, 214, 224, 0.8);
}

html[data-theme="birthday-bourbon"] {
  --ember: #e0a560;
  --ember-hi: #f2c38a;
  --ember-dim: #a8733a;
  --glow-soft: rgba(200, 120, 50, 0.5);
  --glow-core: rgba(242, 195, 138, 0.75);
}

html[data-theme="birthday-gamer"] {
  --ember: #6fe7f0;
  --ember-hi: #a6f3f8;
  --ember-dim: #3fa9b2;
  --glow-soft: rgba(220, 80, 255, 0.5);
  --glow-core: rgba(166, 243, 248, 0.8);
}

html[data-theme="september11"] {
  --ember: #b9c6dc;
  --ember-hi: #d6dfec;
  --ember-dim: #7f8ca3;
  --glow-soft: rgba(190, 210, 255, 0.35);
  --glow-core: rgba(214, 223, 236, 0.65);
}

html[data-theme="presidents"] {
  --ember: #a9c7ff;
  --ember-hi: #cadcff;
  --ember-dim: #7393c7;
  --glow-soft: rgba(220, 70, 80, 0.4);
  --glow-core: rgba(202, 220, 255, 0.75);
}

html[data-theme="earthday"] {
  --ember: #7fd0e0;
  --ember-hi: #a6e3ee;
  --ember-dim: #4f99a8;
  --glow-soft: rgba(80, 200, 160, 0.45);
  --glow-core: rgba(166, 227, 238, 0.7);
}

html[data-theme="cincodemayo"] {
  --ember: #ff9e5e;
  --ember-hi: #ffbd8a;
  --ember-dim: #c46c32;
  --glow-soft: rgba(240, 70, 150, 0.45);
  --glow-core: rgba(255, 189, 138, 0.75);
}

html[data-theme="mothersday"] {
  --ember: #f7a8c8;
  --ember-hi: #ffc6dc;
  --ember-dim: #c2738f;
  --glow-soft: rgba(190, 150, 255, 0.45);
  --glow-core: rgba(255, 198, 220, 0.75);
}

html[data-theme="memorialday"] {
  --ember: #c9d6ea;
  --ember-hi: #e1e9f5;
  --ember-dim: #8d9cb3;
  --glow-soft: rgba(200, 60, 60, 0.35);
  --glow-core: rgba(225, 233, 245, 0.7);
}

html[data-theme="fathersday"] {
  --ember: #f2b25c;
  --ember-hi: #ffc982;
  --ember-dim: #b97e30;
  --glow-soft: rgba(230, 110, 40, 0.5);
  --glow-core: rgba(255, 201, 130, 0.75);
}

html[data-theme="laborday"] {
  --ember: #ffb347;
  --ember-hi: #ffcb7d;
  --ember-dim: #c47f22;
  --glow-soft: rgba(255, 120, 60, 0.45);
  --glow-core: rgba(255, 203, 125, 0.75);
}

html[data-theme="veteransday"] {
  --ember: #d8c48a;
  --ember-hi: #ecdcac;
  --ember-dim: #a08c55;
  --glow-soft: rgba(90, 120, 200, 0.45);
  --glow-core: rgba(236, 220, 172, 0.75);
}
