:root {
  color-scheme: dark;
  --ink: #f4f4f0;
  --muted: #898982;
  --line: #2c2c2a;
  --surface: #141412;
  --surface-raised: #1b1b18;
  --accent: #f2f2ec;
  --error: #ef817e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #0b0b0a; }
body { margin: 0; background: radial-gradient(circle at 78% 8%, #252521 0, #0b0b0a 34rem), #0b0b0a; color: var(--ink); }
button, textarea { font: inherit; }
.site-shell { width: min(1160px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; letter-spacing: -.06em; font-size: 1.25rem; font-weight: 700; }
.wordmark i { color: var(--muted); font-style: normal; margin: 0 .2rem; }
.wordmark b { color: var(--muted); font-weight: 500; }
.header-status, .eyebrow, .panel-topline, .helper-text, .site-footer { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .67rem; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8eaa88; margin-right: 8px; }
.main-content { flex: 1; padding: clamp(72px, 13vh, 150px) 0 96px; }
.hero-copy { width: min(640px, 100%); }
.eyebrow { margin: 0 0 24px; }
h1 { font-size: clamp(3.8rem, 10vw, 8.2rem); line-height: .88; letter-spacing: -.085em; margin: 0; font-weight: 560; }
h1 em { color: var(--muted); font-style: normal; }
.lead { color: #aeaea7; max-width: 510px; line-height: 1.65; margin: 34px 0 0; font-size: 1rem; }
.shortener-panel { margin-top: 72px; border-top: 1px solid #eee; border-bottom: 1px solid var(--line); padding: 16px 0 20px; }
.panel-topline, .form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
textarea { display: block; width: 100%; margin: 24px 0 16px; resize: vertical; min-height: 148px; padding: 22px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 2px; outline: none; line-height: 1.6; transition: border-color .2s, background .2s; }
textarea:focus { border-color: #a5a59d; background: var(--surface-raised); }
textarea::placeholder { color: #5f5f59; }
.primary-button { border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: #0b0b0a; padding: 13px 16px 13px 20px; display: inline-flex; align-items: center; gap: 18px; cursor: pointer; font-weight: 650; font-size: .84rem; transition: transform .2s, background .2s; }
.primary-button:hover { transform: translateY(-2px); background: #fff; }
.primary-button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-arrow { font-size: 1.1rem; }
.form-message { min-height: 22px; padding-top: 18px; color: var(--muted); font-size: .85rem; }
.form-message.error, .result-error { color: var(--error); }
.results-stack { display: grid; gap: 10px; margin-top: 24px; }
.result-card { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-number { color: var(--muted); font-size: .76rem; }
.result-input { color: #999991; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-short { display: block; color: var(--ink); font-size: .98rem; margin-top: 6px; text-decoration: none; overflow-wrap: anywhere; }
.result-meta { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.copy-button { border: 1px solid var(--line); color: var(--ink); background: transparent; border-radius: 999px; padding: 8px 13px; cursor: pointer; font-size: .75rem; }
.copy-button:hover { border-color: #aaa; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-auth { max-width: 620px; }
.admin-form { max-width: 420px; margin-top: 52px; display: grid; gap: 10px; }
.admin-form label { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 14px; }
.admin-form input, .filters input, .filters select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 15px 16px; outline: none; border-radius: 2px; }
.admin-form input:focus, .filters input:focus, .filters select:focus { border-color: #aaa; }
.admin-form .primary-button { margin-top: 20px; justify-self: start; }
.admin-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.admin-title { font-size: clamp(3.3rem, 7vw, 6.2rem); }
.admin-actions { display: flex; align-items: center; gap: 8px; }
.admin-actions form { display: inline; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 62px; }
.stat-card { min-height: 128px; border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(20,20,18,.45); }
.stat-card span { color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; }
.stat-card strong { font-size: 2.2rem; font-weight: 450; letter-spacing: -.06em; }
.admin-section { margin-top: 58px; border-top: 1px solid var(--line); padding-top: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.daily-list { display: grid; gap: 8px; }
.daily-row { display: grid; grid-template-columns: 100px 1fr 50px; align-items: center; gap: 14px; font-size: .78rem; color: var(--muted); }
.daily-row b { color: var(--ink); font-weight: 500; text-align: right; }
.daily-bar { height: 6px; background: var(--line); }
.daily-bar i { display: block; height: 100%; background: var(--accent); }
.filters { display: flex; gap: 8px; margin-bottom: 20px; }
.filters input { flex: 1; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 760px; }
th { color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; text-align: left; }
th, td { padding: 16px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child, th:first-child { padding-left: 0; }
.table-original { display: block; color: var(--muted); max-width: 390px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
td a { color: var(--ink); text-decoration: none; }
.status-pill { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.status-active { color: #a3c6a0; }.status-disabled { color: #df9d8f; }.status-archived { color: #777; }
.table-action { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.table-action.danger { color: #b67f77; }
.muted { color: var(--muted); }
.error-page h1 { font-size: clamp(2.7rem, 7vw, 6.2rem); max-width: 800px; }
.error-back { display: inline-flex; margin-top: 42px; text-decoration: none; }
@media (max-width: 640px) { .site-shell { width: min(100% - 30px, 1160px); } .site-header { height: 70px; } .header-status { display: none; } .main-content { padding-top: 72px; } .shortener-panel { margin-top: 54px; } .form-footer, .site-footer { align-items: flex-start; flex-direction: column; } .primary-button { width: 100%; justify-content: space-between; } .result-card { grid-template-columns: 28px 1fr; gap: 10px; } .copy-button { grid-column: 2; justify-self: start; } }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .admin-heading { align-items: flex-start; flex-direction: column; } .filters { flex-wrap: wrap; } .filters input { flex-basis: 100%; } }
