/* Cascade Part A — screen 2, and the one dialog.
 *
 * Split from `mvp.css` so neither file crosses the cap. The tokens live there
 * and are inherited: same warm ground, same terracotta accent, same three
 * coloured states and no fourth. A colour anywhere still means a state.
 *
 * There is no mono face in this system, so every control that was subordinate
 * by being mono is now subordinate by weight, size, tracking and contrast in
 * Figtree. The chips, the significance row and the Add button all changed for
 * that reason and for no other.
 */

@import url("./mvp.css?v=81");
@import url("./mvp.account.css?v=81");
@import url("./mvp.wide.css?v=81");
@import url("./mvp.chrome.css?v=81");
@import url("./mvp.web.css?v=81");

/* ------------------------------------------------------------ screen 2
 *
 * Capture and edit, the same screen for both. The box is the largest thing on
 * it and everything else is typographically under it, because the box is the
 * work and the chips are corrections to what the box already said.
 *
 * A chip that is ON is a state, so it takes the accent as a fill rather than as
 * a tint: at 11.5px an outline in a warm palette is not enough separation to
 * read at arm's length. Nothing here is coloured for emphasis.
 */

/* STICKY, because Back is in here and the advanced panel is taller than a
   phone. With the panel open the header scrolled away, so the only way off the
   screen was to scroll back up to find it, and a way out you have to look for
   is not a way out. The background is opaque so rows do not show through it. */
.head {
  display: flex;
  align-items: center;
  gap: calc(var(--step) * 4);
  margin-bottom: calc(var(--step) * 4);
  min-height: 24px;
  position: sticky;
  /* Sticky against the phone's own bar, not the page edge: without the inset
     the header slid back under the status bar on the first scroll. */
  top: env(safe-area-inset-top, 0px);
  z-index: 3;
  /* The ground, not a card (session 123, his slide): a sheet-coloured strip
     behind the bound chip read as a band across the screen. Sticky still
     needs opacity, so it wears the paper the page already wears. */
  background: var(--paper);
  padding: calc(var(--step) * 2) 0;
}

.bound {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--step) * 2);
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-pill);
  padding: calc(var(--step) * 1.5) calc(var(--step) * 3);
  max-width: 70%;
}
.bound > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { font: inherit; background: none; border: 0; color: var(--quiet); cursor: pointer; padding: 0 2px; }
.x:hover, .x:focus-visible { color: var(--ink); }

.box {
  display: block;
  width: 100%;
  resize: vertical;
  font-family: var(--face-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-card);
  padding: calc(var(--step) * 4);
}
.box::placeholder { color: var(--quiet); font-weight: 400; }

.taps { display: flex; flex-wrap: wrap; gap: calc(var(--step) * 2); margin-top: calc(var(--step) * 3); }
.taps.types { margin-top: calc(var(--step) * 2); }

.chip {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--quiet);
  background: var(--sunk);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  padding: calc(var(--step) * 2) calc(var(--step) * 3.5);
  cursor: pointer;
  min-height: 34px;
}
.chip:hover, .chip:focus-visible { color: var(--ink); border-color: var(--edge); }
.chip.on { background: var(--signal); border-color: var(--signal); color: var(--sheet); }
.chip.more { letter-spacing: 0.14em; }

/* THE DATE BLOCK, three pieces (session 121, his shape). The pinned row —
   tick, Pick date, Pick time — never scrolls: the way into every unlisted
   date is always on screen. The date scroller wraps and scrolls down past two
   rows; nothing is cut in half — the block fades at its bottom edge instead,
   which says "more below" without amputating a chip (session 120's half-cut
   row read as a defect, and it was). The times row is five chips and needs no
   cap. */
.dates-block { margin-top: calc(var(--step) * 3); }
.dates-block .taps { margin-top: calc(var(--step) * 1.5); }
.taps.pinned { flex-wrap: nowrap; }
/* ONE ROW VISIBLE, THE REST DOWN THE SCROLL (session 122, his sizing: three
   or so options showing per group). The affordance is real this time — build
   37 hid the scrollbar and capped at exactly two rows, so nothing said "more
   below" and the scroll read as vanished. A thin scrollbar is drawn, the last
   14px fade, and the scroll stays inside the strip instead of dragging the
   page. */
/* TWO DATE COLUMNS (session 123, his slides): near dates left, later dates
   right, each a vertical scroll about three chips tall with a drawn thin
   scrollbar and a bottom fade. The times keep their capped single strip. */
.dates-cols {
  display: flex;
  gap: calc(var(--step) * 2);
  margin-top: calc(var(--step) * 2);
}
.taps.date-col {
  flex: 1 1 0;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}
