:root {
    color-scheme: light;
    --ink: #1c1915;
    --ink-soft: #655e55;
    --paper: #f4efe6;
    --sheet: #fffdf8;
    --line: #eadfce;
    --rule: rgba(86, 126, 176, 0.16);
    --margin: #c44536;
    --pine: #1d4a38;
    --pine-deep: #143528;
    --moss: #e6f2eb;
    --clay: #8a5730;
    --sand: #f3e6d2;
    --shadow: 0 12px 32px rgba(70, 48, 24, 0.06);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.45;
    background: var(--paper);
}

body.sheet {
    padding-left: 14px;
    background-color: #f3eee4;
    background-image:
        linear-gradient(90deg, var(--margin) 0 7px, transparent 7px),
        repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
    background-attachment: fixed;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap {
    width: min(1040px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.4rem 0 3.5rem;
}
.banner {
    width: min(1040px, calc(100% - 2rem));
    margin: 0.85rem auto 0;
}
.wrap-narrow { width: min(720px, calc(100% - 2rem)); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 238, 228, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(28, 25, 21, 0.08);
}
.topbar-inner {
    width: min(1040px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}
.brand-mark {
    width: 28px;
    height: 34px;
    border-radius: 2px 5px 5px 2px;
    background:
        linear-gradient(#c44536, #c44536) 0 0 / 4px 100% no-repeat,
        repeating-linear-gradient(to bottom, transparent 0 6px, rgba(86, 126, 176, 0.35) 6px 7px),
        #fffdf8;
    border: 1px solid #e4d7c4;
    box-shadow: 2px 2px 0 rgba(28, 25, 21, 0.05);
}
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: auto;
}
.nav-link {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    color: var(--ink);
    font-size: 0.92rem;
}
.nav-link:hover { background: rgba(255, 253, 248, 0.8); }
.nav-link.is-active { background: var(--pine); color: #f7f3ea; }
.nav-link.publish {
    border: 1px solid var(--pine);
    color: var(--pine);
}
.nav-link.publish:hover { background: var(--moss); }
.session {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.who { text-align: right; line-height: 1.2; }
.who-name { margin: 0; font-weight: 600; font-size: 0.92rem; }
.who-role { margin: 0.1rem 0 0; color: var(--ink-soft); font-size: 0.78rem; }

.kicker {
    margin: 0;
    color: var(--clay);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
h1, .title {
    margin: 0.2rem 0 0;
    font-family: var(--serif);
    font-weight: 560;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.035em;
    line-height: 1.02;
}
.lede { margin: 0.55rem 0 0; color: var(--ink-soft); max-width: 36rem; }
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.panel, .note, .login-card {
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.panel { border-radius: 16px; padding: 1.15rem 1.2rem 1.25rem; }
.note {
    border-left: 4px solid var(--margin);
    border-radius: 3px 16px 16px 3px;
    padding: 1.05rem 1.15rem 1rem;
}
.feed { display: flex; flex-direction: column; gap: 0.85rem; }
.note h2 {
    margin: 0.4rem 0 0;
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 560;
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.note h2 a { text-decoration: none; }
.note h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.byline, .meta { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.88rem; }
.note-body {
    margin: 0.75rem 0 0;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prose {
    margin: 1.1rem 0 0;
    white-space: pre-line;
    font-size: 1.08rem;
    line-height: 1.6;
}
.note-actions, .row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.95rem;
}
.when { margin: 0.55rem 0 0; font-size: 0.92rem; }

.stamp, .pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.stamp { border: 1.5px solid currentColor; }
.stamp-anuncio { color: var(--pine); background: var(--moss); }
.stamp-evento { color: var(--clay); background: #f8ecdc; }
.stamp-tarea { color: var(--ink); background: #efe6d4; }
.pill-ok { color: var(--pine); background: var(--moss); }
.pill-wait { color: var(--clay); background: #f8ecdc; }
.pill-off { color: var(--ink-soft); background: #efe8dc; }
.note-top, .card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}
.quiet { color: var(--ink-soft); font-size: 0.82rem; }

.meter { margin-top: 0.9rem; }
.meter-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
}
.meter-track {
    margin-top: 0.35rem;
    height: 7px;
    border-radius: 99px;
    background: #efe3d0;
    overflow: hidden;
}
.meter-fill { height: 100%; background: var(--pine); border-radius: inherit; }
.percent {
    margin: 0;
    font-family: var(--serif);
    font-size: 2.6rem;
    letter-spacing: -0.04em;
    line-height: 1;
}
.signed { margin: 0; color: var(--pine); font-weight: 600; }
.is-yes { color: var(--pine); font-weight: 600; }
.is-no { color: var(--margin); font-weight: 600; }
.back { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.back:hover { color: var(--ink); }
.empty { margin-top: 1.2rem; color: var(--ink-soft); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
}
.btn-primary { background: var(--pine); color: #f7f3ea; }
.btn-primary:hover { background: var(--pine-deep); }
.btn-ink { background: var(--ink); color: #f7f3ea; }
.btn-ink:hover { background: #000; }
.btn-ghost { border-color: #d9cdb8; background: rgba(255, 253, 248, 0.7); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.linkish { color: var(--ink-soft); font-size: 0.9rem; }

.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.4rem; align-items: start; }
.field { display: block; font-size: 0.92rem; }
.field > span, .check span { font-weight: 500; }
.field input, .field select, .field textarea, .inline-field input, .inline-field select {
    width: 100%;
    margin-top: 0.3rem;
    border: 1px solid #e0d3bf;
    background: #fbf7f0;
    border-radius: 12px;
    padding: 0.62rem 0.75rem;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.inline-field input:focus, .inline-field select:focus {
    outline: 2px solid rgba(29, 74, 56, 0.28);
    border-color: var(--pine);
    background: white;
}
.field-error { margin: 0.3rem 0 0; color: var(--margin); font-size: 0.84rem; }
.check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; }
.check input { width: 1rem; height: 1rem; accent-color: var(--pine); }
.filters { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: flex-end; margin: 1rem 0 1.1rem; }
.inline-field { font-size: 0.88rem; font-weight: 600; }
.inline-field input, .inline-field select { font-weight: 450; }

.flash { margin: 0 0 0.4rem; border-radius: 12px; padding: 0.75rem 0.9rem; }
.flash-ok { background: var(--moss); color: var(--pine); }
.flash-error { background: #fdeceb; color: var(--margin); }

.table-wrap { overflow-x: auto; margin-top: 0.8rem; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th {
    text-align: left;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 0.65rem 0.8rem;
}
table.data td {
    padding: 0.8rem;
    border-top: 1px solid var(--line);
    vertical-align: top;
}
table.data tr:hover td { background: rgba(243, 230, 210, 0.35); }
.sub { display: block; color: var(--ink-soft); font-size: 0.8rem; font-weight: 450; }
.late { margin: 0.25rem 0 0; color: var(--margin); font-size: 0.78rem; }

.segment { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.seg {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #e4d7c4;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    background: white;
    cursor: pointer;
    font-size: 0.84rem;
}
.seg:has(input:checked) {
    background: var(--pine);
    border-color: var(--pine);
    color: #f7f3ea;
}
.seg input { accent-color: currentColor; }

.file input { margin-top: 0.35rem; }

.login-stage {
    min-height: 100vh;
    width: min(1040px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    padding: 2.5rem 0;
}
.login-mark {
    width: 74px;
    height: 92px;
    margin-bottom: 1.1rem;
    border-radius: 3px 10px 10px 3px;
    border: 1px solid #e4d7c4;
    background:
        linear-gradient(var(--margin), var(--margin)) 0 0 / 8px 100% no-repeat,
        repeating-linear-gradient(to bottom, transparent 0 15px, rgba(86, 126, 176, 0.28) 15px 16px),
        var(--sheet);
    box-shadow: 8px 10px 0 rgba(196, 69, 54, 0.08);
}
.login-card { border-radius: 18px; padding: 1.3rem 1.25rem 1.15rem; }
.login-card h2 {
    margin: 0 0 0.9rem;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 560;
    letter-spacing: -0.03em;
}
.demo { margin-top: 1.15rem; }
.demo p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.demo-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.65rem; }
.demo-btn {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: white;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}
.demo-btn:hover { border-color: var(--pine); }
.demo-btn strong { display: block; font-weight: 600; }
.demo-btn span { color: var(--ink-soft); font-size: 0.82rem; }

.acuse-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
}

@media (max-width: 860px) {
    .login-stage, .split, .grid-2 { grid-template-columns: 1fr; }
    .login-stage { gap: 1.2rem; padding-top: 1.4rem; }
    .who-role { display: none; }
    .topbar-inner { flex-wrap: wrap; padding: 0.7rem 0; }
    .nav { order: 3; width: 100%; margin-left: 0; }
}
