.portal-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.portal-card { grid-column: span 2; min-height: 260px; }
.portal-card.wide { grid-column: span 3; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.metric-strip div { border: 1px solid var(--line); background: rgba(241,234,223,.06); padding: 18px; }
.metric-strip span { color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.metric-strip strong { display: block; margin-top: 10px; font-family: Georgia, serif; font-size: 1.6rem; }
.intake-tool { display: grid; grid-template-columns: minmax(0,.9fr) minmax(320px,1fr); gap: 18px; align-items: start; }
.intake-panel { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: clamp(22px,4vw,38px); }
.intake-panel form { display: grid; gap: 14px; margin-top: 24px; }
.intake-panel label { display: grid; gap: 8px; color: var(--red); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.intake-panel input, .intake-panel select { min-height: 44px; border: 1px solid rgba(21,16,12,.2); background: #fffaf1; color: var(--ink); }
.result-dossier { border: 1px solid var(--line); background: var(--panel-dark); padding: clamp(22px,4vw,38px); min-height: 460px; }
.result-dossier h3 { color: var(--gold); }
.result-dossier p { margin-top: 16px; color: var(--panel-muted); }
.timeline { display: grid; gap: 12px; }
.timeline article { display: grid; grid-template-columns: 110px minmax(0,1fr) 220px; gap: 18px; align-items: center; border: 1px solid var(--line); background: rgba(241,234,223,.06); padding: 18px; }
.timeline span { color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.profile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.profile-card { min-height: 300px; }
.authority-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.authority-card { min-height: 280px; }
.mini-wall { display: grid; gap: 10px; margin-top: 24px; }
.mini-wall p { margin: 0; padding: 24px; border: 1px solid var(--line); background: #050504; color: var(--gold); font-family: Georgia, serif; font-size: clamp(1.5rem,3vw,3rem); }
@media (max-width:1120px){ .portal-card,.portal-card.wide{grid-column:span 3}.intake-tool,.timeline article{grid-template-columns:1fr}.profile-grid,.authority-grid,.metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:720px){ .portal-grid{grid-template-columns:1fr}.portal-card,.portal-card.wide{grid-column:auto}.profile-grid,.authority-grid,.metric-strip{grid-template-columns:1fr} }

.admin-security-hero {
    align-items: start;
    min-height: auto;
    padding: clamp(28px, 4vw, 56px) clamp(20px, 5vw, 64px);
    gap: clamp(18px, 2.4vw, 36px);
}
.admin-security-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}
.admin-security-hero .hero-line {
    margin-top: 14px;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
}
.admin-security-hero .section-lede {
    margin-top: 12px;
}
.admin-security-hero::after {
    display: none;
}
@media (min-width: 1121px) {
    .admin-security-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
    }
}
.admin-security-gate,
.admin-event-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.admin-security-gate {
    padding: clamp(22px, 3vw, 34px);
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.14), rgba(9, 8, 7, 0) 58%),
        var(--panel-dark);
    color: var(--cream);
}
.admin-security-gate::after,
.admin-event-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 190px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}
.admin-security-gate h3,
.admin-event-card h3 {
    margin: 12px 0 10px;
}
.admin-security-gate p {
    color: var(--panel-muted);
}
.admin-security-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}
.admin-security-form label {
    display: grid;
    gap: 8px;
}
.admin-security-form span,
.admin-event-fields span {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.admin-security-form input {
    min-height: 44px;
    border: 1px solid rgba(184, 155, 94, 0.45);
    border-radius: 3px;
    padding: 10px 12px;
    background: #fffaf1;
    color: var(--ink);
}
.admin-security-error,
.admin-security-notice {
    border-left: 2px solid var(--gold);
    padding-left: 12px;
}
.admin-security-error {
    color: var(--red-soft) !important;
}
.admin-event-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}
.admin-event-card {
    padding: clamp(20px, 3vw, 30px);
    background: rgba(241, 234, 223, 0.06);
    color: var(--cream);
}
.admin-event-card header,
.admin-event-fields,
.admin-event-json {
    position: relative;
    z-index: 1;
}
.admin-event-card a {
    color: var(--cream);
    text-decoration-color: var(--gold);
    text-underline-offset: 4px;
}
.admin-event-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.admin-event-fields div {
    border-top: 1px solid rgba(184, 155, 94, 0.28);
    padding-top: 12px;
}
.admin-event-fields strong {
    display: block;
    margin-top: 6px;
    overflow-wrap: anywhere;
    color: var(--panel-muted);
    font: 700 0.95rem/1.35 "Segoe UI", Inter, Arial, sans-serif;
}
.admin-event-json {
    overflow: auto;
    max-width: 100%;
    margin: 18px 0 0;
    border: 1px solid rgba(184, 155, 94, 0.28);
    padding: 14px;
    color: var(--panel-muted);
}
.admin-event-actions,
.admin-delete-controls {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    border-top: 1px solid rgba(184, 155, 94, 0.28);
    padding-top: 16px;
}
.admin-event-actions span {
    color: var(--panel-muted);
    font-size: 0.88rem;
}
.admin-delete-confirm {
    border-bottom: 0;
}
.admin-delete-confirm .admin-event-card {
    border-color: rgba(168, 70, 70, 0.72);
    background:
        linear-gradient(135deg, rgba(111, 29, 29, 0.22), rgba(9, 8, 7, 0) 48%),
        rgba(241, 234, 223, 0.06);
}
.admin-delete-confirm .admin-event-card > p {
    position: relative;
    z-index: 1;
    color: var(--panel-muted);
}
.official-command.danger,
button.danger {
    border-color: rgba(168, 70, 70, 0.8);
    background: var(--red);
    color: var(--cream);
}
.admin-deleted-label {
    display: inline-block;
    margin-left: 8px;
    color: var(--red-soft);
    font: 900 0.62rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
@media (max-width:720px){ .admin-event-fields{grid-template-columns:1fr}.admin-security-gate .official-command,.admin-event-actions,.admin-event-actions form,.admin-delete-controls,.admin-delete-controls form,.admin-delete-controls button{width:100%}.admin-event-actions{align-items:stretch} }

.profile-hero .hero-copy h1 {
    max-width: none;
}
.profile-command-panel,
.profile-file-card,
.profile-review-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.profile-command-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    padding: clamp(24px, 4vw, 42px);
    background:
        linear-gradient(180deg, rgba(184, 155, 94, 0.13), rgba(9, 8, 7, 0) 46%),
        #0d0b0a;
    color: var(--cream);
}
.profile-command-panel::after,
.profile-review-card::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 190px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.11;
    pointer-events: none;
}
.profile-command-panel h3 {
    margin-top: 18px;
    color: var(--gold);
    font-size: clamp(2rem, 4vw, 4.4rem);
}
.profile-command-panel.compact {
    min-height: 360px;
}
.profile-registry,
.profile-fields,
.profile-metrics {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}
.profile-registry {
    margin-top: auto;
    grid-template-columns: 1fr 1fr;
    gap: 13px 18px;
}
.profile-registry strong {
    overflow-wrap: anywhere;
}
@media (max-width: 720px) {
    .profile-registry {
        grid-template-columns: 1fr;
    }
}
.profile-registry div,
.profile-fields div,
.profile-metrics div {
    border-top: 1px solid rgba(184, 155, 94, 0.26);
    padding-top: 12px;
}
.profile-registry span,
.profile-fields span,
.profile-metrics span {
    display: block;
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.profile-registry strong,
.profile-fields strong,
.profile-metrics strong {
    display: block;
    margin-top: 6px;
    color: var(--panel-muted);
    font: 700 0.98rem/1.25 "Segoe UI", Inter, Arial, sans-serif;
}
.profile-dossier-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    gap: 16px;
    margin-top: 34px;
}
.profile-file-card {
    min-height: 520px;
    padding: clamp(24px, 4vw, 42px);
    background: var(--panel);
    color: var(--ink);
}
.profile-file-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -48px;
    width: 230px;
    aspect-ratio: 1;
    background: url("../img/seal-ink.svg") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}
