/* =========================================================
   CARNET PRIVE — PRODUCT UI V1
   One visual system for every screen.
   ========================================================= */

:root {
    color-scheme: dark;

    --bg: #0b0c0e;
    --bg-raised: #101214;
    --surface: #14171a;
    --surface-strong: #191d20;

    --line: rgba(255, 255, 255, 0.085);
    --line-strong: rgba(255, 255, 255, 0.145);

    --text: #f3efe7;
    --text-soft: #c4c0b8;
    --muted: #918f89;
    --faint: #686a6c;

    --accent: #c0976a;
    --accent-hover: #d0aa7d;
    --accent-ink: #17120e;
    --accent-soft: rgba(192, 151, 106, 0.11);

    --danger: #dd7f78;
    --danger-soft: rgba(221, 127, 120, 0.10);
    --warning: #d5ad68;
    --warning-soft: rgba(213, 173, 104, 0.10);

    --content: 760px;
    --content-narrow: 620px;

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    --ease: 150ms ease;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 50% -22%,
            rgba(192, 151, 106, 0.045),
            transparent 33rem
        ),
        var(--bg);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

button,
a,
summary,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    color: var(--text);
    background: rgba(192, 151, 106, 0.28);
}

/* =========================================================
   APP SHELL
   ========================================================= */

.app-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 12, 14, 0.88);
    backdrop-filter: blur(18px);
}

.app-bar__inner {
    width: min(calc(100% - 40px), var(--content));
    min-height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.app-wordmark {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 720;
    letter-spacing: -0.02em;
}

.app-wordmark span {
    color: var(--accent);
}

.app-bar__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.app-bar__form {
    margin: 0;
}

.app-bar__link {
    padding: 8px 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 560;
    cursor: pointer;
    transition: color var(--ease);
}

.app-bar__link:hover {
    color: var(--text);
}

.app-bar__button {
    display: block;
}

.app-main {
    width: 100%;
}

.page-shell {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 52px 0 72px;
}

/* =========================================================
   TYPE & HIERARCHY
   ========================================================= */

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

h1 {
    margin-bottom: var(--space-4);
    font-size: clamp(2.1rem, 7vw, 3.35rem);
    line-height: 1.02;
    font-weight: 690;
    letter-spacing: -0.055em;
}

h2 {
    margin-bottom: var(--space-3);
    font-size: 1.18rem;
    line-height: 1.22;
    font-weight: 650;
    letter-spacing: -0.025em;
}

h3 {
    margin-bottom: var(--space-2);
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 620;
}

p {
    margin-bottom: var(--space-4);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.display-title {
    margin: 0;
}

.lead-copy {
    max-width: 600px;
    margin: 15px 0 0;
    color: var(--text-soft);
    font-size: 0.98rem;
    line-height: 1.65;
}

.summary-copy {
    max-width: 650px;
    margin: 0;
    color: var(--text-soft);
    font-size: 1.01rem;
    line-height: 1.72;
}

.identity-detail {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

/* =========================================================
   GLOBAL ACTIONS
   ========================================================= */

.button {
    min-height: 44px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 680;
    line-height: 1;
    cursor: pointer;
    transition:
        color var(--ease),
        background var(--ease),
        border-color var(--ease),
        transform var(--ease);
}

.button:active {
    transform: translateY(1px);
}

.button--primary {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: var(--accent);
}

.button--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button--secondary {
    color: var(--text-soft);
    background: var(--surface);
    border-color: var(--line-strong);
}

.button--secondary:hover,
.button--ghost:hover {
    color: var(--text);
    background: var(--surface-strong);
}

.button--ghost {
    color: var(--muted);
    background: transparent;
    border-color: var(--line);
}

.button--danger {
    color: #ffd8d4;
    background: var(--danger-soft);
    border-color: rgba(221, 127, 120, 0.24);
}

.button--danger:hover {
    background: rgba(221, 127, 120, 0.16);
    border-color: rgba(221, 127, 120, 0.36);
}

.button--wide {
    width: 100%;
}

.quiet-action,
.inline-action,
.back-link {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--ease);
}

.quiet-action:hover,
.inline-action:hover,
.back-link:hover {
    color: var(--text);
}

.quiet-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 580;
}

.inline-action {
    font-size: 0.78rem;
    font-weight: 600;
}

.back-link {
    width: fit-content;
    margin-bottom: 36px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    font-weight: 560;
}

.page-toolbar {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.page-toolbar .back-link {
    margin-bottom: 0;
}

/* =========================================================
   FORMS
   ========================================================= */

.field {
    display: grid;
    gap: 8px;
}

.field > span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 620;
    letter-spacing: 0.015em;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.95rem;
    line-height: 1.45;
    transition:
        border-color var(--ease),
        background var(--ease),
        box-shadow var(--ease);
}

textarea {
    min-height: 116px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--faint);
}

