/* lynx/brand colours (colours.css there): blue is the accent, never text on white */
:root {
  --lynx-blue: #55faff;
  --lynx-black: #0c0c10;
  --lynx-white: #f4f3f1;

  --bg: var(--lynx-black);
  --surface: #15151c;
  --border: #2a2a36;
  --text: var(--lynx-white);
  --muted: #a3a2ab;
  --accent: var(--lynx-blue);
  --error: #ff7a8a;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 16px/1.6 var(--sans);
  background:
    radial-gradient(60rem 30rem at 50% -10rem, rgba(85, 250, 255, .08), transparent 70%),
    var(--bg);
}

/* a little snow: two layers of dots drifting down, off for reduced motion */
.snow, .snow::after {
  position: fixed; inset: -100vh 0 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(244, 243, 241, .5), transparent),
    radial-gradient(1.5px 1.5px at 120px 80px, rgba(244, 243, 241, .35), transparent),
    radial-gradient(2px 2px at 200px 160px, rgba(85, 250, 255, .35), transparent),
    radial-gradient(1px 1px at 70px 190px, rgba(244, 243, 241, .4), transparent);
  background-size: 240px 240px;
  animation: fall 40s linear infinite;
}
.snow::after { content: ""; inset: 0; background-size: 330px 330px; animation-duration: 60s; opacity: .7; }
@keyframes fall { to { transform: translateY(100vh); } }
@media (prefers-reduced-motion: reduce) { .snow, .snow::after { animation: none; } }

header.top, main, footer.bottom { position: relative; z-index: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
header.top { padding-top: 1.25rem; padding-bottom: 1.25rem; }
main { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 3rem; }
footer.bottom { color: var(--muted); font: .8rem var(--mono); padding-bottom: 1.5rem; text-align: center; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font: 700 1.05rem var(--mono); }
.brand .mark svg { width: 28px; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }

h1, h2 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--error); }
.ok, .yes { color: var(--accent); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
.card.center { text-align: center; }
.card.narrow { max-width: 420px; width: 100%; margin: 0 auto; }
.card.danger { border-color: #3a2630; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* forms */
form { display: flex; flex-direction: column; gap: 1rem; }
.row form { display: block; }
label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input, textarea {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .7rem;
  width: 100%;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }

button, .button {
  font: 600 .95rem var(--mono);
  color: var(--lynx-black);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: .6rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
}
button:hover, .button:hover { filter: brightness(1.1); }
.ghost { background: transparent; color: var(--accent); }
.ghost:hover { background: rgba(85, 250, 255, .08); }
button.small { padding: .3rem .7rem; font-size: .8rem; }
.center button, .center .button { align-self: center; }

/* lists and tables */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .6rem 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }

.people { width: 100%; border-collapse: collapse; font-size: .9rem; }
.people th { text-align: left; color: var(--muted); font-weight: 500; padding: .4rem .5rem; }
.people td { border-top: 1px solid var(--border); padding: .5rem; vertical-align: middle; }
.people .actions div { display: flex; gap: .4rem; justify-content: flex-end; }
@media (max-width: 560px) {
  .people thead { display: none; }
  .people tr { display: grid; grid-template-columns: 1fr auto auto; gap: .25rem .75rem; border-top: 1px solid var(--border); padding: .5rem 0; }
  .people td { border: 0; padding: 0; }
  .people td.actions { grid-column: 1 / -1; }
  .people .actions div { justify-content: flex-start; }
  .cols { grid-template-columns: 1fr; }
}

.facts { display: flex; justify-content: center; gap: 2rem; margin: 0 0 1rem; }
.card:not(.center) .facts { justify-content: flex-start; }
.facts dt { color: var(--muted); font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; font-weight: 600; }
.note, .wishlist { white-space: pre-wrap; overflow-wrap: anywhere; }
.note { color: var(--muted); }

/* the reveal */
.reveal { margin-top: 1.5rem; }
.reveal summary {
  list-style: none; cursor: pointer;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 1.75rem 1rem;
  color: var(--accent);
  font: 600 1rem var(--mono);
  transition: background .2s;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary:hover { background: rgba(85, 250, 255, .06); }
.reveal[open] summary { display: none; }
.giftee { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); padding: 1rem 0 .25rem; }
.giftee .name {
  font-size: clamp(2.2rem, 9vw, 3.5rem); font-weight: 800; margin: 0;
  color: var(--text);
  text-shadow: 3px 3px 0 var(--accent);
  overflow-wrap: anywhere;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .giftee { animation: none; } }
.theirs { text-align: left; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* copyable links */
.copy { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.copy input { font: .8rem var(--mono); padding: .4rem .6rem; min-width: 0; }
.copy button { align-self: center; }

.card.highlight { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(85, 250, 255, .08); }
.card.flash { padding: 1rem 1.5rem; }
.status { font-family: var(--mono); color: var(--muted); }
code { font-family: var(--mono); color: var(--accent); }
form.inline { display: block; }

/* tucked-away sections */
details.more + details.more { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
details.more summary { cursor: pointer; font-weight: 600; }
details.more[open] summary { margin-bottom: .75rem; }

/* circles */
h3 { font-size: 1rem; margin: 0 0 .5rem; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
legend { font-size: .9rem; padding: 0 .35rem; }
label.circle { font-size: 1rem; cursor: pointer; }
label.circle input { width: 1.1rem; height: 1.1rem; }
.wish { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
form.leave { margin-top: 1rem; align-items: flex-end; }
.list li.row form { display: block; }
.row h2 { margin: 0; }
.people + details.more, p + details.more { margin-top: 1rem; }
