
:root {
    --bg:#f4f6f4;
    --paper:#fff;
    --ink:#23312d;
    --muted:#62716b;
    --green:#236c58;
    --light:#e5f1eb;
    --line:#dce4df;
    --sand:#f8f1e6;
    --brown:#885e29
}
* {
    box-sizing:border-box
}
body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font:15px/1.5 system-ui,-apple-system,sans-serif
}
main {
    max-width:1200px;
    margin:auto;
    padding:24px
}
header {
    background:#193c33;
    color:white;
    border-radius:24px;
    padding:28px;
    display:flex;
    justify-content:space-between;
    gap:20px;
    flex-wrap:wrap
}
h1 {
    font-size:clamp(32px,5vw,54px);
    line-height:1;
    margin:12px 0
}
h2 {
    font-size:20px;
    margin:0 0 12px
}
h3 {
    font-size:16px;
    margin:0
}
p {
    margin:5px 0 12px
}
.eyebrow {
    font-size:11px;
    letter-spacing:2px;
    text-transform:uppercase;
    font-weight:700
}
.muted {
    color:var(--muted)
}
header .muted {
    color:#b6d2c8
}
.chip {
    border:1px solid #7c9b8f;
    border-radius:100px;
    padding:7px 13px;
    align-self:flex-start
}
.tabs,.days,.tools {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin:16px 0
}
button,.btn,select {
    font:inherit;
    border:1px solid var(--line);
    background:white;
    border-radius:10px;
    padding:9px 14px;
    color:var(--ink);
    cursor:pointer;
    text-decoration:none;
    display:inline-block
}
button.active,.primary {
    background:var(--green);
    color:white;
    border-color:var(--green)
}
button:focus-visible,a:focus-visible {
    outline:3px solid #9bbeb0;
    outline-offset:2px
}
.grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px
}
.card {
    background:var(--paper);
    border:1px solid var(--line);
    border-radius:18px;
    padding:18px;
    min-width:0
}
.metric {
    font-size:32px;
    font-weight:700;
    line-height:1.2
}
.bar {
    height:9px;
    background:#e9eeeb;
    border-radius:8px;
    overflow:hidden;
    margin:10px 0
}
.bar>div {
    height:100%;
    background:var(--green);
    transition:width .25s
}
.person-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px
}
.task {
    display:grid;
    grid-template-columns:26px minmax(0,1fr);
    gap:10px;
    border-top:1px solid var(--line);
    padding:13px 0;
    align-items:start
}
.task input {
    width:21px;
    height:21px;
    accent-color:var(--green);
    margin:2px 0
}
.task.done h3 {
    color:var(--green)
}
.task.done {
    background:#f5fbf7
}
.task p {
    font-size:13px;
    color:var(--muted);
    margin:3px 0
}
.meta {
    font-size:11px;
    letter-spacing:.4px;
    font-weight:700;
    color:var(--green);
    text-transform:uppercase
}
.optional {
    color:var(--brown)
}
.alert {
    background:var(--sand);
    border:1px solid #ebd6b5;
    border-radius:13px;
    padding:14px;
    margin:15px 0;
    color:#624b2d
}
.section {
    margin-top:20px
}
textarea {
    font:inherit;
    width:100%;
    min-height:80px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:10px;
    resize:vertical
}
table {
    width:100%;
    border-collapse:collapse;
    font-size:13px
}
th,td {
    border-bottom:1px solid var(--line);
    text-align:left;
    padding:10px 5px
}
td:nth-child(n+2),th:nth-child(n+2) {
    text-align:center
}
.mini {
    font-size:12px
}
.week {
    overflow:auto
}
.hidden {
    display:none
}
details {
    margin-top:12px
}
summary {
    cursor:pointer;
    font-weight:600
}
footer {
    margin:25px 0;
    color:var(--muted);
    font-size:12px
}
.pill {
    border-radius:30px;
    background:var(--light);
    padding:3px 8px;
    font-size:11px;
    white-space:nowrap
}
.row {
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center
}
.hint {
    font-size:12px;
    color:var(--muted)
}
@media(max-width:700px) {
    main {
    padding:12px
}
header {
    padding:20px;
    border-radius:18px
}
.grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
}
.grid>.card:first-child {
    grid-column:1/-1
}
.person-grid {
    grid-template-columns:1fr
}
.card {
    padding:14px
}
.tabs button,.days button {
    padding:7px 10px
}
.metric {
    font-size:27px
}

}
@media print {
    .tools,.tabs,.days,button {
    display:none
}
body {
    background:white
}
.card {
    break-inside:avoid
}

}


