:root {
  --bg: #e6edf2;
  --surface: #ffffff;
  --ink: #101820;
  --accent: #0a6c74;
  --accent-strong: #084f57;
  --line: rgba(16, 24, 32, 0.22);
  --muted: #51606d;
  --danger: #b91c1c;
  --shadow: 0 18px 34px rgba(10, 26, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  position: relative;
}

.topbar,
.page,
.hero {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
}

.grid {
  width: 100%;
  margin: 0;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid rgba(16, 24, 32, 0.14);
}

.brand {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.nav a,
.nav button {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.04);
}

.nav-button-primary {
  background: var(--accent);
  color: white !important;
  border-color: transparent;
}

.page {
  padding-bottom: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  padding: 26px 0 18px;
}

.home-hero {
  display: block;
  max-width: none;
  width: 100%;
  padding: 12px 0 8px;
}

.home-hero-copy {
  display: grid;
  gap: 6px;
  width: 100%;
}

.hero h1,
.card h1,
.card h2,
.card h3 {
  margin-top: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.lead {
  font-size: 1.08rem;
  line-height: 1.45;
  margin: 0;
}

.disclaimer-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 2px solid #15803d;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  color: var(--ink);
  line-height: 1.55;
}

.disclaimer-note h2,
.disclaimer-note p {
  margin: 0;
}

.disclaimer-note h2 {
  margin-bottom: 8px;
}

.section-note,
.compact {
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.narrow {
  width: min(620px, 100%);
  margin: 24px auto;
}

.message-card {
  display: grid;
  gap: 8px;
}

.message-card h1 {
  margin-bottom: 0;
}

.message-lead {
  margin: 0;
  line-height: 1.5;
}

.hero-actions,
.actions,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.button.primary,
button.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.themed-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration-color: rgba(8, 79, 87, 0.45);
  text-underline-offset: 3px;
}

.themed-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.dashboard-wide-card {
  grid-column: 1 / -1;
}

.home-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 20px;
  margin-top: 12px;
}

.home-main.solo {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

.home-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.tool-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tool-controls,
.tool-outputs {
  display: grid;
  gap: 10px;
}

.form-grid,
.stack {
  display: grid;
  gap: 10px;
}

.form-grid {
  grid-template-columns: 1fr;
  max-width: 420px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid rgba(17, 17, 17, 0.22);
  border-radius: 6px;
  padding: 11px 12px;
  background: #ffffff;
  font: inherit;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.checkbox-line input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.checkbox-line span {
  line-height: 1.5;
}

input[readonly] {
  color: var(--muted);
  background: #eef2f4;
}

.preview,
.result {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #f9fafb;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid rgba(17, 17, 17, 0.55);
  margin: 0;
}

.chart-panel {
  min-height: 220px;
  padding: 10px;
  border: 2px solid rgba(17, 17, 17, 0.55);
  border-radius: 8px;
  background: #0f172a;
}

.chart-empty {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.5;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-svg rect {
  fill: #0f172a;
}

.chart-svg line {
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
}

.chart-svg text {
  fill: #cbd5e1;
  font-size: 12px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.chart-area {
  fill: rgba(59, 130, 246, 0.18);
}

.chart-line {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-points circle {
  fill: #bfdbfe;
  stroke: #60a5fa;
  stroke-width: 1.5;
}

.result-wrap {
  position: relative;
}

.result {
  line-height: 1.65;
  max-height: 500px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 197, 253, 0.65) rgba(255, 255, 255, 0.08);
}

.result::-webkit-scrollbar {
  width: 10px;
}

.result::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.result::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.6);
  border-radius: 999px;
  border: 2px solid rgba(17, 24, 39, 0.85);
}

.result::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 197, 253, 0.82);
}

.response-status {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
}

.response-status.ok {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
}

.response-status.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
}

.response-status.loading,
.response-status.idle {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
}

.json-key {
  color: #93c5fd;
}

.json-string {
  color: #86efac;
}

.json-number {
  color: #f9a8d4;
}

.json-boolean {
  color: #fcd34d;
}

.json-null {
  color: #d8b4fe;
}

.url-path {
  color: #e2e8f0;
}

.url-domain {
  color: #cbd5e1;
}

.url-key {
  color: #93c5fd;
}

.url-value {
  color: #86efac;
}

.url-punct {
  color: #fcd34d;
}

