/* Today view — the dominant surface */

.today {
  padding-top: calc(24px * var(--density));
}

.today__meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: calc(56px * var(--density));
}

.today__meta-sep {
  color: var(--ink-3);
  font-size: 12px;
}

.today__meta-phase {
  color: var(--ink-3);
}

/* Empty state */
.today__empty {
  padding-top: calc(20px * var(--density));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(20px * var(--density));
}

.today__empty-line {
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  max-width: 18ch;
}

/* Task stack */
.today__stack {
  display: flex;
  flex-direction: column;
}

/* Card — the centerpiece */
.card {
  position: relative;
  padding: calc(32px * var(--density)) 0 calc(28px * var(--density));
  transition: opacity 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card--divided {
  border-top: 1px solid var(--rule);
  margin-top: 8px;
  padding-top: calc(28px * var(--density));
}

/* The accent — a top mark on the card while planned.
   Only place this color appears in the app. */
.card__accent {
  position: absolute;
  left: 0;
  top: -1px;
  width: 96px;
  height: 3px;
  background: var(--accent);
  transition: background 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card--retiring .card__accent {
  opacity: 0;
  background: var(--ink-2);
}

/* Plan-number + track mark cluster above the title */
.card__topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card__ord {
  font-size: 13px;
  line-height: 1;
}

/* Track mark — inline above the title */
.card__mark-inline {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0;
  margin-bottom: 18px;
  vertical-align: top;
}

/* Inside the topline the mark sits on the number's baseline, so drop its
   standalone bottom gap (the topline owns the spacing to the title). */
.card__topline .card__mark-inline {
  margin-bottom: 0;
}

/* Track rule variant */
.card--track-rule {
  border-left: 1px solid var(--track);
  padding-left: 24px;
}

.card--done .card__title,
.card--done .card__deliverable,
.card--done .card__meta,
.card--done .card__topline {
  opacity: 0.45;
  transition: opacity 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card--done .card__title {
  text-decoration: none;
  color: var(--ink-2);
}

.card--skipped .card__title,
.card--skipped .card__deliverable {
  color: var(--ink-3);
}

/* Title */
.card__title-wrap {
  margin-top: 8px;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card__title {
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  cursor: text;
  text-wrap: balance;
}

.card--secondary .card__title {
  font-size: clamp(26px, 2.8vw, 32px);
}

.card__title-input {
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
  border: 0;
  background: transparent;
  outline: none;
  border-bottom: 1px solid var(--ink);
  width: 100%;
  padding: 0 0 4px;
  color: var(--ink);
  font-feature-settings: "ss01", "ss02";
}

.card--secondary .card__title-input {
  font-size: clamp(26px, 2.8vw, 32px);
}

/* Deliverable */
.card__deliverable {
  margin: calc(16px * var(--density)) 0 0;
  padding-left: 0;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.5;
  max-width: 64ch;
  cursor: text;
}

.card--secondary .card__deliverable {
  font-size: 18px;
}

.card__deliverable-input {
  margin: 20px 0 0;
  width: 100%;
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  outline: none;
  padding: 0 0 6px 0;
  resize: vertical;
  min-height: 50px;
}

.card--track-rule .card__deliverable,
.card--track-rule .card__title-wrap {
  /* nothing — content already aligns to card edge */
}

/* Done line */
.card__done-line {
  margin: calc(14px * var(--density)) 0 0;
  padding-left: 0;
}

/* Refs in the primary today card */
.card__refs {
  margin: calc(14px * var(--density)) 0 0;
}

/* Backlink row ("Refers to …") in the today card */
.card__relates {
  margin: calc(8px * var(--density)) 0 0;
}

/* Foot */
.card__foot {
  margin-top: calc(28px * var(--density));
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__meta-dot { color: var(--ink-3); }
.card__meta-est { cursor: text; }

.card__est-input {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  outline: none;
  width: 60px;
  padding: 2px 0;
}

.card__actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Tomorrow / chooser cleanup — old tomorrow styles kept harmless below */
.today__tomorrow,
.today__tomorrow-head,
.today__tomorrow-date,
.tomrow,
.tomrow__main,
.tomrow__title,
.tomrow__spacer,
.tomrow__est,
.tomrow__detail,
.tomrow__deliverable,
.tomrow__track { /* legacy — TomorrowRow no longer rendered */ }

/* ── Chooser ───────────────────────────────────────────────────────────── */

.chooser {
  margin-top: calc(56px * var(--density));
  padding-top: calc(20px * var(--density));
  border-top: 1px solid var(--rule);
}

.chooser--primary {
  /* When this is the first thing on the page (no committed tasks), give it
     more breathing room above and drop the divider rule. */
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.chooser__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: calc(18px * var(--density));
}

.chooser__budget {
  color: var(--ink-3);
}

.chooser__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.opt {
  display: flex;
  gap: 24px;
  padding: calc(18px * var(--density)) 0;
  border-bottom: 1px solid var(--rule);
  align-items: flex-start;
  transition: opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
              background 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.opt:last-child { border-bottom: 0; }

.opt__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.opt__ord {
  font-size: 13px;
  line-height: 1;
  min-width: 2.1em;    /* 3 tabular digits — keeps bodies aligned past a placeholder */
  text-align: right;
  padding-top: 17px;   /* drop the number onto the title line, past the mark */
}

.opt__mark {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--track);
  margin-bottom: 14px;
}

.opt__title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  text-wrap: pretty;
}

.opt__deliverable {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
  max-width: 60ch;
}

.opt__refs {
  margin-top: 10px;
}

.opt__refs .refs {
  font-size: 11px;
}

.opt__relates {
  margin-top: 8px;
}

.opt__relates .refs {
  font-size: 11px;
}

.opt__meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.opt__meta-dot { color: var(--ink-3); }
.opt__est, .opt__track { color: var(--ink-2); }

.opt__actions {
  flex-shrink: 0;
  padding-top: calc(12px * var(--density));
}

.opt__pick {
  padding: 8px 18px;
  font-size: 14px;
}

.chooser__more {
  appearance: none;
  border: 0;
  background: none;
  padding: calc(14px * var(--density)) 0 0;
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--ink-3);
  cursor: default;
  letter-spacing: -0.005em;
  transition: color 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.chooser__more:hover { color: var(--ink); }

/* Just-picked celebration — none, per the brief. The card's accent
   appearing is all the affordance the user needs. */
.card--just-picked {
  animation: justPicked 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes justPicked {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* End-of-day */
.today__resolved {
  margin-top: calc(40px * var(--density));
  padding-top: calc(20px * var(--density));
  border-top: 1px solid var(--rule);
}

.today__resolved-label {
  color: var(--accent);
}

.today__resolved-more {
  appearance: none;
  border: 0;
  background: none;
  display: block;
  padding: calc(10px * var(--density)) 0 0;
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--ink-3);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: color 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.today__resolved-more:hover { color: var(--ink); }

/* Day-full quiet state */
.today__day-full {
  margin-top: calc(56px * var(--density));
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.today__day-full .meta {
  color: var(--ink-3);
}

/* Return action on a committed task — quieter than skip */
.card__return {
  color: var(--ink-3);
}
.card__return:hover { color: var(--ink-2); }
