@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/plex-sans/ibm-plex-sans-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/plex-sans/ibm-plex-sans-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/plex-sans/ibm-plex-sans-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/plex-mono/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
}

:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #1b1b19;
  --ink-2: #3f3f3a;
  --muted: #55554f;
  --line: #e3e2dd;
  --field: #c9c8c2;
  --accent: #1f4fa8;
  --accent-hover: #173c80;
  --accent-ink: #ffffff;
  --accent-soft: #d6e0f3;
  --accent-soft-ink: #173c80;
  --ask-bg: #fbf1e1;
  --ask-line: #e9c98f;
  --ask-ink: #8a4b00;
  --unsure: #b86a00;
  --notyet: #8c8c85;
  --meet-bg: #1b1b19;
  --meet-ink: #ffffff;
  --meet-muted: #e3e2dd;
  --danger: #a3261b;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #161614;
    --surface: #201f1d;
    --ink: #edede8;
    --ink-2: #cfcfc8;
    --muted: #a6a69e;
    --line: #34332f;
    --field: #4b4a45;
    --accent: #8fb0ee;
    --accent-hover: #b3cbf5;
    --accent-ink: #10131a;
    --accent-soft: #24324d;
    --accent-soft-ink: #c9d8f5;
    --ask-bg: #2d2416;
    --ask-line: #6b4f22;
    --ask-ink: #f1b763;
    --unsure: #e09a3c;
    --notyet: #8c8c85;
    --meet-bg: #edede8;
    --meet-ink: #161614;
    --meet-muted: #4b4a45;
    --danger: #f08a7e;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-hover);
}
a.plain {
  color: inherit;
  text-decoration: none;
}
a.plain:hover {
  text-decoration: underline;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page h1 {
  font-size: 30px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------ tabs */

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.tabs a:hover {
  background: var(--bg);
}

.tabs a[aria-current='page'] {
  background: var(--ink);
  color: var(--surface);
}

/* ------------------------------------------------ layout */

main {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

main.today {
  max-width: 600px;
  padding: 22px 20px 32px;
  gap: 22px;
}

main.page {
  max-width: 1120px;
  padding: 32px 24px 48px;
  gap: 28px;
}

main.narrow {
  max-width: 720px;
}

@media (max-width: 600px) {
  main.page {
    padding: 22px 16px 32px;
    gap: 22px;
  }
  main.today {
    padding: 20px 16px 28px;
  }
}

.cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.cols > * {
  flex: 1 1 420px;
  min-width: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.eyebrow,
.sub,
.label {
  font-size: 13px;
  color: var(--muted);
}

.sub {
  line-height: 1.45;
}

.label {
  font-weight: 600;
}

.lede {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 760px;
}

.title {
  font-size: 15px;
  font-weight: 500;
}

.where {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
}

span.where {
  color: var(--muted);
}

/* ------------------------------------------------ cards and lists */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.page .card {
  border-radius: 12px;
}

.pad {
  padding: 14px 16px;
}

.page .pad {
  padding: 20px 24px;
}

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

.list > li {
  padding: 14px 16px;
}

.list > li + li {
  border-top: 1px solid var(--line);
}

.page .list > li {
  padding: 18px 20px;
}

.empty {
  margin-top: 8px;
  padding: 14px 16px;
  color: var(--muted);
}

.split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.split > :last-child {
  flex: none;
}

/* ------------------------------------------------ fields and buttons */

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

input[type='text'],
input[type='password'],
input:not([type]),
select {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field);
  border-radius: 8px;
}

.field {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.field > input,
.field > select {
  flex: 1;
}

button {
  height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
}

button.primary {
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
}

button.primary:hover {
  background: var(--accent-hover);
}

button.secondary {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field);
}

button.secondary:hover {
  background: var(--bg);
}

button.link {
  height: auto;
  padding: 0;
  font-size: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  text-decoration: underline;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.hint.filed {
  color: var(--ink);
}

.error {
  margin-top: 8px;
  font-size: 14px;
  color: var(--danger);
}

.move {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.move select {
  flex: 1 1 220px;
}

/* ------------------------------------------------ today */

.ask {
  background: var(--ask-bg);
  border: 1px solid var(--ask-line);
  border-radius: 10px;
  padding: 16px;
}

.ask h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ask-ink);
}

.ask .q {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
}

.ask .ctx {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.ask .row {
  margin-top: 12px;
}

.ask button {
  font-size: 14px;
}

.ask .reply {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.cook {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.list > li.cook {
  padding: 12px 16px;
}

.cook > div {
  min-width: 0;
}

.timer {
  flex: none;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 500;
}

.timer.soon {
  color: var(--ask-ink);
}

.timer.none {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.quote {
  font-size: 15px;
}

/* ------------------------------------------------ menu */

.week-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.week-head h2,
.road-head h2,
.section-h {
  font-size: 18px;
  font-weight: 600;
}

.dish-title {
  font-size: 16px;
  font-weight: 600;
}

.when {
  flex: none;
  font-size: 13px;
  color: var(--muted);
}

.when.dated {
  font-weight: 500;
  color: var(--ink);
}

.quiet > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
}

.page .list.quiet > li {
  padding: 12px 0;
}

.quiet button {
  font-size: 14px;
  padding: 0 14px;
}

details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.pantry li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------ recipe */

.road {
  padding: 20px 24px 8px;
}

.road-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}

.steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.step {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.step > div {
  flex: 1;
  min-width: 0;
}

.dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
}

.dot.done {
  background: var(--ink);
}

.dot.not_yet {
  border: 1.5px solid var(--notyet);
}

.dot.not_sure {
  border: 1.5px dashed var(--unsure);
}

.state {
  font-size: 13px;
  color: var(--muted);
}

.state.done {
  font-weight: 500;
  color: var(--ink);
}

.state.not_sure {
  font-weight: 500;
  color: var(--ask-ink);
}

.meet {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 18px 24px;
  background: var(--meet-bg);
  color: var(--meet-ink);
  border-radius: 12px;
}

.meet h2 {
  font-size: 18px;
  font-weight: 600;
}

.meet p {
  font-size: 15px;
  color: var(--meet-muted);
}

.strip-box {
  overflow-x: auto;
  margin-top: 14px;
}

.strip {
  min-width: 560px;
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 10px;
  column-gap: 12px;
  align-items: center;
}

.strip-name {
  font-size: 14px;
  font-weight: 500;
}

.track {
  position: relative;
  height: 36px;
}

.axis {
  position: relative;
  height: 20px;
}

.tick {
  position: absolute;
  top: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.tick.first {
  font-weight: 500;
  color: var(--ink);
}

.tick.end {
  font-weight: 500;
  color: var(--ink);
  transform: translateX(-100%);
}

.tick.mid {
  transform: translateX(-50%);
}

.bar {
  position: absolute;
  top: 0;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar.cook {
  background: var(--accent);
  color: var(--accent-ink);
}

.bar.cook.long {
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}

.bar.rest {
  justify-content: center;
  border: 1.5px dashed var(--accent);
  color: var(--accent-soft-ink);
  font-weight: 400;
}

.late {
  font-size: 13px;
  color: var(--ask-ink);
}

/* ------------------------------------------------ sign-in and consent */

.signin,
.consent {
  max-width: 440px;
  margin: 12vh auto 0;
  padding: 0 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.signin .card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  word-break: break-all;
}

.settings section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.settings section > * + * {
  margin-top: 10px;
}

.flash {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  z-index: 10;
}

/* ------------------------------------------------ what changed */

.filters {
  position: static;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.diff {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.diff .k {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}
