:root {
  --bg: #fff1e0;
  --surface: #ffffff;
  --surface-alt: #fff1e0;
  --text: #000000;
  --muted: #a65a00;
  --border: #ffd199;
  --border-strong: #ff8a00;
  --accent: #ff981f;
  --accent-hover: #ed8102;
  --accent-light: #ffd199;
  --accent-contrast: #000000;
  --link: #a65a00;
  --link-hover: #e07a00;
  --code-bg: #2a1604;
  --code-text: #ffe3c2;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(255, 138, 0, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

::selection {
  background: var(--accent-light);
  color: #000000;
}

code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--accent-hover);
  background: var(--accent);
  color: #000000;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
}

.brand:hover { color: #000000; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #000000;
  color: var(--accent);
  font-weight: 800;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.lang-switch a {
  color: #000000;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
}

.lang-switch a:hover {
  background: var(--accent-light);
  color: #000000;
}

.lang-switch a[aria-current="true"] {
  background: var(--surface);
  color: #000000;
  font-weight: 600;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 3rem;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h3 { font-size: 1.05rem; }

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0.5rem 0 1.5rem;
}

.muted { color: var(--muted); }

.hero { padding-top: 1rem; }

.lookup-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow);
  max-width: 720px;
}

.lookup-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lookup-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lookup-row input {
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1rem;
}

.lookup-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

button:hover, .button:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}
button:active, .button:active { transform: translateY(1px); }

.button.secondary {
  background: transparent;
  color: var(--link);
  border-color: var(--border-strong);
}

.button.secondary:hover {
  background: var(--surface-alt);
  color: var(--link-hover);
}

.button.small { padding: 0.55rem 0.9rem; font-size: 0.9rem; }

.form-error {
  color: var(--danger);
  margin: 0.75rem 0 0;
  font-weight: 500;
}

.section { margin-top: clamp(2rem, 5vw, 3.5rem); }

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.card p { color: var(--muted); margin: 0.25rem 0 0.85rem; }
.card ul { margin: 0.25rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.card li { margin: 0.2rem 0; }

.endpoint {
  display: block;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.domain-list li {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 2rem;
}

.result-header { margin-bottom: 1.5rem; }

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.endpoint-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.endpoint-card h2 { margin: 0; font-size: 1.05rem; }

.pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.9rem;
  margin: 0 0 1rem;
}

dt { color: var(--muted); font-size: 0.85rem; }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.copy {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.copy:hover {
  background: var(--accent-light);
  color: var(--text);
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-top: 0.75rem;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

details p { color: var(--muted); margin: 0.75rem 0 0; }
details p:last-child { margin-bottom: 0.2rem; }

.endpoint-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.endpoint-list li {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.endpoint-list span { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.endpoint-list code { overflow-wrap: anywhere; color: var(--link); }

.site-footer {
  border-top: 1px solid var(--accent-hover);
  background: var(--accent);
  color: #000000;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
  font-size: 0.9rem;
}

.site-footer p { margin: 0; }

@media (max-width: 640px) {
  .endpoint-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .lookup-row button { width: 100%; }
}