.profile-file-card h3,
.profile-review-card h3 {
    margin-top: 18px;
}
.profile-file-card p {
    max-width: 760px;
    margin-top: 16px;
    color: var(--ink-muted);
    font-size: 1.05rem;
}
.profile-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
}
.profile-fields strong {
    color: var(--ink);
}
.profile-review-card {
    min-height: 520px;
    padding: clamp(24px, 4vw, 38px);
    background: rgba(241, 234, 223, 0.06);
    color: var(--cream);
}
.profile-metrics div {
    min-height: 78px;
}
.profile-metrics strong {
    color: var(--cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
    line-height: 1;
}
.badge-ledger {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.badge-ledger span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    padding: 8px 10px;
    color: var(--gold);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
@media (max-width:1120px){ .profile-dossier-grid{grid-template-columns:1fr}.profile-command-panel{min-height:320px}.profile-fields{grid-template-columns:1fr} }
.record-seal-band {
    background: #0d0b0a;
}
.record-seal-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(18px, 4vw, 44px);
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: clamp(24px, 4vw, 42px);
    background:
        linear-gradient(120deg, rgba(184, 155, 94, 0.12), rgba(9, 8, 7, 0) 48%),
        var(--panel-dark);
    color: var(--cream);
}
.record-seal-panel::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -48px;
    width: 210px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
}
.record-seal-panel > *:not(.stamp) {
    position: relative;
    z-index: 1;
}
.record-seal-panel > .stamp {
    z-index: 2;
}
.record-seal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.record-seal-panel .official-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 15px;
    border: 1px solid var(--gold);
    border-radius: 3px;
    background: var(--red);
    color: var(--cream);
    font: 900 0.72rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}
.record-seal-panel .official-command.ghost {
    background: transparent;
    color: var(--gold);
}
.record-seal-panel .official-command:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}
.record-seal-panel .official-command:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}
.record-seal-panel .official-command[hidden] {
    display: none;
}
.record-seal-status {
    grid-column: 1 / -1;
    min-height: 1.4em;
    color: var(--panel-muted);
    font-size: 0.92rem;
}
.record-seal-panel.is-dismissed {
    opacity: 0.72;
}
.record-seal-panel.is-unlocked {
    border-color: rgba(184, 155, 94, 0.72);
}
@media (max-width: 820px) {
    .record-seal-panel {
        grid-template-columns: 1fr;
    }
    .record-seal-actions {
        justify-content: stretch;
    }
    .record-seal-panel .official-command {
        width: 100%;
    }
}

.profile-entry-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(184, 155, 94, 0.42);
    border-radius: 3px;
    padding: clamp(24px, 4vw, 44px);
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.16), rgba(111, 29, 29, 0.08)),
        var(--panel-dark);
    color: var(--cream);
}
.profile-entry-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 210px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.09;
    pointer-events: none;
}
.profile-entry-card > *:not(.stamp) {
    position: relative;
    z-index: 1;
}
.profile-entry-card h2 {
    max-width: 760px;
    margin-top: 12px;
    color: var(--gold);
    font-size: clamp(2.2rem, 4vw, 4.8rem);
}
.profile-entry-card p:not(.section-kicker) {
    max-width: 760px;
    margin-top: 14px;
    color: var(--panel-muted);
    font-size: clamp(1.05rem, 1.4vw, 1.22rem);
    line-height: 1.55;
}

