/* Remembered.to — shared styles */
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff") format("woff");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fdfdfb;
  --text: #141414;
  --muted: #5c5c5c;
  --accent: #e61e30;
  --line: #e4e4de;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--sans); /* one typeface now; the logo carries the serif */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.center {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px 16px;
  max-width: 560px;
  margin: 0 auto;
}

.logo { margin: 0 0 20px; }
.logo img { width: min(380px, 86vw); height: auto; display: block; margin: 0 auto; }

.tagline { font-size: 1.35rem; margin: 0 0 8px; }
.mission { color: var(--muted); margin: 0 0 32px; }
.soon { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); }
.soon + .soon { margin-top: 4px; }
.soon.legal-links { font-size: 0.8rem; margin-top: 14px; }

/* ---- Home page ---- */
.home-head, .home-main, .home-foot { max-width: 1168px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; }
.home-logo img { display: block; width: clamp(184px, 22vw, 272px); height: auto; }
.home-signin { font-size: 0.95rem; font-weight: 600; padding: 12px 0; }
.home-main { padding-top: clamp(32px, 6vw, 72px); padding-bottom: 40px; }
.home-tag { margin: 0 0 clamp(22px, 3.4vw, 40px); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

/* Each line is the logo, finished as a sentence. The logo is sized so its red ".to" matches the
   text's letter height, and nudged down so both sit on one baseline (the R's tail hangs below it). */
.said { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 2.6vw, 30px); }
.said .line {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.2em; row-gap: 0.14em;
  font-weight: 800; font-size: clamp(1.5rem, 4.1vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em;
}
.said .line img { height: 1.107em; width: auto; position: relative; top: 0.22em; margin-top: -0.22em; }
.said .line b { font-weight: inherit; color: var(--accent); }
.said .with { margin: 8px 0 0; font-size: 1rem; line-height: 1.4; color: var(--muted); }

.home-cta { margin-top: clamp(36px, 5vw, 64px); border-top: 3px solid var(--text); padding-top: 32px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 64px; scroll-margin-top: 16px; }
.home-cta .pitch, .home-cta .request { flex: 1 1 360px; min-width: 0; }
.home-cta h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.home-cta .pitch p { margin: 0; font-size: 1.125rem; line-height: 1.5; color: #3d3d3d; max-width: 520px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { margin: 0; flex: 1; min-width: 0; }
.inline-form button { width: auto; white-space: nowrap; }
.home .inline-form input { height: 52px; border: 2px solid var(--text); border-radius: 0; }
.home .inline-form button { height: 52px; padding: 0 22px; border-radius: 0; background: var(--accent); font-size: 1.05rem; font-weight: 700; }
.home .inline-form button:hover { background: #c9172a; }
.home .request .fine { text-align: left; margin: 10px 0 0; }
.home .request .message { margin: 12px 0 0; }
.home-foot { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-bottom: 36px; font-size: 0.9rem; }
.home-foot a { padding: 8px 0; }
.sticky-cta, .roll-dots { display: none; }

@media (max-width: 599px) {
  body.home { --roll: clamp(1.15rem, 6.6vw, 2.4rem); padding-bottom: 84px; }
  .home-head, .home-main, .home-foot { padding-left: 20px; padding-right: 20px; }
  .home-head { padding-top: 20px; }
  /* Without motion (or without scripts): the logo gets its own line, then the rest of the sentence. */
  .said { gap: 0; }
  .said li { padding: 18px 0; border-top: 1px solid var(--line); }
  .said li:first-child { border-top: 0; padding-top: 0; }
  .said .line { flex-direction: column; align-items: flex-start; row-gap: 0; font-size: var(--roll); }
  .said .line img { top: 0; margin-top: 0; }
  .said .with { margin-top: 6px; font-size: 0.95rem; }

  /* With motion: the logo at the top stays put and the rest of the sentence rolls through the list. */
  body.roll .home-head { align-items: flex-end; padding-top: 22px; }
  body.roll .home-logo img { width: auto; height: calc(1.107 * var(--roll)); }
  body.roll .home-signin { align-self: center; }
  body.roll .home-main { padding-top: 0; display: flex; flex-direction: column; }
  body.roll .home-tag { order: 2; margin: 30px 0 0; }
  body.roll .home-cta { order: 3; margin-top: 16px; }
  .said.rolling { display: grid; overflow: hidden; }
  .said.rolling li {
    grid-area: 1 / 1; padding: 0; border: 0; opacity: 0; transform: translateY(100%);
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
  }
  .said.rolling li.on { opacity: 1; transform: none; }
  .said.rolling li.out { transform: translateY(-100%); }
  .said.rolling .line img { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .roll-dots { order: 1; display: flex; gap: 6px; margin-top: 14px; }
  .roll-dots i { width: 18px; height: 3px; background: #cfcfc8; }
  .roll-dots i.on { background: var(--text); }

  .inline-form { flex-direction: column; }
  .inline-form button { width: 100%; }
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--line);
    transition: transform 0.2s ease;
  }
  .sticky-cta a { display: block; padding: 15px 16px; text-align: center; text-decoration: none; font-weight: 700; color: #fff; background: var(--accent); }
  .sticky-cta.away { transform: translateY(110%); }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }
/* Admin */
.app.wide { max-width: 640px; }
.count { color: var(--muted); font-weight: 400; }
.people { list-style: none; margin: 0; padding: 0; }
.people li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #ecece6;
  font-family: var(--sans);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.people li:first-child { border-top: 0; }
.people .hint { font-size: 0.85rem; }
button.small { width: auto; padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- App pages (sign-in, account) ---- */
.app {
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}
.app .logo { text-align: center; margin-bottom: 28px; }
.app .logo img { width: min(240px, 70vw); }

.card {
  background: #fff;
  border: 1px solid #e4e4de;
  border-radius: 6px;
  padding: 28px 24px;
  margin-bottom: 16px;
}
.card h1, .card h2 { font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.card h1 { font-size: 1.6rem; }
.card h2 { font-size: 1.2rem; }
.card p { margin: 0 0 16px; line-height: 1.5; }
.hint, .fine { font-family: var(--sans); color: var(--muted); }
.hint { font-size: 0.95rem; }
.fine { font-size: 0.85rem; text-align: center; margin-top: 16px; }

label {
  display: block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 6px;
}
input, select {
  width: 100%;
  font: 1.05rem var(--sans);
  color: var(--text);
  background: #fff;
  border: 1px solid #cfcfc8;
  border-radius: 4px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
input:focus, select:focus { outline: 2px solid var(--text); outline-offset: 1px; border-color: var(--text); }
input.code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
}

button {
  width: 100%;
  font: 600 1rem var(--sans);
  color: #fff;
  background: var(--text);
  border: 0;
  border-radius: 4px;
  padding: 13px 16px;
  cursor: pointer;
}
button:hover { background: #000; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: progress; }
button.link {
  width: auto;
  background: none;
  color: var(--muted);
  padding: 0;
  font-weight: 400;
  text-decoration: underline;
}
button.link:hover { color: var(--text); background: none; }

.message {
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 0 0 16px;
}
.message.error { background: #fdeced; color: #8a1520; }
.message.ok { background: #eaf5ec; color: #1d5b2b; }
.message:empty { display: none; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.actions { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-size: 0.9rem; }
.who { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); }
label.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 16px;
  cursor: pointer;
}
label.consent input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--text); }
label.consent a { color: var(--muted); }
[hidden] { display: none !important; }

/* ---- Reminders ---- */
.topnav { display: flex; justify-content: center; gap: 22px; font-family: var(--sans); font-size: 0.95rem; margin: -8px 0 24px; }
.topnav a { color: var(--muted); text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.reminders { list-style: none; margin: 0; padding: 0; }
.reminders li { padding: 14px 0; border-top: 1px solid #ecece6; }
.reminders li:first-child { border-top: 0; padding-top: 4px; }
.r-title { font-size: 1.08rem; font-weight: 600; overflow-wrap: anywhere; }
.r-title span { font-weight: 400; color: var(--muted); }
.r-when { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin: 3px 0 8px; }
.r-when.attention { color: #8a1520; font-weight: 600; }
.r-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--sans); font-size: 0.9rem; }
.r-actions button.link { font-size: 0.9rem; padding: 4px 0; }
.r-actions button.link.danger { color: #8a1520; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chips button {
  width: auto; padding: 7px 14px; font-weight: 500; font-size: 0.9rem; border-radius: 4px;
  background: #fff; color: var(--text); border: 1px solid #cfcfc8;
}
.chips button:hover { background: #f1f1ec; }
.chips button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }

.library { list-style: none; margin: 0; padding: 0; }
.library li + li { margin-top: 8px; }
.library button {
  display: block; width: 100%; text-align: left; background: #fff; color: var(--text);
  border: 1px solid #e4e4de; border-radius: 4px; padding: 13px 16px; font-weight: 400;
}
.library button:hover { background: #fff; border-color: var(--text); }
.library .t-title { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.library .t-desc { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.library .t-cat { float: right; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-left: 10px; }

dialog.sheet {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  border: 0; border-radius: 8px; padding: 26px 22px 22px; background: #fff; color: var(--text);
  box-shadow: 0 20px 60px rgba(31, 29, 26, 0.3);
}
dialog.sheet::backdrop { background: rgba(31, 29, 26, 0.45); }
dialog.sheet h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
dialog.sheet .hint { margin: 0 0 18px; }
.field-help { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin: -10px 0 16px; }
.row.tight { gap: 8px; }
fieldset.checks { border: 0; margin: 0 0 16px; padding: 0; }
fieldset.checks legend { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; padding: 0; margin: 0 0 8px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 0.95rem; margin: 0 0 8px; cursor: pointer; }
label.check input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--text); }
.buttons { display: flex; gap: 10px; margin-top: 4px; }
.buttons button { flex: 1; }
button.secondary { background: #fff; color: var(--text); border: 1px solid #cfcfc8; }
button.secondary:hover { background: #f1f1ec; }
details.more { margin: 0 0 16px; }
details.more summary { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); cursor: pointer; margin-bottom: 12px; }
.empty { font-family: var(--sans); color: var(--muted); text-align: center; padding: 8px 0 4px; margin: 0; }
.stack > * + * { margin-top: 10px; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0; }
.stats div { background: var(--bg); border-radius: 4px; padding: 12px 14px; }
.stats dt { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 600; }
.tpl { border-top: 1px solid #ecece6; padding: 14px 0; font-family: var(--sans); font-size: 0.92rem; }
.tpl:first-child { border-top: 0; }
.tpl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tpl-head strong { font-family: var(--serif); font-size: 1.05rem; }
.tpl.off strong { color: var(--muted); text-decoration: line-through; }
.tpl .link-row { margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 4px; }
.tpl .link-row input { font-size: 0.9rem; padding: 8px 10px; margin: 4px 0 8px; }
.tpl .link-row .meta { font-size: 0.8rem; color: var(--muted); }
.tpl .link-row .meta.unchecked { color: #8a1520; }
.tpl .mini { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.tpl .mini button.link, .tpl .mini a { font-size: 0.85rem; }
.problems { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 0.88rem; }
.problems li { border-top: 1px solid #ecece6; padding: 10px 0; overflow-wrap: anywhere; }
.problems li:first-child { border-top: 0; }
.problems .err { color: #8a1520; }
#settings-form label.check { margin-bottom: 18px; }

/* Admin: a reminder's links */
dialog.sheet.wide { width: min(720px, calc(100vw - 24px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.panel { border-top: 1px solid #ecece6; padding: 16px 0 4px; }
.panel h3 { font-family: var(--sans); font-size: 1rem; margin: 0 0 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h3 { margin: 0; }
.panel .hint { font-size: 0.85rem; margin: 8px 0 12px; }
.lookup-result { font-family: var(--sans); font-size: 0.92rem; background: var(--bg); border-radius: 4px; padding: 10px 12px; margin: 10px 0 0; overflow-wrap: anywhere; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.filters input[type=search] { flex: 1 1 200px; margin: 0; padding: 9px 12px; font-size: 0.95rem; }
.filters label.check { margin: 0; font-size: 0.9rem; }
.rows { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 0.9rem; }
.rows li { border-top: 1px solid #ecece6; padding: 10px 0; }
.rows li:first-child { border-top: 0; }
.row-main { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.row-main strong { font-size: 0.95rem; }
.row-sub { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; margin-top: 2px; }
.status { font-size: 0.78rem; white-space: nowrap; color: #1d5b2b; }
.status.unchecked { color: #8a1520; }
.rows .mini { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.rows .mini button.link, .rows .mini a { font-size: 0.85rem; }
.rows .edit input { font-size: 0.9rem; padding: 8px 10px; margin: 6px 0; }
.partner-form { background: var(--bg); border-radius: 4px; padding: 14px; margin-bottom: 12px; }
.partner-form input, .partner-form textarea { font-size: 0.95rem; padding: 9px 12px; margin-bottom: 12px; }
textarea { width: 100%; font: 1rem var(--sans); color: var(--text); background: #fff; border: 1px solid #cfcfc8; border-radius: 4px; padding: 12px 14px; margin: 0 0 16px; resize: vertical; }
.partner-form label.check { font-size: 0.85rem; }
.add-state { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #ecece6; }
.add-state h3 { margin: 0; }
.add-state input, .add-state select { margin: 0; font-size: 0.95rem; padding: 9px 12px; }
.add-state button { justify-self: start; }
.tpl-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tpl-meta { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.tpl-meta .warn { color: #8a1520; }

/* First-run questions */
.chips.big { gap: 10px; margin-bottom: 20px; }
.chips.big button { padding: 11px 18px; font-size: 1rem; }
.library .t-added { float: right; font-size: 0.75rem; color: #1d5b2b; margin-left: 10px; }
#mine-card h1 { font-size: 1.6rem; }
.card p.fine { margin: 14px 0 0; }
.row-sub.err { color: #8a1520; }