input:disabled,textarea:disabled,select:disabled {
    opacity:.75;
    cursor:not-allowed
}
 .calendar-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:12px
}
.calendar-grid label {
    display:grid;
    gap:5px
}
.calendar-grid input {
    font:inherit;
    padding:8px;
    border:1px solid var(--line);
    border-radius:8px
}
 #sync {
    position:sticky;
    top:0;
    z-index:3;
    background:#f4f6f4;
    padding:8px 0
}
 [hidden] {
    display:none!important
}


/* Estructura v2: misma paleta, controles accesibles y navegación móvil. */
.site-header, #desktop-nav, #sync, footer {
    max-width: 1200px;
    margin: 16px auto;
}
.site-header { border-radius: 0 0 24px 24px; }
main { padding-top: 8px; }
#sync { padding: 8px 16px; min-height: 44px; }
button, .btn, select, input:not([type=checkbox]), summary {
    min-height: 44px;
}
input, select, textarea { font: inherit; }
input:not([type=checkbox]), select {
    max-width: 100%;
    padding: 10px;
    border: 1px solid #889d93;
    border-radius: 10px;
    background: white;
    color: var(--ink);
}
form > label, .card > label, .calendar-grid label { display: grid; gap: 5px; margin: 12px 0; }
form > button { margin-top: 12px; }
label.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }
fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
legend { font-weight: 600; }
fieldset:disabled { opacity: .8; }
.task strong, .task .detail { display: block; }
.task .detail { font-size: 13px; color: #52625a; white-space: pre-wrap; }
.task input { margin-top: 10px; }
:focus-visible { outline: 3px solid #236c58; outline-offset: 3px; }
header :focus-visible { outline-color: white; }
.btn.active { background: var(--green); color: white; }
button:disabled { cursor: wait; opacity: .65; }
progress { display: block; width: 100%; height: 12px; margin: 12px 0; border: 0; border-radius: 8px; accent-color: var(--green); background: var(--light); }
progress::-webkit-progress-bar { background: var(--light); border-radius: 8px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 8px; }
a { color: #17513f; }
.auth { max-width: 480px; margin: 24px auto; }
.auth input:not([type=checkbox]) { width: 100%; }
.honeypot { position: absolute; left: -10000px; }
.danger { color: #982d24; border-color: #982d24; }
.invitation { margin-bottom: 20px; border: 2px solid var(--green); }
.history-row { border-bottom: 1px solid var(--line); padding: 12px 0; }
dt { font-weight: 700; margin-top: 12px; }
dd { margin-left: 0; white-space: pre-wrap; }
li { margin: 10px 0; }
dialog { width: min(90vw, 480px); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
dialog::backdrop { background: #193c3380; }
#more-nav { display: grid; gap: 8px; margin: 12px 0; }
#mobile-nav { display: none; }
.skip { position: absolute; left: -10000px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; padding: 12px; background: white; }
footer { padding: 12px; }
@media (max-width: 700px) {
    body { padding-bottom: 80px; }
    #desktop-nav { display: none; }
    #mobile-nav { display: flex; position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
    #mobile-nav > * { flex: 1; display: grid; place-items: center; min-height: 60px; text-decoration: none; padding: 4px; font-size: 13px; }
    #mobile-nav [aria-current] { color: white; background: var(--green); }
    .row { flex-wrap: wrap; }
    .site-header { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