.profile-entry-band {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
    gap: 16px;
    align-items: stretch;
    background: #0d0b0a;
    padding-top: clamp(24px, 4vw, 54px);
}
.profile-feed-panel {
    border: 1px solid rgba(184, 155, 94, 0.3);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.58);
    color: var(--cream);
}
.profile-feed-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    border-bottom: 1px solid rgba(184, 155, 94, 0.2);
    padding: 14px 16px;
}
.profile-feed-heading span,
.profile-feed-card span,
.amendment-subtitle {
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.profile-feed-heading strong {
    color: var(--panel-muted);
    font: 800 0.72rem/1.2 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.profile-feed-grid {
    display: grid;
    gap: 0;
}
.profile-feed-card {
    min-height: 128px;
    border-bottom: 1px solid rgba(184, 155, 94, 0.16);
    padding: 16px;
    background: rgba(241, 234, 223, 0.03);
}
.profile-feed-card:last-child {
    border-bottom: 0;
}
.profile-feed-card h3 {
    margin: 10px 0 0;
    color: var(--cream);
    font-size: clamp(1.2rem, 1.8vw, 1.8rem);
}
.profile-feed-card p {
    margin: 8px 0 0;
    color: var(--panel-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}
.profile-feed-card.is-muted {
    opacity: 0.76;
}
.profile-feed-card.is-fresh {
    background: rgba(184, 155, 94, 0.08);
}
.amendment-subsection {
    display: grid;
    gap: 12px;
    border-top: 1px solid rgba(184, 155, 94, 0.22);
    padding-top: 18px;
}
.amendment-subtitle {
    margin: 0;
}
.entry-composer-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
    gap: 12px;
}
.amendment-console select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #0d0b0a;
    color: var(--cream);
    padding: 10px 12px;
}
@media (max-width: 1120px) {
    .profile-entry-band {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .entry-composer-grid {
        grid-template-columns: 1fr;
    }
}
.statement-band .profile-statement {
    margin: 0;
    max-width: 760px;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.4;
    color: var(--cream);
    border-left: 2px solid var(--gold);
    padding-left: clamp(16px, 2vw, 26px);
}
.profile-personal-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.54fr);
    gap: 16px;
    align-items: stretch;
    background:
        linear-gradient(180deg, rgba(111, 29, 29, 0.1), rgba(9, 8, 7, 0)),
        #0d0b0a;
}
.profile-personal-card {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: clamp(24px, 4vw, 42px);
    background: var(--panel-dark);
    color: var(--cream);
}
.profile-personal-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -48px;
    width: 190px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}
