/* ==========================================================================
   Obsign — archival precision design system
   Editorial public pages + dense administrative console.
   ========================================================================== */

:root {
    color-scheme: light;
    --paper: #f4f1e7;
    --paper-deep: #ece7d9;
    --surface: #fffdf7;
    --surface-2: #faf7ee;
    --surface-3: #f3eee1;
    --ink: #17241d;
    --ink-soft: #2c3a31;
    --muted: #6c766e;
    --muted-2: #8c948d;
    --line: #e3ddcc;
    --line-strong: #d4cab5;
    --forest: #14382b;
    --forest-2: #1c4b39;
    --forest-3: #2c6a51;
    --forest-mist: #e8f0ea;
    --gold: #a9823a;
    --gold-2: #c49a4d;
    --gold-soft: #efe2c4;
    --danger: #a63d2f;
    --danger-bg: #faeee8;
    --success: #2f6b4f;
    --success-bg: #e9f3ed;
    --warn: #94631c;
    --warn-bg: #fbf2df;
    --info: #2f5d7a;
    --info-bg: #eaf1f6;
    --shadow-xs: 0 1px 2px rgba(23, 36, 29, 0.04);
    --shadow-sm: 0 4px 18px rgba(23, 36, 29, 0.06);
    --shadow-md: 0 16px 44px rgba(20, 40, 31, 0.11);
    --shadow-lg: 0 30px 80px rgba(14, 32, 24, 0.18);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --font-sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    --font-display: Georgia, "Times New Roman", "Songti SC", "SimSun", "Noto Serif SC", serif;
    --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", "Courier New", monospace;
    --sidebar-width: 264px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 520px at 84% -10%, rgba(169, 130, 58, 0.09), transparent 60%),
        radial-gradient(900px 500px at -5% 12%, rgba(44, 106, 81, 0.07), transparent 58%),
        var(--paper);
}

::selection {
    background: rgba(169, 130, 58, 0.25);
}

a {
    color: var(--forest-3);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
    color: var(--forest);
}

h1, h2, h3, h4, h5 {
    margin: 0;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.2;
}

p {
    margin: 0;
}

code, pre, .mono {
    font-family: var(--font-mono);
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img, svg {
    max-width: 100%;
}

.icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: -0.15em;
}

.hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.muted {
    color: var(--muted) !important;
}

.small {
    font-size: 0.8rem;
}

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Typography & common atoms
   -------------------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: var(--gold-soft);
}

.eyebrow__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(169, 130, 58, 0.15);
}

.step-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.62rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--forest-3);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.15em;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 550;
}

.text-link:hover {
    color: var(--forest-3);
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.section-title h2 {
    font-size: 1.2rem;
}

.section-title p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.86rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.7rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 0.87rem;
    font-weight: 650;
    letter-spacing: 0.005em;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.copy-button:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.btn--primary {
    background: var(--forest);
    border-color: var(--forest);
    color: #fdfbf3;
    box-shadow: 0 8px 24px rgba(20, 56, 43, 0.18);
}

.btn--primary:hover {
    background: var(--forest-2);
    border-color: var(--forest-2);
    color: #fff;
    box-shadow: 0 12px 30px rgba(20, 56, 43, 0.23);
}

.btn--secondary {
    background: var(--forest-mist);
    border-color: #cfe0d5;
    color: var(--forest);
}

.btn--secondary:hover {
    background: #ddeae1;
    color: var(--forest);
}

.btn--ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.btn--ghost:hover {
    background: var(--surface-2);
    border-color: #c4b99f;
    color: var(--ink);
}

.btn--light {
    background: #f6e9c9;
    border-color: #f6e9c9;
    color: var(--forest);
}

.btn--light:hover {
    background: #fff4da;
    color: var(--forest);
}

.btn--danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff8f4;
}

.btn--danger:hover {
    background: #8d3024;
    border-color: #8d3024;
}

.btn--danger-text {
    color: var(--danger);
}

.btn--danger-text:hover {
    background: var(--danger-bg);
    border-color: #eccfc5;
    color: var(--danger);
}

.btn--sm {
    min-height: 34px;
    padding: 0.44rem 0.78rem;
    border-radius: 8px;
    font-size: 0.79rem;
}

.btn--block {
    width: 100%;
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
}

.icon-btn--danger:hover {
    background: var(--danger-bg);
    border-color: #eed4ca;
    color: var(--danger);
}

.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 30px;
    padding: 0.28rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.16s ease;
}

.copy-button:hover {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--surface-2);
}

.copy-button--compact {
    width: 28px;
    min-height: 28px;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Badges, pills, chips
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.58rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
    white-space: nowrap;
}

.badge--neutral {
    background: #f1eee5;
    border-color: #e4dece;
    color: #6b726b;
}

.badge--success {
    background: var(--success-bg);
    border-color: #cfe3d7;
    color: var(--success);
}

.badge--warn {
    background: var(--warn-bg);
    border-color: #ecd9b6;
    color: var(--warn);
}

.badge--danger {
    background: var(--danger-bg);
    border-color: #efd2c7;
    color: var(--danger);
}

.badge--info {
    background: var(--info-bg);
    border-color: #d4e2ec;
    color: var(--info);
}

.step-chip,
.meta-chip {
    white-space: nowrap;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.3rem 0.64rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
}

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b5ada0;
    box-shadow: 0 0 0 3px rgba(181, 173, 160, 0.18);
}

.live-dot.is-live {
    background: #65c996;
    box-shadow: 0 0 0 3px rgba(101, 201, 150, 0.18);
    animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(101, 201, 150, 0.16); }
    50% { box-shadow: 0 0 0 6px rgba(101, 201, 150, 0.04); }
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--forest);
    color: #f4e6c6;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
}

.avatar--lg {
    width: 64px;
    height: 64px;
    font-size: 1.15rem;
}

.big-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--forest-mist);
    border: 1px solid #d4e4d9;
    color: var(--forest-3);
}

.big-icon--success {
    background: var(--success-bg);
    border-color: #cde3d6;
    color: var(--success);
}

.big-icon--danger {
    background: var(--danger-bg);
    border-color: #efd1c6;
    color: var(--danger);
}

.big-icon--warn {
    background: var(--warn-bg);
    border-color: #eddbb8;
    color: var(--warn);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    min-width: 0;
}

.field__label {
    color: var(--ink-soft);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.field__hint {
    color: var(--muted-2);
    font-size: 0.76rem;
    line-height: 1.45;
}

.field__hint--warn {
    color: var(--warn);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 43px;
    padding: 0.68rem 0.82rem;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fffefb;
    color: var(--ink);
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field textarea {
    min-height: 84px;
    resize: vertical;
    line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a9a79b;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--forest-3);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 106, 81, 0.12);
}

.field input:disabled,
.field textarea:disabled,
.field select:disabled {
    background: var(--surface-3);
    color: var(--muted);
    cursor: not-allowed;
}

.field--wide {
    grid-column: 1 / -1;
}

.form-grid {
    display: grid;
    gap: 1.1rem 1.2rem;
}

.form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-input {
    font-family: var(--font-mono) !important;
    font-size: 1.28rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.26em !important;
    text-align: center;
    text-transform: uppercase;
    padding: 0.85rem 1rem !important;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > .icon {
    position: absolute;
    left: 0.9rem;
    color: var(--muted-2);
    pointer-events: none;
}

.input-wrap > input {
    padding-left: 2.55rem;
    padding-right: 2.9rem;
}

.input-wrap__action {
    position: absolute;
    right: 0.25rem;
}

.form-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.85rem 0;
    padding: 0.68rem 0.8rem;
    border: 1px solid #efd2c7;
    border-radius: 9px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 0.81rem;
    line-height: 1.45;
}

.form-error .icon {
    margin-top: 0.15rem;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1rem 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.55;
    cursor: pointer;
}

.consent-row input {
    width: 17px;
    height: 17px;
    margin-top: 0.18rem;
    flex: 0 0 auto;
    accent-color: var(--forest-3);
}

.consent-row strong {
    color: var(--forest);
}

.no-code-box,
.resume-box,
.download-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d6e6db;
    border-radius: 10px;
    background: var(--forest-mist);
    color: var(--forest);
    font-size: 0.8rem;
    line-height: 1.5;
}

.no-code-box .icon,
.resume-box .icon,
.download-warning .icon {
    margin-top: 0.15rem;
}

.resume-box {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    border-color: #e4d6b3;
    background: var(--warn-bg);
    color: var(--ink-soft);
}

.resume-box strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--warn);
}

.resume-box p {
    font-size: 0.77rem;
    color: #7e6a45;
}

.toggle-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer;
}

.toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.toggle-copy strong {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 650;
}

.toggle-copy small {
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.4;
}

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    padding: 0;
    border: 1px solid #d2c9b6;
    border-radius: 999px;
    background: #e7e0d0;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fffdf7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease;
}

.switch.is-on {
    background: var(--forest-3);
    border-color: var(--forest-3);
}

.switch.is-on span {
    transform: translateX(18px);
}

/* --------------------------------------------------------------------------
   Spinner, alerts, empty states
   -------------------------------------------------------------------------- */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(44, 106, 81, 0.22);
    border-top-color: var(--forest-3);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner--sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner--lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.spinner--light {
    border-color: rgba(255, 253, 247, 0.3);
    border-top-color: #fffdf7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.inline-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.inline-alert__icon {
    display: inline-flex;
    margin-top: 0.12rem;
    color: var(--muted);
}

.inline-alert strong {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.83rem;
}

.inline-alert p {
    margin: 0.15rem 0 0;
    color: var(--muted);
}

.inline-alert--danger {
    border-color: #efd2c7;
    background: var(--danger-bg);
    color: var(--danger);
}

.inline-alert--danger .inline-alert__icon {
    color: var(--danger);
}

.inline-alert--danger p {
    color: #83584e;
}

.inline-alert--info {
    border-color: #d6e2ea;
    background: var(--info-bg);
}

.inline-alert--info .inline-alert__icon {
    color: var(--info);
}

.inline-alert--info p {
    color: #566b78;
}

.inline-alert--warn {
    border-color: #ecd9b6;
    background: var(--warn-bg);
}

.inline-alert--warn .inline-alert__icon {
    color: var(--warn);
}

.inline-alert--success {
    border-color: #cfe3d7;
    background: var(--success-bg);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 2.6rem 1.5rem;
    text-align: center;
}

.empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-2);
    color: var(--muted);
}

.empty-state h3 {
    font-size: 0.95rem;
    font-weight: 650;
}

