:root {
  color-scheme: dark;
  font: 100%/1.5 system-ui, sans-serif;
  color: #edf0f4;
  background: #12141a;
  --surface: #191d25;
  --border: #343b49;
  --subtle: #aeb8c8;
  --accent: #92ead6;
  --warn: #f4bf87;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--border); }
.header-inner, .header-actions, .provider-heading, .account-heading, .dialog-actions, .metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .625rem;
}
.header-inner { min-height: 4.1rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: inherit;
  text-decoration: none;
}
.brand img { border-radius: .45rem; }
main { padding-block: 3rem 4rem; }
.intro { margin-bottom: 2.15rem; }
h1, h2, h3, h4, p { margin: 0; }
h1 {
  font-size: clamp(2.1rem, 6vw, 3.55rem);
  font-weight: 660;
  line-height: 1.05;
  letter-spacing: -.06em;
}
.intro p { margin-top: .65rem; color: var(--subtle); }
.section-title { font-size: 1rem; margin-bottom: .65rem; }
.provider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.provider {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .85rem;
  overflow: hidden;
}
.provider-top { padding: 1.1rem; }
.provider-heading { align-items: baseline; flex-wrap: wrap; }
.provider-heading h3 { font-size: 1.15rem; letter-spacing: -.025em; }
.provider p, .account p { color: var(--subtle); font-size: .875rem; }
.provider-top p { margin-block: .45rem .65rem; }
a { color: var(--accent); text-underline-offset: .18em; }
.provider a { font-size: .875rem; }
.provider-actions {
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--border);
}
.account { padding: .9rem 1.1rem; border-top: 1px solid var(--border); }
.account-heading { align-items: flex-start; flex-wrap: wrap; }
.account h4 { font-size: .95rem; overflow-wrap: anywhere; }
.tag { font-size: .875rem; color: var(--subtle); }
.account > p { margin-top: .35rem; }
.account-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.metrics { margin-top: .65rem; display: grid; gap: .5rem; }
.metric { padding: .65rem .7rem; background: #12161d; border-radius: .5rem; }
.metric-top { align-items: baseline; }
.metric-name { min-width: 0; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.metric-value { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .875rem; }
.metric p { margin-top: .12rem; overflow-wrap: anywhere; }
.metric progress {
  appearance: none;
  width: 100%;
  height: .32rem;
  display: block;
  margin-block: .45rem .3rem;
  background: #353e4c;
  border-radius: 1rem;
  overflow: hidden;
  accent-color: var(--accent);
}
progress::-webkit-progress-bar { background: #353e4c; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.metric .stale { color: var(--warn); }
.api { margin-top: 1.8rem; }

button, input, select { font: inherit; }
button {
  color: inherit;
  background: #242a36;
  border: 1px solid #495364;
  border-radius: .5rem;
  padding: .36rem .68rem;
  font-size: .875rem;
  cursor: pointer;
}
button:hover:enabled { background: #313947; }
button:disabled { opacity: .55; cursor: default; }
button.primary { color: #10241f; background: var(--accent); border-color: var(--accent); font-weight: 650; }
button.primary:hover { background: #b6f7e8; }
button.danger { color: #ffb7b0; }
button.inline { background: transparent; border-color: transparent; padding: .1rem .25rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
dialog {
  width: min(100% - 2rem, 32rem);
  max-height: calc(100% - 2rem);
  padding: 1.25rem;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .85rem;
}
dialog::backdrop { background: #080b10d9; }
dialog h2 { font-size: 1.25rem; }
dialog p { margin-block: .3rem .75rem; color: var(--subtle); font-size: .875rem; }
dialog label { display: grid; gap: .2rem; min-width: 0; margin-bottom: .65rem; font-size: .875rem; }
dialog input, dialog select {
  min-width: 0;
  width: 100%;
  padding: .4rem .5rem;
  border: 1px solid #495364;
  border-radius: .4rem;
  background: #12161d;
  color: inherit;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: .7rem; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: .65rem; }
.feedback, .account p.feedback, dialog p.feedback { color: var(--warn); }
#storage-error { margin-bottom: 1rem; }

@media (max-width: 62rem) {
  .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 43rem) {
  .wrap { width: calc(100% - 2rem); }
  .provider-grid { grid-template-columns: minmax(0, 1fr); }
  main { padding-top: 2rem; }
  .intro { margin-bottom: 1.5rem; }
}
@media (max-width: 28rem) {
  .form-grid { grid-template-columns: 1fr; }
}
