:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --background: #080a0d;
  --surface: #11151b;
  --surface-raised: #171d25;
  --border: #2c3542;
  --text: #f4f7fb;
  --muted: #aab4c2;
  --accent: #dec27a;
  --accent-strong: #f0d998;
  --danger: #ff8f8f;
  --success: #78d7a3;
  background: var(--background);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgb(222 194 122 / 10%), transparent 36rem),
    var(--background);
  color: var(--text);
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
  border-radius: 0.7rem;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 0.2rem solid var(--accent-strong);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  transform: translateY(-200%);
  border-radius: 0.4rem;
  background: var(--text);
  color: var(--background);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.layout,
.site-footer,
.noscript-warning {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2.25rem 1.25rem;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}

.eyebrow {
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.security-badge {
  margin-bottom: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(17 21 27 / 86%);
  color: var(--muted);
  font-size: 0.85rem;
}

.noscript-warning {
  padding: 0.85rem 1rem;
  border: 1px solid var(--danger);
  border-radius: 0.75rem;
  background: rgb(255 143 143 / 8%);
  color: var(--danger);
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.card {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgb(17 21 27 / 92%);
  box-shadow: 0 1.2rem 3rem rgb(0 0 0 / 18%);
}

.card:first-child {
  grid-column: 1 / -1;
}

.section-heading,
.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-panel p {
  margin-bottom: 0;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 0.25rem rgb(170 180 194 / 10%);
}

.status-dot[data-state="ready"] {
  background: var(--success);
  box-shadow: 0 0 0 0.25rem rgb(120 215 163 / 12%);
}

.status-dot[data-state="error"] {
  background: var(--danger);
  box-shadow: 0 0 0 0.25rem rgb(255 143 143 / 12%);
}

.status-text {
  min-height: 1.55rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.status-text[data-state="error"] {
  color: var(--danger);
}

.status-text[data-state="success"] {
  color: var(--success);
}

.help-text,
.site-footer {
  color: var(--muted);
}

form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 700;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
  padding: 0.8rem;
}

input {
  padding: 0.72rem 0.8rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.button {
  width: fit-content;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
}

.button-primary {
  background: var(--accent);
  color: #18150c;
}

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

.button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.response-box {
  min-height: 8rem;
  max-height: 24rem;
  margin: 1rem 0 0;
  padding: 0.85rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: #090c10;
  color: var(--text);
  font: 0.94rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.site-footer {
  padding-block: 0 2rem;
}

.site-footer p {
  margin-bottom: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 48rem) {
  .site-header,
  .account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card:first-child {
    grid-column: auto;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