.profile-personal-card > *:not(.stamp) {
    position: relative;
    z-index: 1;
}
.profile-personal-card .profile-statement {
    margin: 18px 0 0;
    max-width: 820px;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.38;
    color: var(--gold);
    border-left: 2px solid var(--gold);
    padding-left: clamp(16px, 2vw, 24px);
}
.signals-card {
    background:
        linear-gradient(150deg, rgba(184, 155, 94, 0.1), rgba(9, 8, 7, 0) 42%),
        var(--panel-dark);
}
.signals-card h2 {
    margin-top: 12px;
    color: var(--cream);
    font-size: clamp(1.9rem, 3.2vw, 3.6rem);
}
.signal-ledger {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.signal-ledger span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(184, 155, 94, 0.5);
    border-radius: 3px;
    padding: 8px 10px;
    color: var(--gold);
    background: rgba(241, 234, 223, 0.05);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.signal-ledger span.is-muted {
    border-color: rgba(184, 155, 94, 0.24);
    color: rgba(216, 207, 193, 0.72);
    background: rgba(241, 234, 223, 0.025);
}
/* Declared signals link to their registry page; same chip, invitation on hover. */
.signal-ledger a.signal-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(184, 155, 94, 0.5);
    border-radius: 3px;
    padding: 8px 10px;
    color: var(--gold);
    background: rgba(241, 234, 223, 0.05);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.signal-ledger a.signal-link:hover,
.signal-ledger a.signal-link:focus-visible {
    border-color: var(--gold);
    background: rgba(184, 155, 94, 0.18);
    color: var(--cream);
}
.signal-edit-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1120px) {
    .profile-personal-band {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .profile-detail-grid,
    .signal-edit-segment {
        grid-template-columns: 1fr;
    }
    .profile-detail-grid .amendment-field:last-child {
        grid-column: auto;
    }
}

.amendment-console {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: clamp(24px, 4vw, 42px);
    background:
        linear-gradient(120deg, rgba(184, 155, 94, 0.1), rgba(9, 8, 7, 0) 52%),
        var(--panel-dark);
    color: var(--cream);
}
.amendment-console h2 {
    margin: 4px 0 8px;
}
.amendment-console .section-lede {
    margin: 0 0 24px;
    color: var(--panel-muted);
}
.amendment-form {
    display: grid;
    gap: 20px;
    max-width: 620px;
}
.profile-detail-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.34fr) minmax(190px, 0.66fr);
    gap: 16px;
}
.profile-detail-grid .amendment-field:last-child {
    grid-column: 1 / -1;
}
@media (max-width: 720px) {
    .profile-detail-grid {
        grid-template-columns: 1fr;
    }
    .profile-detail-grid .amendment-field:last-child {
        grid-column: auto;
    }
}
.amendment-field {
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
}
.amendment-label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.amendment-hint {
    margin-left: 8px;
    color: var(--ink-muted);
    font-weight: 700;
    letter-spacing: 0.08em;
}
.amendment-console input[type="text"],
.amendment-console input[type="email"],
.amendment-console select,
.amendment-console textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #0d0b0a;
    color: var(--cream);
    font-family: inherit;
    font-size: 0.95rem;
}
.amendment-console textarea {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.5;
    resize: vertical;
}
.amendment-console input[type="text"]:focus,
.amendment-console input[type="email"]:focus,
.amendment-console select:focus,
.amendment-console textarea:focus {
    border-color: var(--gold);
}
.amendment-console input[type="text"]:focus:not(:focus-visible),
.amendment-console input[type="email"]:focus:not(:focus-visible),
.amendment-console select:focus:not(:focus-visible),
.amendment-console textarea:focus:not(:focus-visible) {
    outline: none;
}
.amendment-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.amendment-segment label {
    position: relative;
    cursor: pointer;
}
.amendment-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.amendment-segment span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(184, 155, 94, 0.5);
    border-radius: 3px;
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.amendment-segment input:checked + span {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}
.amendment-segment input:focus-visible + span {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.signal-edit-field .amendment-hint {
    color: var(--panel-muted);
}
/* "Declare your own signal" row under a signal checkbox grid. */
.signal-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: stretch;
}
.signal-add-row input[type="text"] {
    flex: 1 1 220px;
    width: auto;
}
.signal-add-note {
    margin: 10px 0 0;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.signal-edit-segment {
    gap: 8px;
}
.signal-edit-segment label {
    display: block;
}
.signal-edit-segment span {
    position: relative;
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 10px 12px 10px 40px;
    border-color: rgba(184, 155, 94, 0.32);
    background: rgba(241, 234, 223, 0.025);
    color: var(--panel-muted);
    text-align: left;
    line-height: 1.25;
}
.signal-edit-segment span::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(184, 155, 94, 0.62);
    border-radius: 2px;
    transform: translateY(-50%);
    background: rgba(9, 8, 7, 0.35);
}
.signal-edit-segment input:checked + span {
    border-color: rgba(184, 155, 94, 0.82);
    background: rgba(184, 155, 94, 0.16);
    color: var(--cream);
}
.signal-edit-segment input:checked + span::before {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: inset 0 0 0 3px var(--panel-dark);
}
.signal-edit-segment label:hover span {
    border-color: rgba(184, 155, 94, 0.7);
    background: rgba(184, 155, 94, 0.08);
    color: var(--cream);
}
.authority-edit-segment:not(.signal-edit-segment) {
    gap: 8px;
}
.authority-edit-segment:not(.signal-edit-segment) span {
    position: relative;
    padding-left: 38px;
    border-color: rgba(184, 155, 94, 0.34);
    background: rgba(241, 234, 223, 0.025);
    color: var(--panel-muted);
}
.authority-edit-segment:not(.signal-edit-segment) span::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 13px;
    height: 13px;
    border: 1px solid rgba(184, 155, 94, 0.62);
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(9, 8, 7, 0.35);
}
.authority-edit-segment:not(.signal-edit-segment) input:checked + span {
    border-color: rgba(184, 155, 94, 0.82);
    background: rgba(184, 155, 94, 0.16);
    color: var(--cream);
}
.authority-edit-segment:not(.signal-edit-segment) input:checked + span::before {
    border-color: var(--gold);
    background: radial-gradient(circle, var(--gold) 0 40%, transparent 43%);
}
.authority-edit-segment:not(.signal-edit-segment) label:hover span {
    border-color: rgba(184, 155, 94, 0.7);
    background: rgba(184, 155, 94, 0.08);
    color: var(--cream);
}
.amendment-locked {
    border-top: 1px solid var(--gold-soft);
    padding-top: 16px;
}
.amendment-locked-label {
    margin: 0 0 12px;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.amendment-locked-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.amendment-locked-grid > div {
    background: rgba(241, 234, 223, 0.05);
    border: 1px solid var(--gold-soft);
    border-radius: 3px;
    padding: 10px 12px;
}
.amendment-locked-grid span {
    display: block;
    color: var(--ink-muted);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.amendment-locked-grid strong {
    color: var(--panel-muted);
    font-size: 0.9rem;
    font-weight: 700;
}
.amendment-status {
    min-height: 1.4em;
    margin: 0;
    color: var(--panel-muted);
    font-size: 0.92rem;
}
.amendment-status.is-filed {
    display: inline-block;
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid rgba(184, 155, 94, 0.6);
    padding: 6px 10px;
    transform: rotate(-2deg);
}
.amendment-status-link {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.amendment-status-link::before {
    content: "//";
    margin-right: 10px;
    opacity: 0.72;
}
.amendment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.amendment-console .official-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid var(--gold);
    border-radius: 3px;
    background: var(--red);
    color: var(--cream);
    font: 900 0.72rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}
.amendment-console .official-command.ghost {
    background: transparent;
    color: var(--gold);
}
.amendment-console .official-command:hover {
    background: var(--gold);
    color: var(--ink);
}
.amendment-console .official-command:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}
@media (max-width: 820px) {
    .amendment-actions {
        justify-content: stretch;
    }
    .amendment-console .official-command {
        flex: 1;
    }
}

.profile-hero {
    align-items: start;
    min-height: auto;
    gap: clamp(28px, 4vw, 60px);
}
.profile-hero .hero-copy {
    justify-content: flex-start;
}
.profile-hero-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    gap: 0;
    margin: 12px 0 0;
    padding: 6px 10px 6px 8px;
    border-top: 1px solid rgba(184, 155, 94, 0.34);
    border-bottom: 1px solid rgba(184, 155, 94, 0.2);
    border-left: 3px solid rgba(111, 29, 29, 0.78);
    border-right: 1px solid rgba(184, 155, 94, 0.28);
    background:
        linear-gradient(90deg, rgba(111, 29, 29, 0.18), rgba(184, 155, 94, 0.05) 42%, rgba(9, 8, 7, 0)),
        rgba(9, 8, 7, 0.34);
    box-shadow: inset 0 1px 0 rgba(245, 239, 229, 0.04);
}
.profile-meta-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 28px;
    padding: 0 9px;
    color: var(--cream);
    cursor: help;
}
.profile-meta-badge + .profile-meta-badge::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 16px;
    transform: translateY(-50%);
    background: rgba(184, 155, 94, 0.34);
}
.profile-meta-symbol {
    display: inline-block;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 1.28rem;
    line-height: 1;
}
.profile-meta-icon {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.28));
}
.profile-meta-icon-country {
    width: 27px;
    height: 20px;
}
.profile-meta-icon-gender-female,
.profile-meta-icon-gender-male {
    width: 21px;
    height: 21px;
    opacity: 0.94;
}
.profile-meta-icon-generation {
    width: 23px;
    height: 23px;
}
.profile-meta-badge:hover,
.profile-meta-badge:focus-visible {
    background: rgba(184, 155, 94, 0.1);
}
@media (max-width: 560px) {
    .profile-hero-meta {
        margin-top: 10px;
        padding: 5px 9px 5px 7px;
    }
    .profile-meta-badge {
        min-width: 29px;
        min-height: 28px;
        padding: 0 8px;
    }
    .profile-meta-symbol {
        font-size: 1.18rem;
    }
}
.record-feed-preview {
    width: min(720px, 100%);
    margin-top: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 3px;
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.1), rgba(111, 29, 29, 0.1)),
        rgba(9, 8, 7, 0.62);
    color: var(--cream);
}
.record-feed-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid rgba(184, 155, 94, 0.22);
    padding: 14px 16px;
}
.record-feed-header span,
.record-log-stamp span {
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.record-feed-header strong {
    color: var(--panel-muted);
    font: 800 0.72rem/1.2 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.record-feed-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.record-feed-list li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border-bottom: 1px solid rgba(184, 155, 94, 0.16);
    border-left: 3px solid rgba(184, 155, 94, 0.4);
    padding: 14px 16px;
}
.record-feed-list li:last-child {
    border-bottom: 0;
}
.record-log-stamp {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}
.record-feed-list strong {
    display: block;
    color: var(--cream);
    font: 900 0.9rem/1.2 "Segoe UI", Inter, Arial, sans-serif;
}
.record-feed-list small {
    display: block;
    color: var(--panel-muted);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
}
.record-feed-list li.is-fresh {
    background: rgba(184, 155, 94, 0.08);
}
.record-feed-list p {
    margin: 0;
    color: var(--cream);
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.record-feed-list p a {
    color: var(--gold);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.record-feed-list p a:hover,
.record-feed-list p a:focus-visible {
    color: var(--cream);
}

/* Category cues: gold rail = institute event, bone rail + serif "voice" =
   the keeper's own words, red rail + dot = a reaction. */
.record-feed-list li.kind-entry {
    border-left-color: #e7d8b6;
}
.record-feed-list li.kind-reaction {
    border-left-color: var(--red-soft);
}
.record-feed-list li.kind-entry .record-log-body {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    color: #efe2c8;
}
.record-feed-list li.kind-reaction .record-log-stamp span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.record-feed-list li.kind-reaction .record-log-stamp span::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red-soft);
}
.record-feed-list li.kind-message {
    border-left-color: var(--gold);
}
.record-feed-list li.kind-image {
    border-left-color: #e7d8b6;
    background: rgba(184, 155, 94, 0.045);
}
.record-log-thumb {
    position: relative;
    overflow: hidden;
    display: block;
    width: min(132px, 100%);
    aspect-ratio: 1;
    margin: 0 0 10px;
    border: 1px solid rgba(184, 155, 94, 0.54);
    border-radius: 3px;
    padding: 0;
    background: #0d0b0a;
    cursor: zoom-in;
}
/* A board plate thumb navigates to the plate page instead of zooming. */
.kind-board .record-log-thumb {
    cursor: pointer;
}
.record-log-thumb::after,
.visual-record-image::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(245, 239, 229, 0.12);
    pointer-events: none;
}
.record-log-thumb img,
.visual-record-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.record-log-thumb:hover,
.record-log-thumb:focus-visible,
.visual-record-image:hover,
.visual-record-image:focus-visible {
    border-color: var(--gold);
    background: #0d0b0a;
    color: inherit;
}
.record-log-thumb:focus-visible,
.visual-record-image:focus-visible,
.visual-record-delete:focus-visible,
.image-lightbox-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.record-log-hide {
    margin-top: 8px;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    color: var(--panel-muted);
    font: 800 0.58rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    cursor: pointer;
}
.record-log-hide:hover,
.record-log-hide:focus-visible {
    border-color: var(--red-soft);
    color: var(--red-soft);
}
@media (max-width: 720px) {
    .record-feed-list li {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .record-log-stamp {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
    }
    .record-log-thumb {
        width: min(154px, 52vw);
    }
}

/* Record section tabs (Profile / Registry Log / Visual Record).
   A stamped strip below the hero: hairline rules, wide-tracked uppercase labels
   and the diamond motif echo the reaction kicker. The active tab carries gold. */
.record-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 2vw, 20px);
    padding: 0 clamp(20px, 6vw, 96px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--panel-dark);
}
.record-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: -1px; /* sit the active underline on the strip's own rule */
    padding: clamp(15px, 2.2vw, 22px) 4px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--panel-muted);
    font: 900 0.66rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
}
.record-tab::before {
    content: "\25C6"; /* ◆ — echoes the portrait record seal */
    font-size: 0.5rem;
    color: var(--gold);
    opacity: 0.3;
}
.record-tab:hover {
    color: var(--cream);
}
.record-tab[aria-selected="true"] {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.record-tab[aria-selected="true"]::before {
    opacity: 0.9;
}
.record-tab:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.record-tab-panel[hidden] {
    display: none;
}

/* Full log inside the log tab: the same feed band as the hero preview, but
   spanning the section column rather than the narrow hero strip. */
.record-log-full {
    margin-top: clamp(18px, 3vw, 30px);
    max-width: 880px;
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.62);
    color: var(--cream);
}

