/* 75 HARD — black, condensed, uppercase. Equipment, not a wellness app. */
:root {
  --bg: #000;
  --fg: #fff;
  --dim: #6b6b6b;
  --line: #232323;
  --done: #d7ff00;   /* the only bright thing in the app */
  --fail: #ff2d2d;
  --tap: 64px;       /* thumb target, in the dark, at 5am */
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
}

#screen { padding: 0 20px 24px; }

/* --- day header --- */
.daynum {
  font-size: clamp(96px, 34vw, 190px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.04em;
  padding: 24px 0 0;
}
.daynum small {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: 0.3em; color: var(--dim); padding-bottom: 10px;
}
.of75 {
  color: var(--dim); font-size: 15px; font-weight: 700; letter-spacing: 0.2em;
  padding: 14px 0 28px; border-bottom: 1px solid var(--line);
}

/* --- task rows --- */
.task {
  display: flex; align-items: center; gap: 18px;
  width: 100%; min-height: var(--tap);
  background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--fg); text-align: left; font: inherit; text-transform: inherit;
  padding: 14px 0; cursor: pointer;
}
.box {
  flex: 0 0 30px; height: 30px;
  border: 2px solid var(--dim);
  display: grid; place-items: center;
}
.task[aria-pressed="true"] .box { background: var(--done); border-color: var(--done); }
.task[aria-pressed="true"] .box::after {
  content: ""; width: 12px; height: 6px;
  border: 3px solid #000; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-2px);
}
.task-label { font-size: 20px; font-weight: 700; line-height: 1.1; }
.task[aria-pressed="true"] .task-label {
  color: var(--dim); text-decoration: line-through; text-decoration-thickness: 2px;
}
.task-detail {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--dim); letter-spacing: 0.18em; margin-top: 3px;
}

.status { padding: 30px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.25em; color: var(--dim); }
.status.complete { color: var(--done); }
.nag {
  margin-top: 22px; padding: 14px; border: 1px solid var(--fail); color: var(--fail);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; line-height: 1.6;
}

/* --- tabs --- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #000; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
#tabs button {
  background: none; border: 0; color: var(--dim);
  font: inherit; text-transform: uppercase; font-weight: 700;
  font-size: 12px; letter-spacing: 0.2em; padding: 20px 0;
}
#tabs button.active { color: var(--fg); }
#tabs[hidden] { display: none; }

/* --- confrontation --- */
#screen.confront { padding-top: 18vh; padding-bottom: 60px; }
.confront-kicker { font-size: 15px; font-weight: 700; letter-spacing: 0.35em; color: var(--fail); }
.confront-day {
  font-size: clamp(64px, 22vw, 128px); font-weight: 800;
  line-height: 0.85; letter-spacing: -0.04em; margin-top: 6px;
}
.confront-missed {
  color: var(--dim); font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; line-height: 1.7; margin: 22px 0 46px;
}
.confront-note {
  color: var(--dim); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; line-height: 1.7; margin-bottom: 22px;
}

.btn-hold, .btn-fail, .btn-primary, .btn-outline {
  position: relative; display: block; width: 100%; min-height: var(--tap);
  font: inherit; text-transform: uppercase; font-weight: 700;
  font-size: 15px; letter-spacing: 0.16em; padding: 22px 16px;
  cursor: pointer; overflow: hidden;
}
.btn-hold { border: 2px solid var(--dim); background: none; color: var(--fg); margin-bottom: 14px; }
.btn-hold .btn-text { position: relative; z-index: 1; }
.btn-hold .fill { position: absolute; inset: 0 100% 0 0; background: var(--done); transition: none; }
.btn-hold.holding .fill { inset: 0 0 0 0; transition: inset 2s linear; }
.btn-hold.holding .btn-text { color: #000; }
.btn-fail { border: 2px solid var(--fail); background: none; color: var(--fail); }

/* --- record grid --- */
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 26px; }
.cell {
  aspect-ratio: 1; display: grid; place-items: center;
  border: 1px solid var(--line); color: #2e2e2e;
  font-size: 11px; font-weight: 700;
}
.cell.done { background: var(--done); border-color: var(--done); color: #000; }
.cell.today { border-color: var(--fg); color: var(--fg); }
.attempts-head { margin: 40px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.25em; color: var(--fail); }
.attempt {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--dim); padding: 8px 0; border-bottom: 1px solid var(--line);
}

