/* Fifty Things — public page. Sizes, colours and spacing follow the
   Claude Design file ("Fifty Things.dc.html") one-to-one. */

:root {
  --accent: oklch(0.48 0.09 145); /* check colour; the admin can change it */
  --green: oklch(0.48 0.09 145);
  --ink: #1c1a16;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --rule: #ddd6c6;
  --rule-soft: #e2dbcb;
  --field: #cfc7b5;
  --muted: #6b655a;
  --soft: #4a4539;
  --body: #3d3931;
  --quiet: #8c8578;
  --hover: #ece5d6;
  --serif: Newsreader, Georgia, serif;
  --sans: 'Work Sans', Helvetica, sans-serif;
}

html, body { margin: 0; padding: 0; background: var(--paper); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: oklch(0.38 0.09 145); }
input, button, textarea { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.ft-root {
  background: var(--paper); color: var(--ink); font-family: var(--sans);
  min-height: 100vh; padding: 0 0 120px;
  display: flex; flex-direction: column; align-items: center;
}
.ft-noscript { margin: 120px 24px 0; font-family: var(--serif); font-size: 19px; }

/* ---------- nav ---------- */

.ft-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: var(--ink); color: #f1ece1; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.ft-nav-inner {
  max-width: 688px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 24px;
}
.ft-brand { font-family: var(--serif); font-size: 16px; letter-spacing: 0.01em; color: #f1ece1; white-space: nowrap; }
.ft-tabs { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ft-tab {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto; white-space: nowrap;
  background: none; border: none; border-radius: 3px; padding: 8px 13px;
  font-family: var(--serif); font-size: 16.5px; letter-spacing: -0.005em; cursor: pointer;
  color: rgba(241, 236, 225, 0.62);
}
.ft-tab:hover { color: #fffdf8; }
.ft-tab.is-active { background: rgba(241, 236, 225, 0.12); color: #fffdf8; }
.ft-menu-btn {
  display: none; margin-left: auto; width: 36px; height: 36px; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 3px; color: #f1ece1; cursor: pointer; padding: 0;
}
.ft-menu {
  display: none; flex-direction: column; padding: 6px 20px 12px;
  border-top: 1px solid rgba(241, 236, 225, 0.16);
}
.ft-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: none; border: none; padding: 11px 0;
  font-family: var(--serif); font-size: 18px; cursor: pointer; color: rgba(241, 236, 225, 0.62);
}
.ft-menu-item.is-active { color: #fffdf8; }

/* ---------- header ---------- */

.ft-page { width: 100%; max-width: 640px; padding: 104px 24px 0; }
.ft-header { display: flex; flex-direction: column; gap: 22px; margin-bottom: 56px; }
.ft-kicker { font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); }
.ft-title {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 6.5vw, 62px); line-height: 1.03; letter-spacing: -0.02em;
}
.ft-intro { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.6; color: var(--body); text-wrap: pretty; white-space: pre-line; }
.ft-help { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); white-space: pre-line; }
.ft-caption { font-size: 12px; color: var(--muted); font-family: var(--sans); letter-spacing: 0.04em; }

.ft-photo { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 10px; border-radius: 2px; overflow: hidden; }
.ft-photo-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ft-photo-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px; text-align: center; border-radius: 2px;
  background: rgba(127, 127, 127, 0.08); font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
.ft-photo-empty::after {
  content: ''; position: absolute; inset: 0; border-radius: 2px; pointer-events: none;
  border: 1.5px dashed currentColor; opacity: 0.35;
}
.ft-photo-empty svg { opacity: 0.45; }
.ft-photo-cap { max-width: 90%; font-weight: 500; letter-spacing: 0.01em; opacity: 0.75; }

/* ---------- lock ---------- */

.ft-lock {
  margin-top: 8px; max-width: 420px; padding: 30px 28px;
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid var(--rule); background: var(--card); border-radius: 3px;
}
.ft-lock-icon { color: var(--green); }
.ft-lock-title { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.ft-lock-blurb { margin: 0; font-size: 14px; line-height: 1.6; color: var(--soft); }
.ft-lock-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ft-pass {
  flex: 1; min-width: 150px; background: none; border: 1px solid var(--field); border-radius: 2px;
  padding: 10px 12px; font-family: var(--sans); font-size: 15px; letter-spacing: 0.14em; color: var(--ink); outline: none;
}
.ft-pass:focus { border-color: var(--ink); }
.ft-btn-dark {
  background: var(--ink); border: 1px solid var(--ink); border-radius: 2px; padding: 10px 18px;
  font-size: 13.5px; letter-spacing: 0.04em; color: var(--paper); cursor: pointer;
}
.ft-btn-dark:hover { background: #3d3931; }
.ft-btn-dark:disabled { opacity: 0.6; cursor: default; }
.ft-err { font-size: 13px; color: oklch(0.5 0.14 25); }

.ft-lockrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ft-lockrow-icon { color: var(--muted); }
.ft-lockrow-text { font-size: 13px; color: var(--soft); }
.ft-btn-line {
  background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 7px 13px;
  font-size: 12.5px; letter-spacing: 0.04em; color: var(--soft); white-space: nowrap; cursor: pointer;
}
.ft-btn-line:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- the fifty ---------- */

.ft-items { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.ft-item { border-bottom: 1px solid var(--rule); }
.ft-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 4px; }

.ft-chev {
  width: 26px; height: 26px; flex: 0 0 26px; margin-top: 1px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 13px; cursor: pointer; color: var(--muted);
}
.ft-chev:hover, .ft-chev.is-open { background: var(--hover); color: var(--ink); }
.ft-chev-icon { transition: transform 0.18s ease; }
.ft-chev.is-open .ft-chev-icon { transform: rotate(-180deg); }

.ft-box {
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
  border-radius: 2px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  background: var(--card); border: 1px solid var(--field); color: transparent;
}
.ft-box.is-on { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.ft-box-lg { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 4px; font-size: 13px; }
.ft-box-sm { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; font-size: 11px; }
.ft-box.is-disabled { opacity: 0.4; cursor: not-allowed; border-style: dashed; }

.ft-num {
  font-family: var(--sans); font-size: 12px; color: var(--muted);
  min-width: 24px; padding-top: 9px; font-variant-numeric: tabular-nums;
}
.ft-t {
  flex: 1; min-width: 0; display: block; padding: 4px 0 3px;
  background: none; border: none; border-bottom: 1px solid transparent; outline: none;
  overflow: hidden; resize: none;
  font-family: var(--serif); font-size: 21px; line-height: 1.35; letter-spacing: -0.005em; text-wrap: pretty;
  color: var(--ink);
}
.ft-t.is-blank { border-bottom-color: var(--field); }
.ft-item.is-done .ft-t { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }

.ft-actions { display: flex; align-items: center; gap: 2px; padding-top: 3px; }
.ft-icon-btn {
  width: 22px; height: 22px; flex: 0 0 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 2px;
  font-size: 15px; line-height: 1; color: var(--quiet); cursor: pointer;
}
.ft-icon-btn:hover { background: var(--hover); color: var(--ink); }
.ft-icon-btn-sm { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; font-size: 14px; }

.ft-body { padding: 2px 0 24px 106px; display: flex; flex-direction: column; gap: 16px; }
.ft-fine {
  width: 100%; overflow: hidden; resize: none; outline: none;
  background: var(--card); border: 1px solid var(--rule-soft); border-radius: 2px; padding: 11px 12px;
  font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--body); text-wrap: pretty;
}
.ft-steps { display: flex; flex-direction: column; gap: 9px; border-left: 1px solid var(--rule-soft); }
.ft-step { display: flex; align-items: flex-start; gap: 11px; padding-left: 16px; }
.ft-step-t {
  flex: 1; min-width: 0; display: block; overflow: hidden; resize: none; outline: none;
  background: none; border: none; border-bottom: 1px solid transparent; padding: 1px 0 2px;
  font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--soft); text-wrap: pretty;
}
.ft-step-t.is-blank { border-bottom-color: var(--field); }
.ft-add {
  align-self: flex-start; display: flex; align-items: center; gap: 8px;
  background: none; border: 1px dashed var(--field); border-radius: 2px; padding: 8px 13px;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.04em; color: var(--soft); cursor: pointer;
}
.ft-add:hover { border-color: var(--ink); border-style: solid; }
.ft-add-plus { font-size: 14px; line-height: 1; }
.ft-add-label { white-space: nowrap; }

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

.ft-footer { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.ft-tally { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--soft); }
.ft-footnote { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 52ch; white-space: pre-line; }

/* ---------- toast (save errors, undo) ---------- */

.ft-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 40px);
  padding: 10px 12px 10px 16px; border-radius: 3px;
  background: var(--ink); color: var(--paper); font: 13px/1.4 var(--sans);
  box-shadow: 0 6px 24px rgba(28, 26, 22, 0.25);
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
}
.ft-toast.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ft-toast-btn {
  background: none; border: 1px solid rgba(246, 243, 236, 0.35); border-radius: 2px; padding: 5px 10px;
  font-size: 12.5px; letter-spacing: 0.04em; color: var(--paper); cursor: pointer; white-space: nowrap;
}
.ft-toast-btn:hover { border-color: var(--paper); }

/* ---------- phones (the design switches at 560px) ---------- */

@media (max-width: 559.98px) {
  .ft-nav-inner { max-width: 640px; padding: 12px 20px; }
  .ft-tabs { display: none; }
  .ft-menu-btn, .ft-menu { display: flex; }
  .ft-page { padding: 88px 20px 0; }
  .ft-row { gap: 9px; padding: 14px 0; }
  .ft-num { visibility: hidden; }
  .ft-t { font-size: 19px; }
  .ft-body { padding-left: 35px; gap: 12px; }
}