.visual-record-section {
    background: #0d0b0a;
}
.visual-record-shell {
    display: grid;
    gap: clamp(18px, 3vw, 28px);
    max-width: 1080px;
}
.visual-record-heading h2 {
    max-width: 760px;
    margin-top: 10px;
    color: var(--gold);
    font-size: clamp(2.1rem, 4vw, 4.6rem);
}
.visual-record-heading p:not(.section-kicker) {
    max-width: 700px;
    margin-top: 12px;
    color: var(--panel-muted);
}
.visual-record-empty span {
    display: block;
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.visual-record-empty {
    position: relative;
    overflow: hidden;
    max-width: 720px;
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 3px;
    padding: clamp(22px, 4vw, 34px);
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.1), rgba(9, 8, 7, 0) 58%),
        var(--panel-dark);
    color: var(--cream);
}
.visual-record-empty::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -46px;
    width: 190px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}
.visual-record-empty strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    font-weight: 700;
}
.visual-record-empty p {
    position: relative;
    z-index: 1;
    margin: 12px 0 0;
    color: var(--panel-muted);
}
.visual-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
}
.visual-record-tile {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 3px;
    background: rgba(241, 234, 223, 0.055);
    color: var(--cream);
}
.visual-record-tile.is-fresh {
    box-shadow: 0 0 0 1px rgba(184, 155, 94, 0.34), 0 16px 36px rgba(0, 0, 0, 0.18);
}
.visual-record-image {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-bottom: 1px solid rgba(184, 155, 94, 0.26);
    border-radius: 0;
    padding: 0;
    background: #0d0b0a;
    cursor: zoom-in;
}
.visual-record-tile p {
    min-height: 3.2em;
    margin: 0;
    padding: 10px 11px 12px;
    color: var(--panel-muted);
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.visual-record-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(184, 155, 94, 0.62);
    border-radius: 3px;
    padding: 0 9px;
    background: rgba(9, 8, 7, 0.82);
    color: var(--gold);
    font: 900 0.56rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}