.taps.date-col .chip { text-align: center; }
.taps.date-col, .taps.times-row {
  max-height: 118px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
  padding-right: 6px;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 14px), transparent);
  mask-image: linear-gradient(to bottom, black calc(100% - 14px), transparent);
}
.taps.times-row { max-height: 46px; }
.taps.date-col::-webkit-scrollbar, .taps.times-row::-webkit-scrollbar { width: 3px; }
.taps.date-col::-webkit-scrollbar-thumb, .taps.times-row::-webkit-scrollbar-thumb {
  background: var(--edge);
  border-radius: 2px;
}

/* The two pickers LOOK like what they are (session 119): the way into every
   date and time the strip does not carry. They were grey like the word chips
   and read as more of the same. Accent means pressable, which they are, so this
   spends no new colour. */
.picker .chip {
  color: var(--signal-deep);
  background: var(--signal-wash);
  border-color: var(--signal);
}
.picker .chip:hover, .picker .chip:focus-visible {
  background: var(--signal);
  color: var(--sheet);
}

/* A picker is a chip beside a native control, not a native control stretched
   under a chip. The old shape relied on the press landing on the browser's own
   calendar indicator, which sits at the right edge of the field and was under a
   chip of a different width: hit sometimes for time and never for date. The
   button calls `showPicker()` instead and the field takes no clicks at all.
   It stays 1px at the bottom-left of the chip rather than being moved off the
   page, because the browser anchors the popup to where the field is. */
.picker { position: relative; display: inline-flex; align-items: center; }
.picker-field {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
}

.dorow {
  display: flex;
  align-items: center;
  gap: calc(var(--step) * 4);
  margin-top: calc(var(--step) * 4);
}
.sigs { display: flex; gap: calc(var(--step) * 3); }
.sig {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
  background: none;
  border: 0;
  padding: calc(var(--step) * 1.5) 0;
  cursor: pointer;
}
.sig.on { color: var(--signal-deep); font-weight: 700; }

.go {
  margin-left: auto;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff8f2;
  background: var(--signal);
  border: 0;
  border-radius: var(--r-pill);
  padding: calc(var(--step) * 3) calc(var(--step) * 7);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(140, 73, 26, 0.3);
}
.go:disabled { background: var(--sunk); color: var(--quiet); cursor: default; box-shadow: none; }

.panel {
  margin-top: calc(var(--step) * 4);
  border-top: 1px solid var(--edge);
}
.panel:empty { border-top: 0; }
.group { margin-top: calc(var(--step) * 4); }
.group .label {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: calc(var(--step) * 1.5);
}
.num {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  /* A field, not a chip (session 123, his slide): the numbers sat in the same
     sunk pill as the taps around them and read as one more option. A sheet
     ground with a drawn edge says "type here". */
  background: var(--sheet);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-pill);
  padding: calc(var(--step) * 2) calc(var(--step) * 3);
  width: 68px;
  text-align: center;
}
.num:focus-visible { outline: 0; border-color: var(--signal); background: var(--sheet); }
.note {
  font-family: inherit;
  font-size: 12px;
  color: var(--quiet);
  align-self: center;
}
/* A label with no text still holds its row's top margin, which is what keeps
   the duration suggestions attached to the box above them rather than reading
   as a group of their own. */
.group .label:empty { display: none; }
.taps.quiet { margin-top: calc(var(--step) * 1.5); }
.taps.quiet .chip { color: var(--quiet); }
.notes {
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-card);
  padding: calc(var(--step) * 3);
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  margin-top: calc(var(--step) * 1.5);
}
.notes:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }

/* Nothing matching draws nothing: no panel, no headers, no empty state. */
.matches { display: flex; flex-direction: column; margin-top: calc(var(--step) * 6); }
.matches:not(:empty) { border-top: 1px solid var(--edge); }
.match {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(var(--step) * 4);
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--edge);
  padding: calc(var(--step) * 3) 0;
  cursor: pointer;
  font: inherit;
}
.match-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.match-said { font-family: inherit; font-size: 12px; font-weight: 600; color: var(--quiet); white-space: nowrap; }

.plus {
  font-family: var(--face-display);
  font-size: 20px;
  line-height: 1;
  color: var(--quiet);
  background: none;
  border: 0;
  padding: 0 calc(var(--step));
  cursor: pointer;
}
.plus:hover, .plus:focus-visible { color: var(--ink); }

/* ------------------------------------------------------------- the dialog
 *
 * One dialog, three reasons: the duplicate, the timed clash, and two hard
 * deadlines on one day. A line that is all three is stopped once and told
 * three things.
 */

