:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #55605b;
  --border: #d9dfdb;
  --accent: #1f6f5c;
  --accent-text: #ffffff;
  --tag-bg: #e3efff;
  --tag-text: #0b2a5b;
  --notice-bg: #fff4d6;
  --notice-text: #5a4300;
  --focus: #2b6cdf;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614;
    --surface: #1a211e;
    --text: #e9efec;
    --muted: #a3afa9;
    --border: #2f3a35;
    --accent: #5cc4a8;
    --accent-text: #0d1a16;
    --tag-bg: #1d3557;
    --tag-text: #dbe8ff;
    --notice-bg: #3a3112;
    --notice-text: #ffe6a3;
    --focus: #8ab4ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 1; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-text); }
.pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
nav a, .link-button { color: var(--text); text-decoration: none; font: inherit; }
nav a:hover, .link-button:hover { text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }

main { padding-block: 24px 48px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 8px 0 12px; }
h2 { font-size: 21px; margin: 0 0 8px; }
h3 { font-size: 17px; margin: 0 0 4px; }
.lead { font-size: 19px; color: var(--muted); max-width: 40em; }

.notice { background: var(--notice-bg); color: var(--notice-text); padding: 12px 16px; border-radius: 8px; }
.flash:empty, .status:empty { display: none; }
.flash { background: var(--tag-bg); color: var(--tag-text); padding: 12px 16px; border-radius: 8px; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-block: 16px; }
.choices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.choices .card { margin: 0; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 32px; }
.features p { color: var(--muted); margin: 0; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 8px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 16px; }
.hint { color: var(--muted); font-size: 15px; }
.status { font-weight: 500; }

.field { display: grid; gap: 4px; margin-block: 14px; }
label { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%;
}
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-text); }

button:not(.unidy-button):not(.link-button), .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  font: 600 16px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.6; cursor: progress; }

pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.steps { padding-left: 20px; }
.steps > li { margin-block: 24px; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; padding-block: 16px 32px; }