.visual-record-delete:hover,
.visual-record-delete:focus-visible {
    border-color: var(--red-soft);
    background: var(--red);
    color: var(--cream);
}
.image-lightbox[hidden] {
    display: none;
}
.has-image-lightbox {
    overflow: hidden;
}
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 44px);
    padding-bottom: max(clamp(16px, 4vw, 44px), env(safe-area-inset-bottom));
    background: rgba(9, 8, 7, 0.88);
    color: var(--cream);
}
.image-lightbox-frame {
    position: relative;
    display: grid;
    gap: 12px;
    width: min(980px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: clamp(12px, 2vw, 18px);
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.08), rgba(111, 29, 29, 0.08)),
        var(--panel-dark);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}
.image-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: min(74vh, 820px);
    justify-self: center;
    border: 1px solid rgba(184, 155, 94, 0.32);
    object-fit: contain;
}
.image-lightbox-caption {
    margin: 0;
    color: var(--panel-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.4;
}
.image-lightbox-close {
    justify-self: end;
    min-height: 40px;
    border: 1px solid var(--gold);
    border-radius: 3px;
    padding: 9px 12px;
    background: transparent;
    color: var(--gold);
    font: 900 0.62rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    cursor: pointer;
}
.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
    background: var(--gold);
    color: var(--ink);
}

/* Narrow screens: keep the tabs on one line as an equal-width segmented strip
   (a vertical stack would read as a menu, not tabs). Tighter type and no
   diamond so the labels stay legible. */
