/* ============================================================================
   Family Tree — heritage design system
   Warm ivory canvas, deep ink + burgundy accents, soft gold highlights.
   Elegant serif (Cormorant Garamond) for display, Inter for body.
   ========================================================================== */

:root {
    /* Blue, modern palette on a softly darker canvas.
       Variable names are kept for stability; values are the new blue scheme. */
    --ivory:        #e4eaf3;   /* page background (lightly darker, blue-grey) */
    --ivory-deep:   #d4ddec;   /* tree canvas / inset surfaces */
    --parchment:    #eef3fa;   /* header, footer, inputs */
    --ink:          #18222e;   /* near-navy text */
    --ink-soft:     #4f6075;
    --burgundy:     #1f3b63;   /* primary (deep blue) */
    --burgundy-dk:  #142a49;
    --forest:       #2f6b5e;   /* secondary accent (teal) */
    --gold:         #3b6ea5;   /* highlight (blue) */
    --gold-soft:    #a9c4e2;
    --line:         #c6d3e4;
    --line-soft:    #d9e3f0;
    --card:         #ffffff;
    --living:       #2f6b5e;
    --shadow-sm:    0 1px 2px rgba(24,34,46,.06), 0 2px 10px rgba(24,34,46,.07);
    --shadow-md:    0 8px 28px rgba(24,34,46,.14);
    --radius:       14px;
    --radius-sm:    9px;
    --serif: "Space Grotesk", "Inter", system-ui, sans-serif;     /* modern display */
    --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(1200px 520px at 80% -10%, rgba(59,110,165,.12), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(31,59,99,.08), transparent 55%),
        var(--ivory);
    background-attachment: fixed;
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

a { color: var(--burgundy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--burgundy-dk); }

p { margin: 0 0 1rem; }

.container { width: min(1140px, 92vw); margin-inline: auto; }

/* ----------------------------------------------------------- Header / nav */
.site-header {
    background: linear-gradient(180deg, var(--parchment), rgba(251,248,241,.85));
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(120%) blur(4px);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); }
.brand-logo { height: 54px; width: auto; object-fit: contain; }
.brand-monogram {
    font-family: var(--serif); font-weight: 700; font-size: 1.7rem;
    width: 46px; height: 46px; display: grid; place-items: center;
    color: var(--parchment); background: var(--burgundy);
    border-radius: 50%; box-shadow: inset 0 0 0 2px var(--gold-soft);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.brand-tagline { font-size: .76rem; color: var(--ink-soft); letter-spacing: .3px; }

.main-nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--burgundy); }
.nav-cta {
    background: var(--burgundy); color: var(--parchment) !important;
    padding: .5rem .95rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--burgundy-dk); }
