@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212, U+2215;
}

:root {
  --page: #eceff2;
  --panel: #f7f9fa;
  --ink: #14202c;
  --slate: #566371;
  --faint: #8d98a4;
  --rule: #d3d9df;
  --hair: #dfe4e8;

  --s-available: #2450ff;
  --s-serving: #7a4dff;
  --s-capped: #e0464b;
  --s-cooling: #e39b2f;
  --s-resting: #aab4bf;
  --s-other: #aab4bf;
  --tint: 24%;

  --display: "Bricolage", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --text: "Bricolage", -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  --cell: 15px;
  --gap: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d1520;
    --panel: #121c29;
    --ink: #e7ecf1;
    --slate: #9caab8;
    --faint: #66768a;
    --rule: #26344a;
    --hair: #1c2838;
    --s-available: #5a7cff;
    --s-serving: #9d7bff;
    --s-capped: #f0626a;
    --s-cooling: #f0ad45;
    --s-resting: #5d6d82;
    --s-other: #5d6d82;
    --tint: 30%;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 400 15px/1.6 var(--text);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, dl, dd, ol, figure { margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--s-available); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.bar {
  max-width: 1180px; margin: 0 auto; padding: 22px 32px 0;
  display: flex; align-items: center; gap: 14px;
}
.mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.mark svg { width: 18px; height: 18px; }
.mark .m1 { fill: var(--s-available); }
.mark .m2 { fill: var(--s-resting); }
.mark .m3 { fill: var(--s-cooling); }
.product { color: var(--slate); font-size: 14px; padding-left: 14px; border-left: 1px solid var(--rule); line-height: 16px; }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live[data-state="ok"] .dot { background: #1fae6b; box-shadow: 0 0 0 3px color-mix(in srgb, #1fae6b 22%, transparent); }
.live[data-state="stale"] .dot { background: var(--s-cooling); }
.live[data-state="error"] .dot { background: var(--s-capped); }
.refresh {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 50%; background: transparent; cursor: pointer; color: var(--slate);
  transition: color .15s, border-color .15s;
}
.refresh:hover { color: var(--ink); border-color: var(--slate); }
.refresh svg { width: 14px; height: 14px; }
.refresh.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero { padding: 72px 0 56px; }
.sentence {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.25;
  letter-spacing: -.01em;
  max-width: 21em;
}
.sentence .line { display: block; }
.fig {
  font-family: "Bricolage", var(--display);
  font-weight: 650;
  font-stretch: 78%;
  font-size: 2.35em;
  line-height: .9;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 96;
  display: inline-block;
  vertical-align: -.1em;
  min-width: 1.2ch;
}
.fig-accent { color: var(--s-available); }
.facts {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.facts > div { padding: 16px 20px 0 0; }
.facts dt { font-size: 13px; color: var(--slate); }
.facts dd { font-size: 30px; font-weight: 550; font-stretch: 85%; letter-spacing: -.02em; line-height: 1.3; margin-top: 2px; }

.field {
  position: relative;
  background: var(--panel);
  border-radius: 20px;
  padding: 36px 36px 32px;
  box-shadow: 0 0 0 1px var(--hair);
}
.field-head { display: grid; gap: 6px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.field-note { color: var(--slate); font-size: 14px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; cursor: pointer;
  font-size: 13px; color: var(--ink);
  transition: background-color .15s, border-color .15s, opacity .15s;
}
.chip:hover { border-color: var(--slate); }
.chip .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.chip b { font-weight: 600; font-stretch: 85%; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.legend.filtering .chip[aria-pressed="false"] { opacity: .55; }

.mosaic { display: grid; gap: 18px; outline: none; }
.mosaic:focus-visible { outline: 2px solid var(--s-available); outline-offset: 10px; border-radius: 8px; }
.plan-row { display: grid; grid-template-columns: 172px 1fr; gap: 24px; align-items: start; }
.plan-name { font-size: 14px; font-weight: 550; line-height: var(--cell); padding-top: 1px; }
.plan-sub { display: block; font-size: 12px; font-weight: 400; color: var(--slate); margin-top: 6px; line-height: 1.3; }
.plan-sub b { color: var(--ink); font-weight: 600; }
.cells { display: flex; flex-wrap: wrap; gap: var(--gap); }

.cell {
  --c: var(--s-other);
  position: relative;
  width: var(--cell); height: var(--cell);
  border-radius: 3.5px;
  background: color-mix(in srgb, var(--c) var(--tint), transparent);
  overflow: hidden;
  cursor: pointer;
  transition: opacity .2s var(--ease), transform .15s var(--ease);
}
.cell::after {
  content: ""; position: absolute; inset: auto 0 0 0;
  height: calc(var(--f, 0) * 1%);
  background: var(--c);
}
.cell.na { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 40%, transparent) 0 2px, transparent 2px 4px); }
.cell:hover, .cell.active { transform: scale(1.45); z-index: 2; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--ink); }
.mosaic.filtering .cell:not(.on) { opacity: .12; }
.s-available { --c: var(--s-available); }
.s-serving { --c: var(--s-serving); }
.s-capped { --c: var(--s-capped); }
.s-cooling { --c: var(--s-cooling); }
.s-resting { --c: var(--s-resting); }

.intro .cell { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 2.2ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.6); } }