@media (max-width: 720px) {
    .record-tabs {
        flex-wrap: nowrap;
        gap: 0;
        padding: 0;
    }
    .record-tab {
        flex: 1 1 0;
        justify-content: center;
        gap: 6px;
        padding: 14px 6px;
        font-size: 0.6rem;
        letter-spacing: 0.12em;
        text-align: center;
        white-space: nowrap;
    }
    .record-tab::before {
        display: none;
    }
    .visual-record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .visual-record-tile p {
        min-height: 0;
        font-size: 0.78rem;
    }
    .image-lightbox {
        align-items: start;
        padding: 10px;
    }
    .image-lightbox-frame {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    .image-lightbox-image {
        max-height: 68vh;
    }
}
@media (max-width: 420px) {
    .record-tab {
        padding-right: 4px;
        padding-left: 4px;
        font-size: 0.54rem;
        letter-spacing: 0.08em;
    }
}

.profile-hero-stack {
    display: grid;
    /* auto rows so the 4/5 portrait gets its full height. A fractional row
       here would size shorter than the portrait, which (align-self:start)
       then overflows downward under the record panel and hides the portrait
       seal. The image itself keeps aspect-ratio:4/5 + object-fit:cover. */
    grid-template-rows: auto auto;
    gap: 16px;
    align-self: start;
    width: 100%;
    min-width: 0;
}
.profile-hero .hero-record {
    max-width: none;
    min-height: 0;
}
.profile-hero-stack .profile-portrait {
    align-self: start;
    width: 100%;
    min-height: clamp(360px, 48vw, 620px);
}
@media (max-width: 1120px) {
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero .profile-hero-stack {
        max-width: 520px;
        justify-self: center;
        width: 100%;
    }
}
@media (max-width: 720px) {
    .profile-hero {
        gap: 28px;
    }

    .profile-hero .profile-hero-stack {
        max-width: none;
    }
}
.profile-portrait {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold);
    border-radius: 3px;
    background:
        linear-gradient(160deg, rgba(184, 155, 94, 0.08), rgba(9, 8, 7, 0)),
        var(--panel-dark);
}
.portrait-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.portrait-seal {
    position: absolute;
    right: 9px;
    bottom: 9px;
    width: 38%;
    max-width: 128px;
    pointer-events: none;
    transform: rotate(-6deg);
    opacity: 0.92;
}
.portrait-seal svg {
    display: block;
    width: 100%;
    height: auto;
}
.portrait-seal::before {
    content: "";
    position: absolute;
    inset: -16%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(9, 8, 7, 0.55), rgba(9, 8, 7, 0));
}
.profile-portrait:not([data-has-portrait="1"]) .portrait-seal {
    display: none;
}
.profile-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/seal.svg") center / 52% no-repeat;
    opacity: 0.08;
    pointer-events: none;
}
.profile-portrait[data-has-portrait="1"]::after {
    display: none;
}
.profile-portrait-placeholder {
    position: relative;
    z-index: 1;
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.amendment-portrait-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.amendment-portrait-thumb {
    width: 104px;
    flex: 0 0 auto;
}
.amendment-portrait-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.portrait-choose {
    cursor: pointer;
}
.amendment-portrait-status {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.8rem;
}
.amendment-console .official-command[hidden] {
    display: none;
}

.hero-claim {
    margin-top: clamp(18px, 2.5vw, 26px);
    padding-top: clamp(16px, 2vw, 20px);
    border-top: 1px solid var(--gold-soft);
}
.hero-claim-line {
    margin: 0 0 12px;
    color: var(--panel-muted);
    font-size: 0.92rem;
}
.hero-claim .record-seal-actions {
    justify-content: flex-start;
}
.hero-claim-unsealed {
    border: 1px solid var(--gold);
    border-top: 1px solid var(--gold);
    border-radius: 3px;
    padding: clamp(16px, 2.5vw, 22px);
    background: linear-gradient(120deg, rgba(184, 155, 94, 0.16), rgba(9, 8, 7, 0) 60%);
}
.hero-claim-unsealed .hero-claim-line {
    color: var(--cream);
}
.hero-claim-unsealed .hero-claim-line strong {
    color: var(--gold);
}

/* Claim ceremony: one-time keeper prompt on the fresh public record. */
.claim-ceremony {
    margin-top: 18px;
    padding: clamp(18px, 2.5vw, 26px);
    border: 1px solid var(--gold);
    border-radius: 3px;
    background: linear-gradient(120deg, rgba(184, 155, 94, 0.16), rgba(9, 8, 7, 0) 60%);
    color: var(--cream);
}
.claim-ceremony.is-dismissed {
    opacity: 0.72;
}
.claim-ceremony .section-kicker {
    color: var(--gold);
}
.claim-ceremony h3 {
    margin: 6px 0 8px;
}
.claim-ceremony-lede {
    margin: 0 0 16px;
    color: var(--panel-muted);
    font-size: 0.95rem;
}
.claim-ceremony .record-seal-actions {
    justify-content: flex-start;
}
.claim-ceremony .record-seal-status {
    margin: 12px 0 0;
    min-height: 1.2em;
    color: var(--gold);
    font-size: 0.9rem;
}
.claim-ceremony .record-seal-correspondence {
    display: grid;
    gap: 14px;
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(184, 155, 94, 0.35);
}
.claim-ceremony .record-seal-correspondence[hidden] {
    display: none;
}
.claim-ceremony .record-seal-correspondence-lede {
    margin: 0;
    color: var(--panel-muted);
    font-size: 0.92rem;
}
.claim-ceremony .record-seal-field {
    display: grid;
    gap: 7px;
}
.claim-ceremony .record-seal-field span {
    color: var(--gold);
    font: 900 0.66rem/1.3 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.claim-ceremony .record-seal-field input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid rgba(184, 155, 94, 0.45);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.6);
    color: var(--cream);
    font-family: inherit;
    font-size: 0.95rem;
}
.claim-ceremony .record-seal-field input:focus {
    border-color: var(--gold);
}
.claim-ceremony .record-seal-field input:focus:not(:focus-visible) {
    outline: none;
}
.claim-ceremony .record-seal-correspondence .official-command {
    justify-self: start;
}
@media (max-width: 560px) {
    .claim-ceremony .record-seal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .claim-ceremony .official-command {
        width: 100%;
    }
    .claim-ceremony .record-seal-correspondence .official-command {
        justify-self: stretch;
    }
}