input:focus,
textarea:focus,
select:focus {
    background: var(--surface-strong);
    border-color: rgba(192, 151, 106, 0.70);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-layout,
.review-form {
    display: grid;
    gap: var(--space-5);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding-top: 2px;
}

/* =========================================================
   NOTICES
   ========================================================= */

.notice {
    margin-bottom: var(--space-5);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    color: var(--text-soft);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.88rem;
}

.notice strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
}

.notice p,
.notice ul {
    margin: 0;
}

.notice ul {
    padding-left: 18px;
}

.notice--danger {
    color: #efb8b3;
    background: var(--danger-soft);
    border-color: rgba(221, 127, 120, 0.24);
}

.notice--warning {
    background: var(--warning-soft);
    border-color: rgba(213, 173, 104, 0.22);
}

.notice--info {
    background: rgba(255, 255, 255, 0.025);
}

.notice__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 0.76rem;
}

/* =========================================================
   HOME
   ========================================================= */

.home-header {
    min-height: 150px;
    margin-bottom: 34px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
}

.home-header__copy {
    min-width: 0;
}

.composer {
    margin-bottom: 48px;
    overflow: hidden;
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
    transition:
        border-color var(--ease),
        box-shadow var(--ease),
        transform var(--ease);
}

.composer:focus-within {
    border-color: rgba(192, 151, 106, 0.52);
    box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(192, 151, 106, 0.07);
}