.tip {
  position: absolute; z-index: 5; pointer-events: none;
  width: 236px; padding: 14px 16px;
  background: var(--ink); color: var(--panel);
  border-radius: 12px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 12px 32px -8px rgba(10, 20, 32, .35);
}
.tip .t-id { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.tip .t-state { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; opacity: .85; }
.tip .t-state i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.tip dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin-top: 10px; }
.tip dt { opacity: .6; }
.tip dd { text-align: right; }
.tip small { opacity: .6; margin-left: 6px; }

.quota, .models, .ledger { padding: 88px 0 0; }
.hists { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 28px; }
.hist figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.hist .cap-name { font-size: 14px; color: var(--slate); }
.hist .cap-avg { font-size: 13px; color: var(--slate); }
.hist .cap-avg b { font-size: 26px; color: var(--ink); font-weight: 600; font-stretch: 82%; letter-spacing: -.02em; margin-right: 4px; }
.bars { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; height: 168px; border-bottom: 1px solid var(--rule); }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; }
.bar-col span {
  display: block; width: 100%; height: calc(var(--h) * 1%); min-height: 2px;
  border-radius: 4px 4px 1px 1px;
  background: color-mix(in srgb, var(--s-available) calc(28% + var(--b) * 8%), var(--page));
}
.bar-col em {
  position: absolute; left: 0; right: 0; bottom: calc(var(--h) * 1% + 4px);
  text-align: center; font-style: normal; font-size: 12px; color: var(--slate); font-stretch: 85%;
}
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--faint); }
.avg-line {
  position: absolute; top: -14px; bottom: -1px; width: 0;
  border-left: 1.5px dashed var(--ink); opacity: .6;
}
.avg-line::before {
  content: "平均"; position: absolute; top: -6px; left: 5px;
  font-size: 11px; color: var(--ink); white-space: nowrap;
}
.hist .na-note { margin-top: 10px; font-size: 12px; color: var(--faint); }

.families { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.family { padding: 20px 24px 4px 0; }
.family + .family { padding-left: 24px; border-left: 1px solid var(--hair); }
.family-name { font-size: 28px; font-weight: 600; font-stretch: 80%; letter-spacing: -.02em; line-height: 1.2; }
.versions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ver {
  font-size: 13px; padding: 2px 9px; border-radius: 6px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--hair);
  cursor: copy; border: 0;
}
.ver:hover { box-shadow: 0 0 0 1px var(--slate); }
.ver.copied { background: var(--ink); color: var(--panel); }

