:root {
  --pico-background-color: #111215;
  --pico-color: #eeeae2;
  --pico-muted-color: #b6b0a7;
  --pico-primary: #dfbd7d;
  --pico-primary-background: #d7b678;
  --pico-primary-inverse: #16130e;
  --pico-primary-hover-background: #eccd93;
  --pico-card-background-color: #1b1d22;
  --pico-card-border-color: #39342c;
  --pico-card-box-shadow: none;
  --pico-h1-color: #f5eee1;
  --pico-h2-color: #eee3d1;
  --pico-border-radius: .65rem;
  --veil: #1b1d22;
  --rule: #37353a;
  --gold: #dfbd7d;
  --calm: #b3cfb6;
  --danger: #f0a197;
}
html { font-size: 16px; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, .wordmark { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.07; }
h2 { font-size: 1.45rem; margin-bottom: .85rem; }
h3 { font-size: 1rem; margin-bottom: .65rem; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { min-height: 44px; margin: 0; }
.skip { position: absolute; transform: translateY(-160%); z-index: 3; background: var(--veil); padding: .6rem; }
.skip:focus { transform: none; }
.sidebar { background: #17181d; border-bottom: 1px solid var(--rule); padding: .85rem 1rem; }
.wordmark { color: #f7efe0; text-decoration: none; display: inline-flex; gap: .75rem; align-items: center; font-size: 1.22rem; }
.brand-icon { display: block; flex: none; width: 2.7rem; height: auto; aspect-ratio: 1;
  background: #080808; border: 1px solid #5b4b30; border-radius: 50%; }
.brand-caption { display: grid; line-height: 1.08; }
.brand-caption small { color: var(--gold); margin-top: .24rem; font-size: .73rem; letter-spacing: .035em; }
#nav-toggle { float: right; padding: .4rem .8rem; }
#navigation { display: none; clear: both; padding-top: .75rem; }
#navigation.open { display: grid; }
.sidebar nav { display: grid; gap: .13rem; }
.sidebar nav a, .sidebar-footer a { display: flex; align-items: center; gap: .5rem; min-height: 44px;
  padding: .55rem .75rem; color: var(--pico-muted-color); text-decoration: none; border: 1px solid transparent;
  border-radius: .4rem; font-size: .93rem; }
.sidebar nav a:hover, .sidebar-footer a:hover { color: var(--pico-color); background: #22242b; }
.sidebar nav a[aria-current] { color: #f1d294; border-color: #59482d; background: #30291f; }
.sidebar-footer { display: grid; gap: .6rem; margin-top: 1rem; padding-top: .6rem; border-top: 1px solid var(--rule); }
.sidebar-footer .vikunja-link { color: var(--gold); justify-content: space-between; }
.sidebar-footer form { margin: 0; }
.sidebar-footer button { width: 100%; font-size: .88rem; padding: .4rem .65rem; }
.main { min-width: 0; padding: 1.35rem 1rem 2.5rem; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: .55rem; margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--rule); padding-bottom: 1rem; }
.page-header button { font-size: .85rem; padding: .45rem .7rem; }
.mode { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
  font-weight: 700; margin: 0 0 .45rem; }
#status:empty { display: none; }
#data { display: grid; gap: 1.2rem; }
.metric-grid, .cards { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.metric-grid article, .cards article { padding: .85rem 1rem; margin: 0; border: 1px solid var(--rule); min-width: 0; }
.metric { color: #f8ecd5; font: 1.5rem Georgia, serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.meta, small, .empty { color: var(--pico-muted-color); }
.meta { font-size: .82rem; margin: 0 0 .35rem; }
.empty { padding: .75rem 1rem; border: 1px dashed var(--rule); margin: 0; border-radius: .5rem; }
.table-frame { border: 1px solid var(--rule); border-radius: .55rem; overflow-x: auto; }
table { margin: 0; --pico-table-border-color: var(--rule); font-size: .88rem; }
th, td { padding: .62rem .7rem; vertical-align: top; }
th { color: #dfd1b4; min-width: 6rem; }
td { font-variant-numeric: tabular-nums; max-width: 30rem; overflow-wrap: anywhere; white-space: pre-wrap; }
td:first-child { color: #f0e2c7; }
details { border: 1px solid var(--rule); border-radius: .55rem; margin: 0 0 .55rem; padding: .7rem .85rem; }
details summary { padding: .28rem 0; min-height: 32px; }
details p { white-space: pre-wrap; overflow-wrap: anywhere; }
article p:last-child { margin-bottom: 0; }
.alert { color: var(--danger); }
.ok { color: var(--calm); }
canvas { display: block; width: 100%; height: 230px; background: var(--veil); border: 1px solid var(--rule); border-radius: .55rem; }
.login-page { display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 50% 20%, #28231b, #111215 70%); }
.login-card { width: min(100%, 460px); padding: clamp(1.15rem, 6vw, 2.7rem); background: var(--veil); border: 1px solid var(--rule); border-radius: .8rem; }
.login-brand { display: block; width: min(57%, 190px); height: auto; aspect-ratio: 1;
  margin: 0 auto .85rem; border-radius: 50%; }
.login-card h1 { font-size: clamp(1.7rem, 7vw, 2.55rem); text-align: center; }
.login-card .motto { text-align: center; font: .9rem Georgia, serif; color: var(--gold); letter-spacing: .11em;
  text-transform: uppercase; margin: .55rem 0 1.3rem; }
.login-card .mode { margin-bottom: .85rem; }
.login-card form { margin: 0; }
#login-error { color: var(--danger); }
@media (min-width: 850px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
  .sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column;
    padding: 1.5rem 1rem; border-bottom: 0; border-right: 1px solid var(--rule); }
  .wordmark { display: grid; justify-items: center; text-align: center; gap: .75rem; }
  .brand-icon { width: min(70%, 136px); }
  .brand-caption small { letter-spacing: .09em; margin-top: .4rem; }
  #nav-toggle { display: none; }
  #navigation { display: flex; flex-direction: column; flex: 1; padding-top: 1.5rem; }
  .sidebar-footer { margin-top: auto; }
  .main { padding: 2.25rem clamp(1.3rem, 3.5vw, 4.5rem) 4rem; max-width: 1490px; }
  .page-header { margin-bottom: 1.8rem; padding-bottom: 1.45rem; }
  .metric-grid article, .cards article { padding: 1rem 1.15rem; }
}