.composer__heading {
    padding: 20px 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.composer__heading h2 {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.89rem;
    font-weight: 620;
    letter-spacing: -0.01em;
}

.composer__mark {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.composer textarea {
    min-height: 136px;
    padding: 16px 20px 18px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.03rem;
    line-height: 1.62;
}

.composer textarea:focus {
    background: transparent;
    box-shadow: none;
}

.composer__footer {
    padding: 11px 12px 11px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    border-top: 1px solid var(--line);
}

.composer__hint {
    color: var(--faint);
    font-size: 0.75rem;
}

/* =========================================================
   SECTIONS & LISTS
   ========================================================= */

.content-section {
    margin-top: 48px;
}

.content-section--intro {
    margin-top: 44px;
}

.section-header {
    min-height: 32px;
    margin-bottom: 11px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
}

.section-header h2 {
    margin: 0;
}

.section-count {
    color: var(--faint);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

.person-list,
.memory-list {
    border-top: 1px solid var(--line);
}

.person-row,
.memory-row {
    min-height: 72px;
    padding: 16px 2px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition:
        padding var(--ease),
        background var(--ease);
}

.person-row:hover,
.memory-row:hover {
    padding-left: 8px;
    background:
        linear-gradient(
            90deg,
            rgba(192, 151, 106, 0.065),
            transparent 60%
        );
}

.person-row__main,
.memory-row__main {
    min-width: 0;
}

.person-row__name {
    display: block;
    color: var(--text);
    font-size: 0.97rem;
    font-weight: 640;
    letter-spacing: -0.015em;
}

.person-row__detail {
    margin-top: 4px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 10px;
}

.relationship-label {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 610;
}

.person-row__summary {
    max-width: 520px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.81rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-chevron {
    color: var(--faint);
    font-size: 1.35rem;
    font-weight: 300;
}

.memory-row {
    align-items: start;
}

.memory-row__meta {
    margin-bottom: 5px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
}

.memory-row__meta strong {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 630;
}

.memory-row__meta time {
    color: var(--faint);
    font-size: 0.73rem;
    font-variant-numeric: tabular-nums;
}

.memory-row p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.empty-state {
    padding: 18px 2px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.empty-state--section {
    border-top: 1px solid var(--line);
}

/* =========================================================
   DISCLOSURES / SECONDARY TOOLS
   ========================================================= */

.utility-drawer {
    margin-top: 46px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.utility-drawer--spaced {
    margin-top: 52px;
}

.utility-drawer > summary,
.nested-disclosure > summary {
    list-style: none;
    cursor: pointer;
}

.utility-drawer > summary::-webkit-details-marker,
.nested-disclosure > summary::-webkit-details-marker {
    display: none;
}

.utility-drawer > summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    color: var(--muted);
    font-size: 0.81rem;
    font-weight: 570;
}

.utility-drawer__icon {
    color: var(--faint);
    font-size: 1.1rem;
    transition: transform var(--ease), color var(--ease);
}

.utility-drawer[open] > summary {
    color: var(--text-soft);
}

.utility-drawer[open] > summary .utility-drawer__icon {
    color: var(--accent);
    transform: rotate(45deg);
}

.utility-drawer__body {
    padding: 6px 0 24px;
    display: grid;
    gap: var(--space-5);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px auto;
    align-items: end;
    gap: var(--space-3);
}

.search-form__button {
    min-width: 112px;
}

.nested-disclosure {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.nested-disclosure > summary {
    width: fit-content;
    color: var(--muted);
    font-size: 0.80rem;
    font-weight: 570;
}

.nested-disclosure[open] > summary {
    margin-bottom: var(--space-5);
    color: var(--text-soft);
}

/* =========================================================
   PERSON DETAIL
   ========================================================= */

.person-hero,
.page-header {
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.person-hero {
    display: block;
}

.person-hero__main {
    min-width: 0;
}

.person-meta {
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 0.78rem;
}

.view-tabs {
    margin-top: 34px;
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--line);
}

.view-tabs a {
    position: relative;
    padding: 0 1px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 610;
    transition: color var(--ease);
}

.view-tabs a:hover,
.view-tabs a.is-active {
    color: var(--text);
}

.view-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--accent);
}

.view-tabs + .utility-drawer--spaced {
    margin-top: 28px;
}

.timeline-list {
    border-top: 1px solid var(--line);
}

.timeline-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 12px;
}

.timeline-row__rail {
    position: relative;
}

.timeline-row__rail::after {
    content: "";
    position: absolute;
    top: 27px;
    bottom: -1px;
    left: 7px;
    width: 1px;
    background: var(--line);
}

.timeline-row:last-child .timeline-row__rail::after {
    display: none;
}

.timeline-marker {
    position: absolute;
    top: 22px;
    left: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-marker--confirme {
    background: #86b899;
}

.timeline-marker--probable {
    background: #c9aa6d;
}

.timeline-marker--incertain {
    background: #9b8fa5;
}

.timeline-row__body {
    min-width: 0;
    padding: 17px 0 20px;
    border-bottom: 1px solid var(--line);
}

.timeline-row__header,
.timeline-row__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.timeline-row__header time {
    color: var(--faint);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.evidence-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.72rem;
}

.timeline-row__content {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.64;
}

.timeline-row__footer {
    margin-top: 14px;
}

.timeline-row__meta {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--faint);
    font-size: 0.72rem;
}

/* =========================================================
   PREVIEW / REVIEW
   ========================================================= */

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    max-width: 640px;
    margin: 0;
    font-size: clamp(2rem, 6vw, 2.8rem);
}

.capture-quote {
    margin-bottom: 22px;
    padding: 4px 0 4px 16px;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--accent);
}

.capture-quote p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.66;
}