.output-block {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.output-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy-button {
  padding: 7px 12px;
  font-size: 0.9rem;
}

.copy-button-overlay {
  position: absolute;
  top: 10px;
  right: 28px;
  z-index: 1;
}

.home-tester {
  display: grid;
  gap: 6px;
  margin-bottom: 96px;
}

.tester-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.home-hero h1,
.home-tester h2 {
  margin-bottom: 0;
}

.tool-note,
.notice {
  color: var(--accent-strong);
  margin: 0;
}

.reuse-note {
  margin-top: 14px;
  padding: 14px 16px;
  border: 2px solid #1d4ed8;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: #1e3a8a;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.45;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.reuse-note a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.data-credit {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 2px solid #1d4ed8;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.data-credit-full {
  grid-column: 1 / -1;
}

.data-credit p {
  margin: 0;
}

.data-credit strong {
  color: var(--ink);
}

.credit-quote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
}

.data-credit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.data-credit a {
  color: var(--accent-strong);
}

.error {
  color: var(--danger);
}

.site-list {
  display: grid;
  gap: 12px;
}

.account-actions {
  display: flex;
  justify-content: center;
  padding-top: 22px;
  padding-bottom: 8px;
}

.account-site-link {
  padding-top: 8px;
  padding-bottom: 10px;
}

.site-item {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.account-site-item {
  gap: 10px;
  padding: 14px;
  border: 2px solid rgba(29, 78, 216, 0.16);
  border-radius: 12px;
  background-color: #f3f8ff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  border-bottom: 2px solid rgba(29, 78, 216, 0.16);
}

.api-key-item {
  gap: 10px;
  padding: 14px;
  border: 2px solid rgba(29, 78, 216, 0.16);
  border-radius: 12px;
  background-color: #f3f8ff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  border-bottom: 2px solid rgba(29, 78, 216, 0.16);
}

.api-key-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.api-key-name {
  color: #0f172a;
}

.api-key-rename-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.api-key-rename-form.is-hidden {
  display: none;
}

.api-key-rename-form input {
  max-width: 260px;
  background: #ffffff;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.api-key-value {
  display: inline-block;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(29, 78, 216, 0.22);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
}

.api-key-copy {
  padding: 6px 10px;
  min-height: 34px;
  border-color: rgba(29, 78, 216, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a8a;
}

.api-key-rename-toggle {
  min-height: 42px;
  padding: 10px 16px;
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.api-key-status {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.api-key-status.is-active {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.api-key-status.is-revoked {
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
}

.api-key-actions {
  gap: 8px;
}

.api-key-add-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.api-key-add-form input {
  flex: 1 1 auto;
  min-width: 0;
}

.purchase-list {
  gap: 14px;
}

.purchase-item {
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.purchase-item-pending {
  border: 2px solid rgba(37, 99, 235, 0.16);
  border-bottom: 2px solid rgba(37, 99, 235, 0.16);
  background-color: #f3f8ff;
}

.purchase-item-approved {
  border: 2px solid rgba(22, 163, 74, 0.16);
  border-bottom: 2px solid rgba(22, 163, 74, 0.16);
  background-color: #f1fbf5;
}

.purchase-heading,
.purchase-meta,
.purchase-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.purchase-site {
  color: #0f172a;
}

.purchase-status {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.purchase-status.is-pending {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.purchase-status.is-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.purchase-status.is-cancelled {
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
}

.purchase-status.is-approved {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.purchase-window {
  color: var(--ink);
}

.purchase-amount {
  display: inline-block;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 8px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
}

.purchase-state,
.purchase-date {
  color: var(--muted);
}

.purchase-actions {
  margin-top: 2px;
  justify-content: flex-end;
}

.button.button-warning {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.button.button-success {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.button.button-danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.compact-list .site-item {
  padding: 10px 0;
}

.price-panel {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: rgba(0, 95, 115, 0.04);
}

.price-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.price-strikethrough {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: var(--muted);
}

.price-free {
  justify-self: end;
  font-weight: 700;
  color: #166534;
}

.price-error {
  color: #991b1b;
  line-height: 1.45;
}

.message-details {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border: 2px solid rgba(37, 99, 235, 0.16);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
}

.message-details p {
  margin: 0;
}

.message-action {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 6px;
  text-align: center;
}

.message-action .button,
.message-action button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legal-page h2 {
  margin-bottom: 8px;
}

.legal-stack {
  display: grid;
  gap: 18px;
}

.legal-stack p {
  margin: 0;
  line-height: 1.6;
}

.is-hidden {
  display: none;
}

code {
  font-family: "Courier New", monospace;
}

@media (max-width: 900px) {

  .home-hero,
  .home-main,
  .tool-layout,
  .hero,
  .grid.two,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
