/* Los mismos tokens que la app (docs/DISENO.md, res/values y values-night). */
:root {
  --primary: #315E50; --on-primary: #FFFFFF;
  --bg: #F6F4EF; --surface: #FFFDF8; --surface-high: #EAECE4;
  --text: #252B29; --muted: #59635D; --selected: #DCE9E0;
  --error: #9B4030; --hero: #23483B; --hero-text: #FFF9EC; --divider: #CDD4CB;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #BBD1C3; --on-primary: #17392D;
    --bg: #151D19; --surface: #1E2923; --surface-high: #2B3730;
    --text: #ECEFE8; --muted: #B7C2B9; --selected: #294A3D;
    --error: #FFB4A1; --hero: #284C3F; --hero-text: #FFF9EC; --divider: #414F45;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
a { color: var(--primary); }
h1, h2 { font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hero { background: var(--hero); color: var(--hero-text); border-radius: 28px; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font: 500 30px/38px Georgia, "Noto Serif", serif; }
.glyph { width: 35px; height: 36px; }
.count { margin: 8px 0 0; font-size: 22px; }

.chips { display: flex; gap: 8px; margin: 12px 0; }
.chip {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--divider);
  color: var(--text); text-decoration: none; font-size: 14px;
}
.chip[aria-current] { background: var(--selected); border-color: transparent; }

.card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: 20px;
  padding: 16px; margin: 8px 0 16px;
}
.empty h2 { font: 24px/32px Georgia, "Noto Serif", serif; margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0; }

input, button { font: inherit; color: inherit; }
input[type=text], input:not([type]), input[type=password], input[type=date] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--divider); background: var(--bg);
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.when { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.when .date { flex: 1 1 160px; }
button {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--divider);
  background: var(--surface-high); cursor: pointer; min-height: 40px;
}
button.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
button.link { background: none; border: none; color: var(--primary); padding: 0; min-height: 0; text-decoration: underline; }

h2 { font-size: 17px; margin: 16px 0 4px; }
h2.overdue { color: var(--error); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--divider); gap: 4px; }
.check { margin: 0; }
.box {
  width: 40px; height: 40px; padding: 0; border: none; background: none; border-radius: 6px;
  display: grid; place-items: center; min-height: 0;
}
.box::before {
  content: ""; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 2px;
}
.box.done::before {
  background: var(--primary); border-color: var(--primary);
}
.box { position: relative; }
.box.done::after { content: "✓"; position: absolute; color: var(--on-primary); font-size: 14px; font-weight: 700; }
.title {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); text-decoration: none; padding: 8px 0 8px 4px; font-size: 15px;
}
a.title:hover { text-decoration: underline; }
.title.done { text-decoration: line-through; color: var(--muted); }
.meta { color: var(--primary); font-size: 13px; padding: 0 4px 0 8px; white-space: nowrap; }
.editor .meta { color: var(--muted); padding: 0; margin: 4px 0 8px; }
.editor h1 { font: 24px/32px Georgia, "Noto Serif", serif; margin: 0 0 12px; }
.editor label, .login label { display: block; font-size: 14px; margin: 12px 0 4px; color: var(--muted); }
.login button { margin-top: 12px; }
.error { color: var(--error); }

footer { margin-top: 32px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
footer p { margin: 0; }

@media (max-width: 480px) {
  .brand h1 { font-size: 26px; }
  .count { font-size: 18px; }
}
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; }
footer a { color: var(--primary); }
.connect h2 { margin: 0 0 6px; font-size: 18px; }
.connect p { margin: 0 0 12px; color: var(--muted); }
a.button {
  display: inline-block; padding: 9px 16px; border-radius: 20px; text-decoration: none;
  background: var(--primary); color: var(--on-primary);
}
.steps { padding-left: 20px; margin: 0 0 8px; }
.steps li { margin: 4px 0; }
