:root {
[hidden] { display: none !important; }
  --bg: #000; --fg: #fff; --muted: #8f8f8f; --dim: #5a5a5a; --panel: #070707; --panel-2: #0c0c0c;
  --line: rgba(255,255,255,0.10); --line-strong: rgba(255,255,255,0.28);
  --ok: #3ddc84; --err: #ff6b61; --pad: clamp(20px, 4vw, 56px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }

/* header */
.p-head { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.p-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.p-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.p-brand img { height: 26px; width: auto; display: block; }
.p-brand .tag { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 16px; }
.p-nav { display: flex; align-items: center; gap: 22px; }
.p-nav a, .p-nav button { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 0; white-space: nowrap; }
.p-nav a:hover, .p-nav button:hover, .p-nav a.on { color: #fff; }
.p-user { color: #fff !important; }
@media (max-width: 760px) {
  .p-brand .tag { display: none; }
  .p-nav { gap: 14px; }
  .p-nav .hide-sm { display: none; }
}

/* steps */
.steps { display: flex; gap: 0; border: 1px solid var(--line); width: fit-content; margin: 0 0 28px; }
.steps span { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 9px 14px; border-left: 1px solid var(--line); }
.steps span:first-child { border-left: 0; }
.steps span.done { color: var(--muted); }
.steps span.on { color: #000; background: #fff; }
@media (max-width: 560px) { .steps span { padding: 8px 9px; font-size: 9.5px; letter-spacing: .1em; } }

/* type */
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--line-strong); }
.h-xl { font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: .92; font-size: clamp(40px, 6vw, 84px); margin: 18px 0 18px; }
.h-lg { font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .95; font-size: clamp(30px, 4vw, 52px); margin: 14px 0 14px; }
.stroke { -webkit-text-stroke: 1.5px #fff; color: transparent; }
.lede { color: #bdbdbd; font-size: 16px; line-height: 1.6; max-width: 60ch; margin: 0 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* panels & forms */
.panel { background: var(--panel); border: 1px solid var(--line-strong); padding: clamp(24px, 3.4vw, 44px); clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.field { display: block; margin-bottom: 20px; }
.field > span, .label { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field .req { color: #fff; }
.input, select.input, textarea.input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); color: #fff; font: 15px 'Inter', sans-serif; padding: 10px 0; border-radius: 0; outline: none; transition: border-color .2s; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8f8f8f 50%), linear-gradient(135deg, #8f8f8f 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: #0a0a0a; color: #fff; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.55; }
.input:focus { border-bottom-color: #fff; }
.field.invalid .input { border-bottom-color: var(--err); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #cfcfcf; line-height: 1.55; cursor: pointer; }
.check input { margin-top: 4px; accent-color: #fff; width: 15px; height: 15px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; padding: 14px 24px; border: 1px solid #fff; background: #fff; color: #000; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, opacity .2s; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.btn:hover { background: transparent; color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: var(--line-strong); }
.btn.ghost:hover { border-color: #fff; }
.btn.sm { padding: 9px 14px; font-size: 10.5px; }
.btn.danger { background: transparent; color: var(--err); border-color: rgba(255,107,97,.5); }
.btn.danger:hover { background: var(--err); color: #000; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.btn[disabled]:hover { background: #fff; color: #000; }
.btn.ghost[disabled]:hover { background: transparent; color: #fff; }

.msg { font-size: 13.5px; min-height: 1.2em; margin: 12px 0 0; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 14px 18px 12px 0; margin-right: 22px; cursor: pointer; margin-bottom: -1px; }
.tabs button.on { color: #fff; border-bottom-color: #fff; }

/* auth page */
.auth { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 1; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.75) 100%), linear-gradient(0deg, #000 0%, rgba(0,0,0,.55) 38%, rgba(0,0,0,0) 62%); }
.auth-art .copy { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(36px, 6vw, 72px); z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: clamp(36px, 6vw, 72px) var(--pad); }
.auth-form .panel { width: 100%; max-width: 520px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
  .auth-art img { position: relative; inset: auto; height: auto; aspect-ratio: 4 / 3; object-position: 50% 32%; }
  .auth-art::after { background: linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 30%); bottom: auto; height: calc(100vw * .75); }
  .auth-art .copy { position: relative; left: auto; right: auto; bottom: auto; padding: 0 var(--pad) 32px; margin-top: -28px; }
}

/* policy */
.page { padding: clamp(36px, 5vw, 72px) 0 96px; }
.policy-box { border: 1px solid var(--line-strong); background: #fafafa; color: #111; height: min(62vh, 640px); overflow-y: auto; padding: clamp(24px, 4vw, 56px); font-family: 'Times New Roman', Times, serif; font-size: 16px; line-height: 1.55; }
.policy-box .doc-head { text-align: center; margin-bottom: 26px; }
.policy-box .doc-head .co { font-weight: 700; font-size: 17px; }
.policy-box .doc-head .t { font-weight: 700; font-size: 20px; letter-spacing: .04em; margin-top: 6px; }
.policy-box .doc-head .v { font-style: normal; color: #444; margin-top: 4px; }
.policy-box h1 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; text-transform: none; letter-spacing: 0; }
.policy-box h2 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.policy-box p { margin: 0 0 12px; text-align: justify; }
.policy-box ul, .policy-box ol { margin: 0 0 12px; padding-left: 26px; }
.policy-box li { margin-bottom: 6px; }
.policy-box .num { display: inline-block; min-width: 2.2em; }
.policy-box .tbl { overflow-x: auto; margin: 10px 0 18px; }
.policy-box table { border-collapse: collapse; width: 100%; font-size: 14px; }
.policy-box td, .policy-box th { border: 1px solid #999; padding: 6px 8px; vertical-align: top; text-align: left; }
.policy-box blockquote { margin: 0 0 12px; padding: 0; }
.read-meter { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 0; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.read-meter .bar { flex: 1; height: 2px; background: var(--line); position: relative; }
.read-meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; transition: width .15s; }
.sign { margin-top: 36px; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .sign { grid-template-columns: 1fr; } }
.statement { border-left: 2px solid #fff; padding: 4px 0 4px 18px; color: #d6d6d6; font-size: 15px; line-height: 1.65; margin: 0 0 22px; }
.sig-preview { border: 1px dashed var(--line-strong); min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 18px 12px; margin-top: 4px; }
.sig-preview .ink { font-family: 'Mrs Saint Delafield', 'Brush Script MT', cursive; font-size: 44px; line-height: 1.05; color: #fff; min-height: 46px; word-break: break-word; }
.sig-preview .meta { border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.signed-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border: 1px solid rgba(61,220,132,.45); background: rgba(61,220,132,.06); padding: 18px 22px; margin-bottom: 22px; }
.signed-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); display: inline-block; margin-right: 10px; }

/* news feed */
.feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); background: transparent; padding: 8px 12px; cursor: pointer; }
.chip.on, .chip:hover { color: #000; background: #fff; border-color: #fff; }
.post { display: grid; grid-template-columns: 340px 1fr; border: 1px solid var(--line-strong); background: var(--panel); margin-bottom: 22px; overflow: hidden; }
.post.noimg { grid-template-columns: 1fr; }
.post-media { position: relative; min-height: 220px; background: #050505; border-right: 1px solid var(--line); }
.post-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.post-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.post-meta .cat { color: #fff; border: 1px solid var(--line-strong); padding: 3px 8px; }
.post h3 { font-weight: 800; text-transform: uppercase; letter-spacing: -.015em; line-height: 1.02; font-size: clamp(22px, 2.2vw, 30px); margin: 0; }
.post .sum { color: #c4c4c4; font-size: 15px; line-height: 1.6; margin: 0; max-width: 72ch; }
.post .full { color: #bdbdbd; font-size: 15px; line-height: 1.7; max-width: 72ch; display: none; }
.post .full p { margin: 0 0 12px; }
.post.open .full { display: block; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
@media (max-width: 820px) {
  .post { grid-template-columns: 1fr; }
  .post-media { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
}
.empty { border: 1px dashed var(--line-strong); padding: 48px 28px; text-align: center; color: var(--muted); }

/* admin tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(61,220,132,.5); }
.pill.warn { color: #ffc35a; border-color: rgba(255,195,90,.5); }
.pill.off { color: var(--err); border-color: rgba(255,107,97,.5); }
.pill.admin { color: #000; background: #fff; border-color: #fff; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.upload { border: 1px dashed var(--line-strong); padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.upload .name { font-size: 13px; color: #cfcfcf; word-break: break-all; }
.upload img { max-height: 70px; max-width: 120px; display: block; }
.admin-list .item { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.admin-list .item h4 { margin: 4px 0 4px; font-size: 16px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #fff; color: #000; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 12px 18px; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal.open { display: flex; }
.modal .panel { max-width: 520px; width: 100%; }
.loading { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 40px 0; }
.p-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--dim); font-size: 12px; }
.p-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.showpw { display: flex; align-items: center; gap: 10px; margin: -6px 0 22px; font-size: 13px; color: var(--muted); cursor: pointer; }
.showpw input { accent-color: #fff; width: 15px; height: 15px; }
html:not(.wl-ready) main { visibility: hidden; }
.tabs button[data-tab="register"] { color: #F2C230; }
.tabs button[data-tab="register"].on { color: #F2C230; border-bottom-color: #F2C230; }