.empty-state p {
    max-width: 42ch;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.empty-state .btn {
    margin-top: 0.7rem;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-stack {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    color: var(--ink-soft);
    font-size: 0.81rem;
    line-height: 1.45;
    pointer-events: auto;
    animation: toast-in 0.22s ease-out;
}

.toast__icon {
    display: inline-flex;
    margin-top: 0.1rem;
    color: var(--forest-3);
}

.toast__text {
    flex: 1;
}

.toast__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted-2);
}

.toast__close:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.toast--success {
    border-color: #cfe3d7;
    background: #f4faf6;
}

.toast--success .toast__icon {
    color: var(--success);
}

.toast--error {
    border-color: #efd2c7;
    background: #fdf5f1;
}

.toast--error .toast__icon {
    color: var(--danger);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(11, 24, 18, 0.55);
    backdrop-filter: blur(4px);
}

.modal-backdrop.is-open {
    display: flex;
    animation: fade-in 0.16s ease-out;
}

.modal-panel {
    display: flex;
    flex-direction: column;
    width: min(600px, 100%);
    max-height: calc(100vh - 2.4rem);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.2s ease-out;
}

.modal-panel--wide {
    width: min(880px, 100%);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.3rem;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    font-size: 1.1rem;
}

.modal-head p {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.79rem;
}

.modal-body {
    overflow-y: auto;
    padding: 1.2rem 1.3rem 1.35rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.modal-actions--left {
    justify-content: flex-start;
    border-top: 0;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------------------------------------------------
   Public shell
   -------------------------------------------------------------------------- */

.public-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-nav,
.public-main,
.public-footer {
    width: min(1220px, calc(100% - 4rem));
    margin: 0 auto;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid rgba(212, 202, 181, 0.55);
}

.brand-link {
    display: inline-flex;
    color: inherit;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    line-height: 1.18;
}

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--forest);
    color: var(--gold-soft);
    box-shadow: inset 0 0 0 1px rgba(239, 226, 196, 0.24);
}

.brand__copy {
    display: flex;
    flex-direction: column;
}

.brand__copy strong {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.brand__copy small {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.brand--light {
    color: #f7f2e4;
}

.brand--light .brand__mark {
    background: var(--gold-soft);
    color: var(--forest);
}

.brand--light .brand__copy small {
    color: #b9c8bd;
}

.public-nav__side {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.public-nav__tag {
    color: var(--muted-2);
    font-size: 0.67rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.public-main {
    flex: 1;
    padding: 2.4rem 0 3rem;
}

.public-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.8rem 0 2.2rem;
    border-top: 1px solid rgba(212, 202, 181, 0.7);
    color: var(--muted);
    font-size: 0.75rem;
}

.public-footer strong {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 0.9rem;
}

.public-footer__meta {
    display: flex;
    gap: 1.2rem;
    color: var(--muted-2);
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 4rem;
    align-items: center;
    min-height: 540px;
    padding: 3.2rem 0 3.6rem;
}

.hero__copy {
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin: 0.4rem 0 1.4rem;
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    font-weight: 550;
    letter-spacing: -0.022em;
    line-height: 1.04;
}

.hero h1 em {
    color: var(--forest-3);
    font-style: italic;
    font-weight: 500;
}

.hero__lead {
    max-width: 56ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero__meta .icon {
    color: var(--gold);
}

.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 470px;
}

.hero__orbit {
    position: absolute;
    border: 1px solid rgba(169, 130, 58, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.hero__orbit--one {
    width: 470px;
    height: 470px;
}

.hero__orbit--two {
    width: 350px;
    height: 350px;
    border-style: dashed;
    border-color: rgba(44, 106, 81, 0.18);
}

.release-card {
    position: relative;
    z-index: 2;
    width: min(350px, 88%);
    padding: 1.35rem;
    border: 1px solid #d9cfb8;
    border-radius: 18px;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 246, 233, 0.96) 100%);
    box-shadow: 0 30px 70px rgba(38, 53, 42, 0.16), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
    transform: rotate(-2.2deg);
}

.release-card__top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.release-card__seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--gold);
}

.release-card__label {
    flex: 1;
    color: var(--muted-2);
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.15em;
}

.release-card__lock {
    color: var(--gold);
}

.release-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.25;
}

.release-card > p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.release-card__lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.2rem 0;
}

.release-card__lines span {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e9e2d2, #f4efe4);
}

.release-card__lines span:nth-child(1) { width: 100%; }
.release-card__lines span:nth-child(2) { width: 84%; }
.release-card__lines span:nth-child(3) { width: 62%; }

.release-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.release-card__stats div {
    display: flex;
    flex-direction: column;
}

.release-card__stats strong {
    color: var(--forest);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.release-card__stats span {
    color: var(--muted-2);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
}

.release-card__stamp {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    color: var(--success);
    font-size: 0.67rem;
    font-weight: 650;
}

.home-section {
    padding: 4.4rem 0;
    border-top: 1px solid rgba(212, 202, 181, 0.55);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2.2rem;
}

.section-heading h2,
.home-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    font-weight: 550;
    letter-spacing: -0.012em;
}

.section-heading p,
.home-copy {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.75;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.process-card {
    position: relative;
    padding: 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 247, 0.68);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.process-card:hover {
    transform: translateY(-3px);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.process-card__num {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    color: #d9d2c1;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1;
}

.process-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.2rem;
    border: 1px solid #d6e4da;
    border-radius: 12px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.process-card h3 {
    margin-bottom: 0.5rem;
    font-size: 0.96rem;
}

.process-card p {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.65;
}

.home-section--split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.check-list .icon {
    margin-top: 0.2rem;
    color: var(--success);
}

.evidence-panel {
    padding: 1.3rem;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, #173b2d 0%, #102a20 100%);
    color: #e7eee8;
    box-shadow: var(--shadow-md);
}

.evidence-panel__head,
.evidence-panel__footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #9fb6a8;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.evidence-panel__time {
    margin-left: auto;
    color: var(--gold-soft);
}

.evidence-panel__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.66rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.76rem;
}

.evidence-panel__row span {
    color: #9fb6a8;
}

.evidence-panel__row strong {
    color: #f2f0e5;
    font-weight: 600;
}

.evidence-panel__row code {
    color: var(--gold-soft);
    font-size: 0.72rem;
}

.evidence-panel__sig {
    padding: 1.4rem 0 1rem;
    color: #d8cfae;
}

.evidence-panel__sig svg {
    width: 100%;
    height: 66px;
}

.evidence-panel__footer {
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.03em;
}

.evidence-panel__footer span:nth-child(2) {
    margin-left: auto;
}

.evidence-panel__footer span:last-child {
    color: #65c996;
}

.home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    margin: 1rem 0 2rem;
    padding: 2.4rem 2.8rem;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(800px 300px at 95% 0%, rgba(201, 160, 80, 0.18), transparent 60%),
        linear-gradient(135deg, #163b2d 0%, #0f291f 100%);
    color: #f4f0e3;
    box-shadow: var(--shadow-md);
}

.home-cta h2 {
    color: #f8f4e8;
    font-size: 1.8rem;
}

.home-cta p {
    max-width: 52ch;
    margin-top: 0.5rem;
    color: #adc0b2;
    font-size: 0.88rem;
}

.home-cta .eyebrow {
    color: var(--gold-soft);
}

/* --------------------------------------------------------------------------
   Not found
   -------------------------------------------------------------------------- */

.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52vh;
    text-align: center;
}

.not-found h1 {
    margin: 0.3rem 0 0.6rem;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 550;
}

.not-found p {
    color: var(--muted);
}

.not-found__actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

/* --------------------------------------------------------------------------
   Access page
   -------------------------------------------------------------------------- */

.access-page,
.sign-page,
.receipt-page,
.download-page {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0.6rem 0 2rem;
}

.access-page {
    max-width: 1140px;
}

.access-head,
.sign-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.6rem;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stepper__item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--muted-2);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.stepper__item:not(:last-child)::after {
    content: "";
    width: 28px;
    height: 1px;
    margin-left: 0.3rem;
    background: var(--line-strong);
}

.stepper__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
}

.stepper__item--active {
    color: var(--ink);
}

.stepper__item--active .stepper__dot {
    border-color: var(--gold);
    background: var(--gold-soft);
    color: var(--forest);
    box-shadow: 0 0 0 3px rgba(169, 130, 58, 0.12);
}

.stepper__item--done {
    color: var(--success);
}

.stepper__item--done .stepper__dot {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.access-head .stepper__item:not(:last-child)::after {
    width: 20px;
}

.access-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 1.6rem;
    align-items: stretch;
}

.access-card {
    padding: 2.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.access-card--loading,
.access-card--error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 330px;
    text-align: center;
}

.access-card--error h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 550;
}

.access-card--error p {
    max-width: 48ch;
    color: var(--muted);
    font-size: 0.88rem;
}

.access-card__badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.access-card__badge .eyebrow {
    margin-bottom: 0;
}

.access-card h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.2vw, 2.45rem);
    font-weight: 550;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.access-card__desc {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 1.8rem;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.meta-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.meta-grid span {
    color: var(--muted-2);
    font-size: 0.69rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.meta-grid strong {
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.access-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.4rem;
    padding: 0.8rem 0.9rem;
    border-left: 2px solid var(--gold);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.55;
}

.access-note .icon {
    margin-top: 0.15rem;
    color: var(--gold);
}

.access-form-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border: 1px solid #d7cfba;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(160deg, #fffdf8 0%, #faf6ea 100%);
    box-shadow: var(--shadow-sm);
}

.access-form-card__head {
    margin-bottom: 1.4rem;
}

.access-form-card__head h2 {
    margin-top: 0.7rem;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 550;
}

.access-form-card__head p {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.access-form-card form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.access-form-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 0.7rem;
    font-weight: 600;
}

.access-form-card__foot span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

/* --------------------------------------------------------------------------
   Signing
   -------------------------------------------------------------------------- */

.sign-page {
    max-width: 1280px;
}

.sign-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin: 1rem 0 1.4rem;
}

.sign-title h1 {
    margin: 0.15rem 0 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    font-weight: 550;
    letter-spacing: -0.015em;
}

.sign-title p {
    max-width: 68ch;
    color: var(--muted);
    font-size: 0.9rem;
}

.sign-title__meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sign-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.88fr);
    gap: 1.4rem;
    align-items: start;
}

.sign-doc,
.sign-form {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.sign-doc {
    overflow: hidden;
}

.sign-doc__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.sign-doc__head h2 {
    font-size: 1rem;
}

.sign-doc__head p {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.77rem;
}

.tou-frame {
    display: block;
    width: 100%;
    height: min(62vh, 680px);
    min-height: 440px;
    border: 0;
    background: #fff;
}

.sign-doc__foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.72rem;
}

