/* Demo theme: "newsroom daybook". Loaded only in dist-demo (scripts/demo-archivos.mjs).
   Black on white, one red for what is due, the day as a list ordered by time.
   Urgency also shows in type weight: u1 today, u2 this week, u3 later. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --raised: #F2F2F2;
  --line: #E2E2E2;
  --text: #111111;
  --muted: #6B6B6B;
  --blue: #1F4FB0;
  --red: #D7261E;
  --kraft: #111111;
  --kraft-ink: #FFFFFF;
  --ok: #1E7A3C;
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Archivo", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
::selection { background: var(--red); color: #fff; }
body { font: 400 17px/1.5 var(--display); background: var(--bg); }
b, strong { font-weight: 800; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.small { font-size: 14px; }
.muted { color: var(--muted); }

/* Shell: thick black rules top and bottom, like the daybook's masthead. */
.top { background: var(--bg); border-bottom: 4px solid var(--text); }
.logo { font-weight: 800; letter-spacing: .01em; font-size: 22px; }
.top h1 { font-size: 16px; color: var(--text); font-weight: 700; }
.lang { background: none; border: 0; border-radius: 0; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; padding: 6px 4px; min-height: 34px; }
.bottom { background: var(--bg); border-top: 4px solid var(--text); padding-left: 4px; padding-right: 4px; }
.bottom button, .bottom > button { font-size: 12px; color: var(--muted); padding: 6px 0; min-width: 0; }
.bottom button[aria-current="page"] { color: var(--text); font-weight: 800; }
.bottom button[aria-current="page"] .ico, .side button[aria-current="page"] .ico { color: var(--red); }
.ico svg { display: block; }
.center { gap: 6px; padding: 0 2px; }
.cbtn { font-size: 13px; color: var(--text); font-weight: 700; }
.bottom .add, .side .add { background: var(--red); color: #fff; }
.bottom .add, .bottom .mic { width: 52px; height: 52px; }
.mic, .bottom .mic, .side .mic { background: var(--text); color: #fff; }
.mic.on, .bottom .mic.on, .side .mic.on { background: var(--red); color: #fff; }
.count { background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.side { background: var(--bg); border-right: 4px solid var(--text); }
.side button { color: var(--muted); }
.side button[aria-current="page"] { background: var(--raised); color: var(--text); font-weight: 800; }

/* Type scale: 34 / 22 / 17 / 14. Section heads are small, bold, letterspaced. */
h2 { font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-top: 8px; }
.intro { font-size: 15px; max-width: 60ch; }
.view { gap: 22px; max-width: 760px; }

/* Today: the black block says how many things are due, before anything else. */
.hero-due { background: var(--text); color: #fff; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero-due .date { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #BDBDBD; }
.hero-due .head { margin: 0; font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.hero-due .head span { color: #FF5A4E; }
.hero-due .sub { margin: 0; font-size: 16px; color: #DADADA; }
.brief { background: var(--bg); color: var(--text); border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; gap: 8px; }
.brief p { font-family: var(--display); font-size: 17px; }
.brief .date { display: none; }

/* Lists: rules between rows, no boxes. */
.list { background: var(--bg); border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.row { padding: 14px 0; gap: 14px; border-top: 0; border-bottom: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .title { font-size: 18px; line-height: 1.25; font-weight: 600; }
.row .title.u1 { font-size: 20px; font-weight: 800; }
.row .title.u2 { font-weight: 600; }
.row .title.u3 { font-weight: 400; color: var(--muted); }
.row .body { font-family: var(--display); font-size: 17px; }
.when { font-size: 15px; color: var(--muted); min-width: 78px; }
.when b { font-size: 16px; font-weight: 800; color: var(--text); }
.chips { gap: 8px; }
.chip { font-size: 14px; padding: 3px 10px; color: var(--muted); border-color: var(--line); }
.chip.red { background: none; border: 0; padding: 3px 0; color: var(--red); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.chip.blue { background: #EAF0FB; color: #1A4592; }
.chip.kraft { background: var(--raised); color: var(--text); }
.chip.ok { background: #E6F3EA; color: #1B6B35; }
button.chip { min-height: 32px; }
.state { min-height: 40px; font-size: 13px; font-weight: 700; color: var(--muted); border: 1.5px solid var(--line); }
.state.st-en_proceso { background: #EAF0FB; color: #1A4592; }
.state.st-terminada { background: #E6F3EA; color: #1B6B35; }

/* Buttons: every action is a real tap target. */
.btn { min-height: 44px; padding: 9px 16px; font-size: 15px; font-weight: 700; border-radius: 0; background: var(--bg); border: 2px solid var(--text); }
.btn.tiny { min-height: 40px; padding: 7px 14px; font-size: 15px; }
.btn.primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn.red { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.actions { gap: 10px; }
.add-open { align-self: flex-start; background: var(--text); color: #fff; border-color: var(--text); }

/* Forms */
.form { background: var(--raised); border: 0; border-radius: 0; padding: 14px; }
.field label { font-size: 14px; color: var(--text); font-weight: 700; }
input[type="text"], input[type="url"], input[type="date"], input[type="time"], input[type="email"], select, textarea {
  background: #fff; border: 1.5px solid #BDBDBD; border-radius: 0; min-height: 44px; font-size: 16px;
}
input::placeholder, textarea::placeholder { color: #767676; }
select { color: var(--text); }

/* Cards and tabs */
.card { border-radius: 0; border: 0; border-top: 4px solid var(--text); background: var(--bg); padding: 12px 0 14px; }
.card h4 { font-size: 20px; font-weight: 800; }
.card.quiet { border-top-style: dashed; border-top-color: var(--muted); }
.tabs { border-bottom: 2px solid var(--text); }
.tabs button { font-size: 16px; padding: 10px 12px; min-height: 44px; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom: 4px solid var(--red); font-weight: 800; }

/* Radar lead: the date lives on its calendar button; actions in two rows. */
.lead .chips .chip.red { display: none; }
.lead .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 4px; }
.lead .actions .btn.red { grid-column: 1 / -1; justify-self: start; background: var(--bg); color: var(--red); border: 2px solid var(--red); }
.lead .actions select { min-width: 0; }
.lead .body { font-size: 18px; line-height: 1.35; }

/* Surfaces */
.demo-banner { background: var(--raised); border: 0; border-radius: 0; color: var(--text); font-size: 15px; max-width: 70ch; }
.notice { border: 0; background: var(--raised); color: var(--muted); border-radius: 0; }
.sheet { background: var(--bg); border-color: var(--line); border-radius: 0; border-top: 4px solid var(--text); }
.capbtns button, .capbtns label { background: var(--raised); border: 0; border-radius: 0; min-height: 56px; font-size: 15px; font-weight: 700; }
.capbtns .rec { background: var(--red); color: #fff; }
.toast { background: var(--text); color: #fff; border-radius: 0; }
.transcript { border-left: 1px solid var(--blue); }
.draft { background: var(--bg); font-family: var(--display); border-radius: 0; }
.draft blockquote { background: var(--raised); }

/* Five equal tabs; Note and Voice float on the right, above the bar. */
.bottom { grid-template-columns: repeat(5, 1fr); }
.fabs { position: fixed; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; align-items: center; z-index: 11; }
.fab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--text); }
.fab span { background: rgba(255,255,255,.92); padding: 0 4px; }
.bottom .fab .add, .bottom .fab .mic { width: 58px; height: 58px; border-radius: 50%; margin: 0; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.22); font-size: 0; }
.bottom .fab .add { background: var(--red); color: #fff; }
.bottom .fab .mic { background: var(--text); color: #fff; }
.bottom .fab .mic.on { background: var(--red); }
.bottom .fab .rec-time { font-size: 14px; }
.main { padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 90px; left: 16px; transform: none; }

@media (min-width: 900px) {
  .main { padding-bottom: 24px; }
  .toast { left: 50%; right: auto; transform: translateX(-50%); }
  .hero-due .head { font-size: 44px; }
  .side .mic.wide { background: var(--text); color: #fff; }
}
