:root {
  color: #13223a;
  background: #f3f7fc;
  font-family:
    Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

/* Author display rules (e.g. .body-modal's display: grid) outrank the UA
   stylesheet's [hidden] { display: none }, which made the modal cover the
   whole page on load. Guard every hidden toggle against that. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(69, 128, 255, 0.12), transparent 36rem),
    linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.45;
}

.ambient-one {
  width: 24rem;
  height: 24rem;
  top: 16rem;
  right: -12rem;
  background: rgba(255, 171, 87, 0.14);
}

.ambient-two {
  width: 20rem;
  height: 20rem;
  left: -11rem;
  bottom: 4rem;
  background: rgba(65, 199, 174, 0.12);
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 36px;
}

.hero {
  max-width: 760px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #243b5f;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, #2467ef, #694be8);
  box-shadow: 0 8px 22px rgba(47, 96, 223, 0.24);
}

.eyebrow {
  margin-bottom: 10px;
  color: #3973e7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.query-card,
.quota-card {
  border: 1px solid rgba(203, 214, 230, 0.8);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 70px rgba(33, 53, 85, 0.08);
  backdrop-filter: blur(16px);
}

.query-card {
  padding: 26px;
  border-radius: 24px;
}

.query-heading,
.result-heading,
.card-topline,
.metric-row {
  display: flex;
  align-items: center;
}

.query-heading,
.result-heading {
  justify-content: space-between;
  gap: 18px;
}

.query-heading h2,
.result-heading h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.query-heading p {
  margin-bottom: 0;
  color: #728097;
  font-size: 13px;
}

.secure-badge,
.plan-badge {
  flex: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.secure-badge {
  padding: 8px 12px;
  color: #18785f;
  background: #eaf9f3;
}

.secure-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #28ae85;
}

form {
  margin-top: 22px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #40526d;
  font-size: 12px;
  font-weight: 750;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

input,
button {
  min-height: 50px;
  border-radius: 14px;
  font: inherit;
}

input {
  min-width: 0;
  border: 1px solid #ced8e6;
  outline: none;
  padding: 0 16px;
  color: #182943;
  background: #f9fbfe;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus {
  border-color: #4f7fe6;
  background: white;
  box-shadow: 0 0 0 4px rgba(64, 111, 218, 0.12);
}

button {
  border: 0;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.ghost-button {
  color: #4d5f78;
  background: #edf2f8;
}

.primary-button {
  min-width: 122px;
  color: white;
  background: linear-gradient(135deg, #286ce8, #4f55dc);
  box-shadow: 0 10px 24px rgba(53, 91, 211, 0.22);
}

.message {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid #f0c9c9;
  border-radius: 14px;
  color: #a63b3b;
  background: #fff3f3;
  font-size: 14px;
}

.results {
  margin-top: 34px;
}

.result-heading {
  margin: 0 4px 16px;
}

.result-heading .eyebrow {
  margin-bottom: 5px;
}

.result-heading h2 {
  margin-bottom: 0;
}

.result-time {
  color: #7d8ba0;
  font-size: 12px;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.quota-card {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  padding: 26px;
  border-radius: 24px;
}

.quota-card::after {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -64px;
  bottom: -76px;
  border-radius: 50%;
  content: "";
  background: rgba(62, 118, 235, 0.06);
}

.official-card::after {
  background: rgba(244, 133, 52, 0.08);
}

.card-topline {
  gap: 12px;
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: #2864d5;
  background: #eaf1ff;
  font-size: 15px;
  font-weight: 850;
}

.card-icon.warm {
  color: #bd5f20;
  background: #fff0e4;
}

.card-topline h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.plan-badge {
  margin-left: auto;
  padding: 7px 11px;
  color: #9a541f;
  background: #fff1e5;
  text-transform: uppercase;
}

.metric-row {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.metric-row strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-row span {
  color: #718096;
  font-size: 13px;
  text-align: right;
}

.progress-track {
  height: 9px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.warm-track {
  background: #f8eadf;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 0.55s ease;
}

.progress-fill.blue {
  background: linear-gradient(90deg, #2974ed, #625eea);
}

.progress-fill.orange {
  background: linear-gradient(90deg, #f39a49, #ed6650);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  margin: 28px 0 0;
}

.detail-list div {
  min-width: 0;
}

.detail-list dt {
  margin-bottom: 5px;
  color: #8a97aa;
  font-size: 11px;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}

.unavailable {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #6d532f;
  background: #fff7e9;
  font-size: 12px;
}

.unavailable {
  color: #934444;
  background: #fff1f1;
}

.policy-note {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid #d7e1ef;
  border-radius: 16px;
  color: #5f6f86;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.65;
}

footer {
  padding: 30px 0 0;
  color: #8a96a8;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 640px);
    padding-top: 26px;
  }

  .brand {
    margin-bottom: 32px;
  }

  .query-heading {
    align-items: flex-start;
  }

  .key-row {
    grid-template-columns: 1fr auto;
  }

  .primary-button {
    grid-column: 1 / -1;
  }

  .quota-grid {
    grid-template-columns: 1fr;
  }

  .quota-card {
    min-height: 410px;
  }
}

@media (max-width: 430px) {
  .query-card,
  .quota-card {
    padding: 20px;
    border-radius: 20px;
  }

  .secure-badge {
    display: none;
  }

  .result-heading {
    align-items: flex-end;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quota-card {
    min-height: 480px;
  }

}

/* --- member request audit --- */
.requests-section {
  margin-top: 26px;
}

.requests-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(36, 103, 239, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(28, 63, 133, 0.08);
}

.requests-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 13px;
}

.requests-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7286a6;
  background: rgba(36, 103, 239, 0.06);
  white-space: nowrap;
}

.requests-table td {
  padding: 10px 14px;
  border-top: 1px solid rgba(36, 103, 239, 0.08);
  color: #26364f;
  white-space: nowrap;
}

.requests-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-model {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-ip {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
}

.cell-region {
  margin-top: 1px;
  font-size: 11px;
  color: #7286a6;
}

.status-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-chip.tone-ok {
  color: #0f7a4d;
  background: rgba(47, 184, 124, 0.14);
}

.status-chip.tone-bad {
  color: #b3261e;
  background: rgba(235, 87, 74, 0.13);
}

.status-chip.tone-info {
  color: #1d5fd6;
  background: rgba(47, 96, 223, 0.12);
}

.status-chip.tone-muted {
  color: #5d6f8c;
  background: rgba(122, 143, 173, 0.16);
}

.requests-more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.ghost-button.small {
  padding: 4px 12px;
  font-size: 12px;
}

.ghost-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.body-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 26, 46, 0.45);
  backdrop-filter: blur(4px);
}

.body-modal-card {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: 82vh;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(9, 20, 40, 0.35);
  overflow: hidden;
}

.body-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(36, 103, 239, 0.12);
}

.body-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #243b5f;
}

.body-modal-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #7286a6;
}

.body-modal-content {
  flex: 1;
  margin: 0;
  padding: 16px 20px;
  overflow: auto;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #26364f;
  white-space: pre-wrap;
  word-break: break-all;
}