.sign-form {
    position: sticky;
    top: 1rem;
    padding: 1.4rem;
}

.sign-form__head {
    margin-bottom: 1.1rem;
}

.sign-form__head h2 {
    margin-top: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 550;
}

.sign-form__head p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.79rem;
}

.sign-form form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.sign-form__note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.2rem;
    color: var(--muted-2);
    font-size: 0.71rem;
    line-height: 1.5;
}

.sign-form__note .icon {
    margin-top: 0.12rem;
    color: var(--gold);
}

.signature-pad-wrap {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--line-strong);
    border-radius: 12px;
    background: #fffefb;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

.signature-pad {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 4;
    min-height: 220px;
    touch-action: none;
    cursor: crosshair;
}

.signature-pad__baseline {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 24%;
    height: 1px;
    background: rgba(163, 154, 133, 0.45);
    pointer-events: none;
}

.signature-pad__hint {
    position: absolute;
    left: 0.8rem;
    bottom: 0.55rem;
    right: 8rem;
    color: var(--muted-2);
    font-size: 0.66rem;
    pointer-events: none;
}

.signature-pad__clear {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    background: rgba(255, 253, 247, 0.88);
}

.sign-legal {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 253, 247, 0.55);
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.55;
}

.sign-legal .icon {
    margin-top: 0.12rem;
    color: var(--forest-3);
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 450;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(11, 24, 18, 0.66);
    backdrop-filter: blur(6px);
}

.processing-card {
    width: min(480px, 100%);
    padding: 2.1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.processing-card h3 {
    margin: 0.9rem 0 0.45rem;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 550;
}

.processing-card p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.processing-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.3rem;
}

.processing-steps span {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-2);
    font-size: 0.67rem;
    font-weight: 650;
}

.processing-steps .is-active {
    border-color: #cfe3d7;
    background: var(--success-bg);
    color: var(--success);
}

/* --------------------------------------------------------------------------
   Receipt
   -------------------------------------------------------------------------- */

.receipt-page {
    max-width: 1180px;
}

.receipt-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin: 0.4rem 0 1.4rem;
    padding: 1.7rem 1.9rem;
    border: 1px solid #2e5b47;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(720px 260px at 100% 0%, rgba(196, 154, 77, 0.18), transparent 62%),
        linear-gradient(135deg, #173d2e 0%, #10291f 100%);
    color: #f2f0e4;
    box-shadow: var(--shadow-md);
}

.receipt-hero--warn {
    background:
        radial-gradient(720px 260px at 100% 0%, rgba(196, 154, 77, 0.24), transparent 62%),
        linear-gradient(135deg, #40351f 0%, #241f14 100%);
    border-color: #5c4a28;
}

.receipt-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.07);
    color: #8bd6ac;
}

.receipt-hero--warn .receipt-hero__icon {
    color: var(--gold-soft);
}

.receipt-hero__body {
    flex: 1;
    min-width: 0;
}

.receipt-hero .eyebrow {
    margin-bottom: 0.55rem;
    color: var(--gold-soft);
}

.receipt-hero h1 {
    color: #faf7ec;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 550;
}

.receipt-hero__body > p {
    margin-top: 0.35rem;
    color: #b5c6ba;
    font-size: 0.85rem;
}

.receipt-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem;
    margin-top: 1rem;
    color: #cbd8cf;
    font-size: 0.76rem;
}

.receipt-hero__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.receipt-hero__meta .badge {
    margin-left: 0.2rem;
}

.receipt-hero__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.receipt-hero__id {
    color: #8fa79a;
    font-family: var(--font-mono);
    font-size: 0.63rem;
}

.receipt-hero .countdown {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #f0ead6;
}

.receipt-hero .countdown strong {
    color: #fff8e8;
}

.receipt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.72fr);
    gap: 1.3rem;
    align-items: start;
}

.receipt-main,
.receipt-side {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    min-width: 0;
}

.panel {
    padding: 1.35rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.panel--soft {
    background: linear-gradient(170deg, #fffdf8 0%, #faf6ec 100%);
}

.panel--flush {
    padding: 0;
    overflow: hidden;
}

.panel--danger {
    border-color: #e8cfc6;
    background: linear-gradient(170deg, #fffaf7 0%, #fbf0ea 100%);
}

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.4rem;
    margin-bottom: 1.1rem;
}

.panel__head--compact {
    margin-top: 0.35rem;
}

.panel__head h2 {
    margin-top: 0.2rem;
    font-size: 1.02rem;
    font-weight: 650;
}

.panel__head p {
    margin-top: 0.22rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.panel__head .eyebrow {
    margin-bottom: 0.25rem;
}

.panel__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.panel__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--forest-3);
    font-size: 0.77rem;
    font-weight: 650;
}

.panel__link:hover {
    color: var(--forest);
}

.panel__note {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.6;
}

.panel__note code {
    padding: 0.08rem 0.3rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 0.7rem;
}

.evidence-downloads {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.evidence-file {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-soft);
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.evidence-file:hover {
    border-color: var(--line-strong);
    background: var(--surface);
    transform: translateX(2px);
    color: var(--ink-soft);
}

.evidence-file.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.evidence-file--bundle {
    border-color: #d4e4d9;
    background: var(--forest-mist);
}

.evidence-file__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--forest-3);
}

.evidence-file__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.evidence-file__body strong {
    font-size: 0.83rem;
    font-weight: 650;
}

.evidence-file__body small {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.evidence-file > .icon {
    color: var(--muted-2);
}

.save-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.save-step {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-2);
    font-size: 0.68rem;
    font-weight: 600;
}

.save-step.is-done {
    border-color: #cfe3d7;
    background: var(--success-bg);
    color: var(--success);
}

.continue-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid #d4e4d9;
    border-left: 3px solid var(--forest-3);
    border-radius: 10px;
    background: var(--forest-mist);
}

.continue-box strong {
    display: block;
    color: var(--forest);
    font-size: 0.84rem;
}

.continue-box p {
    margin-top: 0.15rem;
    color: #5b7265;
    font-size: 0.74rem;
    line-height: 1.45;
}

.continue-error {
    width: 100%;
    margin-top: 0.4rem;
    color: var(--danger);
    font-size: 0.72rem;
}

.timestamp-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.1rem;
    padding: 0.9rem 1.05rem;
    border: 1px solid #ecd9b6;
    border-radius: 10px;
    background: var(--warn-bg);
}

.timestamp-warning__body strong {
    display: block;
    color: var(--warn);
    font-size: 0.84rem;
}

.timestamp-warning__body p {
    margin-top: 0.15rem;
    color: #7f6a45;
    font-size: 0.74rem;
    line-height: 1.5;
    word-break: break-word;
}

.timestamp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.timestamp-grid > div,
.kv-list > div {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.timestamp-grid span,
.kv-list span {
    color: var(--muted-2);
    font-size: 0.67rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.timestamp-grid strong,
.kv-list strong {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    word-break: break-word;
}

.timestamp-grid code,
.kv-list code {
    color: var(--ink-soft);
    font-size: 0.72rem;
    word-break: break-all;
}

.hash-list {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    margin-top: 0.9rem;
}

.hash-line {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
}

.hash-line > span {
    flex: 0 0 150px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.hash-line code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signature-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    margin-bottom: 0.9rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(212, 202, 181, 0.35) 32px),
        #fffefb;
}

.signature-preview img {
    max-width: 100%;
    max-height: 120px;
}

.kv-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.kv-list--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.9rem;
}

.side-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 0.71rem;
    line-height: 1.5;
}

.side-note .icon {
    margin-top: 0.12rem;
    color: var(--gold);
}

.code-inline {
    padding: 0.1rem 0.32rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 0.72rem;
    word-break: break-all;
}

/* --------------------------------------------------------------------------
   Download
   -------------------------------------------------------------------------- */

.download-page {
    max-width: 1120px;
}

.download-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin: 0.5rem 0 1.4rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--line-strong);
}

.download-hero h1 {
    margin: 0.2rem 0 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.5vw, 2.7rem);
    font-weight: 550;
}

.download-hero p {
    max-width: 65ch;
    color: var(--muted);
    font-size: 0.88rem;
}

.download-hero__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.download-hero__window {
    color: var(--muted-2);
    font-size: 0.7rem;
    font-weight: 600;
}

.countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 650;
    white-space: nowrap;
}

.countdown .icon {
    color: var(--gold);
}

.countdown strong {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.countdown--compact {
    padding: 0.3rem 0.58rem;
    font-size: 0.7rem;
}

.countdown__label {
    color: var(--muted);
    font-weight: 600;
}

.countdown--urgent {
    border-color: #e6c9a1;
    background: var(--warn-bg);
    color: var(--warn);
}

.countdown--urgent .icon {
    color: var(--warn);
}

.countdown--over {
    border-color: #e7cec4;
    background: var(--danger-bg);
    color: var(--danger);
}

.download-warning {
    margin-bottom: 1.1rem;
    border-color: #ecd9b6;
    background: var(--warn-bg);
    color: #6c572f;
}

.download-warning strong {
    display: block;
    color: var(--warn);
    font-size: 0.82rem;
}

.download-warning p {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.5;
}

.file-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}

.file-row:last-child {
    border-bottom: 0;
}

.file-row:hover {
    background: var(--surface-2);
}

.file-row__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--forest-3);
}

.file-row__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.file-row__body strong {
    overflow: hidden;
    font-size: 0.84rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row__body span {
    color: var(--muted);
    font-size: 0.71rem;
}

.file-row__body code {
    padding: 0.06rem 0.26rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
    font-size: 0.67rem;
}

.download-blocked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 3.4rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow-xs);
}

.download-blocked h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 550;
}

.download-blocked p {
    max-width: 52ch;
    color: var(--muted);
    font-size: 0.86rem;
}