.veil {
  position: fixed;
  inset: 0;
  background: rgba(46, 43, 37, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--step) * 4);
  z-index: 10;
}
.dialog {
  background: var(--sheet);
  border-radius: var(--r-block);
  padding: calc(var(--step) * 6);
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(46, 43, 37, 0.22);
}
.dialog-said {
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 calc(var(--step) * 2);
}
.dialog-acts {
  display: flex;
  justify-content: flex-end;
  gap: calc(var(--step) * 5);
  margin-top: calc(var(--step) * 5);
}
.dialog-acts .go {
  margin-left: 0;
  padding: calc(var(--step) * 2) calc(var(--step) * 4);
}

@media (max-width: 600px) {
  .box { font-size: 18px; }
  .dorow { flex-wrap: wrap; }
}

/* The type dropdown (session 122): all fourteen, the engine's guess as the
   value, drawn as the design drew it — `⟨action ▾⟩`. Chip-shaped so the row
   keeps its rhythm; the arrow is the browser's own. */
.type-select {
  font-family: var(--face-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--sunk);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  padding: 7px 12px;
  max-width: 60%;
}
.type-select:focus-visible { border-color: var(--signal); outline: none; }

/* The alarm on the capture screen (session 123): drawn only while the line
   carries an exact time; the toggle plus the instant it will ring. */
.alarm-row {
  /* It wraps now (session 125): the toggle, the sentence and the lead slider
     do not fit one phone line, and a slider that has to be scrolled sideways
     to reach is a slider that gets dragged by accident. */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--step) * 3);
  margin-top: calc(var(--step) * 2);
}
.alarm-when { font-size: 12.5px; color: var(--signal-deep); font-weight: 600; }

/* THE LEAD SLIDER (session 125, his ask: a slider from 0 to 60 minutes showing
   the lead). It sits beside the Alarm toggle here and on every row of the
   alarms screen, one rule for both, because it is one control writing one
   field. The reading is not decoration: a slider with no number is a promise
   nobody can check. */
.lead-wrap { display: flex; align-items: center; gap: calc(var(--step) * 2); flex: 1 1 100%; }
.lead-read { font-size: 12.5px; color: var(--quiet); white-space: nowrap; }
input[type="range"].lead, input[type="range"].dur {
  flex: 1 1 auto;
  min-width: 120px;
  accent-color: var(--signal);
  height: 28px;
}

/* The duration ladder (session 125, his ask: a slider instead of buttons). One
   line, the reading on the right, no unit chips and no suggestion row. */
.dur-line { display: flex; align-items: center; gap: calc(var(--step) * 2); }
.dur-read { font-size: 13px; color: var(--signal-deep); font-weight: 600; white-space: nowrap; min-width: 6ch; }

/* The repeat group (session 124): the Never button lives beside the label and
   wears the sentence once a repeat is set; the number and the units sit below
   it. */
.group-head { display: flex; align-items: center; gap: calc(var(--step) * 3); margin-bottom: calc(var(--step) * 2); }
.group-head .label { margin-bottom: 0; }
/* NOT CUT SHORT (session 125, his slide "not showing full text"): the chip was
   capped at 62% of the row with an ellipsis, so the one thing on the screen
   that says what the repeat MEANS — `every month on the 23rd at 3:30pm` — was
   losing its time. It wraps and takes the width it needs. */
.chip.rep-state {
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
  border-radius: 14px;
}
.group-head { flex-wrap: wrap; }
/* SIX UNITS WRAP; FOUR DID NOT (session 160, when `min` and `hr` arrived).
   This row was `nowrap` with `overflow-x: auto` and a HIDDEN scrollbar, which
   held four chips on a 320px phone with nothing to spare. Six come to roughly
   400px of chips and field against 288px of row, so two of them would have sat
   off the right edge with no scrollbar and no shadow to say they were there —
   `month` and `year` simply missing, on the screen whose job is to show what
   the choices are.
   His sizing instruction in session 124 said one line, and it was given about
   four units. Two short lines show all six; one line hides two of them. */
.taps.rep-line { flex-wrap: wrap; }
.taps.rep-line .num { width: 48px; flex-shrink: 0; }
.taps.rep-line .chip { padding-left: 10px; padding-right: 10px; flex-shrink: 0; }

/* ===================================================================== */
/* HAND-OFFS (session 161). Four surfaces, and none of them invents a shape:
   the rows reuse the card, the chips reuse `.chip`, the buttons reuse `.act`.
   A feature that arrives with its own visual language reads as a second app. */

/* THE STRIP AT THE FOOT OF THE LIST. Not drawn when nothing is waiting — the
   element is always in the tree and hides itself, because building it only on
   arrival would move the rows under it the first time an offer came in.
   Session 139 put a 70% floor under those rows, which is the whole reason this
   is conditional rather than a fourth tab. */