/* --- photos --- */
.btn-primary { background: var(--done); border: 0; color: #000; margin-bottom: 14px; }
.btn-outline { background: none; border: 2px solid var(--dim); color: var(--fg); margin-bottom: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 22px; }
.shot { position: relative; aspect-ratio: 3/4; border: 1px solid var(--line); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot span {
  position: absolute; left: 8px; bottom: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; background: #000; padding: 4px 7px;
}
.shot.empty { display: grid; place-items: center; color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; }

/* --- photo status row (not a checkbox: it resolves when a photo exists) --- */
.photo-row { border-top: 1px solid var(--line); margin-top: 10px; }
.photo-row .box.hollow { border-style: dashed; }
.photo-row.taken .box { background: var(--done); border-color: var(--done); }
.photo-row.taken .box::after {
  content: ""; width: 12px; height: 6px;
  border: 3px solid #000; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-2px);
}
.photo-row.taken .task-label { color: var(--dim); }
.photo-row .chev { margin-left: auto; color: var(--dim); font-size: 26px; line-height: 1; }

/* --- standing reminder (not a task, deliberately not tappable) --- */
.reminder {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--dim);
  background: #0a0a0a;
}
.reminder-label { display: block; font-size: 15px; font-weight: 700; letter-spacing: 0.12em; color: var(--fg); }
.reminder-detail { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.2em; color: var(--dim); margin-top: 5px; }

/* --- maker's mark --- */
/* In normal flow, not fixed: a fixed mark floats over whatever text happens to
   be at the bottom of the screen and collides with the status line. */
#mark {
  display: block; width: 96px; margin: 40px 0 0 auto;
  /* Carries the clearance for the fixed tab bar. min-height keeps that
     clearance even if the logo fetch fails, so the last row is never
     trapped behind the tabs. */
  padding: 0 20px calc(92px + env(safe-area-inset-bottom)) 0;
  box-sizing: content-box; min-height: 34px;
  opacity: 0.3; color: #f4f1ea;   /* Deadset bone */
  pointer-events: none;
}
#mark svg { width: 100%; height: auto; display: block; }
#mark[hidden] { display: none; }

/* --- five tabs --- */
#tabs { grid-template-columns: repeat(5, 1fr); }
#tabs button { font-size: 10px; letter-spacing: 0.12em; padding: 18px 0; }

/* --- shared screen head --- */
.screen-head { padding-top: 26px; }

/* --- tasks --- */
.add-row { display: flex; gap: 10px; margin: 4px 0 10px; }
.add-input {
  flex: 1; min-height: 54px; background: #0d0d0d; color: var(--fg);
  border: 1px solid var(--line); padding: 0 14px;
  font: inherit; font-size: 16px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.add-input::placeholder { color: #4a4a4a; }
.add-input:focus { outline: 0; border-color: var(--done); }
.add-btn {
  flex: 0 0 54px; background: var(--done); border: 0; color: #000;
  font-size: 26px; font-weight: 700; line-height: 1; cursor: pointer;
}
.task-item { gap: 12px; }
.task-check { background: none; border: 0; padding: 0; cursor: pointer; display: flex; }
.task-check[aria-pressed="true"] .box { background: var(--done); border-color: var(--done); }
.task-check[aria-pressed="true"] .box::after {
  content: ""; width: 12px; height: 6px;
  border: 3px solid #000; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-2px);
}
.task-text { flex: 1; font-size: 17px; text-transform: none; letter-spacing: 0.02em; }
.task-item.is-done .task-text { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 2px; }
.task-del { background: none; border: 0; color: #3a3a3a; font-size: 24px; line-height: 1; padding: 0 4px; cursor: pointer; }
.edit-btn { margin-top: 22px; }
.done-head { color: var(--dim); }

/* --- editors (task bulk edit + notes) --- */
.editor {
  width: 100%; background: #0d0d0d; color: var(--fg);
  border: 1px solid var(--line); padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; line-height: 1.6; text-transform: none; letter-spacing: 0;
  resize: vertical; margin-bottom: 10px;
}
.editor:focus { outline: 0; border-color: var(--done); }
.notes-editor { min-height: 42vh; }
.saved-flag { height: 16px; font-size: 10px; font-weight: 700; letter-spacing: 0.25em; color: var(--done); margin-bottom: 12px; }
.note-past { border-bottom: 1px solid var(--line); padding: 12px 0; }
.note-past summary { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--dim); cursor: pointer; }
.note-body {
  white-space: pre-wrap; text-transform: none; letter-spacing: 0;
  font-size: 15px; line-height: 1.6; color: var(--fg); padding-top: 10px;
}