.blocked-evidence {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.evidence-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Auth (admin login)
   -------------------------------------------------------------------------- */

.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 100vh;
    background: var(--paper);
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 2.4rem clamp(2rem, 4vw, 4.5rem);
    background:
        radial-gradient(700px 420px at 92% 8%, rgba(196, 154, 77, 0.2), transparent 60%),
        linear-gradient(150deg, #173d2e 0%, #0d241b 100%);
    color: #f7f2e4;
}

.auth-aside__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-aside__tag {
    padding: 0.25rem 0.55rem;
    border: 1px solid rgba(239, 226, 196, 0.25);
    border-radius: 999px;
    color: var(--gold-soft);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.auth-aside__body {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 4rem 0;
}

.auth-aside__body h1 {
    margin: 0.4rem 0 1.2rem;
    color: #faf7ec;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4vw, 4rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.auth-aside__body p {
    color: #afc1b5;
    font-size: 0.92rem;
    line-height: 1.75;
}

.auth-aside__stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 440px;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-aside__stats div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.auth-aside__stats strong {
    color: var(--gold-soft);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
}

.auth-aside__stats span {
    color: #94a99b;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.auth-aside__grid {
    position: absolute;
    right: -12%;
    bottom: -10%;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.auth-aside__grid::before,
.auth-aside__grid::after {
    content: "";
    position: absolute;
    inset: 48px;
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-aside__grid::after {
    inset: 110px;
    border-style: solid;
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2.5rem;
}

.auth-card {
    width: min(430px, 100%);
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.auth-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border: 1px solid #d6e4da;
    border-radius: 14px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.auth-card h2 {
    margin: 0.2rem 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 550;
}

.auth-card__lead {
    margin-bottom: 1.4rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-card .btn--block {
    margin-top: 0.4rem;
    min-height: 46px;
}

.auth-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 0.68rem;
}

.auth-card__foot a {
    color: var(--forest-3);
    font-weight: 650;
}

.auth-main__foot {
    display: flex;
    gap: 1.2rem;
    color: var(--muted-2);
    font-size: 0.66rem;
}

/* --------------------------------------------------------------------------
   Admin shell
   -------------------------------------------------------------------------- */

.admin-shell {
    min-height: 100vh;
    background: #f1eee4;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    padding: 1.4rem 1rem 1.1rem;
    background:
        radial-gradient(420px 260px at 20% 0%, rgba(196, 154, 77, 0.13), transparent 60%),
        linear-gradient(180deg, #132f24 0%, #0c2119 100%);
    color: #e8ede7;
    overflow-y: auto;
}

.admin-sidebar .brand {
    gap: 0.6rem;
    min-width: 0;
}

.admin-sidebar .brand__mark {
    width: 36px;
    height: 36px;
}

.admin-sidebar .brand__copy {
    min-width: 0;
}

.admin-sidebar .brand__copy strong {
    overflow: hidden;
    font-size: 0.84rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-sidebar .brand__copy small {
    overflow: hidden;
    font-size: 0.48rem;
    letter-spacing: 0.075em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.4rem;
}

.admin-sidebar__close {
    display: none;
    color: #b7c6bc;
}

.admin-sidebar__label {
    margin: 1.6rem 0.75rem 0.6rem;
    color: #7d9486;
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.17em;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.68rem;
    padding: 0.62rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #b9c8bd;
    font-size: 0.82rem;
    font-weight: 550;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.admin-nav__item:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #f3f4ec;
}

.admin-nav__item.is-active {
    border-color: rgba(239, 226, 196, 0.16);
    background: rgba(239, 226, 196, 0.1);
    color: #fbf7e9;
}

.admin-nav__item.is-active::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--gold-soft);
    transform: translateY(-50%);
}

.admin-nav__icon {
    display: inline-flex;
    color: #8ea698;
}

.admin-nav__item.is-active .admin-nav__icon {
    color: var(--gold-soft);
}

.admin-nav__chevron {
    margin-left: auto;
    color: #5f776a;
    opacity: 0;
    transform: translateX(-3px);
    transition: all 0.16s ease;
}

.admin-nav__item:hover .admin-nav__chevron,
.admin-nav__item.is-active .admin-nav__chevron {
    opacity: 1;
    transform: translateX(0);
}

.admin-sidebar__foot {
    margin-top: auto;
    padding: 0.9rem 0.55rem 0.2rem;
}

.admin-sidebar__status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
}

.admin-sidebar__status strong {
    display: block;
    color: #dfe9e1;
    font-size: 0.72rem;
    font-weight: 650;
}

.admin-sidebar__status small {
    display: block;
    color: #7f9587;
    font-size: 0.6rem;
    letter-spacing: 0.04em;
}

.admin-sidebar__hint {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0 0.2rem;
    color: #7e9487;
    font-size: 0.65rem;
    line-height: 1.45;
}

.admin-sidebar__hint .icon {
    margin-top: 0.08rem;
    color: #9dae9f;
}

.admin-workspace {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.95rem clamp(1.2rem, 2.4vw, 2.4rem);
    border-bottom: 1px solid rgba(212, 202, 181, 0.65);
    background: rgba(246, 243, 234, 0.86);
    backdrop-filter: blur(12px);
}

.admin-topbar__left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.admin-topbar__eyebrow {
    display: block;
    margin-bottom: 0.05rem;
    color: var(--muted-2);
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

.admin-topbar h1 {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-menu-btn {
    display: none;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 0.59rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.live-pill.is-live {
    border-color: #cfe3d7;
    background: #f2faf5;
    color: var(--success);
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--line);
}

.admin-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--forest);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 750;
}

.admin-account strong {
    display: block;
    max-width: 150px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-account small {
    display: block;
    color: var(--muted-2);
    font-size: 0.59rem;
    letter-spacing: 0.04em;
}

.admin-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 1.8rem clamp(1.2rem, 2.4vw, 2.4rem) 4rem;
}

.admin-overlay {
    display: none;
}

.auth-loading {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 238, 228, 0.78);
    backdrop-filter: blur(4px);
}

.auth-loading__panel {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--muted);
    font-size: 0.82rem;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    font-weight: 550;
    letter-spacing: -0.015em;
}

.page-header p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.toolbar__count {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(420px, 100%);
    padding: 0.48rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted-2);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-box:focus-within {
    border-color: var(--forest-3);
    box-shadow: 0 0 0 3px rgba(44, 106, 81, 0.1);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-size: 0.82rem;
}

.search-box--compact {
    width: min(320px, 100%);
}

.filter-group {
    display: flex;
    gap: 0.35rem;
}

.filter-chip {
    padding: 0.34rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.filter-chip.is-active {
    border-color: var(--forest);
    background: var(--forest);
    color: #f8f5e9;
}

/* --------------------------------------------------------------------------
   Admin dashboard
   -------------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.3rem;
}

.stats-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    min-width: 0;
    padding: 1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid #dbe4dc;
    border-radius: 10px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.stat-card--accent .stat-card__icon {
    border-color: #e5d7b5;
    background: var(--warn-bg);
    color: var(--gold);
}

.stat-card--warn .stat-card__icon {
    border-color: #ecd9b6;
    background: var(--warn-bg);
    color: var(--warn);
}

.stat-card--danger .stat-card__icon {
    border-color: #efd2c7;
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card__label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.stat-card__value {
    margin-top: 0.1rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 550;
    line-height: 1.15;
}

.stat-card__hint {
    margin-top: 0.15rem;
    color: var(--muted-2);
    font-size: 0.65rem;
    line-height: 1.35;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.mini-stat span {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.mini-stat strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 550;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-grid + .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-live .panel__head {
    margin-bottom: 0.8rem;
}

.live-event {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4e4d9;
    border-radius: 9px;
    background: var(--forest-mist);
}

.live-event__dot {
    width: 7px;
    height: 7px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #4fae7d;
    flex: 0 0 auto;
}

.live-event strong {
    display: block;
    color: var(--forest);
    font-size: 0.78rem;
    font-weight: 650;
}

.live-event small {
    color: #647d6f;
    font-size: 0.65rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item__dot {
    width: 6px;
    height: 6px;
    margin-top: 0.42rem;
    border-radius: 50%;
    background: var(--line-strong);
    flex: 0 0 auto;
}

.activity-item__body {
    min-width: 0;
}

.activity-item__body strong {
    display: block;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
}

.activity-item__body p {
    overflow: hidden;
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-item__body small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted-2);
    font-size: 0.63rem;
}

.system-list {
    display: flex;
    flex-direction: column;
}

.system-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.52rem 0;
    border-bottom: 1px solid var(--line);
}

.system-list > div:last-child {
    border-bottom: 0;
}

.system-list span {
    color: var(--muted);
    font-size: 0.72rem;
}

.system-list strong {
    max-width: 62%;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 600;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-list code {
    max-width: 62%;
    overflow: hidden;
    color: var(--forest-3);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.download-feed {
    display: flex;
    flex-direction: column;
}

.download-feed__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.download-feed__item:last-child {
    border-bottom: 0;
}

.download-feed__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--forest-3);
}

.download-feed__item > div {
    min-width: 0;
    flex: 1;
}

.download-feed__item strong {
    display: block;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-feed__item small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-feed__time {
    color: var(--muted-2);
    font-size: 0.64rem;
    white-space: nowrap;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink-soft);
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.quick-action:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-xs);
    color: var(--ink);
    transform: translateY(-1px);
}

.quick-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.quick-action > div {
    min-width: 0;
    flex: 1;
}

.quick-action strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 650;
}

.quick-action small {
    display: block;
    margin-top: 0.08rem;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.quick-action > .icon {
    color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   Data tables
   -------------------------------------------------------------------------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.data-table th {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted-2);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover td {
    background: rgba(250, 247, 238, 0.7);
}

.data-table--roomy td {
    padding: 0.78rem 0.7rem;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 0.85rem;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 0.85rem;
}

.table-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
}

.table-link:hover {
    color: var(--forest-3);
}

.table-link > span:not(.avatar) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.table-link strong {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 650;
}

.table-link small {
    color: var(--muted);
    font-size: 0.67rem;
}

.table-strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.table-sub {
    display: block;
    margin-top: 0.08rem;
    color: var(--muted-2);
    font-size: 0.65rem;
}

.td-actions {
    text-align: right;
    white-space: nowrap;
}

.td-detail {
    max-width: 360px;
    color: var(--muted) !important;
    font-size: 0.73rem;
    line-height: 1.45;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: var(--ink-soft);
    font-weight: 550;
}

.file-name .icon {
    color: var(--forest-3);
}

.tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.42rem 0.7rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.tab.is-active {
    background: var(--forest);
    color: #f8f5e9;
}

.tab__count {
    padding: 0.02rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.tab:not(.is-active) .tab__count {
    background: var(--surface-3);
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Admin publications
   -------------------------------------------------------------------------- */

.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.9rem;
}

.publication-card {
    display: flex;
    flex-direction: column;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.publication-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.publication-card.is-inactive {
    opacity: 0.72;
}

.publication-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.publication-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #d6e4da;
    border-radius: 10px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.publication-card__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.28rem;
}

.publication-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.publication-card h3 a {
    color: var(--ink);
}

.publication-card h3 a:hover {
    color: var(--forest-3);
}

.publication-card__desc {
    min-height: 2.6em;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.publication-card__link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
}

.publication-card__link code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.publication-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    margin-top: 0.8rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.publication-card__stats div {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.publication-card__stats strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
}

.publication-card__stats span {
    color: var(--muted-2);
    font-size: 0.6rem;
}

.publication-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.68rem;
}

.publication-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.publication-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: auto;
    padding-top: 0.75rem;
    color: var(--muted-2);
    font-size: 0.65rem;
}