.received-slot { flex: 0 0 auto; }
.received {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: calc(var(--step) * 2.5);
  width: 100%;
  margin: calc(var(--step) * 2) 0 0;
  padding: calc(var(--step) * 2.5) calc(var(--step) * 3.5);
  border: 1px solid var(--signal);
  border-radius: var(--r-card);
  background: var(--signal-wash);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.received:hover, .received:focus-visible { border-color: var(--signal-deep); }
/* The count, as a number and not as a dot with a number near it: a badge that
   has to be counted is a badge that has not said anything. */
.received-dot {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 11px;
  background: var(--signal-deep);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}
.received-text { font-size: 14px; font-weight: 600; }
.received-who {
  font-size: 12.5px;
  color: var(--signal-deep);
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ONE ROW PER OFFER, on the two list screens. The same card the task rows use,
   so a thing somebody sent reads as a task-shaped thing. */
.given-row {
  display: block;
  width: 100%;
  margin-bottom: calc(var(--step) * 2);
  padding: calc(var(--step) * 3);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.received-row { cursor: pointer; }
.received-row:hover, .received-row:focus-visible { border-color: var(--signal); }
/* A SEND THAT HAS NOT GONE YET IS DRAWN AS UNFINISHED, with a dashed edge and
   no fill: it is a thing in progress and not a record of anything. Nobody has
   been told, and the row has to look like that is true. */
.given-queued { border-style: dashed; background: transparent; }
.given-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.given-who { margin-top: calc(var(--step) * 1.5); font-size: 12.5px; color: var(--quiet); }
.given-edit { margin-top: var(--step); font-size: 12px; color: var(--signal-deep); }
.given-row .act { margin-top: calc(var(--step) * 2); }

/* THE HAND-OFF ROW IN THE ADVANCED PANEL. One control, or one sentence saying
   why there is no control — never a dim button, which is the lesson session
   142 paid for. */
.hand-line { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--step) * 2); }
.hand-said { flex: 1 1 100%; font-size: 12.5px; color: var(--quiet); line-height: 1.4; }
.d-hand { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--step) * 2); }

/* THE SEND SHEET. A dialog, because it asks one thing. */
.send-sheet { max-width: 420px; }
.send-to, .send-name {
  width: 100%;
  margin-top: calc(var(--step) * 2);
  padding: calc(var(--step) * 2.5);
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--sunk);
  color: var(--ink);
  font: inherit;
}
.send-known { max-height: 96px; overflow-y: auto; }
/* MARKED AND NOT HIDDEN. A block is about what arrives; nothing about it says
   he has stopped delegating to them, so the address stays pickable and wears
   the fact instead. */
.chip-blocked { border-style: dashed; color: var(--quiet); }
.send-why { margin-top: calc(var(--step) * 2); font-size: 12.5px; color: var(--warn); }

/* ONE OFFER IN FULL. The correction box and what it would change, side by
   side: what was sent is kept beside what came back, never instead of it. */
.offer-line {
  width: 100%;
  margin-top: calc(var(--step) * 2);
  padding: calc(var(--step) * 3);
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--sunk);
  color: var(--ink);
  font: inherit;
}
.offer-preview { margin-top: calc(var(--step) * 2); font-size: 12.5px; color: var(--quiet); }
.offer-change {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: calc(var(--step) * 2);
  padding: var(--step) 0;
  align-items: baseline;
}
.offer-change .f-was { text-decoration: line-through; opacity: 0.7; }
.offer-change .f-now { color: var(--signal-deep); font-weight: 600; }
.offer-acts {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--step) * 2);
  margin-top: calc(var(--step) * 4);
}
/* The one destructive control on the screen wears the one warning colour this
   app uses, and it is last. */
.offer-acts .danger { color: var(--warn); }

/* The blocked list on the account screen. */
.block-list { margin-top: calc(var(--step) * 2); }

/* PULL DOWN TO REFRESH (session 163). The band lives above the header and has
   no height until a finger gives it one, so nothing on the screen moves until
   the gesture has started — which matters here more than usual, because
   session 139 put a 70% floor under the task rows and a permanent strip at the
   top would come straight out of that budget. */
.pull-band {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  /* No transition by default: while the finger is down the height follows it
     and an animation would lag behind the touch. `mvp.pull.js` turns one on
     for the spring back and takes it off again. */
}
.pull-word {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--signal-deep);
  letter-spacing: 0.01em;
}

/* A TASK SOMEBODY HANDED BACK. The engine's own sentence says why the task is
   in this list; this says why it is still his to do, so it is a second line in
   its own colour rather than a replacement for the first. */
.said-back { color: var(--signal-deep); font-weight: 600; }
.hand-back { color: var(--signal-deep); font-weight: 600; }
