
:root {
  color-scheme: light dark;
  --bg: #f4efe4;
  --surface: #fffcf5;
  --ink: #15212c;
  --muted: #5b6670;
  --line: #e2d9c6;
  --brass: #8a5c12;
  --brass-ink: #ffffff;
  --brass-soft: #f1e3c4;
  --navy: #14324a;
  --ok: #1d6f47;
  --ok-bg: #dff1e6;
  --warn: #9a2c1c;
  --warn-bg: #f7ddd5;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 32 44 / 6%), 0 6px 20px rgb(20 32 44 / 6%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1620;
    --surface: #12212e;
    --ink: #ebe5d7;
    --muted: #9eabb6;
    --line: #223648;
    --brass: #d9a441;
    --brass-ink: #0b1620;
    --brass-soft: #2b2a1f;
    --navy: #0e2232;
    --ok: #6fd6a2;
    --ok-bg: #12352a;
    --warn: #f19a85;
    --warn-bg: #3d1f1a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; margin: 0; }
p { margin: 0 0 .75rem; }
a { color: var(--brass); }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .9rem; }
.bell { width: 1.6rem; height: 1.6rem; fill: currentColor; flex: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem max(16px, calc((100% - 68rem) / 2 + 16px));
  background: var(--navy); color: #f4efe4;
  border-bottom: 3px solid var(--brass);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none;
  font: 600 1.25rem var(--serif); letter-spacing: .01em; }
.brand .bell { color: #e2b552; }
.signout, .inline-form { margin: 0; }
.topbar .button-quiet { color: #f4efe4; border-color: rgb(244 239 228 / 35%); background: transparent; }

.shell { width: 100%; max-width: 68rem; margin: 0 auto; padding: 2rem 16px 3rem; flex: 1; }
.intro { margin-bottom: 1.5rem; }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; min-width: 0;
}
.card-wide { grid-column: 1 / -1; }
.platforms { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin-top: .75rem; }
.platform { border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px); padding: 1rem; min-width: 0; }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.facts { margin: 0 0 .75rem; display: grid; gap: .4rem; }
.facts div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.facts dt { color: var(--muted); min-width: 6rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; background: var(--brass-soft); color: var(--ink); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-ok::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.usage-count { margin: .5rem 0 .6rem; color: var(--muted); }
.usage-count strong { font: 600 2rem/1 var(--serif); color: var(--ink); margin-right: .15rem; }
.usage-bar {
  display: block; width: 100%; height: .7rem; margin: 0 0 .9rem;
  appearance: none; border: 0; border-radius: 999px; background: var(--brass-soft); overflow: hidden;
}
.usage-bar::-webkit-progress-bar { background: var(--brass-soft); border-radius: 999px; }
.usage-bar::-webkit-progress-value { background: var(--brass); border-radius: 999px; }
.usage-bar::-moz-progress-bar { background: var(--brass); border-radius: 999px; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem;
  padding: .55rem 1.1rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--brass); color: var(--brass-ink); font: 600 .95rem var(--sans);
  text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--line); }

.notice { flex: 1; display: grid; place-items: center; padding: 2.5rem 16px; }
.panel { width: 100%; max-width: 30rem; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem 1.5rem; }
.panel .actions { justify-content: center; }
.panel-bell { color: var(--brass); margin-bottom: .5rem; }
.panel-bell .bell { width: 2.6rem; height: 2.6rem; }
.flash { background: var(--brass-soft); border-radius: 10px; padding: .6rem .8rem; }

.env-lines { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.env-line { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem .75rem; min-width: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.env-line code { flex: 1; min-width: 0; }
.mask { color: var(--muted); letter-spacing: .08em; }
.button-small { min-height: 2.1rem; padding: .3rem .8rem; font-size: .88rem; flex: none; }
.button:disabled { opacity: .5; cursor: not-allowed; filter: none; }

.activity-list { list-style: none; margin: .5rem 0 .75rem; padding: 0; display: grid; }
.activity-item { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding: .6rem 0;
  border-bottom: 1px solid var(--line); min-width: 0; }
.activity-item:last-child { border-bottom: 0; }
.activity-where { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.activity-ref { color: var(--muted); font-size: .82rem; }
.activity-when { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.activity-empty { margin: .5rem 0 .75rem; }

.footer { padding: 1.25rem 16px 2rem; text-align: center; color: var(--muted); font-size: .85rem; }