.token-reveal {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.token-reveal__intro {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.token-reveal__intro h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 550;
}

.token-reveal__intro p {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.token-reveal__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.token-reveal__link span {
    color: var(--muted-2);
    font-size: 0.68rem;
    font-weight: 650;
    white-space: nowrap;
}

.token-reveal__link code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--forest-3);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.5rem;
}

.code-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
}

.code-chip code {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.05em;
}

.token-reveal__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Publication detail
   -------------------------------------------------------------------------- */

.detail-back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(600px 240px at 100% 0%, rgba(196, 154, 77, 0.13), transparent 60%),
        linear-gradient(150deg, #fffdf8 0%, #f8f3e6 100%);
    box-shadow: var(--shadow-xs);
}

.detail-hero__main {
    min-width: 0;
}

.detail-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.55rem;
}

.detail-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.6vw, 2.35rem);
    font-weight: 550;
    letter-spacing: -0.015em;
}

.detail-hero__main > p {
    max-width: 68ch;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.6;
}

.detail-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 560px;
    margin-top: 0.9rem;
    padding: 0.38rem 0.45rem 0.38rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
}

.detail-link code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--forest-3);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-hero__side {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 0.4rem;
    flex: 0 0 auto;
}

.detail-side-stat {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 108px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 253, 247, 0.7);
}

.detail-side-stat span {
    color: var(--muted-2);
    font-size: 0.61rem;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.detail-side-stat strong {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d4e4d9;
    border-radius: 8px;
    background: var(--forest-mist);
    color: var(--forest);
    font-size: 0.73rem;
}

.token-table {
    display: flex;
    flex-direction: column;
    max-height: 460px;
    overflow-y: auto;
}

.token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.token-row:last-child {
    border-bottom: 0;
}

.token-row > div:first-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.token-code {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.06em;
}

.token-row__label {
    color: var(--muted-2);
    font-size: 0.63rem;
}

.token-row__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.timestamp-grid {
    margin-top: 0.7rem;
}

.ua-block {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    margin-top: 0.7rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.ua-block span {
    color: var(--muted-2);
    font-size: 0.65rem;
    font-weight: 650;
}

.ua-block code {
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.5;
    word-break: break-word;
}

.danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* --------------------------------------------------------------------------
   Templates
   -------------------------------------------------------------------------- */

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.9rem;
}

.template-card {
    display: flex;
    flex-direction: column;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.template-card.is-default {
    border-color: #cfded3;
    background: linear-gradient(160deg, #fffdf8 0%, #f6faf6 100%);
}

.template-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.template-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d6e4da;
    border-radius: 11px;
    background: var(--forest-mist);
    color: var(--forest-3);
}

.template-card h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
}

.template-card__file {
    margin-top: 0.15rem;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 0.66rem;
}

.template-card__meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin: 0.9rem 0;
    padding: 0.65rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.template-card__meta div {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
}

.template-card__meta span {
    color: var(--muted-2);
    font-size: 0.6rem;
}

.template-card__meta strong {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 600;
}

.template-card__hash {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.template-card__hash span {
    color: var(--muted-2);
    font-size: 0.62rem;
    font-weight: 650;
}

.template-card__hash code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-card__date {
    margin-top: 0.45rem;
    color: var(--muted-2);
    font-size: 0.63rem;
}

.template-card__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.8rem;
}

.template-card__actions .icon-btn {
    margin-left: auto;
}

.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.6rem 1.2rem;
    border: 1px dashed var(--line-strong);
    border-radius: 11px;
    background: var(--surface-2);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.file-drop:hover {
    border-color: var(--forest-3);
    background: var(--forest-mist);
}

.file-drop strong {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 650;
}

.file-drop small {
    color: var(--muted-2);
    font-size: 0.7rem;
}

.template-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.template-preview__caption {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.template-preview iframe {
    width: 100%;
    height: min(68vh, 720px);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

/* --------------------------------------------------------------------------
   Record detail
   -------------------------------------------------------------------------- */

.record-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.1rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(150deg, #fffdf8 0%, #f8f3e6 100%);
    box-shadow: var(--shadow-xs);
}

.record-hero__identity {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 280px;
}

.record-hero__identity h1 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
}

.record-hero__identity p {
    color: var(--muted);
    font-size: 0.78rem;
}

.record-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    margin-top: 0.5rem;
}

.record-hero__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1.4rem;
    flex: 1;
    min-width: 0;
}

.record-hero__facts > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.record-hero__facts span {
    color: var(--muted-2);
    font-size: 0.63rem;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.record-hero__facts strong,
.record-hero__facts a {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-hero__facts code {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: 300px;
    flex: 0 0 auto;
}

.record-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
    gap: 1.1rem;
    align-items: start;
}

.record-main,
.record-side {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
}

.stack-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Settings
   -------------------------------------------------------------------------- */

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.65fr);
    gap: 1.1rem;
    align-items: start;
}

