:root {
  color-scheme: dark;
  --base: #101513;
  --panel: #1a231f;
  --edge: #334339;
  --text: #f1f4ed;
  --muted: #b1beb3;
  --accent: #dafa79;
  --warn: #ffc785;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at top left, #222f23 0%, var(--base) 51%); color: var(--text); min-height: 100vh; }
.shell { max-width: 81rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 3rem); }
.top { min-height: 4.4rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--edge); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--text); font-weight: 840; letter-spacing: .12em; font-size: 1.46rem; text-decoration: none; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -.055em; margin: 1.75rem 0 1.3rem; line-height: 1.05; }
h2 { font-size: 1.27rem; margin: 0 0 .42rem; }
h3 { margin: 0 0 .72rem; font-size: 1.02rem; }
p { line-height: 1.5; margin: .4rem 0; }
a { color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--edge); border-radius: 1rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.35rem; }
.metric { display: flex; flex-direction: column; padding: 1rem; gap: .35rem; }
.metric span, .muted { color: var(--muted); }
.metric strong { color: var(--accent); font-size: 2.15rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.account-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1rem; margin-bottom: .85rem; }
.account-filters, .account-sort-buttons { display: flex; gap: .45rem; flex-wrap: wrap; }
.account-sorter { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.filter-button, .sort-button { min-height: 2.35rem; padding: .4rem .8rem; color: var(--muted); }
.filter-button span { margin-inline-start: .25rem; font-variant-numeric: tabular-nums; }
.filter-button.active, .sort-button.active { color: #172019; border-color: var(--accent); background: var(--accent); font-weight: 740; }
.sort-label, .sort-description { color: var(--muted); font-size: .88rem; }
.sort-description { width: 100%; text-align: right; }
.filter-empty { padding: 1rem; }
.account-list { display: grid; gap: .65rem; }
.account { padding: .75rem clamp(.8rem, 3vw, 1.25rem); }
.account-summary { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 14rem) auto; align-items: start; gap: .65rem 1.2rem; }
.account-field { display: grid; gap: .18rem; min-width: 0; overflow-wrap: anywhere; }
.account-field > .muted { font-size: .78rem; }
.account-field h2, .unassigned-title { margin: 0; font-size: 1rem; }
.account-field .identifier { color: var(--text); }
.account-details { margin-top: .3rem; }
.account-details > summary { width: fit-content; padding: .45rem .35rem .4rem 0; color: var(--accent); cursor: pointer; font-size: .88rem; font-weight: 640; }
.account-details > summary:hover { text-decoration: underline; }
.account-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.1rem; padding: .65rem 0 .15rem; }
.account-body > :only-child { grid-column: 1 / -1; }
.account-stats { display: grid; gap: .45rem; margin: 0; font-size: .9rem; }
.account-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.account-stats dt { color: var(--muted); }
.account-stats dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.row { display: flex; align-items: center; justify-content: space-between; gap: .72rem; border-top: 1px solid var(--edge); padding: .55rem 0; }
.row > div { display: grid; gap: .2rem; min-width: 0; overflow-wrap: anywhere; }
.source-password { display: grid; justify-items: start; gap: .35rem; min-width: 0; }
.password-restricted { align-self: center; font-size: .84rem; }
.delete-account { justify-self: end; }
.delete-account .danger { min-height: 2rem; padding: .2rem .65rem; color: #ffd9d4; border-color: #8b4941; background: #381f1d; font-size: .9rem; }
.delete-account .danger:hover { background: #552a26; }
.password-button { min-height: 2rem; padding: .2rem .5rem; font-size: .9rem; }
.password-value { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; }
.identifier, .short { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; color: var(--muted); }
.playing { color: var(--accent); overflow-wrap: anywhere; }
.playing:empty { display: none; }
.badge { font-size: .875rem; font-weight: 640; padding: .32rem .62rem; border-radius: 3rem; white-space: nowrap; }
.badge.valid, .badge.live { background: #2c3c22; color: var(--accent); }
.badge.expired { background: #403123; color: var(--warn); }
.badge.offline { background: #28322c; color: var(--muted); }
.empty, .login, .prose { padding: clamp(1rem, 4vw, 2rem); }
.login { margin: 3rem auto 1rem; max-width: 29rem; }
.login h1, .prose h1 { margin-top: 0; }
.login form { display: grid; gap: .72rem; }
.prose { margin-top: 1.4rem; max-width: 50rem; }
.prose h2 { margin-top: 1.5rem; }
input, button { min-height: 2.55rem; padding: .5rem .7rem; background: #131b16; border: 1px solid #546b58; border-radius: .55rem; color: var(--text); font: inherit; }
button { cursor: pointer; }
button:hover { background: #293b2b; }
button.primary { background: var(--accent); color: #172019; font-weight: 740; border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.error, .notice { padding: .75rem; border-radius: .55rem; }
.error { color: var(--warn); background: #403123; }
.notice { color: var(--accent); background: #293825; }
footer { padding: 1.5rem 0 .55rem; }
footer a { color: var(--muted); }
footer a + a { margin-inline-start: 1rem; }
.download-action { display: inline-block; margin: .9rem 0 .45rem; padding: .7rem 1rem; border-radius: .55rem; background: var(--accent); color: #172019; font-weight: 740; text-decoration: none; }
.download-action:hover { text-decoration: underline; }
@media (max-width: 52rem) {
  .account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-password, .password-restricted { grid-column: 1 / 2; }
  .delete-account { grid-column: 2; grid-row: 2; }
  .account-body { grid-template-columns: 1fr; }
}
@media (max-width: 34rem) {
  .top { min-height: 3.75rem; }
  .metric { padding: .65rem; }
  .metric span { font-size: .875rem; }
  .metric strong { font-size: 1.65rem; }
  .row { align-items: flex-start; }
  .account-toolbar { align-items: flex-start; }
  .account-sorter { justify-content: flex-start; }
  .sort-description { text-align: left; }
  .account-summary { grid-template-columns: 1fr auto; }
  .account-field { grid-column: 1 / -1; }
  .source-password, .password-restricted { grid-column: 1; }
  .delete-account { grid-column: 2; grid-row: auto; align-self: start; }
}
