:root {
  color-scheme: light dark;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #17202b;
  --muted: #5c6876;
  --line: #d5dde7;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
  --danger: #b42318;
  --success: #166534;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --surface: #151c24;
    --surface-2: #1d2731;
    --text: #edf2f7;
    --muted: #a9b3bf;
    --line: #303b47;
    --accent: #2dd4bf;
    --accent-2: #93c5fd;
    --danger: #f87171;
    --success: #4ade80;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent-2);
}

header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.hero {
  padding: 40px 0 36px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.button-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

main {
  padding: 28px 0 56px;
}

section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

section:first-child {
  border-top: 0;
  padding-top: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

p {
  max-width: 820px;
}

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

.grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-item {
  display: grid;
  gap: 4px;
}

.meta-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.meta-value {
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--surface);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  width: 230px;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.96em;
}

ul {
  padding-left: 22px;
  max-width: 860px;
}

.callout {
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  background: var(--surface);
  max-width: 860px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.field {
  margin-bottom: 14px;
  max-width: 760px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.radio input {
  width: auto;
  margin: 0;
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  max-width: 760px;
}

.status-error {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--danger);
}

.status-success {
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  color: var(--success);
}

.footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