.settings-side {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.settings-form .panel__head {
    margin-bottom: 1rem;
}

.settings-separator {
    height: 1px;
    margin: 1.3rem 0;
    background: var(--line);
}

.test-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.test-result {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #cfe3d7;
    border-radius: 7px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.7rem;
    line-height: 1.45;
    word-break: break-word;
}

.test-result.is-error {
    border-color: #efd2c7;
    background: var(--danger-bg);
    color: var(--danger);
}

.test-result span {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1250px) {
    .hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 2.5rem;
    }

    .hero__orbit--one {
        width: 400px;
        height: 400px;
    }

    .hero__orbit--two {
        width: 300px;
        height: 300px;
    }

    .sign-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    }

    .detail-hero {
        flex-direction: column;
        gap: 1rem;
    }

    .detail-hero__side {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .record-hero {
        flex-wrap: wrap;
    }

    .record-hero__actions {
        justify-content: flex-start;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 1080px) {
    :root {
        --sidebar-width: 240px;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: none;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgba(8, 20, 14, 0.22);
    }

    .admin-sidebar__close {
        display: inline-flex;
    }

    .admin-workspace {
        margin-left: 0;
    }

    .admin-menu-btn {
        display: inline-flex;
    }

    .admin-overlay {
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(8, 20, 14, 0.45);
    }

    .admin-overlay.is-open {
        display: block;
    }

    .dashboard-grid,
    .dashboard-grid + .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .record-grid {
        grid-template-columns: 1fr;
    }

    .receipt-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .receipt-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .public-nav,
    .public-main,
    .public-footer {
        width: min(100% - 2.4rem, 1220px);
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 2rem;
    }

    .hero__visual {
        min-height: 380px;
        margin-top: 0.5rem;
    }

    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section--split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.4rem;
        padding: 2rem;
    }

    .access-grid,
    .sign-grid {
        grid-template-columns: 1fr;
    }

    .sign-form {
        position: static;
    }

    .access-form-card {
        order: -1;
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        min-height: 260px;
        padding: 1.6rem;
    }

    .auth-aside__body {
        margin: 1.4rem 0 0.4rem;
    }

    .auth-aside__body h1 {
        font-size: 2rem;
    }

    .auth-aside__body p,
    .auth-aside__stats {
        display: none;
    }

    .auth-main {
        padding: 1.6rem;
    }

    .receipt-hero {
        flex-wrap: wrap;
    }

    .receipt-hero__side {
        align-items: flex-start;
        width: 100%;
    }

    .receipt-side {
        grid-template-columns: 1fr;
    }

    .sign-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .sign-title__meta {
        justify-content: flex-start;
    }

    .download-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .download-hero__side {
        align-items: flex-start;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .publication-grid,
    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .admin-topbar__eyebrow {
        max-width: 32vw;
    }

    .record-hero__identity {
        min-width: 0;
    }

    .record-hero__facts {
        width: 100%;
        flex-basis: 100%;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 14px;
    }

    .public-nav {
        padding: 0.9rem 0;
    }

    .public-nav__tag {
        display: none;
    }

    .public-nav__side {
        gap: 0.8rem;
    }

    .public-main {
        padding-top: 1.4rem;
    }

    .public-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .public-footer__meta {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .hero h1 {
        font-size: 2.55rem;
    }

    .hero__lead {
        font-size: 0.92rem;
    }

    .hero__meta {
        gap: 0.8rem;
    }

    .hero__orbit {
        display: none;
    }

    .hero__visual {
        min-height: 330px;
    }

    .release-card {
        transform: none;
        width: 100%;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .home-section {
        padding: 2.6rem 0;
    }

    .home-cta {
        border-radius: 18px;
        margin: 0.5rem 0 1rem;
    }

    .stepper {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .stepper__item:not(:last-child)::after {
        display: none;
    }

    .access-card,
    .access-form-card {
        padding: 1.4rem;
    }

    .access-head,
    .sign-head {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .sign-doc__head {
        flex-direction: column;
        gap: 0.6rem;
    }

    .tou-frame {
        height: 55vh;
        min-height: 380px;
    }

    .receipt-hero {
        padding: 1.25rem;
    }

    .receipt-hero__meta {
        gap: 0.6rem;
    }

    .receipt-grid {
        gap: 0.9rem;
    }

    .panel {
        padding: 1.1rem;
    }

    .timestamp-grid,
    .kv-list--two {
        grid-template-columns: 1fr;
    }

    .hash-line {
        flex-wrap: wrap;
    }

    .hash-line > span {
        flex-basis: 100%;
    }

    .hash-line code {
        flex-basis: calc(100% - 40px);
    }

    .continue-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .continue-box .btn {
        width: 100%;
    }

    .timestamp-warning {
        flex-direction: column;
        align-items: flex-start;
    }

    .sign-form {
        padding: 1.15rem;
    }

    .signature-pad__hint {
        display: none;
    }

    .auth-aside {
        min-height: 220px;
    }

    .auth-main {
        padding: 1.2rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .admin-topbar {
        padding: 0.8rem 1rem;
    }

    .admin-topbar__eyebrow {
        max-width: 44vw;
    }

    .admin-account {
        display: none;
    }

    .admin-topbar__right .live-pill {
        display: none;
    }

    .admin-content {
        padding: 1.2rem 1rem 3rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }

    .toolbar {
        flex-wrap: wrap;
    }

    .toolbar__count {
        margin-left: 0;
    }

    .search-box {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-card__value {
        font-size: 1.3rem;
    }

    .publication-grid,
    .template-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        padding: 1.2rem;
    }

    .detail-hero__side {
        grid-template-columns: 1fr;
    }

    .detail-side-stat {
        min-width: 0;
    }

    .publication-card__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.55rem;
    }

    .record-hero {
        padding: 1.2rem;
    }

    .record-hero__facts {
        grid-template-columns: 1fr;
    }

    .record-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .record-hero__actions .btn {
        width: 100%;
    }

    .record-hero__identity .avatar--lg {
        width: 48px;
        height: 48px;
        font-size: 0.9rem;
    }

    .form-grid--2 {
        grid-template-columns: 1fr;
    }

    .field--wide {
        grid-column: auto;
    }

    .modal-backdrop {
        padding: 0.7rem;
    }

    .modal-head,
    .modal-body {
        padding: 1rem;
    }

    .modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .toast-stack {
        right: 0.8rem;
        left: 0.8rem;
        bottom: 0.8rem;
        width: auto;
    }

    .code-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        width: 100%;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .data-table {
        min-width: 620px;
    }

    .table-wrap {
        margin: 0 -0.2rem;
    }

    .not-found__actions {
        flex-direction: column;
        width: 100%;
    }

    .not-found__actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .public-nav,
    .public-main,
    .public-footer {
        width: calc(100% - 1.6rem);
    }

    .brand__copy small {
        display: none;
    }

    .stats-grid,
    .stats-grid,
    .stats-grid--compact {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .access-card,
    .access-form-card {
        padding: 1.15rem;
    }

    .auth-aside {
        min-height: 190px;
        padding: 1.2rem;
    }

    .auth-aside__tag {
        display: none;
    }

    .auth-card__foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .receipt-hero__icon {
        width: 46px;
        height: 46px;
    }

    .receipt-hero h1 {
        font-size: 1.55rem;
    }

    .download-hero h1 {
        font-size: 1.7rem;
    }

    .file-row {
        flex-wrap: wrap;
    }

    .file-row .btn {
        width: 100%;
    }

    .token-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   2026 product theme — neutral surfaces, blue primary, orange accent.
   Inspired by modern edge-platform consoles: flat, dense, high contrast.
   ========================================================================== */

:root {
    --paper: #f6f7f9;
    --paper-deep: #eef1f5;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f2f4f7;
    --ink: #0b1220;
    --ink-soft: #1d2939;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #e4e7ec;
    --line-strong: #d0d5dd;
    --forest: #0b1220;
    --forest-2: #162033;
    --forest-3: #175cd3;
    --forest-mist: #eff4ff;
    --gold: #f6821f;
    --gold-2: #ff9f43;
    --gold-soft: #fff3e6;
    --danger: #d92d20;
    --danger-bg: #fef3f2;
    --success: #067647;
    --success-bg: #ecfdf3;
    --warn: #b54708;
    --warn-bg: #fffaeb;
    --info: #175cd3;
    --info-bg: #eff8ff;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.10);
    --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.16);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --font-display: var(--font-sans);
    --font-sans: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    --brand-blue: #0051c3;
    --brand-blue-hover: #003ea8;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.55;
}

body::before {
    display: none;
}

::selection {
    background: rgba(0, 81, 195, 0.18);
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-sans);
    letter-spacing: -0.025em;
    font-weight: 650;
}

a {
    color: var(--brand-blue);
}

a:hover {
    color: var(--brand-blue-hover);
}

.eyebrow {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 650;
    letter-spacing: 0.1em;
}

.eyebrow__dot {
    background: var(--gold);
}

/* Buttons ------------------------------------------------------------------ */

.btn {
    min-height: 38px;
    padding: 0.55rem 0.95rem;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: none;
}

.btn--primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.btn--primary:hover {
    background: var(--brand-blue-hover);
    border-color: var(--brand-blue-hover);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 81, 195, 0.24);
}

.btn--secondary {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.btn--secondary:hover {
    background: var(--surface-2);
    border-color: #98a2b3;
    color: var(--ink);
}

.btn--ghost {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.btn--ghost:hover {
    background: var(--surface-2);
    border-color: #98a2b3;
    color: var(--ink);
}

.btn--light {
    background: #fff;
    border-color: #fff;
    color: var(--brand-blue);
}

.btn--light:hover {
    background: #eff4ff;
    color: var(--brand-blue);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.copy-button:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(0, 81, 195, 0.55);
    outline-offset: 2px;
}

/* Brand / public navigation ------------------------------------------------ */

.public-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    max-width: none;
    height: 64px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
}

.brand {
    gap: 0.6rem;
}

.brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-blue);
    color: #fff;
    box-shadow: none;
}

.brand__copy strong {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.brand__copy small {
    color: var(--muted-2);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.brand--light {
    color: #fff;
}

.brand--light .brand__mark {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.brand--light .brand__copy small {
    color: rgba(255, 255, 255, 0.62);
}

.public-nav__side {
    gap: 1.4rem;
}

.public-nav__tag {
    display: none;
}

.public-nav .text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.public-nav .text-link:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

.public-main {
    width: min(1180px, calc(100% - 4rem));
    padding: 2.6rem 0 4rem;
}

.public-footer {
    width: min(1180px, calc(100% - 4rem));
    padding: 1.4rem 0 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
}

.public-footer strong {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 650;
}

.public-footer__meta {
    color: var(--muted-2);
}

/* Public landing ----------------------------------------------------------- */

.hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 4.5rem;
    min-height: 0;
    padding: 4.2rem 0 4rem;
}

.hero h1 {
    margin: 0.55rem 0 1.2rem;
    font-family: var(--font-sans);
    font-size: clamp(2.5rem, 4.6vw, 4rem);
    font-weight: 650;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.hero h1 em {
    color: var(--brand-blue);
    font-style: normal;
    font-weight: 650;
}

.hero__lead {
    max-width: 34rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.hero__actions {
    margin-top: 1.6rem;
    gap: 0.55rem;
}

.hero__meta {
    gap: 1.2rem;
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
}

.hero__meta .icon {
    color: var(--muted-2);
}

.hero__visual {
    min-height: 0;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
    box-shadow: var(--shadow-md);
}

.hero__orbit {
    display: none;
}

.release-card {
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    transform: none;
}

.release-card__seal {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--forest-mist);
    color: var(--brand-blue);
    box-shadow: none;
}

.release-card__label {
    color: var(--muted-2);
    font-size: 0.6rem;
    letter-spacing: 0.09em;
}

.release-card h3 {
    margin-top: 1.1rem;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 650;
}

.release-card > p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.release-card__lines {
    margin: 1.1rem 0;
    gap: 0.5rem;
}

.release-card__lines span {
    height: 7px;
    border-radius: 3px;
    background: #f2f4f7;
}

.release-card__stats {
    padding: 0.9rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.release-card__stats strong {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 650;
}

.release-card__stats span {
    color: var(--muted-2);
    font-size: 0.62rem;
}

.release-card__stamp {
    margin-top: 0.9rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #abefc6;
    border-radius: 6px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.68rem;
}

.home-section {
    padding: 4.2rem 0;
    border-top: 1px solid var(--line);
}

.section-heading {
    max-width: 42rem;
    margin-bottom: 2.2rem;
}

.section-heading h2,
.home-section h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.7rem, 2.8vw, 2.3rem);
    font-weight: 650;
    letter-spacing: -0.035em;
}

.section-heading p,
.home-copy {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.process-grid {
    gap: 1rem;
}

.process-card {
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}

.process-card:hover {
    border-color: #b2ddff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.process-card__num {
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.process-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--forest-mist);
    color: var(--brand-blue);
}

.process-card h3 {
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 650;
}

.process-card p {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.65;
}

.home-section--split {
    margin: 1rem 0;
    padding: 3.2rem;
    border: 0;
    border-radius: 16px;
    background: #0b1220;
    color: #fff;
}

.home-section--split h2 {
    color: #fff;
}

.home-section--split .eyebrow {
    color: #84adff;
}

.home-section--split .home-copy {
    color: #98a2b3;
}

.check-list li {
    color: #d0d5dd;
    font-size: 0.82rem;
}

.check-list .icon {
    color: #84adff;
}

.evidence-panel {
    border: 1px solid #1d2939;
    border-radius: 10px;
    background: #111c2e;
    box-shadow: none;
}

.evidence-panel__head {
    border-bottom-color: #1d2939;
    color: #98a2b3;
}

.evidence-panel__row {
    border-bottom-color: #1d2939;
}

.evidence-panel__row span {
    color: #98a2b3;
}

.evidence-panel__row strong,
.evidence-panel__row code {
    color: #f2f4f7;
}

.evidence-panel__sig {
    color: #84adff;
}

.evidence-panel__footer {
    border-top-color: #1d2939;
    color: #98a2b3;
}

.home-cta {
    margin-top: 1rem;
    padding: 3rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0051c3 0%, #003ea8 100%);
    color: #fff;
    box-shadow: none;
}

.home-cta h2 {
    color: #fff;
    font-family: var(--font-sans);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 650;
}

.home-cta p {
    color: rgba(255, 255, 255, 0.78);
}

.home-cta .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

/* Public task pages -------------------------------------------------------- */

.access-card,
.access-form-card,
.processing-card,
.receipt-hero,
.auth-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.access-card h1 {
    font-family: var(--font-sans);
    font-weight: 650;
    letter-spacing: -0.035em;
}

.access-form-card__head h2,
.panel__head h2 {
    font-family: var(--font-sans);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.receipt-hero {
    background: #0b1220;
    border-color: #0b1220;
    color: #fff;
}

.receipt-hero h1 {
    color: #fff;
    font-family: var(--font-sans);
}

.receipt-hero__meta,
.receipt-hero__id {
    color: #98a2b3;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.panel--soft {
    background: var(--surface-2);
}

.panel__head {
    border-bottom: 1px solid var(--line);
}

.panel__head p,
.panel__note {
    color: var(--muted);
}

/* Forms -------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #84adff;
    outline: 3px solid rgba(0, 81, 195, 0.12);
    outline-offset: 0;
}

.field__label {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.field__hint {
    color: var(--muted-2);
    font-size: 0.7rem;
}

/* Admin shell -------------------------------------------------------------- */

.admin-shell {
    background: var(--paper);
}

.admin-sidebar {
    background: #0b1220;
    background-image: none;
    border-right: 1px solid #1d2939;
    padding: 1.2rem 0.8rem 1rem;
    color: #d0d5dd;
}

.admin-sidebar .brand__mark {
    background: var(--brand-blue);
    color: #fff;
}

.admin-sidebar .brand__copy strong {
    color: #f9fafb;
    font-family: var(--font-sans);
    font-size: 0.82rem;
}

.admin-sidebar .brand__copy small {
    color: #667085;
    font-size: 0.47rem;
}

.admin-sidebar__label {
    color: #667085;
    font-size: 0.57rem;
    letter-spacing: 0.13em;
}

.admin-nav {
    gap: 0.15rem;
}

.admin-nav__item {
    padding: 0.54rem 0.65rem;
    border-radius: 6px;
    color: #98a2b3;
    font-size: 0.79rem;
    font-weight: 500;
}

.admin-nav__item:hover {
    background: #111c2e;
    color: #f2f4f7;
}

.admin-nav__item.is-active {
    border-color: transparent;
    background: #132a4d;
    color: #fff;
}

.admin-nav__item.is-active::before {
    left: -0.8rem;
    width: 3px;
    height: 18px;
    background: #528bff;
}

.admin-nav__icon {
    color: #667085;
}

.admin-nav__item.is-active .admin-nav__icon {
    color: #84adff;
}

.admin-nav__chevron {
    color: #475467;
}

.admin-sidebar__status {
    border-color: #1d2939;
    background: #111c2e;
}

.admin-sidebar__status strong {
    color: #d0d5dd;
}

.admin-sidebar__status small,
.admin-sidebar__hint {
    color: #667085;
}

.admin-topbar {
    padding: 0.72rem clamp(1.2rem, 2.2vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.admin-topbar__eyebrow {
    color: var(--muted-2);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
}

.admin-topbar h1 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.admin-avatar {
    background: var(--forest-mist);
    color: var(--brand-blue);
    font-family: var(--font-sans);
}

.admin-content {
    max-width: 1440px;
    padding: 1.7rem clamp(1.2rem, 2.2vw, 2rem) 4rem;
}

.page-header {
    margin-bottom: 1.3rem;
}

.page-header h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.55rem, 2.2vw, 1.9rem);
    font-weight: 650;
    letter-spacing: -0.035em;
}

.page-header p {
    color: var(--muted);
    font-size: 0.82rem;
}

.stats-grid {
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.stat-card {
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}

.stat-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-xs);
    transform: none;
}

.stat-card__icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: var(--forest-mist);
    color: var(--brand-blue);
}

.stat-card__label {
    color: var(--muted);
    font-size: 0.7rem;
}

.stat-card strong {
    font-family: var(--font-sans);
    font-size: 1.45rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.stat-card__hint {
    color: var(--muted-2);
    font-size: 0.64rem;
}

.panel {
    margin-bottom: 1.1rem;
}

.panel__head {
    padding: 1rem 1.15rem;
}

.panel__head h2 {
    font-size: 0.98rem;
}

.eyebrow {
    font-size: 0.6rem;
}

.data-table {
    font-size: 0.78rem;
}

.data-table th {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.data-table td {
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid #f2f4f7;
    color: var(--ink-soft);
}

.data-table tbody tr:hover {
    background: #fbfcfe;
}

.data-table small {
    color: var(--muted-2);
    font-size: 0.66rem;
}

.badge {
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0;
}

.toolbar input[type="search"],
.search-field input {
    height: 38px;
}

/* Admin login -------------------------------------------------------------- */

.auth-shell,
.auth-page {
    background: var(--paper);
}

.auth-visual {
    background: #0b1220;
}

.auth-visual h1,
.auth-visual h2 {
    font-family: var(--font-sans);
}

/* Modal -------------------------------------------------------------------- */

.modal {
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.modal__head {
    border-bottom: 1px solid var(--line);
}

.modal__foot {
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

/* Responsive tweaks -------------------------------------------------------- */

@media (max-width: 900px) {
    .public-main {
        width: calc(100% - 2.5rem);
        padding-top: 1.6rem;
    }

    .hero {
        gap: 2.2rem;
        padding: 2.4rem 0;
    }

    .hero__visual {
        padding: 0.9rem;
    }

    .home-section {
        padding: 2.6rem 0;
    }

    .home-section--split,
    .home-cta {
        padding: 2rem 1.4rem;
        border-radius: 12px;
    }

    .public-footer {
        width: calc(100% - 2.5rem);
    }
}

/* Theme correction pass ----------------------------------------------------- */

.access-grid {
    align-items: start;
}

.hero__visual {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.release-card {
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.10);
}

.auth-aside {
    background: #0b1220;
    color: #fff;
}

.auth-aside__body h1 {
    color: #fff;
    font-family: var(--font-sans);
    font-size: clamp(2.1rem, 3.4vw, 3.2rem);
    font-weight: 650;
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.auth-aside__body p {
    color: #98a2b3;
}

.auth-aside__tag {
    border-color: #1d2939;
    color: #84adff;
}

.auth-aside .brand__mark {
    background: var(--brand-blue);
    color: #fff;
}

.auth-aside .stat-strip,
.auth-aside__stats {
    border-top-color: #1d2939;
}

.admin-topbar h1 {
    display: none;
}

.admin-topbar__eyebrow {
    margin-bottom: 0;
}

@media (max-width: 920px) {
    .public-nav {
        padding: 0 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.6rem 0 2.4rem;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 9vw, 3rem);
    }

    .hero__visual {
        width: 100%;
        min-height: 0;
        margin-top: 0.2rem;
    }

    .hero__meta {
        flex-wrap: wrap;
        gap: 0.7rem 1.1rem;
    }

    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section--split {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.2rem 1.6rem;
    }

    .home-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
        padding: 2.2rem 1.6rem;
    }

    .access-grid,
    .sign-grid {
        grid-template-columns: 1fr;
    }

    .access-form-card {
        order: -1;
    }
}

@media (max-width: 620px) {
    .public-main {
        width: calc(100% - 2.2rem);
        padding: 1.6rem 0 3rem;
    }

    .public-footer {
        width: calc(100% - 2.2rem);
    }

    .brand__copy strong {
        font-size: 0.84rem;
    }

    .brand__copy small {
        font-size: 0.5rem;
    }

    .brand__mark {
        width: 32px;
        height: 32px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .home-section {
        padding: 2.4rem 0;
    }

    .home-section--split,
    .home-cta {
        border-radius: 10px;
        padding: 1.7rem 1.2rem;
    }

    .home-cta h2 {
        font-size: 1.45rem;
    }

    .public-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.9rem;
    }

    .public-footer__meta {
        flex-wrap: wrap;
        gap: 0.5rem 0.9rem;
    }

    .access-card,
    .access-form-card {
        padding: 1.35rem;
    }
}

/* Admin detail/record headers: remove the remaining warm paper gradients. */
.detail-hero,
.record-hero {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow-xs);
}

.detail-side-stat {
    border-color: var(--line);
    border-radius: 7px;
    background: #ffffff;
}

.detail-side-stat span {
    color: var(--muted-2);
}

.detail-side-stat strong {
    color: var(--ink-soft);
}

/* ==========================================================================
   OBSIGN — archival precision
   Warm paper, forest ink, oxidized copper. Serif display, humanist sans UI.
   ========================================================================== */

:root {
    --paper: #f1ece1;
    --paper-deep: #e8e1d2;
    --surface: #fbf8f1;
    --surface-2: #f6f1e7;
    --surface-3: #eee6d8;
    --ink: #18251f;
    --ink-soft: #2b3832;
    --muted: #66716a;
    --muted-2: #8b938b;
    --line: #dcd3c2;
    --line-strong: #c7bba5;
    --forest: #17382c;
    --forest-2: #1e4a3a;
    --forest-3: #2f6b56;
    --forest-mist: #e2ece4;
    --gold: #a65d35;
    --gold-2: #bf7a4e;
    --gold-soft: #f2e2d3;
    --danger: #a33b2c;
    --danger-bg: #f8ebe6;
    --success: #2f6b4b;
    --success-bg: #e8f1e8;
    --warn: #8a5a1f;
    --warn-bg: #f8efdc;
    --info: #3c6b76;
    --info-bg: #eaf1f1;
    --shadow-xs: 0 1px 1px rgba(24, 37, 31, 0.04);
    --shadow-sm: 0 1px 2px rgba(24, 37, 31, 0.05);
    --shadow-md: 0 16px 34px rgba(24, 37, 31, 0.08);
    --shadow-lg: 0 28px 64px rgba(24, 37, 31, 0.12);
    --radius-sm: 2px;
    --radius: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --brand-blue: #2f6b56;
    --brand-blue-hover: #245443;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "Noto Serif SC", serif;
    --font-sans: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--paper);
    background-image: radial-gradient(rgba(24, 37, 31, 0.045) 0.55px, transparent 0.55px);
    background-size: 5px 5px;
    color: var(--ink);
}

body::before {
    display: none;
}

::selection {
    background: rgba(166, 93, 53, 0.24);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.022em;
}

a {
    color: var(--forest-3);
}

a:hover {
    color: var(--forest);
}

.eyebrow {
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 0.61rem;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.eyebrow__dot {
    width: 5px;
    height: 5px;
    background: var(--gold);
}

/* Navigation --------------------------------------------------------------- */

.public-nav {
    height: 72px;
    padding: 0 max(28px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(241, 236, 225, 0.94);
    backdrop-filter: blur(10px);
}

.public-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: rgba(166, 93, 53, 0.28);
}

.brand {
    gap: 0.7rem;
}

.brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 2px;
    background: var(--forest);
    color: #f2e2d3;
    box-shadow: inset 0 0 0 1px rgba(242, 226, 211, 0.34);
}

.brand__copy strong {
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.brand__copy small {
    color: var(--gold);
    font-size: 0.52rem;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.public-nav .text-link {
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: transparent;
    color: var(--ink-soft);
    padding: 0.42rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.public-nav .text-link:hover {
    border-color: var(--forest);
    background: var(--forest);
    color: #f8f4ea;
}

.public-main {
    width: min(1180px, calc(100% - 4rem));
    padding: 3.2rem 0 4.4rem;
}

.public-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.public-footer strong {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
}

.public-footer__meta {
    color: var(--muted-2);
    letter-spacing: 0.02em;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
    min-height: 40px;
    padding: 0.58rem 1.05rem;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 0.79rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.btn--primary {
    background: var(--forest);
    border-color: var(--forest);
    color: #f8f4ea;
    box-shadow: 0 1px 2px rgba(24, 37, 31, 0.12);
}

.btn--primary:hover {
    background: var(--forest-2);
    border-color: var(--forest-2);
    color: #fff;
    box-shadow: 0 3px 8px rgba(24, 37, 31, 0.16);
}

.btn--secondary,
.btn--ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.btn--secondary:hover,
.btn--ghost:hover {
    background: var(--surface);
    border-color: var(--forest);
    color: var(--forest);
}

.btn--light {
    background: #f8f4ea;
    border-color: #f8f4ea;
    color: var(--forest);
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Hero / record card ------------------------------------------------------- */

.hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 5rem;
    padding: 4.8rem 0 4.4rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5.4vw, 4.9rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0.6rem 0 1.3rem;
}

.hero h1 em {
    color: var(--forest);
    font-style: italic;
    font-weight: 500;
}

.hero__lead {
    max-width: 33rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.hero__actions {
    margin-top: 1.7rem;
    gap: 0.55rem;
}

.hero__meta {
    gap: 1.25rem;
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.hero__visual {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.record-card {
    position: relative;
    padding: 1.5rem 1.55rem 1.2rem;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.record-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 18px;
    bottom: 18px;
    width: 3px;
    background: var(--gold);
}

.record-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.61rem;
    letter-spacing: 0.11em;
}

.record-card__status {
    color: var(--success);
    border-bottom: 1px solid rgba(47, 107, 75, 0.35);
}

.record-card__title {
    margin: 1.15rem 0 1.25rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.08;
}

.record-card__rows {
    border-top: 1px solid var(--line);
}

.record-card__rows > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.58rem 0;
    border-bottom: 1px solid var(--line);
}

.record-card__rows span {
    color: var(--muted-2);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

.record-card__rows strong {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 550;
}

.record-card__foot {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding-top: 0.95rem;
    color: var(--muted);
    font-size: 0.66rem;
}

.record-card__foot .icon {
    color: var(--gold);
}

/* Home principles / operator ---------------------------------------------- */

.home-principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.principle {
    padding: 2.2rem 2rem 2.4rem;
}

.principle + .principle {
    border-left: 1px solid var(--line);
}

.principle__num {
    display: block;
    margin-bottom: 1.4rem;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

.principle h2 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 500;
}

.principle p {
    max-width: 18rem;
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.7;
}

.operator-note {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 0 0.6rem;
}

.operator-note h2 {
    margin-top: 0.25rem;
    font-size: 1.4rem;
    font-weight: 500;
}

.operator-note .text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--forest-3);
    font-size: 0.8rem;
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 0.15rem;
}

/* Public task surfaces ----------------------------------------------------- */

.access-card,
.access-form-card,
.processing-card,
.receipt-hero,
.auth-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: none;
}

.access-card {
    border-top: 2px solid var(--forest);
}

.access-form-card {
    border-top: 2px solid var(--gold);
}

.access-card h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.3vw, 2.7rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.access-card__badge .eyebrow {
    color: var(--muted);
}

.panel__head {
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.panel__head h2,
.access-form-card__head h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.panel--soft {
    background: var(--surface-2);
}

.receipt-hero {
    border-color: var(--forest);
    border-top: 3px solid var(--gold);
    border-radius: 4px;
    background-color: var(--forest);
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    color: #f8f4ea;
}

.receipt-hero h1 {
    font-family: var(--font-display);
    font-weight: 500;
    color: #fff;
}

.receipt-hero__meta,
.receipt-hero__id {
    color: #b9c9be;
}

.receipt-hero .eyebrow {
    color: #e0b18d;
}

/* Forms -------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: #fdfbf6;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--forest-3);
    outline: 2px solid rgba(47, 107, 86, 0.16);
    outline-offset: 0;
}

.field__label {
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.field__hint {
    color: var(--muted-2);
}

/* Admin -------------------------------------------------------------------- */

.admin-shell {
    background: var(--paper);
}

.admin-sidebar {
    background: var(--forest);
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent 20%),
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(255,255,255,0.025) 47px 48px);
    border-right: 1px solid #0d241c;
    padding: 1.35rem 0.85rem 1rem;
}

.admin-sidebar .brand__mark {
    background: #f2e2d3;
    color: var(--forest);
    box-shadow: none;
}

.admin-sidebar .brand__copy strong {
    color: #f8f4ea;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
}

.admin-sidebar .brand__copy small {
    color: #c99a76;
    font-size: 0.46rem;
    letter-spacing: 0.13em;
}

.admin-sidebar__label {
    color: #82998b;
}

.admin-nav__item {
    border-radius: 2px;
    color: #b3c3b7;
    font-size: 0.77rem;
    letter-spacing: 0.02em;
}

.admin-nav__item:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #f8f4ea;
}

.admin-nav__item.is-active {
    background: rgba(242, 226, 211, 0.075);
    color: #fbf7ef;
}

.admin-nav__item.is-active::before {
    background: var(--gold-2);
    width: 2px;
}

.admin-nav__icon {
    color: #7f9788;
}

.admin-nav__item.is-active .admin-nav__icon {
    color: #e0b18d;
}

.admin-sidebar__status {
    border-color: rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.10);
    border-radius: 2px;
}

.admin-sidebar__status strong {
    color: #e6ede7;
}

.admin-sidebar__status small,
.admin-sidebar__hint {
    color: #8fa495;
}

.admin-topbar {
    padding: 0.62rem clamp(1.2rem, 2.2vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(241, 236, 225, 0.94);
}

.admin-topbar__eyebrow {
    color: var(--muted-2);
    font-size: 0.57rem;
}

.admin-topbar h1 {
    display: none;
}

.admin-avatar {
    border-radius: 2px;
    background: var(--gold-soft);
    color: var(--forest);
    font-family: var(--font-mono);
}

.admin-content {
    padding-top: 1.9rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 2.7vw, 2.4rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.page-header p {
    color: var(--muted);
}

.stat-card {
    border: 1px solid var(--line);
    border-top: 2px solid var(--line-strong);
    border-radius: 2px;
    background: var(--surface);
    box-shadow: none;
}

.stat-card:hover {
    border-top-color: var(--gold);
    box-shadow: none;
}

.stat-card__icon {
    border-radius: 2px;
    background: var(--forest-mist);
    color: var(--forest);
}

.stat-card strong {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 500;
}

.stat-card__label {
    color: var(--muted);
    letter-spacing: 0.03em;
}

.panel {
    border-radius: 2px;
    background: var(--surface);
    box-shadow: none;
}

.panel__head {
    padding: 1.05rem 1.15rem;
}

.eyebrow {
    letter-spacing: 0.14em;
}

.data-table th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.6rem;
    letter-spacing: 0.09em;
}

.data-table td {
    border-bottom: 1px solid #eee7da;
}

.data-table tbody tr:hover {
    background: #faf6ee;
}

.badge {
    border-radius: 2px;
    font-size: 0.62rem;
    letter-spacing: 0.025em;
}

.toolbar input[type="search"],
.search-field input {
    border-radius: 2px;
}

.detail-hero,
.record-hero {
    border: 1px solid var(--line);
    border-top: 3px solid var(--forest);
    border-radius: 2px;
    background: var(--surface);
    box-shadow: none;
}

.detail-side-stat {
    border-radius: 2px;
    background: var(--surface-2);
}

/* Admin login -------------------------------------------------------------- */

.auth-page {
    background: var(--paper);
}

.auth-aside {
    background: var(--forest);
    background-image:
        radial-gradient(680px 420px at 88% 6%, rgba(166, 93, 53, 0.16), transparent 62%),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,0.025) 79px 80px);
    color: #f8f4ea;
}

.auth-aside__body h1 {
    color: #fbf7ef;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 3.6vw, 3.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.auth-aside__body p {
    color: #b3c3b7;
}

.auth-aside__tag {
    border-color: rgba(242, 226, 211, 0.28);
    color: #e0b18d;
    border-radius: 2px;
}

.auth-aside__stats {
    border-top: 1px solid rgba(242, 226, 211, 0.18);
}

.auth-aside__stats span {
    color: #9db0a2;
}

.auth-card {
    border-top: 2px solid var(--forest);
    border-radius: 2px;
    box-shadow: var(--shadow-sm);
}

.auth-card h2 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 500;
}

/* Receipt / modal details -------------------------------------------------- */

.modal {
    border-radius: 4px;
}

.modal__head,
.modal__foot {
    border-color: var(--line);
}

.modal__foot {
    background: var(--surface-2);
}

.hash-line code,
.code-inline {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.evidence-json {
    margin-top: 0.85rem;
    border-top: 1px solid var(--line);
    padding-top: 0.7rem;
}

.evidence-json summary {
    color: var(--forest-3);
    cursor: pointer;
    font-size: 0.75rem;
}

.evidence-json span {
    display: block;
    margin: 0.7rem 0 0.25rem;
    color: var(--muted);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.evidence-json pre {
    max-height: 16rem;
    overflow: auto;
    padding: 0.7rem;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.4rem;
        padding: 3rem 0 2.8rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero__visual {
        max-width: 520px;
    }

    .home-principles {
        grid-template-columns: 1fr;
    }

    .principle + .principle {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .operator-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 620px) {
    .public-nav {
        height: 64px;
        padding: 0 20px;
    }

    .public-main {
        width: calc(100% - 2.2rem);
        padding-top: 2rem;
    }

    .hero h1 {
        font-size: 2.45rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .principle {
        padding: 1.6rem 1.2rem;
    }

    .record-card {
        padding: 1.2rem;
    }

    .public-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}

/* Language switch ---------------------------------------------------------- */

.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 0.5rem;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: transparent;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.lang-toggle:hover {
    border-color: var(--forest);
    color: var(--forest);
    background: var(--surface-2);
}

.lang-toggle--light {
    border-color: rgba(242, 226, 211, 0.32);
    color: #f2e2d3;
}

.lang-toggle--light:hover {
    border-color: #f2e2d3;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.auth-aside__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    z-index: 3;
}

.auth-aside__lang {
    display: none;
}

.admin-topbar__right .lang-toggle {
    margin-right: 0.1rem;
}

/* Login language switch ---------------------------------------------------- */
.auth-main {
    position: relative;
}

.auth-main__lang {
    position: absolute;
    top: 1.4rem;
    right: 1.5rem;
    z-index: 3;
}

@media (max-width: 860px) {
    .auth-main__lang {
        display: none !important;
    }
    .auth-aside__lang {
        display: block;
    }
}

.toolbar__count { display: none; }


html[lang="en"] .auth-loading strong {
    font-size: 0;
}
html[lang="en"] .auth-loading strong::after {
    content: "Verifying administrator session…";
    font-size: 0.82rem;
}
