:root {
    color-scheme: light;
    --bg: var(--identity-paper); --surface: var(--identity-light); --surface-strong: var(--identity-light); --sidebar: var(--identity-paper);
    --ink: var(--identity-ink); --muted: var(--identity-muted); --faint: #87928c; --line: var(--identity-line); --line-soft: #e9edea;
    --accent: var(--identity-accent); --accent-soft: #f8ddd5; --lime: #f0a202; --pink: #d95d39;
    --shadow: none;
    font-family: var(--identity-font);
    letter-spacing: -.02em;
}
:root[data-theme="dark"] {
    color-scheme: dark; --bg: #18211d; --surface: #202b26; --surface-strong: #26332d; --sidebar: #17201c;
    --ink: #ffffff; --muted: #bdc8c2; --faint: #89978f; --line: #394740; --line-soft: #2b3932;
    --accent: #e65f3d; --accent-soft: #5a3028; --shadow: none;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; overflow: hidden; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; } button { color: inherit; }
button, [contenteditable="true"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, [contenteditable="true"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { position: relative; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px; background: var(--sidebar); border-right: 1px solid var(--line); overflow: hidden; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 17px; }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; font-weight: 760; font-size: 18px; cursor: pointer; }
.brand-mark { display: inline-flex; align-items: center; gap: 3px; }
.brand-mark i { width: 7px; height: 7px; display: block; border-radius: 50%; background: var(--lime); }
.brand-mark i:nth-child(2) { background: var(--accent); } .brand-mark i:nth-child(3) { background: var(--pink); }
.brand-mark.large { justify-content: center; gap: 7px; margin-bottom: 24px; } .brand-mark.large i { width: 13px; height: 13px; }
.icon-button, .tiny-button, .view-button, .avatar { border: 0; background: transparent; cursor: pointer; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--muted); font-size: 19px; }
.icon-button:hover { background: var(--line-soft); color: var(--ink); } .icon-button:disabled { opacity: .35; cursor: default; }
.sidebar-close { display: none; }
.primary-nav { display: grid; gap: 3px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.primary-nav button, .sidebar-footer button { width: 100%; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 6px; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.primary-nav button:hover, .sidebar-footer button:hover { background: rgb(255 255 255 / 46%); color: var(--ink); }
:root[data-theme="dark"] .primary-nav button:hover, :root[data-theme="dark"] .sidebar-footer button:hover { background: rgb(255 255 255 / 6%); }
kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--faint); font: 10px ui-monospace, monospace; white-space: nowrap; }
.sidebar-section { padding-top: 18px; } .outline-section { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.section-label, .section-label-row { color: var(--faint); font-size: 10px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.section-label { padding: 0 10px 8px; } .section-label-row { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.section-label-row .section-label { padding-bottom: 8px; }
.tiny-button { width: 24px; height: 24px; border-radius: 7px; color: var(--muted); font-size: 18px; line-height: 1; }
.tiny-button:hover { background: var(--line-soft); }
.sidebar-list, .outline-tree { display: grid; gap: 2px; } .outline-tree { overflow: auto; padding-right: 4px; }
.sidebar-item { width: 100%; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.sidebar-item:hover, .sidebar-item.active { background: rgb(255 255 255 / 46%); color: var(--ink); }
:root[data-theme="dark"] .sidebar-item:hover, :root[data-theme="dark"] .sidebar-item.active { background: rgb(255 255 255 / 6%); }
.sidebar-item .side-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--faint); }
.sidebar-item .side-star { color: #cb9a34; } .sidebar-item .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-children { padding-left: 14px; } .empty-sidebar { padding: 5px 10px; color: var(--faint); font-size: 12px; }
.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-footer button { grid-template-columns: 24px 1fr; padding-block: 7px; font-size: 13px; }
.sidebar-footer p { margin: 8px 10px 0; color: var(--faint); font-size: 10px; }
.workspace { min-width: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); }
.topbar { height: 64px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 24px; border-bottom: 1px solid var(--line-soft); }
.menu-button { display: none; }
.breadcrumbs { min-width: 0; flex: 1; display: flex; align-items: center; overflow: hidden; color: var(--muted); font-size: 13px; }
.breadcrumbs button { max-width: 180px; padding: 6px 5px; overflow: hidden; border: 0; background: transparent; color: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.breadcrumbs button:hover { color: var(--ink); } .breadcrumbs .separator { color: var(--faint); padding: 0 2px; }
.topbar-actions { display: flex; align-items: center; }
.view-button { display: flex; align-items: center; gap: 7px; margin-left: 3px; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-size: 12px; }
.view-button:hover { background: var(--line-soft); color: var(--ink); }
.avatar { width: 32px; height: 32px; margin-left: 7px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 800; }
.search-panel { display: none; align-items: center; gap: 10px; margin: 18px auto 0; width: min(720px, calc(100% - 40px)); padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); box-shadow: 0 8px 30px rgb(42 37 30 / 8%); }
.search-panel.open { display: flex; }
.search-panel input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-panel kbd { margin-left: auto; }
.page { width: min(920px, 100%); min-height: 0; flex: 1; align-self: center; padding: 6vh clamp(26px, 7vw, 74px) 80px; overflow-y: auto; }
.page-header { margin-bottom: 34px; }
.page-kicker { display: block; margin-bottom: 11px; color: var(--accent); font-size: 11px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.page-title { min-height: 1.15em; margin: 0; border-radius: 7px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 64px); font-weight: 500; letter-spacing: -.045em; line-height: 1.04; }
.page-title[contenteditable="true"] { cursor: text; }
.page-subtitle { max-width: 630px; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.page-meta { display: flex; gap: 15px; margin-top: 17px; color: var(--faint); font-size: 11px; }
.content-area { position: relative; } .list-group { display: grid; gap: 1px; } .node-branch { position: relative; }
.node-row { position: relative; min-height: 39px; display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 7px; padding: 5px 4px 5px 0; border-radius: 9px; }
.node-row:hover, .node-row.selected { background: var(--line-soft); } .node-row.dragging { opacity: .42; } .node-row.drag-over { box-shadow: inset 0 -2px var(--accent); }
.bullet-button { width: 22px; height: 27px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.bullet-dot { width: 7px; height: 7px; border: 1.5px solid var(--muted); border-radius: 50%; transition: transform .15s, background .15s; }
.bullet-button:hover .bullet-dot { transform: scale(1.45); background: var(--accent); border-color: var(--accent); }
.node-main { min-width: 0; } .node-text { min-height: 27px; padding: 3px 3px 2px; border-radius: 7px; line-height: 1.45; }
.node-note { min-height: 23px; padding: 1px 3px 3px; border-radius: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.node-note:empty::before { content: "Añade una nota…"; color: var(--faint); }
.node-actions { display: flex; align-items: center; opacity: 0; transition: opacity .15s; }
.node-row:hover .node-actions, .node-row:focus-within .node-actions { opacity: 1; }
.node-action { min-width: 27px; height: 27px; display: inline-grid; place-items: center; padding: 0 5px; border: 0; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; font-size: 11px; }
.node-action:hover { background: var(--surface-strong); color: var(--ink); }
.children { margin-left: 11px; padding-left: 18px; border-left: 1px solid var(--line-soft); } .children.collapsed { display: none; }
.collapse-count { margin-left: 2px; padding: 1px 4px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 9px; }
.node-row[data-type="heading"] .node-text { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 600; }
.node-row[data-type="todo"] .bullet-dot { width: 12px; height: 12px; border-radius: 4px; }
.node-row[data-type="todo"].done .bullet-dot { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.node-row.done .node-text, .board-card.done .board-card-text { color: var(--faint); text-decoration: line-through; }
.empty-state { padding: 38px 20px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.empty-state .empty-dots { color: var(--accent); font-size: 25px; letter-spacing: 7px; }
.empty-state h2 { margin: 14px 0 7px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.new-item-button { display: flex; align-items: center; gap: 7px; margin-top: 18px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; }
.new-item-button:hover { background: var(--line-soft); color: var(--ink); }
.search-summary { margin-bottom: 22px; color: var(--muted); font-size: 13px; } .search-context { padding: 7px 3px 2px; color: var(--faint); font-size: 10px; }
.board { display: flex; align-items: flex-start; gap: 14px; margin-right: calc(clamp(26px, 7vw, 74px) * -1); padding: 3px 3px 24px; overflow-x: auto; }
.board-column { min-width: 245px; width: 245px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.board-column-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 3px 10px; }
.board-title { min-width: 0; flex: 1; border-radius: 4px; outline: 0; font-size: 12px; font-weight: 750; }
.board-count { color: var(--faint); font-size: 10px; } .card-list { min-height: 24px; display: grid; gap: 8px; }
.board-card { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-strong); box-shadow: 0 2px 8px rgb(30 26 20 / 4%); cursor: grab; }
.board-card:hover { border-color: var(--line); box-shadow: 0 5px 14px rgb(30 26 20 / 8%); } .board-card.dragging { opacity: .45; }
.board-card-text { min-height: 21px; outline: 0; font-size: 13px; line-height: 1.5; }
.board-card-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--faint); font-size: 10px; }
.board-add { width: 100%; margin-top: 8px; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); text-align: left; cursor: pointer; }
.board-add:hover { background: var(--line-soft); color: var(--ink); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 25px; padding: 9px 14px; transform: translate(-50%, 20px); border-radius: 9px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal { width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-strong); color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgb(20 18 15 / 38%); backdrop-filter: blur(5px); } .modal form { padding: 27px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal h2 { margin: 4px 0 22px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.shortcut-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px 20px; color: var(--muted); font-size: 13px; }
.modal-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11px; }
.about-modal { text-align: center; } .about-modal form { position: relative; padding: 52px 45px; }
.about-modal h2 { margin: 10px auto 14px; max-width: 390px; font-size: 35px; } .about-modal p { margin: 0 auto; max-width: 400px; color: var(--muted); line-height: 1.65; }
.modal-close { position: absolute; top: 15px; right: 15px; } .sidebar-scrim { display: none; }
@media (max-width: 820px) {
    .app-shell { display: block; } .sidebar { position: fixed; left: 0; top: 0; width: min(310px, 86vw); transform: translateX(-105%); box-shadow: 20px 0 60px rgb(20 18 15 / 18%); transition: transform .24s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); } .sidebar-close, .menu-button { display: inline-grid; }
    .sidebar-scrim { position: fixed; z-index: 15; inset: 0; background: rgb(20 18 15 / 28%); } body.sidebar-open .sidebar-scrim { display: block; }
    .topbar { padding: 0 12px; } .topbar-actions .icon-button:nth-child(-n+2) { display: none; } .view-button span:last-child { display: none; }
    .page { padding: 5vh 23px 70px; } .board { margin-right: -23px; }
}
@media (max-width: 520px) {
    .topbar { height: 58px; } .breadcrumbs button { max-width: 110px; } .page-title { font-size: 40px; } .page-subtitle { font-size: 14px; }
    .node-row { grid-template-columns: 22px 1fr; } .node-actions { grid-column: 2; justify-self: end; margin-top: -4px; opacity: .65; }
    .shortcut-grid { grid-template-columns: 1fr; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Compact infinite-outline presentation. */
.app-shell { grid-template-columns: 245px 1fr; }
.sidebar { padding: 12px 9px 10px; }
.brand-row { padding: 0 7px 10px; }
.brand { gap: 9px; font-size: 15px; font-weight: 680; }
.brand-mark i { width: 6px; height: 6px; }
.primary-nav { gap: 1px; padding-bottom: 11px; }
.primary-nav button, .sidebar-footer button { grid-template-columns: 21px 1fr auto; padding: 7px 9px; border-radius: 5px; }
.sidebar-section { padding-top: 14px; }
.section-label { padding: 0 9px 6px; }
.sidebar-item { padding: 6px 9px; border-radius: 5px; font-size: 13px; }
.sidebar-footer button { grid-template-columns: 21px 1fr; padding-block: 6px; }
.logout-form { margin: 0; }
.topbar { height: 49px; gap: 8px; padding: 0 18px; }
.page { width: min(820px, 100%); padding: 42px clamp(28px, 6vw, 66px) 80px; }
.page-header { margin-bottom: 22px; }
.page-kicker, .page-meta { display: none; }
.page-title { border-radius: 4px; font-family: inherit; font-size: clamp(27px, 4vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.18; }
.page-subtitle { margin-top: 7px; font-size: 13px; line-height: 1.5; }
.page-subtitle.is-placeholder { color: var(--faint); }
.node-row { min-height: 31px; grid-template-columns: 20px 1fr auto; gap: 5px; padding: 2px 3px 2px 0; border-radius: 4px; }
.bullet-button { width: 20px; height: 27px; }
.bullet-dot { width: 6px; height: 6px; border: 0; background: var(--muted); }
.node-text { border-radius: 3px; font-size: 14px; }
.children { margin-left: 9px; padding-left: 17px; }
.node-row[data-type="heading"] .node-text { font-family: inherit; font-size: 18px; font-weight: 700; }

/* Private sign-in. */
.auth-page { min-height: 100vh; overflow: auto; display: grid; place-items: center; background: #f6f7f4; }
.auth-shell { width: min(430px, calc(100% - 32px)); padding: 42px 0; text-align: center; }
.auth-card { padding: 42px 44px 38px; border: 1px solid #e2e4de; border-radius: 8px; background: #fff; box-shadow: 0 8px 32px rgb(40 50 40 / 7%); color: #2b2b2b; text-align: left; }
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 34px; font-size: 18px; font-weight: 700; }
.auth-brand .brand-mark { margin: 0; }
.auth-eyebrow { margin: 0 0 7px; color: #65906f; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.auth-card h1 { margin: 0; font-size: 27px; letter-spacing: -.03em; text-align: center; }
.auth-intro { margin: 10px 0 27px; color: #73736f; font-size: 13px; line-height: 1.5; text-align: center; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { margin-top: 7px; color: #555650; font-size: 12px; font-weight: 650; }
.auth-form input { width: 100%; height: 42px; padding: 9px 11px; border: 1px solid #d7d9d3; border-radius: 5px; background: #fff; color: #2b2b2b; }
.auth-form button { height: 42px; margin-top: 14px; border: 0; border-radius: 5px; background: #4c7c59; color: #fff; font-weight: 700; cursor: pointer; }
.auth-form button:hover { background: #3f6b4b; }
.auth-form button:disabled { background: #a6aaa4; cursor: not-allowed; }
.auth-error { margin-bottom: 13px; padding: 10px 12px; border-radius: 5px; background: #fff0f0; color: #a23e3e; font-size: 12px; }
.auth-footnote { margin: 17px 0 0; color: #969992; font-size: 11px; }

@media (max-width: 820px) {
    .page { padding: 30px 23px 70px; }
}
@media (max-width: 520px) {
    .topbar { height: 49px; }
    .page-title { font-size: 28px; }
    .auth-card { padding: 34px 25px 30px; }
}

/* Trellic Studio identity alignment. */
.brand { font-size: 2rem; font-weight: 800; letter-spacing: -.051em; }
.brand .brand-wordmark { line-height: 1; }
:root[data-theme="dark"] .brand-wordmark { background-color: var(--identity-light); }
.about-wordmark { margin-bottom: 1.5rem; font-size: 3rem; line-height: 1; }
.primary-nav button,
.sidebar-footer button,
.sidebar-item,
.section-label,
.section-label-row,
.breadcrumbs,
.view-button,
.page-subtitle,
.node-text,
.node-note,
.node-action,
.new-item-button,
.search-summary,
.search-context,
.board-title,
.board-count,
.board-card-text,
.board-card-meta,
.board-add,
.modal-note,
.shortcut-grid,
.auth-intro,
.auth-form label,
.auth-error,
.auth-footnote,
.empty-sidebar,
kbd {
    font-size: 1rem;
}
.section-label,
.section-label-row {
    font-weight: 700;
    letter-spacing: -.02em;
    text-transform: none;
}
.section-label { padding-bottom: .5rem; }
.sidebar-footer p { font-size: 1rem; line-height: 1.4; }
.page-title {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.051em;
    text-wrap: balance;
}
.node-row[data-type="heading"] .node-text {
    font-size: 1.5rem;
    letter-spacing: -.035em;
}
.node-row:hover,
.node-row.selected,
.new-item-button:hover,
.board-add:hover {
    background: rgb(123 158 137 / 16%);
}
.bullet-dot { background: var(--identity-ink); }
:root[data-theme="dark"] .bullet-dot { background: var(--identity-light); }
.bullet-button:hover .bullet-dot { background: var(--identity-accent); }
.avatar {
    background: var(--identity-ink);
    color: var(--identity-light);
}
.search-panel,
.modal,
.board-column,
.board-card {
    border-color: var(--identity-line);
    box-shadow: none;
}
.modal { border-radius: .8rem; }
.modal h2,
.empty-state h2 {
    font-family: var(--identity-font);
    font-weight: 700;
    letter-spacing: -.051em;
}
.empty-state {
    padding: 2rem;
    border: 1px solid var(--identity-line);
    border-radius: .7rem;
    background: var(--identity-light);
}
:root[data-theme="dark"] .empty-state { background: var(--surface-strong); }

.auth-page { background: var(--identity-dark); }
.auth-shell {
    width: min(900px, calc(100% - 2rem));
    padding: 2rem 0;
    text-align: left;
}
.auth-card {
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--identity-line);
    border-radius: .8rem;
    background: var(--identity-light);
    box-shadow: none;
}
.auth-brand {
    justify-content: flex-start;
    margin-bottom: 2rem;
    font-size: 2rem;
    letter-spacing: -.051em;
}
.auth-card h1 {
    max-width: 15ch;
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -.051em;
    text-align: left;
}
.auth-intro {
    margin: .5rem 0 2rem;
    color: var(--identity-muted);
    text-align: left;
}
.auth-form { width: min(100%, 520px); gap: 1rem; }
.auth-form label { color: var(--identity-ink); font-weight: 700; }
.auth-form input {
    min-height: 3rem;
    border: 1px solid var(--identity-line);
    border-radius: .45rem;
}
.auth-form input:focus {
    outline: 2px solid var(--identity-accent);
    outline-offset: 1px;
}
.auth-form button {
    min-height: 3rem;
    border-radius: .5rem;
    background: var(--identity-ink);
}
.auth-form button:hover,
.auth-form button:focus-visible { background: var(--identity-accent); }
.auth-error {
    width: min(100%, 520px);
    background: #f8ddd5;
    color: var(--identity-ink);
}
.auth-footnote { color: #bdc8c2; text-align: center; }

@media (max-width: 520px) {
    .auth-card { padding: 2rem 1.5rem; }
    .auth-shell { width: min(100% - 1.5rem, 900px); }
}
