:root {
  --ink: #1f2a2a;
  --ink-soft: #637070;
  --muted: #8b9793;
  --paper: #f6f7f3;
  --surface: #ffffff;
  --line: #e4e9e4;
  --teal: #137f78;
  --teal-dark: #0c625d;
  --teal-wash: #e4f2ef;
  --amber: #c8752e;
  --amber-wash: #fff1df;
  --red: #bf4d4d;
  --red-wash: #fbeaea;
  --shadow: 0 14px 40px rgba(30, 52, 48, .07);
  --radius: 14px;
  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; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(19, 127, 120, .28); outline-offset: 2px; }
.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; }
.muted { color: var(--ink-soft); margin: 0; line-height: 1.55; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 37px); letter-spacing: -.04em; line-height: 1.1; margin-bottom: 9px; }
h2 { font-size: 16px; letter-spacing: -.015em; margin: 0 0 4px; }
.login-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #e5f2ee, transparent 38%), var(--paper); }
.login-card { width: min(100%, 420px); background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 44px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--teal); color: white; font-family: Georgia, serif; font-weight: 800; font-size: 26px; box-shadow: 0 7px 16px rgba(19,127,120,.22); margin-bottom: 26px; }
.brand-mark-small { width: 32px; height: 32px; border-radius: 10px; font-size: 18px; margin: 0; }
.login-card h1 { font-size: 30px; }
.login-intro { margin-bottom: 28px; }
.stack-form { display: grid; gap: 10px; }
.stack-form label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
input[type=password] { width: 100%; padding: 13px 14px; color: var(--ink); border: 1px solid #ccd7d3; background: #fbfcfa; border-radius: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 13px; color: var(--ink); background: white; font-weight: 700; font-size: 13px; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--teal); border-color: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: white; border-color: var(--line); }
.button-secondary:hover, .button-quiet:hover { background: #eef4f1; }
.button-quiet { background: transparent; color: var(--ink-soft); }
.button-wide { width: 100%; padding: 13px; margin-top: 5px; }
.form-error { color: var(--red); font-size: 12px; margin: 5px 0 0; }
.login-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; margin: 27px 0 0; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted); flex: 0 0 auto; }
.status-good { background: #2f9b7f; box-shadow: 0 0 0 3px #dff2eb; }
.status-neutral { background: var(--muted); }
.status-warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-wash); }
.status-danger { background: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.app-layout { min-height: 100vh; display: flex; }
.sidebar { width: 224px; min-height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; padding: 24px 14px 18px; border-right: 1px solid var(--line); background: #fbfcfa; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 11px 28px; }
.sidebar-brand strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.sidebar-brand span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 9px; padding: 11px 12px; text-align: left; color: var(--ink-soft); background: transparent; font-weight: 700; font-size: 13px; }
.nav-item:hover { background: #eef4f1; color: var(--ink); }
.nav-item.active { color: var(--teal-dark); background: var(--teal-wash); }
.nav-icon { width: 16px; text-align: center; font-size: 17px; font-weight: 500; }
.sidebar-footer { display: grid; gap: 13px; margin-top: auto; }
.connection-label { display: flex; align-items: center; gap: 9px; padding: 0 12px; color: var(--muted); font-size: 11px; }
.nav-item-muted { color: var(--muted); }
.main-column { min-width: 0; flex: 1; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: rgba(251,252,250,.84); }
.topbar-context, .topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-context { color: var(--ink-soft); font-size: 11px; }
.topbar-separator { color: #bbc6c1; }
.topbar-actions { gap: 15px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: var(--teal-wash); font-size: 12px; font-weight: 800; }
.mobile-brand, .mobile-only { display: none; }
.main-content { max-width: 1380px; padding: 42px 40px 72px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.heading-meta { color: var(--muted); font-size: 11px; white-space: nowrap; padding-bottom: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; margin-bottom: 18px; }
.metric-card { min-width: 0; padding: 19px 18px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 12px rgba(30,52,48,.025); }
.metric-label { min-height: 32px; color: var(--ink-soft); font-size: 11px; font-weight: 700; line-height: 1.4; }
.metric-value { margin: 11px 0 6px; color: var(--ink); font-size: 25px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.metric-detail { min-height: 15px; color: var(--muted); font-size: 10px; }
.metric-card-unavailable { background: #fbfcfa; }
.metric-card-unavailable .metric-value { color: var(--muted); font-size: 16px; letter-spacing: 0; }
.section-grid { display: grid; gap: 18px; }
.section-grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); margin-bottom: 18px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); box-shadow: 0 4px 12px rgba(30,52,48,.025); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.panel-kicker { color: var(--muted); font-size: 10px; padding-top: 3px; }
.daily-chart { min-height: 190px; display: flex; align-items: stretch; gap: 8px; padding: 12px 5px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.chart-empty { width: 100%; display: grid; place-items: center; min-height: 145px; }
.bar-group { flex: 1 0 30px; min-width: 30px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.bar-pair { height: 142px; display: flex; align-items: flex-end; gap: 3px; }
.bar { width: 9px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--teal); }
.bar-turns { background: #9bc8bf; }
.bar-label { color: var(--muted); font-size: 9px; white-space: nowrap; transform: rotate(-35deg); transform-origin: top center; margin-top: 5px; }
.chart-legend { display: flex; gap: 17px; margin-top: 17px; color: var(--ink-soft); font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.legend-swatch.turns { background: #9bc8bf; }
.retention-content { display: grid; gap: 10px; }
.retention-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0ed; }
.retention-row:last-child { border-bottom: 0; }
.retention-name { font-size: 12px; font-weight: 750; }
.retention-sub { color: var(--muted); font-size: 10px; margin-top: 5px; }
.retention-rate { color: var(--teal-dark); font-size: 23px; font-weight: 750; letter-spacing: -.05em; }
.funnel-content { display: flex; align-items: stretch; gap: 2px; min-height: 83px; overflow-x: auto; }
.funnel-step { min-width: 130px; flex: 1; position: relative; padding: 13px 15px; background: var(--teal-wash); }
.funnel-step:first-child { border-radius: 8px 0 0 8px; }
.funnel-step:last-child { border-radius: 0 8px 8px 0; }
.funnel-step-name { color: var(--ink-soft); font-size: 10px; }
.funnel-step-count { margin-top: 8px; font-size: 21px; font-weight: 750; letter-spacing: -.04em; }
.inline-alert { padding: 12px 14px; margin: -10px 0 18px; border-radius: 9px; font-size: 12px; }
.alert-error { color: #9d4141; background: var(--red-wash); border: 1px solid #f2d1d1; }
.upload-panel { display: flex; justify-content: space-between; align-items: center; gap: 25px; border: 1px dashed #b9ccc5; background: #fbfdfb; margin-bottom: 18px; }
.upload-copy, .upload-actions { display: flex; align-items: center; gap: 15px; }
.upload-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 11px; color: var(--teal-dark); background: var(--teal-wash); font-size: 24px; }
.upload-copy h2 { margin-bottom: 5px; }
.upload-copy p { font-size: 12px; }
.upload-status { color: var(--ink-soft); font-size: 11px; min-width: 130px; }
progress { width: 76px; height: 7px; accent-color: var(--teal); }
.table-panel { padding-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.table-panel table { min-width: 1120px; }
.table-panel th { white-space: nowrap; }
.table-panel td small { display: block; margin-top: 4px; }
.table-panel td:nth-child(4), .table-panel td:nth-child(5) { min-width: 140px; }
.table-panel td:nth-child(6) { min-width: 200px; }
th { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 0 12px 12px; border-bottom: 1px solid var(--line); }
td { padding: 15px 12px; border-bottom: 1px solid #edf0ed; color: var(--ink-soft); font-size: 12px; vertical-align: middle; }
td:first-child { color: var(--ink); font-weight: 750; }
.table-title { display: flex; align-items: center; gap: 10px; }
.cover-letter { width: 31px; height: 35px; display: grid; place-items: center; border-radius: 5px; color: var(--teal-dark); background: var(--teal-wash); font-family: Georgia, serif; font-size: 16px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 8px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pill-good { color: #28735f; background: #e5f4ee; }
.pill-warn { color: #9d5b22; background: var(--amber-wash); }
.pill-danger { color: #a33e3e; background: var(--red-wash); }
.pill-neutral { color: var(--ink-soft); background: #eef1ef; }
.link-button { padding: 4px 0; border: 0; color: var(--teal-dark); background: transparent; font-weight: 750; font-size: 11px; }
.empty-state { display: grid; place-items: center; gap: 7px; min-height: 190px; padding: 30px; text-align: center; }
.empty-symbol { color: #b8c6c0; font-size: 34px; }
.empty-state strong { font-size: 14px; }
.empty-state p { font-size: 11px; }
.operations-banner { margin-bottom: 18px; display: grid; gap: 16px; padding: 18px 22px; background: #f1faf7; border-color: #cde8df; }
.operations-main-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.operations-copy { display: flex; align-items: center; gap: 12px; }
.operations-state { font-size: 13px; font-weight: 800; }
.operations-detail { margin-top: 4px; color: var(--ink-soft); font-size: 11px; }
.operations-notes { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 13px; border-top: 1px solid #d9ece5; }
.ops-note { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; color: var(--ink-soft); background: rgba(255,255,255,.75); font-size: 10px; }
.ops-note b { color: var(--ink); font-weight: 750; }
.activity-grid { margin-bottom: 18px; }
.activity-list, .audit-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 13px 0; border-bottom: 1px solid #edf0ed; }
.activity-item:last-child { border-bottom: 0; }
.activity-item strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.activity-status { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.budget-content { display: grid; gap: 14px; }
.budget-line { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; color: var(--ink-soft); font-size: 11px; }
.budget-line strong { color: var(--ink); font-size: 14px; }
.budget-progress { height: 7px; overflow: hidden; border-radius: 99px; background: #e7eeeb; }
.budget-progress span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.budget-footnote { color: var(--muted); font-size: 10px; line-height: 1.5; }
.audit-item { display: grid; grid-template-columns: 110px 85px minmax(0, 1fr) 145px; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0ed; color: var(--ink-soft); font-size: 11px; }
.audit-item:last-child { border-bottom: 0; }
.audit-item strong { color: var(--ink); }
.audit-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-dialog { width: min(720px, calc(100% - 30px)); max-height: min(760px, calc(100vh - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgba(25,42,40,.22); }
.package-dialog::backdrop { background: rgba(21,39,36,.38); backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 23px 25px 17px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 20px; }
.icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 20px; }
.icon-button:hover { background: #eef4f1; }
.package-content { display: grid; gap: 17px; padding: 23px 25px 28px; overflow: auto; }
.package-section { display: grid; gap: 6px; }
.package-section h3 { margin: 0; font-size: 12px; }
.package-section p, .package-section li { color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.package-section ul { margin: 0; padding-left: 18px; }
.package-json { padding: 12px; border-radius: 8px; color: var(--ink-soft); background: #f5f7f5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-region { position: fixed; z-index: 10; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { max-width: 340px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; box-shadow: var(--shadow); font-size: 12px; }
.toast.error { color: #9d4141; border-color: #f2d1d1; background: var(--red-wash); }
@media (max-width: 1100px) { .metric-grid { grid-template-columns: repeat(3, 1fr); } .section-grid-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sidebar { position: fixed; z-index: 5; top: 0; left: 0; width: 236px; height: 100vh; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); } .sidebar.open { transform: translateX(0); } .mobile-only, .mobile-brand { display: inline-flex; align-items: center; } .mobile-brand { gap: 8px; } .topbar { height: 60px; padding: 0 18px; } .topbar-context { display: none; } .topbar-actions { margin-left: auto; } .main-content { padding: 29px 18px 55px; } .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 21px; } .heading-meta { padding: 0; } .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; } .metric-card { padding: 15px 13px; } .metric-value { font-size: 21px; } .panel { padding: 17px; } .upload-panel { align-items: flex-start; flex-direction: column; } .upload-actions { flex-wrap: wrap; } .upload-status { min-width: 0; } .operations-main-row { align-items: flex-start; flex-direction: column; } .audit-item { grid-template-columns: 1fr 1fr; gap: 6px 10px; } .audit-detail { grid-column: 1 / -1; } .audit-item time { text-align: right; } .login-card { padding: 31px 24px; } }
@media (max-width: 420px) { .metric-label { min-height: 29px; font-size: 10px; } .metric-detail { font-size: 9px; } .funnel-step { min-width: 112px; } }

/* Author display rules must never override the native hidden state. */
[hidden] { display: none !important; }

.report-list { display: grid; gap: 14px; padding: 20px; }
.report-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; overflow-wrap: anywhere; }
.report-card p { margin: 9px 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.report-evidence { padding: 12px; background: var(--surface); border-left: 3px solid var(--line); white-space: pre-wrap; max-height: 200px; overflow: auto; }
#moderation-form { padding: 22px; }
#moderation-reason { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
#community-filter { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