.visitor-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    background: var(--panel-dark);
    border-top: 1px solid var(--line);
}
.visitor-cta h2 {
    margin: 6px 0 12px;
}
.visitor-cta .section-lede {
    margin: 0 0 24px;
    color: var(--panel-muted);
    max-width: 540px;
}
.visitor-alt {
    margin-top: clamp(20px, 3vw, 28px);
    padding-top: clamp(16px, 2vw, 20px);
    border-top: 1px solid var(--gold-soft);
}
.visitor-alt p {
    margin: 0 0 14px;
    max-width: 540px;
    color: var(--ink-muted);
    font-style: italic;
    font-size: 0.95rem;
}
.owner-amend {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: clamp(20px, 3vw, 30px);
    background: #0d0b0a;
    color: var(--cream);
}
.owner-amend .section-lede {
    margin: 0 0 16px;
    color: var(--panel-muted);
}
.owner-amend .record-seal-actions {
    justify-content: flex-start;
}

.hero-claim .official-command,
.owner-amend .official-command,
.claim-ceremony .official-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--gold);
    border-radius: 3px;
    background: var(--red);
    color: var(--cream);
    font: 900 0.72rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}
.hero-claim .official-command.ghost,
.owner-amend .official-command.ghost,
.claim-ceremony .official-command.ghost {
    background: transparent;
    color: var(--gold);
}
.hero-claim .official-command:hover,
.owner-amend .official-command:hover,
.claim-ceremony .official-command:hover {
    background: var(--gold);
    color: var(--ink);
}
.hero-claim .official-command:disabled,
.owner-amend .official-command:disabled,
.claim-ceremony .official-command:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}
.hero-claim .official-command[hidden],
.owner-amend .official-command[hidden],
.claim-ceremony .official-command[hidden] {
    display: none;
}
@media (max-width: 820px) {
    .visitor-band {
        grid-template-columns: 1fr;
    }
}
#program {
    grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.72fr);
    gap: clamp(28px, 5vw, 72px);
    scroll-margin-top: 96px;
}
#service-profiles {
    scroll-margin-top: 96px;
}
.assessment-archive-band .feature-image {
    width: 100%;
    min-width: 0;
    min-height: clamp(360px, 42vw, 620px);
}
.stage-ledger {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: stretch;
}
.stage-ledger article {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 3px;
    padding: clamp(18px, 2.4vw, 28px);
    background:
        linear-gradient(180deg, rgba(241, 234, 223, 0.075), rgba(241, 234, 223, 0.018)),
        var(--panel-dark);
    color: var(--cream);
}
.stage-ledger article::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(var(--gold), rgba(111, 29, 29, 0.18));
    opacity: 0.72;
}
.stage-ledger article::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -38px;
    width: 118px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.055;
    pointer-events: none;
}
.program-stage-ledger {
    margin-top: clamp(22px, 3vw, 34px);
}
.program-stage-ledger article {
    min-height: 132px;
}.stage-ledger article:last-child {
    grid-column: 1 / -1;
}
.stage-ledger h3 {
    position: relative;
    margin: 0;
    color: var(--gold);
    font-size: clamp(1.45rem, 2vw, 2.3rem);
}
.stage-ledger p {
    position: relative;
    margin: 14px 0 0;
    color: var(--panel-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}@media (max-width: 1120px) {
    #program {
        grid-template-columns: 1fr;
    }
    .stage-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .assessment-archive-band .feature-image {
        min-height: clamp(300px, 76vw, 520px);
    }
    .stage-ledger {
        grid-template-columns: 1fr;
    }
    .stage-ledger article {
        min-height: 0;
    }
}
/* Stage locking for registration flows */
.enrollment-gate.is-sealed,
.authority-gate.is-sealed,
.flow-step.is-sealed {
    position: relative;
}

.enrollment-gate.is-sealed :is(input, select, textarea, button:not(.stage-revise)),
.authority-gate.is-sealed :is(input, select, textarea, button:not(.stage-revise)),
.flow-step.is-sealed :is(input, select, textarea, .role-card, .authority-choice, .authority-signal-choice, .classify-enrollment, .request-reclassification, .accept-function, .save-profile, #issueMandate, #sealLocalDossier) {
    pointer-events: none;
}

.flow-step.is-sealed :is(.complete-enrollment, .authority-registry-link, .stage-revise),
.enrollment-gate.is-sealed .stage-revise,
.authority-gate.is-sealed .stage-revise {
    pointer-events: auto;
}

.enrollment-gate.is-sealed :is(input, select, textarea),
.authority-gate.is-sealed :is(input, select, textarea),
.flow-step.is-sealed :is(input, select, textarea),
.flow-step.is-sealed :is(.role-card, .authority-choice, .authority-signal-choice) {
    filter: saturate(0.72);
    opacity: 0.74;
}

.stage-seal-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(184, 155, 94, 0.42);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.62);
    color: var(--panel-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.stage-seal-notice span {
    min-width: min(100%, 240px);
}

.stage-revise {
    min-height: 44px;
    border: 1px solid rgba(184, 155, 94, 0.7);
    border-radius: 3px;
    background: rgba(184, 155, 94, 0.08);
    color: var(--cream);
    padding: 0 14px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.stage-revise:hover,
.stage-revise:focus-visible {
    background: var(--gold);
    color: var(--ink);
}

@media (max-width: 560px) {
    .stage-seal-notice {
        align-items: stretch;
    }

    .stage-revise {
        width: 100%;
    }
}

/* Envelope badge on the profile hero meta strip: opens (or starts) the
   sealed letter line to this file. An anchor between the info badges. */
.profile-meta-badge-letter {
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease;
}
.profile-meta-badge-letter:hover,
.profile-meta-badge-letter:focus-visible {
    transform: translateY(-1px);
}

/* Home Registry Ledger presence line: one quiet activity signal above the
   feed. Rendered only when the week counted 3+ moving records, so a slow
   week never advertises silence. */
.home-ledger-presence {
    margin: 14px 0 0;
    color: var(--gold);
    font: 900 0.72rem/1.4 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
