:root {
  --ink: #111711;
  --ink-soft: #263029;
  --paper: #f4f1e8;
  --paper-bright: #fbfaf6;
  --line: #d8d5cb;
  --acid: #c8f135;
  --acid-dark: #728d14;
  --red: #b42318;
  --amber: #a15c00;
  --blue: #155eef;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(21, 27, 21, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.public-shell {
  background:
    radial-gradient(circle at 75% 8%, rgba(200, 241, 53, .20), transparent 22rem),
    linear-gradient(90deg, rgba(17, 23, 17, .035) 1px, transparent 1px),
    linear-gradient(rgba(17, 23, 17, .035) 1px, transparent 1px), var(--paper);
  background-size: auto, 56px 56px, 56px 56px, auto;
}

.public-header, .public-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-header { min-height: 88px; border-bottom: 1px solid rgba(17, 23, 17, .18); }
.public-footer { padding: 30px 0 40px; border-top: 1px solid rgba(17, 23, 17, .18); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #5d655d; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 14px; line-height: 1.15; letter-spacing: .12em; font-weight: 850; }
.brand small { display: block; margin-top: 3px; font-size: 8px; color: #6a726b; letter-spacing: .20em; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--acid); background: var(--ink); font-weight: 900; }
.quiet-link { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; text-underline-offset: 4px; }

.hero { width: min(1240px, calc(100% - 48px)); min-height: 690px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(48px, 8vw, 120px); align-items: center; padding: 70px 0 90px; }
.eyebrow, .section-kicker { margin: 0 0 22px; color: #546052; font-size: 11px; letter-spacing: .18em; font-weight: 850; }
.eyebrow span { display: inline-block; width: 36px; height: 2px; margin: 0 10px 3px 0; background: var(--ink); }
.hero h1, .transfer-panel h1 { margin: 0; max-width: 780px; font-size: clamp(54px, 7vw, 102px); line-height: .91; letter-spacing: -.065em; font-weight: 840; }
.hero h1 em { color: var(--acid-dark); font-family: Georgia, serif; font-weight: 400; }
.hero-intro, .transfer-summary { max-width: 650px; margin: 34px 0 0; color: #4e594f; font-size: clamp(17px, 2vw, 21px); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(17, 23, 17, .15); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .drop-zone:focus-visible { outline: 3px solid rgba(21, 94, 239, .35); outline-offset: 2px; }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button-primary { border-color: var(--ink); background: var(--ink); color: white; }
.button-primary::after { content: "→"; margin-left: 22px; color: var(--acid); font-size: 16px; }
.button-ghost { background: rgba(255, 255, 255, .35); }
.button-wide { width: 100%; margin-top: 18px; }
.button-small { min-height: 36px; padding: 0 14px; font-size: 10px; }
.button-danger { border-color: #e5b9b5; color: var(--red); background: #fff7f6; }

.security-card { position: relative; padding: 24px; border: 1px solid rgba(17, 23, 17, .3); border-radius: 28px; background: rgba(251, 250, 246, .78); box-shadow: var(--shadow); backdrop-filter: blur(14px); overflow: hidden; }
.security-card::after { content: ""; position: absolute; right: -80px; top: 70px; width: 180px; height: 180px; border: 30px solid rgba(200, 241, 53, .18); border-radius: 50%; }
.security-card-head { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .14em; font-weight: 850; }
.live-dot { color: #547008; }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px rgba(200, 241, 53, .22); }
.shield-orbit { display: grid; width: 200px; height: 200px; margin: 38px auto; place-items: center; border: 1px solid #c9cdc5; border-radius: 50%; box-shadow: inset 0 0 0 24px rgba(17, 23, 17, .025); }
.shield-core { display: grid; width: 102px; height: 118px; place-items: center; border-radius: 44% 44% 50% 50% / 32% 32% 64% 64%; background: var(--ink); color: var(--acid); font-family: Georgia, serif; font-size: 32px; }
.security-list { margin: 0; border-top: 1px solid var(--line); }
.security-list div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.security-list dt { color: #737b73; }
.security-list dd { margin: 0; font-weight: 750; }

.process { padding: 100px max(24px, calc((100vw - 1240px) / 2)); background: var(--ink); color: white; }
.process h2 { max-width: 720px; margin: 0; font-size: clamp(38px, 5vw, 70px); line-height: 1; letter-spacing: -.045em; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 70px; background: #48504a; }
.process-grid article { min-height: 250px; padding: 30px; background: var(--ink); }
.process-grid article > span { color: var(--acid); font-family: Georgia, serif; font-size: 28px; }
.process-grid h3 { margin: 54px 0 12px; font-size: 18px; }
.process-grid p { margin: 0; color: #afb8b0; line-height: 1.6; }
.principles { width: min(1240px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 64px 0; }
.principles div { padding: 15px 25px; border-left: 1px solid var(--line); }
.principles div:last-child { border-right: 1px solid var(--line); }
.principles strong, .principles span { display: block; }
.principles strong { font-family: Georgia, serif; font-size: 27px; }
.principles span { margin-top: 8px; color: #697169; font-size: 12px; }

.transfer-page { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 70px 24px 100px; }
.transfer-panel { width: min(720px, 100%); padding: clamp(28px, 5vw, 58px); border: 1px solid rgba(17, 23, 17, .24); border-radius: 30px; background: rgba(251, 250, 246, .88); box-shadow: var(--shadow); }
.transfer-panel h1 { font-size: clamp(44px, 7vw, 72px); }
.transfer-summary { margin-top: 24px; font-size: 16px; }
.transfer-status-line { display: flex; gap: 9px; align-items: center; justify-content: flex-end; margin-bottom: 36px; color: #667067; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgba(200, 241, 53, .18); }
.drop-zone { margin-top: 32px; padding: 38px 20px; border: 1px dashed #899187; border-radius: 18px; text-align: center; cursor: pointer; transition: background .15s, border .15s; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--acid-dark); background: rgba(200, 241, 53, .09); }
.drop-icon, .file-glyph { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--acid); font-size: 23px; }
.drop-zone strong, .drop-zone span { display: block; }
.drop-zone span { margin-top: 8px; color: #6b746c; font-size: 12px; }
.download-file-card { display: flex; gap: 18px; align-items: center; margin-top: 34px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.download-file-card .file-glyph { flex: 0 0 52px; margin: 0; }
.download-file-card strong, .download-file-card span { display: block; word-break: break-word; }
.download-file-card span { margin-top: 5px; color: #6a726b; font-size: 12px; }
.link-problem, .alert-error { margin-top: 24px; padding: 14px 16px; border: 1px solid #e7b8b2; border-radius: 12px; background: #fff4f2; color: var(--red); font-size: 13px; line-height: 1.45; }
.progress-wrap { margin-top: 22px; }
.progress-track { width: 100%; height: 8px; border: 0; border-radius: 999px; background: #e2e2dc; overflow: hidden; appearance: none; }
.progress-track::-webkit-progress-bar { background: #e2e2dc; }
.progress-track::-webkit-progress-value { background: var(--acid-dark); transition: width .18s; }
.progress-track::-moz-progress-bar { background: var(--acid-dark); }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; color: #606a60; font-size: 11px; }
.transfer-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); color: #646d65; font-size: 10px; }
.transfer-facts i { color: var(--acid-dark); font-style: normal; font-weight: 900; }

/* Admin */
.admin-shell { background: #ecece6; }
.admin-grid { display: grid; min-height: 100vh; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 20px; background: var(--ink); color: white; }
.sidebar .brand { color: white; }
.sidebar-nav { display: grid; gap: 7px; margin-top: 52px; }
.sidebar-nav a { padding: 12px 14px; border-radius: 10px; color: #b8c0b8; text-decoration: none; font-size: 13px; font-weight: 650; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: white; background: #29322b; }
.sidebar-nav a.active::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 0; border-radius: 50%; background: var(--acid); }
.sidebar-bottom { margin-top: auto; }
.sidebar-bottom form { margin-top: 12px; }
.admin-identity { color: #8f9a90; font-size: 11px; word-break: break-all; }
.logout-button { padding: 0; border: 0; background: none; color: #cbd2cb; text-decoration: underline; cursor: pointer; }
.admin-main { min-width: 0; padding: 34px clamp(22px, 4vw, 56px) 70px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.admin-topbar p { margin: 0; color: #6b736c; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.admin-topbar strong { font-family: Georgia, serif; font-size: 17px; }
.page-title { margin: 0 0 26px; font-size: clamp(34px, 5vw, 55px); letter-spacing: -.045em; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card, .panel { border: 1px solid #d1d4cd; border-radius: var(--radius); background: var(--paper-bright); box-shadow: 0 10px 30px rgba(27, 34, 28, .05); }
.stat-card { padding: 20px; }
.stat-card span { display: block; color: #747b74; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 12px; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.admin-columns { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.28fr); gap: 18px; margin-top: 18px; align-items: start; }
.panel { padding: 24px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p { margin: 5px 0 0; color: #747c75; font-size: 12px; }
.form-grid { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; color: #4f5850; font-size: 11px; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid #c9cdc6; border-radius: 10px; background: white; color: var(--ink); }
input[type="checkbox"] { width: auto; min-height: 0; }
textarea { min-height: 90px; resize: vertical; }
.field-help { color: #7a817a; font-size: 10px; font-weight: 400; }
.secret-card { margin-bottom: 18px; padding: 18px; border: 1px solid #9fbb44; border-radius: 14px; background: #f5ffd4; }
.secret-card strong, .secret-card span { display: block; }
.secret-card span { margin: 5px 0 12px; color: #566127; font-size: 12px; }
.secret-row { display: flex; gap: 8px; }
.secret-row code { flex: 1; min-width: 0; padding: 12px; border-radius: 8px; background: #151b15; color: #d7fb51; font-size: 11px; overflow: auto; white-space: nowrap; }
.notice { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #aed1b5; border-radius: 10px; background: #edfff0; color: #246b32; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 9px; border-bottom: 1px solid #cfd2cc; color: #6d756e; text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 13px 9px; border-bottom: 1px solid #e1e2dd; vertical-align: middle; }
td code { font-size: 10px; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e5e8e3; color: #495149; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.status-issued, .status-active { background: #efffbd; color: #4b6400; }
.status-clean, .status-completed, .status-consumed { background: #dff8e4; color: #17612a; }
.status-pending, .status-uploading, .status-reserved { background: #fff0ce; color: #8a5500; }
.status-infected, .status-rejected, .status-failed, .status-revoked, .status-expired { background: #ffe4e0; color: #9c2318; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { width: 84px; min-height: 34px; padding: 5px 7px; }
.pagination { display: flex; justify-content: space-between; margin-top: 18px; }
.pagination a { font-size: 12px; }
.empty { padding: 30px; color: #777f78; text-align: center; }
.panel-spaced { margin-top: 18px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-art { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: var(--ink); color: white; }
.login-art h1 { max-width: 670px; margin: auto 0; font-size: clamp(58px, 8vw, 110px); line-height: .86; letter-spacing: -.065em; }
.login-art h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.login-form-wrap { display: grid; place-items: center; padding: 30px; }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 0; font-size: 38px; letter-spacing: -.04em; }
.login-card > p { margin: 10px 0 28px; color: #6c746d; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .security-card { max-width: 540px; }
  .process-grid, .principles { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-nav { grid-template-columns: repeat(5, 1fr); margin-top: 22px; overflow-x: auto; }
  .sidebar-bottom { display: flex; gap: 20px; align-items: center; margin-top: 24px; }
  .admin-columns { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { min-height: 420px; }
}

@media (max-width: 680px) {
  .public-header, .public-footer, .hero, .principles { width: min(100% - 28px, 1240px); }
  .public-header { min-height: 74px; }
  .quiet-link { font-size: 9px; }
  .hero { min-height: auto; padding: 60px 0; }
  .hero h1 { font-size: 57px; }
  .security-card { padding: 19px; }
  .process { padding: 70px 20px; }
  .process-grid, .principles, .stats-grid, .transfer-facts { grid-template-columns: 1fr; }
  .principles div, .principles div:last-child { border-right: 0; border-left: 0; border-top: 1px solid var(--line); }
  .transfer-page { padding-inline: 12px; }
  .transfer-panel { padding: 26px 20px; border-radius: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .sidebar-nav { grid-template-columns: 1fr 1fr; }
  .admin-main { padding-inline: 14px; }
  .login-art { min-height: 330px; padding: 28px; }
  .login-art h1 { font-size: 62px; }
  .public-footer { align-items: flex-start; gap: 14px; flex-direction: column; }
}
