/* éepa Studio: colours from the éepa web palette (marca.json → colores_web) */
:root {
  --paper: #F3ECDF; --label: #FBF7EE; --espresso: #1D1915; --muted: #6D6457;
  --rust: #C4632C; --rust-deep: #9C4720; --kraft: #C9A574; --leaf: #2F5D3A;
  --line: #E2D7C3; --err: #A33A2A;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--espresso);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--rust-deep); }
h1, h2, .brand { font-family: "Bowlby One", -apple-system, sans-serif; font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 26px; line-height: 1.15; margin: 8px 0 6px; }
h2 { font-size: 17px; margin: 26px 0 10px; color: var(--muted); text-transform: lowercase; }
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }

.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 22px; color: var(--rust); text-decoration: none; }
.brand span { color: var(--espresso); font-size: 15px; }
.back { font-size: 22px; text-decoration: none; color: var(--espresso); padding: 0 4px; }
.mac { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.on { background: #3D9A5B; } .dot.off { background: #C9B8A0; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex;
  background: var(--label); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a { flex: 1; text-align: center; padding: 14px 4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a.on { color: var(--rust); }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.big {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 14px; border-radius: var(--r);
  background: var(--espresso); color: var(--paper); text-decoration: none; font-weight: 700; font-size: 16px;
}
.big span { font-size: 26px; }
.big + .big { background: var(--rust); }

.card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 8px;
  background: var(--label); border: 1px solid var(--line); border-radius: var(--r);
  color: inherit; text-decoration: none;
}
.card.cur { border-color: var(--rust); }
.card-main { flex: 1; min-width: 0; }
.card-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-main small, .meta, .muted, small { color: var(--muted); }
.st { flex: none; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: #EADFCB; }
.st-running { background: #F6D9B8; color: var(--rust-deep); }
.st-done { background: #D5E6D2; color: var(--leaf); }
.st-error { background: #F2D0C8; color: var(--err); }

.form, .login, .fb, .changes { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.login { max-width: 360px; margin: 12vh auto 0; }
label, .field, fieldset { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend, .lbl { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
input, select, textarea, button {
  font: inherit; font-size: 16px; color: inherit; border-radius: 12px;
}
input:not([type=radio]), select, textarea {
  width: 100%; padding: 12px; background: var(--label); border: 1px solid var(--line); font-weight: 400;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--kraft); border-color: transparent; }
button {
  padding: 14px 18px; border: 0; background: var(--rust); color: #fff; font-weight: 700; cursor: pointer;
}
button:active { background: var(--rust-deep); }
button.ghost { background: transparent; color: var(--espresso); border: 1px solid var(--line); }
button.link { background: none; border: 0; padding: 0; color: var(--rust-deep); font-weight: 600; text-align: left; text-decoration: underline; }

.seg { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.seg legend { width: 100%; }
.seg label, .thumbs label { flex: 1; }
.seg input, .thumbs input, .pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .thumbs span {
  display: block; text-align: center; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--label); font-weight: 600; font-size: 14px;
}
.seg input:checked + span, .thumbs input:checked + span { border-color: var(--rust); background: #F6E2D2; }
.thumbs { display: flex; gap: 10px; }
.thumbs span { font-size: 26px; padding: 8px; }
.pick span { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--label); }
.pick span strong { display: block; font-size: 15px; word-break: break-all; }
.pick span small { font-weight: 400; }
.pick input:checked + span { border-color: var(--rust); background: #F6E2D2; }
.pick.wait span { opacity: .55; }
.pick input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--kraft); }

.ideas { font-size: 14px; margin-top: -6px; }
.ideas summary { color: var(--rust-deep); font-weight: 600; cursor: pointer; }
.ideas ul { padding-left: 18px; margin: 8px 0 0; } .ideas li { margin: 6px 0; }

.working { text-align: center; padding: 28px 10px 18px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--rust); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { background: #F7E1DA; border-radius: var(--r); padding: 12px 14px; margin: 12px 0; }
.errbox p { margin: 6px 0 0; white-space: pre-wrap; }
.err { color: var(--err); font-weight: 600; margin: 0; } .ok { color: var(--leaf); font-weight: 600; }
.note { background: var(--label); border-left: 3px solid var(--kraft); padding: 10px 12px; border-radius: 8px; font-size: 14px; }

.script, .summary {
  background: var(--label); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; margin: 12px 0; white-space: normal; overflow-wrap: anywhere;
}
.script { font-size: 15.5px; }
.preview { width: 100%; max-height: 72vh; background: #000; border-radius: var(--r); margin: 12px 0 6px; }
.path { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.path code { font-size: 13px; background: var(--label); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.asked { font-size: 14px; margin: 6px 0 4px; }
.asked summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.asked dl { margin: 8px 0 0; } .asked dt { font-weight: 700; margin-top: 6px; } .asked dd { margin: 0; overflow-wrap: anywhere; }
.fb, .changes { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.filters { display: flex; gap: 8px; margin: 6px 0 14px; }
.filters a { padding: 7px 14px; border-radius: 99px; background: var(--label); border: 1px solid var(--line); color: var(--espresso); text-decoration: none; font-size: 14px; font-weight: 600; }
.filters a.on { background: var(--espresso); color: var(--paper); border-color: var(--espresso); }
.foot { margin-top: 28px; text-align: center; font-size: 14px; }