.nav-admin { color: var(--gold) !important; }
.nav-family {
    border: 1px solid var(--gold-soft); color: var(--gold) !important;
    padding: .42rem .9rem; border-radius: 999px;
}
.nav-family:hover { background: var(--ivory-deep); }
.nav-family.is-on { background: var(--forest); color: #fff !important; border-color: var(--forest); }

/* Social / contact chips on profiles */
.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.social-chip {
    font-size: .82rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px;
    background: var(--parchment); border: 1px solid var(--line); color: var(--burgundy);
}
.social-chip:hover { border-color: var(--gold); background: var(--ivory-deep); }

/* Privacy blur for restricted (youngest-generation) members */
.is-blurred { filter: blur(5px); user-select: none; }
h1.is-blurred { display: inline-block; }

/* ------------------------------------------------------------------- Main */
.site-main { flex: 1 0 auto; }
.page { padding: 2.5rem 0 4rem; }
.page-head { margin-bottom: 1.8rem; }
.page-head .eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--gold); font-weight: 600; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------------------------------------------------------------- Flashes */
.flash-stack { margin-top: 1rem; display: grid; gap: .6rem; }
.flash { padding: .8rem 1.1rem; border-radius: var(--radius-sm); font-size: .95rem; border: 1px solid; box-shadow: var(--shadow-sm); }
.flash-success { background: #eef5ee; border-color: #cfe3cf; color: #29503a; }
.flash-error   { background: #fbeeee; border-color: #efcccc; color: #7a2230; }
.flash-info    { background: #f3eeff; border-color: #ddd2f0; color: #4a3d6b; }

/* ------------------------------------------------------------------ Buttons */
.btn {
    display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
    font-family: var(--sans); font-weight: 600; font-size: .92rem;
    padding: .6rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
    transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--burgundy); color: var(--parchment); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--burgundy-dk); color: var(--parchment); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--burgundy); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: #2d567f; color: #fff; }
.btn-danger { background: transparent; border-color: #d8b3b3; color: #8a2330; }
.btn-danger:hover { background: #fbeeee; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* --------------------------------------------------------------- Tree page */
.tree-page { padding: 0; }
.tree-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 0; flex-wrap: wrap;
}
.tree-stats { display: flex; gap: 1.6rem; color: var(--ink-soft); font-size: .9rem; }
.tree-stats strong { color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.tree-intro { max-width: 62ch; color: var(--ink-soft); margin: .2rem 0 .6rem; line-height: 1.55; }
.tree-breadcrumb { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.tree-breadcrumb .muted { color: var(--ink-soft); font-size: .85rem; font-family: var(--sans); }

#tree-stage {
    position: relative;
    height: min(76vh, 760px);
    /* Layered top→bottom: dot grid · semi-transparent ivory wash (fades the
       photo so the cards stay legible) · the family background photo · base tint. */
    background:
        radial-gradient(circle at 1px 1px, rgba(31,59,99,.12) 1px, transparent 0) 0 0 / 26px 26px,
        linear-gradient(rgba(212,221,236,.62), rgba(212,221,236,.62)),
        url('../img/tree-bg.jpg') center center / cover no-repeat,
        var(--ivory-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: inset 0 0 70px rgba(24,34,46,.06);
}
.tree-empty { display: grid; place-items: center; height: 100%; text-align: center; color: var(--ink-soft); padding: 2rem; }

/* Custom D3 top-down tree */
.tree-svg { display: block; width: 100%; height: 100%; cursor: grab; }
.tree-svg:active { cursor: grabbing; }
.tree-link { fill: none; stroke: #9fb2cb; stroke-width: 1.6px; }
/* Descent from a former (ended) union shown apart from the couple — dashed to read
   as the children of that union rather than of the single card they hang under. */
.tree-link--ended { stroke-dasharray: 5 4; opacity: .7; }
.tree-marriage { fill: none; stroke: var(--gold); stroke-width: 2px; }
.tree-marriage--ended { stroke-dasharray: 5 4; opacity: .6; }
.tree-marriage-label {
    fill: var(--ink-soft); font-family: var(--sans); font-size: 11px;
    /* White halo so the ✕year stays legible even over a short connector between cards. */
    stroke: var(--card); stroke-width: 3px; paint-order: stroke fill;
}

.tree-card {
    display: flex; align-items: center; gap: .55rem;
    width: 100%; height: 100%; box-sizing: border-box;
    background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold);
    border-radius: 12px; padding: .35rem .55rem; text-decoration: none; color: var(--ink);
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.tree-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold); background: var(--parchment); }
.tree-card.is-living { border-left-color: var(--living); }
.tree-card .tc-av {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none;
    display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--gold-soft);
}
.tree-card .tc-ph {
    background: linear-gradient(135deg, var(--ivory-deep), var(--gold-soft));
    color: var(--burgundy); font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
}
.tree-card .tc-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tree-card .tc-nameline { display: flex; align-items: flex-start; gap: .2rem; min-width: 0; }
.tree-card .tc-name {
    font-family: var(--serif); font-weight: 600; font-size: .92rem; min-width: 0;
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tree-card .tc-deceased { color: var(--ink-soft); font-size: .8rem; flex: none; }
.tree-card .tc-label { font-size: .72rem; color: var(--ink-soft); }

/* Hidden (youngest-gen, public) — anonymous placeholder, not clickable */
.tree-card.is-hidden { border-left-color: var(--line); background: var(--parchment); cursor: default; }
.tree-card.is-hidden .tc-name { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.tree-card.is-hidden .tc-ph { background: var(--line-soft); color: var(--ink-soft); box-shadow: none; }
/* Name-only members (from another family) — dashed accent, not clickable */
.tree-card.is-nameonly { border-left-style: dashed; border-left-color: var(--gold); cursor: default; }
div.tree-card { cursor: default; }

.relation-chip.is-static { cursor: default; background: var(--parchment); }
.relation-chip.is-static:hover { border-color: var(--line); }

.tree-hint { color: var(--ink-soft); font-size: .82rem; margin-top: .5rem; }

/* Fallback CSS tree (used if family-chart fails to load) */
.fallback-tree { padding: 1.5rem; overflow: auto; height: 100%; }
.fallback-tree ul { list-style: none; padding-left: 1.4rem; margin: .3rem 0; border-left: 2px solid var(--line); }
.fallback-tree li { margin: .35rem 0; }
.fallback-node {
    display: inline-flex; align-items: center; gap: .55rem; background: var(--card);
    border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem .3rem .35rem;
    box-shadow: var(--shadow-sm);
}
.fallback-node img, .fallback-node .avatar-ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* --------------------------------------------------------------- Person cards */
.avatar-ph {
    background: linear-gradient(135deg, var(--ivory-deep), var(--gold-soft));
    color: var(--burgundy); display: grid; place-items: center;
    font-family: var(--serif); font-weight: 600;
}
.grid-cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease;
    display: flex; gap: .9rem; align-items: center;
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.person-card .avatar, .person-card .avatar-ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: inset 0 0 0 2px var(--gold-soft); }
.person-card .pc-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.person-card .pc-meta { color: var(--ink-soft); font-size: .85rem; }
.badge-living { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--living); border: 1px solid #bcd0c2; border-radius: 999px; padding: .05rem .5rem; margin-left: .35rem; }

/* --------------------------------------------------------------- Profile page */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: start; }
.profile-aside { position: sticky; top: 90px; }
.profile-photo, .profile-photo-ph { width: 100%; aspect-ratio: 1; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.profile-photo-ph { font-size: 4rem; }
.profile-aside .stack { margin-top: 1.6rem; }
.vital { margin: 1.2rem 0; display: grid; gap: .5rem; }
.vital .row { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .4rem; }
.vital .row .k { color: var(--ink-soft); font-size: .85rem; }
.vital .row .v { font-weight: 500; text-align: right; }
.relations h3 { border-bottom: 2px solid var(--gold-soft); padding-bottom: .3rem; margin-top: 1.6rem; }
.relation-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.relation-pair { display: inline-flex; align-items: center; gap: .35rem; }
.union-ended { color: var(--ink-soft); font-size: .78rem; white-space: nowrap; }
.relation-chip { display: inline-flex; align-items: center; gap: .5rem; background: var(--parchment); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem .3rem .35rem; }
.relation-chip img, .relation-chip .avatar-ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.bio { font-size: 1.08rem; line-height: 1.75; }
.masked-note { color: var(--ink-soft); font-style: italic; background: var(--parchment); border: 1px dashed var(--line); padding: .8rem 1rem; border-radius: var(--radius-sm); }

/* --------------------------------------------------------------- Lineage */
.pedigree { display: flex; flex-direction: column; gap: 1.4rem; }
.generation { }
.generation .gen-label { text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; color: var(--gold); font-weight: 600; margin-bottom: .5rem; }
.generation .gen-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* --------------------------------------------------------------- Forms */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.col-span { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.hint { font-size: .78rem; color: var(--ink-soft); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
    font-family: var(--sans); font-size: .98rem; color: var(--ink);
    background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .6rem .75rem; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,138,62,.16); }
textarea { resize: vertical; min-height: 110px; }
.field-error { color: #9a2330; font-size: .8rem; }
.checkbox-row { display: flex; align-items: center; gap: .55rem; }
.checkbox-row input { width: auto; }
.form-actions { display: flex; gap: .8rem; align-items: center; margin-top: 1.4rem; flex-wrap: wrap; }
.honeypot { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }

/* Searchable picker */
.picker { position: relative; }
.picker-results { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); max-height: 260px; overflow: auto; display: none; }
.picker-results.open { display: block; }
.picker-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; cursor: pointer; }
.picker-item:hover, .picker-item.active { background: var(--ivory-deep); }
.picker-item img, .picker-item .avatar-ph { width: 30px; height: 30px; border-radius: 50%; }
.picker-chosen { display: none; align-items: center; gap: .6rem; background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .6rem; }
.picker-chosen.show { display: flex; }
.picker-chosen .clear { margin-left: auto; cursor: pointer; color: var(--burgundy); background: none; border: none; font-size: 1.1rem; }

/* Mode tabs on suggest page */
.tabs { display: inline-flex; background: var(--ivory-deep); border-radius: 999px; padding: .25rem; margin-bottom: 1.4rem; }
.tabs a { padding: .45rem 1rem; border-radius: 999px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.tabs a.active { background: var(--card); color: var(--burgundy); box-shadow: var(--shadow-sm); }

/* --------------------------------------------------------------- Tables / admin */
.admin-shell { padding: 2rem 0 4rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--burgundy); line-height: 1; }
.stat .l { color: var(--ink-soft); font-size: .85rem; margin-top: .3rem; }
.stat.alert .n { color: var(--gold); }

table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); font-size: .92rem; vertical-align: middle; }
table.data th { background: var(--parchment); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
table.data tr:last-child td { border-bottom: none; }
.status-pill { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .55rem; border-radius: 999px; font-weight: 600; }
.status-approved { background: #e7f1e8; color: #2c5a3c; }
.status-pending  { background: #f6efda; color: #8a6a1e; }
.status-rejected { background: #f7e3e3; color: #8a2c34; }

.queue-section { margin-bottom: 2.6rem; }
.queue-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.queue-card .qc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.queue-card h3 { margin-bottom: .2rem; }
.qc-meta { color: var(--ink-soft); font-size: .85rem; }
.qc-body { margin: .8rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem 1.2rem; }
.qc-body .kv { font-size: .9rem; }
.qc-body .kv .k { color: var(--ink-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; display: block; }
.diff-table { width: 100%; border-collapse: collapse; margin: .6rem 0; }
.diff-table td, .diff-table th { padding: .35rem .6rem; border: 1px solid var(--line-soft); font-size: .88rem; text-align: left; }
.diff-old { color: #8a2c34; text-decoration: line-through; }
.diff-new { color: #2c5a3c; font-weight: 600; }
.qc-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.reject-inline { display: flex; gap: .4rem; align-items: center; flex: 1; min-width: 240px; }
.reject-inline input { flex: 1; }
.empty-note { color: var(--ink-soft); font-style: italic; padding: 1rem 0; }

.people-search { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; flex-wrap: wrap; }
.people-filter-input {
    flex: 1 1 280px; max-width: 420px; padding: .55rem .9rem; font: inherit;
    background: var(--parchment); color: var(--ink);
    border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease;
}
.people-filter-input:focus { outline: none; border-color: var(--gold); }
.people-count { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }

.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-bar nav { display: flex; gap: 1.2rem; }
.admin-bar nav a { color: var(--ink-soft); font-weight: 600; }
.admin-bar nav a.active, .admin-bar nav a:hover { color: var(--burgundy); }

/* --------------------------------------------------------------- Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem; box-shadow: var(--shadow-md); width: min(420px, 92vw); }
.auth-card .brand-monogram { margin: 0 auto 1rem; }
.auth-card h1 { text-align: center; }

/* --------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--parchment); margin-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 0; color: var(--ink-soft); font-size: .86rem; flex-wrap: wrap; gap: .6rem; }
.footer-links { display: flex; gap: 1.2rem; }

/* --------------------------------------------------------------- Utilities */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt-1 { margin-top: .6rem; } .mt-2 { margin-top: 1.2rem; } .mt-3 { margin-top: 2rem; }
.stack > * + * { margin-top: 1rem; }
.divider { height: 1px; background: var(--line); margin: 1.6rem 0; border: 0; }
.toolbar-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: .8rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.6rem; }
.filters .field { min-width: 160px; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 820px) {
    .profile { grid-template-columns: 1fr; }
    .profile-aside { position: static; }
    .form-grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .main-nav { gap: 1rem; }
    .tree-stats { gap: 1rem; }
}
