/* Day Brief — 240×282. Page chrome never scrolls; focus moves by wheel. */

:root {
  --ink: #f4efe4;
  --ink-dim: rgba(244, 239, 228, 0.28);
  --mute: #8a8376;
  --rule: #2a2722;
  --bg: #12110f;
  --bg-row: #1a1815;
  --accent: #fe5000;
  --fail: #ffb4a2;
  --device-w: 240px;
  --device-h: 282px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #0b0b0b;
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

body.r1 {
  width: var(--device-w);
  height: var(--device-h);
  background: var(--bg);
}

#stage {
  width: var(--device-w);
  height: var(--device-h);
}

body.preview {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.preview #stage {
  width: auto;
  height: auto;
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

#device {
  width: var(--device-w);
  height: var(--device-h);
  overflow: hidden;
  background: var(--bg);
  position: relative;
  flex-shrink: 0;
}

body.preview #device {
  outline: 1px solid #2e2c28;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

#app {
  width: var(--device-w);
  height: var(--device-h);
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* —— Hero / scan —— */

.date-line {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-line .stale-mark {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: lowercase;
}

.status {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--mute);
  min-height: 0;
}

.status .fail {
  color: var(--fail);
  display: block;
}

.status .as-of {
  display: block;
}

.status button.refresh {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status button.refresh:focus {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.hero,
.scan {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  overflow: hidden;
}

.label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 3px;
}

.block {
  margin-bottom: 10px;
}

.next-line,
.prio-line,
.meet-line,
.empty-line {
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-line {
  font-size: 15px;
  font-weight: 650;
}

.next-line .t {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

.prio-line {
  font-size: 13px;
  padding: 2px 0;
}

.prio-line .n {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}

.peek {
  margin-top: auto;
  height: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.peek .hint {
  letter-spacing: 0.16em;
  font-size: 8px;
}

/* scan list */

.scan-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 6px 4px 8px;
  border-left: 2px solid transparent;
  color: var(--ink-dim);
  background: transparent;
}

.row .t {
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
  flex-shrink: 0;
}

.row .body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row.is-focus {
  color: var(--ink);
  background: var(--bg-row);
  border-left-color: var(--accent);
}

.row.is-focus .t,
.row.is-focus .n {
  color: var(--accent);
}

.row .n {
  width: 14px;
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.scan-meta {
  margin-top: auto;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--mute);
  padding-top: 6px;
}

/* harness lives outside the 240×282 device */

#harness {
  display: none;
  width: 220px;
  color: #c9c3b6;
  font-size: 12px;
  line-height: 1.45;
}

body.preview #harness {
  display: block;
}

#harness h2 {
  font-size: 13px;
  font-weight: 650;
  color: #f4efe4;
  margin-bottom: 6px;
}

#harness p {
  color: #8a8376;
  margin-bottom: 10px;
}

#harness label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0;
  cursor: pointer;
}

#harness button {
  margin-top: 10px;
  background: #2a2722;
  color: #f4efe4;
  border: 1px solid #3d3932;
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

#harness kbd {
  font-size: 10px;
  border: 1px solid #3d3932;
  padding: 0 4px;
  border-radius: 2px;
}
