/* Page-specific parts: chart, code tabs, sign-in, playground, request log, keys, billing, settings. */

.legend { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--mute); }
.legend span { display: flex; align-items: center; gap: 6px; }
.swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.swatch.today { background: var(--blue3); }
.chart { display: flex; gap: 12px; }
.yaxis { position: relative; flex: 0 0 44px; height: 220px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.yaxis span { position: absolute; right: 0; transform: translateY(50%); }
.plot { flex: 1 1 auto; min-width: 0; height: 220px; display: block; }
.plot .grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.plot .base { stroke: rgba(255, 255, 255, 0.18); }
.plot .bar { fill: var(--blue); }
.plot .bar.today { fill: var(--blue3); }
.xaxis { display: flex; justify-content: space-between; padding-left: 56px; font-size: 12px; color: var(--mute); }
.share { height: 4px; border-radius: 999px; background: var(--blue); min-width: 3px; }

.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .wide { flex: 999 1 460px; min-width: 0; }
.split > .narrow { flex: 1 1 300px; min-width: 0; }

.code-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.code-tabs .tabs { padding: 0 16px 12px; }
.code-tabs pre { display: none; margin: 0; padding: 16px 20px; border-top: 1px solid var(--rule); font: 12.5px / 1.7 var(--mono); color: var(--soft); white-space: pre; overflow-x: auto; }
#lang-curl:checked ~ pre.curl, #lang-python:checked ~ pre.python, #lang-js:checked ~ pre.js { display: block; }
#lang-curl:checked ~ .tabs label[for="lang-curl"], #lang-python:checked ~ .tabs label[for="lang-python"], #lang-js:checked ~ .tabs label[for="lang-js"] { border-color: rgba(255, 255, 255, 0.22); color: var(--ink); font-weight: 600; }
.code-tabs > input:focus-visible ~ .tabs { outline: 2px solid var(--blue2); outline-offset: 2px; border-radius: 999px; }

/* Sign-in: dot grid, drifting pills, the form straight on the page. */
.signin { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 56px 20px 88px; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 22px 22px; }
.cloud { position: absolute; inset: 0; pointer-events: none; }
.cloud span { position: absolute; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; animation: drift 7s ease-in-out infinite alternate; }
.cloud::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 380px 340px at 50% 50%, var(--bg) 58%, rgba(10, 11, 14, 0) 100%); }
@keyframes drift {
  from { translate: 0 0; }
  to { translate: 0 -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cloud span { animation: none; }
}
.c-blue { color: #93c5fd; background: rgba(59, 130, 246, 0.16); }
.c-yellow { color: #fde68a; background: rgba(250, 204, 21, 0.13); }
.c-violet { color: #c4b5fd; background: rgba(167, 139, 250, 0.16); }
.c-orange { color: #fdba74; background: rgba(251, 146, 60, 0.14); }
.c-green { color: #86efac; background: rgba(74, 222, 128, 0.13); }
.c-pink { color: #f9a8d4; background: rgba(244, 114, 182, 0.14); }
.signin main { position: relative; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 32px; }
.signin .top { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.signin .brand .wordmark { font-size: 27px; }
.signin h1 { font-size: 40px; letter-spacing: -0.035em; line-height: 1.05; text-align: center; }
.providers { display: flex; flex-direction: column; gap: 12px; }
.provider { position: relative; min-height: 52px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: var(--bg); color: var(--ink); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; }
.provider:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.36); }
.provider.google { background: var(--ink); border-color: var(--ink); color: #0b0d12; }
.provider.google:hover { color: #0b0d12; background: #fff; }
.last { position: absolute; top: -10px; right: 18px; padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.2); color: var(--soft); font-size: 11.5px; font-weight: 600; }
.signin .welcome { padding-top: 22px; border-top: 2px dotted rgba(255, 255, 255, 0.14); font-size: 14.5px; line-height: 1.55; color: var(--soft); text-align: center; }
.signin .welcome strong { color: var(--ink); font-weight: 600; }
.signin .terms { position: absolute; left: 0; right: 0; bottom: 28px; padding: 0 20px; font-size: 13px; color: var(--mute); text-align: center; }

/* Playground */
.request { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
fieldset.toggles { margin: 0; padding: 0; border: 0; }
fieldset.toggles legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--mute); }
.toggle input { position: absolute; opacity: 0; }
.toggle span { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--mute); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input:checked + span { border-color: rgba(96, 165, 250, 0.7); color: var(--ink); font-weight: 600; }
.toggle input:checked + span::before { content: "✓"; color: var(--blue2); font-weight: 700; }
.toggle input:focus-visible + span { outline: 2px solid var(--blue2); outline-offset: 2px; }
.run-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--rule); }
.response { flex: 999 1 440px; min-width: 0; }
.url { padding: 14px 12px 14px 20px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.url code { flex: 1 1 auto; min-width: 0; font: 12.5px var(--mono); color: var(--soft); overflow-x: auto; white-space: nowrap; }
.method { font: 500 12.5px var(--mono); color: var(--blue2); }
.status-line { padding: 12px 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.jobs { margin: 0; padding: 0; list-style: none; }
.jobs li { padding: 14px 20px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 9px; }
.jobs .title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.jobs .title p:first-child { font-size: 15px; font-weight: 600; }
.jobs .title p:last-child { font-size: 12.5px; color: var(--mute); }
.jobs .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.jobs .meta .plain { padding: 0 4px; font-size: 12.5px; color: var(--mute); }
pre.json { margin: 0; padding: 16px 20px; border-top: 1px solid var(--hair); font: 12.5px / 1.65 var(--mono); color: var(--soft); white-space: pre; overflow-x: auto; max-height: 640px; }

/* Request log */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters .search { position: relative; flex: 1 1 240px; min-width: 0; }
.filters .search svg { position: absolute; left: 16px; top: 14px; color: var(--mute); }
.filters .search .in { border-radius: 999px; padding-left: 42px; }
.filters select.in { width: auto; min-height: 40px; border-radius: 999px; font-size: 13.5px; color: var(--soft); }
.t a.when { color: var(--soft); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.t a.when::before { content: ""; width: 6px; height: 6px; border-radius: 999px; }
.t tr.on a.when { color: var(--ink); font-weight: 600; }
.t tr.on a.when::before { background: var(--blue); }
.detail { flex: 1 1 280px; min-width: 0; border-radius: 16px; border: 1px solid var(--line); padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.facts { margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.facts div { padding: 9px 0; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 16px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; text-align: right; }
.pager { padding: 12px 16px 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--mute); }

/* Keys */
.newkey { border-radius: 16px; border: 2px dotted rgba(96, 165, 250, 0.6); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.secret { flex: 1 1 320px; min-width: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); font: 14px var(--mono); overflow-wrap: anywhere; }
.boxed { border-radius: 16px; border: 1px solid var(--line); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }

/* Billing */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.pack input { position: absolute; opacity: 0; }
.pack span { position: relative; min-height: 84px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 4px; cursor: pointer; }
.pack b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pack i { font-style: normal; font-size: 13.5px; color: var(--mute); }
.pack input:checked + span { border-color: rgba(96, 165, 250, 0.9); }
.pack input:checked + span::after { content: "✓"; position: absolute; top: 12px; right: 14px; color: var(--blue2); font-weight: 700; }
.pack input:focus-visible + span { outline: 2px solid var(--blue2); outline-offset: 2px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.total { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.total[hidden] { display: none; }
.total .value { font-weight: 600; }

/* Settings */
.settings { display: flex; flex-direction: column; }
.setting { padding: 28px 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 16px 40px; }
.setting:last-child { border-bottom: 0; }
.setting > .about { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.setting > .about h2 { font-size: 18px; }
.setting > .about p { font-size: 13.5px; line-height: 1.55; color: var(--mute); }
.setting > .body { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.setting.danger h2 { color: var(--red3); }
.ident { padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ident + .ident { border-top: 1px solid var(--hair); }
.ident div { flex: 1 1 180px; min-width: 0; }
.ident-name { font-size: 14.5px; font-weight: 600; }
.ident-sub { font-size: 13px; color: var(--mute); }
.switch { flex: 0 0 auto; width: 46px; height: 28px; padding: 3px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; cursor: pointer; display: flex; }
.switch span { width: 20px; height: 20px; border-radius: 999px; background: var(--mute); }
.switch[aria-checked="true"] { background: var(--blue); border-color: var(--blue); justify-content: flex-end; }
.switch[aria-checked="true"] span { background: #fff; }
