:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
  --background: #eef3f4;
  --surface: #fff;
  --ink: #18272c;
  --border: #bdcbd0;
  --accent: #006656;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #111a1e;
    --surface: #1c282e;
    --ink: #edf5f5;
    --border: #4c636b;
    --accent: #80e4cb;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111a1e;
  --surface: #1c282e;
  --ink: #edf5f5;
  --border: #4c636b;
  --accent: #80e4cb;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; padding: 1rem clamp(1rem, 4vw, 4rem); background: var(--surface); border-bottom: 1px solid var(--border); }
header strong { font-size: 1.2rem; }
nav { display: flex; flex: 1; flex-wrap: wrap; gap: .8rem; }
a { color: var(--accent); }
.workspace { max-width: 76rem; margin: auto; padding: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
#resumen, #message { grid-column: 1 / -1; }
#message:empty { display: none; }
section, .login main { padding: clamp(1rem, 2.5vw, 2rem); border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); }
h1, h2 { margin-top: 0; }
form, label:not(.checkbox) { display: grid; gap: .5rem; }
form { gap: .9rem; }
input:not([type=checkbox]), textarea, select { width: 100%; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: .65rem; font: inherit; }
button { justify-self: start; border: 1px solid var(--accent); border-radius: .55rem; padding: .6rem .85rem; background: var(--accent); color: var(--surface); font: inherit; cursor: pointer; }
button.secondary { background: var(--surface); color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
ul { padding-left: 1.2rem; }
li { margin-block: .4rem; }
li button { margin: .15rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login main { width: min(100%, 28rem); }
@media (max-width: 750px) { .workspace { grid-template-columns: minmax(0, 1fr); } }