.review-context {
    margin-bottom: 10px;
    padding: 15px 2px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.review-context__label {
    color: var(--faint);
    font-size: 0.74rem;
    font-weight: 600;
}

.review-context strong {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.review-context__detail {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 590;
}

.review-form {
    gap: 0;
}

.review-section {
    padding: 28px 0;
    display: grid;
    gap: var(--space-4);
    border-top: 1px solid var(--line);
}

.review-section:first-of-type {
    border-top: 0;
}

.review-actions {
    margin-top: 8px;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--line);
}

/* =========================================================
   EDIT FORMS
   ========================================================= */

.form-surface {
    max-width: var(--content-narrow);
    margin-top: 30px;
    padding: 24px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.danger-section {
    max-width: var(--content-narrow);
    margin-top: 46px;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    border-top: 1px solid rgba(221, 127, 120, 0.20);
}

.danger-section h2 {
    margin: 0 0 5px;
    color: #e2b0ac;
    font-size: 0.93rem;
}

.danger-section p {
    margin: 0;
    color: var(--muted);
    font-size: 0.79rem;
}

/* =========================================================
   AUTH
   ========================================================= */

.auth-page .app-bar {
    position: static;
    background: transparent;
}

.auth-page .page-shell {
    padding-top: 70px;
}

.auth-shell {
    min-height: calc(100vh - 210px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    align-items: center;
    gap: 72px;
}

.auth-intro h1 {
    max-width: 460px;
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    line-height: 0.96;
}

.auth-panel {
    padding: 26px;
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
}

.auth-panel__header {
    margin-bottom: 24px;
}

.auth-panel__header h2 {
    margin-bottom: 7px;
}

.auth-panel__header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 720px) {
    .page-shell,
    .app-bar__inner {
        width: min(calc(100% - 28px), var(--content));
    }

    .page-shell {
        padding: 30px 0 58px;
    }

    .app-bar__inner {
        min-height: 54px;
    }

    .app-bar__actions {
        gap: 14px;
    }

    .app-bar__actions > a {
        display: none;
    }

    .back-link {
        margin-bottom: 28px;
    }

    .home-header,
    .person-hero {
        min-height: 0;
        align-items: flex-start;
    }

    .home-header {
        margin-bottom: 24px;
    }

    .home-header .quiet-action,
    .person-hero .quiet-action {
        margin-top: 3px;
    }

    .composer {
        margin-bottom: 38px;
    }

    .composer__heading {
        padding: 17px 17px 0;
    }

    .composer textarea {
        min-height: 112px;
        padding: 14px 17px 16px;
    }

    .composer__footer {
        padding-left: 17px;
    }

    .composer__hint {
        display: none;
    }

    .content-section {
        margin-top: 38px;
    }

    .utility-drawer {
        margin-top: 38px;
    }

    .view-tabs + .utility-drawer--spaced {
        margin-top: 24px;
    }

    .page-toolbar {
        margin-bottom: 26px;
    }

    .search-form {
        grid-template-columns: 1fr 120px;
    }

    .search-form__button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .person-row__summary {
        max-width: 74vw;
    }

    .timeline-row__footer {
        align-items: flex-end;
    }

    .auth-page .page-shell {
        padding-top: 42px;
    }

    .auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .auth-intro h1 {
        max-width: 360px;
        font-size: clamp(2.6rem, 12vw, 3.7rem);
    }
}

@media (max-width: 480px) {
    .home-header,
    .person-hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-header .quiet-action,
    .person-hero .quiet-action {
        width: fit-content;
    }

    .display-title {
        font-size: clamp(2.2rem, 12vw, 3.05rem);
    }

    .view-tabs {
        gap: 18px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .view-tabs::-webkit-scrollbar {
        display: none;
    }

    .notice {
        display: grid;
    }

    .notice__meta {
        justify-content: flex-start;
    }

    .review-actions {
        justify-content: stretch;
        border-radius: var(--radius-md);
    }

    .review-actions .button {
        flex: 1;
    }

    .danger-section {
        align-items: stretch;
        flex-direction: column;
    }

    .danger-section .button {
        width: 100%;
    }

    .auth-panel {
        padding: 21px;
    }
}

/* Hidden framework fields must never participate in layout. */
input[type="hidden"] {
    display: none !important;
}

/* =========================================================
   IDENTITE PERSONNE V1
   ========================================================= */

.field-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.identity-aliases {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* =========================================================
   CAPTURE / RECHERCHE NATURELLE V1
   ========================================================= */

.page-header--compact {
    margin-bottom: 22px;
}

.capture-quote--search {
    margin-bottom: 28px;
}

.search-results-section {
    margin-top: 0;
}

.search-results {
    border-top: 1px solid var(--line);
}

.search-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 2px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition:
        padding var(--motion-fast),
        background var(--motion-fast);
}

.search-result:hover {
    padding-left: 8px;
    background: linear-gradient(
        90deg,
        var(--accent-soft),
        transparent 62%
    );
}

.search-result__main {
    min-width: 0;
}

.search-result__identity {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
    align-items: baseline;
}

.search-result__identity strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
}

.search-result__identity span {
    color: var(--accent);
    font-size: 0.78rem;
}

.search-result__evidence-list {
    display: grid;
    gap: 5px;
    margin-top: 8px;
}

.search-result__evidence {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.empty-state--search {
    margin: 0 0 34px;
}

.search-again {
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.search-again h2 {
    margin: 0 0 14px;
    font-size: 0.92rem;
    font-weight: 600;
}

.search-again__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

@media (max-width: 560px) {
    .search-result {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .search-again__row {
        grid-template-columns: 1fr;
    }

    .search-again__row .button {
        width: 100%;
    }
}

/* =========================================================
   CAPTURE FLUIDITE 01
   ========================================================= */

.review-form--compact {
    display: grid;
    gap: 0;
}

.capture-understanding {
    margin-top: 2px;
    padding: 20px 0 24px;
    display: grid;
    gap: 20px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.capture-understanding__identity {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}

.capture-understanding__label {
    color: var(--faint);
    font-size: 0.74rem;
    font-weight: 600;
}

.capture-understanding__identity strong {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 680;
}

.capture-understanding__relation {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 590;
}

.field--capture-content textarea {
    min-height: 110px;
    background: var(--bg-raised);
}

.capture-details {
    border-bottom: 1px solid var(--line);
}

.capture-details > summary {
    padding: 16px 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.capture-details > summary::-webkit-details-marker {
    display: none;
}

.capture-details > summary::after {
    content: "+";
    float: right;
    color: var(--faint);
    font-size: 1.1rem;
    font-weight: 400;
}

.capture-details[open] > summary::after {
    content: "−";
}

.capture-details__body {
    padding: 2px 0 24px;
    display: grid;
    gap: var(--space-4);
}

.notice--compact {
    margin-top: 18px;
}

.review-actions--compact {
    margin-top: 0;
    padding-top: 18px;
    border-top: 0;
}

.search-result__empty {
    margin: 8px 0 0;
    color: var(--faint);
    font-size: 0.86rem;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .capture-understanding {
        padding-top: 18px;
        padding-bottom: 20px;
    }

    .field--capture-content textarea {
        min-height: 96px;
    }

    .review-actions--compact {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .review-actions--compact .button {
        width: 100%;
    }
}