.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ledger-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ledger-tools input, .ledger-tools select {
  height: 36px; padding: 0 12px; font-size: 14px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel);
}
.ledger-tools input { width: 200px; }
.ledger-tools input:focus, .ledger-tools select:focus { outline: none; border-color: var(--s-available); }
.rows { list-style: none; margin-top: 20px; border-top: 1px solid var(--rule); }
.row {
  display: grid;
  grid-template-columns: 12px 130px 130px 80px 1fr 1fr 80px;
  gap: 18px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 14px;
}
.row .sq { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.row .id { font-weight: 550; letter-spacing: .02em; }
.row .plan, .row .st { color: var(--slate); }
.gauge { display: grid; grid-template-columns: 1fr 40px; gap: 2px 10px; align-items: center; }
.gauge .g-track { display: block; height: 4px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.gauge .g-fill { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--c); border-radius: 2px; }
.gauge .g-num { text-align: right; font-stretch: 85%; }
.gauge .g-reset { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.row .conc { text-align: right; color: var(--slate); font-stretch: 85%; }
.row .conc b { color: var(--ink); font-weight: 600; }
.row-head { font-size: 12px; color: var(--faint); padding: 10px 0; }
.row-head .conc { color: var(--faint); }
.rows .empty { padding: 40px 0; text-align: center; color: var(--slate); }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--slate); }
.pager-btns { display: flex; align-items: center; gap: 12px; }
.pager button { height: 32px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; cursor: pointer; font-size: 13px; }
.pager button:hover:not(:disabled) { border-color: var(--slate); }
.pager button:disabled { opacity: .4; cursor: default; }

.error { margin: 32px 0 0; padding: 14px 18px; border-radius: 12px; background: color-mix(in srgb, var(--s-capped) 14%, var(--page)); color: var(--ink); font-size: 14px; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 72px 0 48px; color: var(--faint); font-size: 13px; }
.foot a { text-decoration: none; }

@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--hair); margin-top: 16px; }
  .families { grid-template-columns: repeat(2, 1fr); }
  .family:nth-child(3) { padding-left: 0; border-left: 0; }
  .family:nth-child(n+3) { border-top: 1px solid var(--hair); margin-top: 16px; }
  .row { grid-template-columns: 12px 1fr auto; gap: 8px 12px; }
  .row .plan { grid-column: 2; grid-row: 2; font-size: 13px; }
  .row .st { grid-column: 3; grid-row: 1; text-align: right; font-size: 13px; }
  .row .conc { grid-column: 3; grid-row: 2; font-size: 13px; }
  .row .gauge { grid-column: 2 / -1; grid-template-columns: 76px 1fr 40px; }
  .row .gauge::before { content: attr(data-label); font-size: 12px; color: var(--faint); }
  .row .gauge .g-reset { grid-column: 2 / -1; }
  .row-head { display: none; }
}

@media (max-width: 640px) {
  :root { --cell: 11px; --gap: 2.5px; }
  main { padding: 0 18px; }
  .bar { padding: 16px 18px 0; }
  .product { display: none; }
  .hero { padding: 44px 0 36px; }
  .fig { font-size: 2.1em; }
  .facts { margin-top: 32px; }
  .facts dd { font-size: 24px; }
  .field { margin: 0 -18px; border-radius: 0; padding: 28px 18px 24px; box-shadow: 0 -1px 0 var(--hair), 0 1px 0 var(--hair); }
  .plan-row { grid-template-columns: 1fr; gap: 10px; }
  .plan-name { display: flex; align-items: baseline; justify-content: space-between; line-height: 1.4; }
  .plan-sub { margin-top: 0; }
  .hists { grid-template-columns: 1fr; gap: 44px; }
  .bars { height: 132px; gap: 4px; }
  .quota, .models, .ledger { padding-top: 64px; }
  .families { grid-template-columns: 1fr; }
  .family, .family + .family { padding: 16px 0 4px; border-left: 0; }
  .family:nth-child(n+2) { border-top: 1px solid var(--hair); margin-top: 12px; }
  .ledger-tools { width: 100%; }
  .ledger-tools .search { flex: 1 1 100%; }
  .ledger-tools input { width: 100%; }
  .ledger-tools .select { flex: 1; }
  .ledger-tools select { width: 100%; }
  .foot { flex-direction: column; padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
