:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1c2230;
  --ink-2: #4a5263;
  --muted: #7b8291;
  --line: #e4e1d8;
  --accent: #136c58;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ec;
  --warn: #9a6400;
  --warn-soft: #fdf2dc;
  --alert: #b3261e;
  --alert-soft: #fbe7e5;
  --ok: #136c58;
  --ok-soft: #e3f1ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 34, 48, .05), 0 4px 16px rgba(28, 34, 48, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d; --card: #1c2028; --ink: #eceef2; --ink-2: #c3c8d2; --muted: #8b92a1;
    --line: #2c313b; --accent: #4cc4a2; --accent-ink: #0d1a16; --accent-soft: #173229;
    --warn: #f0b44c; --warn-soft: #33290f; --alert: #f2847b; --alert-soft: #3a1c1a;
    --ok: #4cc4a2; --ok-soft: #173229; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }

/* layout */
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; background: none; border: 0; cursor: pointer; font: inherit; }
.nav a:hover, .nav button:hover { background: var(--bg); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 560px; }
main { padding: 28px 0 64px; }
footer { border-top: 1px solid var(--line); padding: 20px 0 40px; color: var(--muted); font-size: .875rem; }
footer a { color: var(--muted); margin-right: 14px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

/* forms */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--alert); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
form.inline { display: inline; }

/* choice cards (tono, modo) */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.choice { position: relative; display: block; margin: 0; font-weight: 400; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice .box { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; height: 100%; background: var(--card); }
.choice .box b { display: block; }
.choice .box span { color: var(--muted); font-size: .9rem; }
.choice input:checked + .box { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + .box { outline: 2px solid var(--accent); }

/* switch */
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature .txt { flex: 1; }
.feature .txt b { display: block; }
.feature .txt span { color: var(--muted); font-size: .92rem; }
.switch { position: relative; width: 48px; height: 28px; flex: none; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line); border-radius: 28px; transition: .15s; cursor: pointer; }
.switch .slider:before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.feature.soon { opacity: .55; }
.modes { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.modes .choice .box { padding: 8px 12px; }

/* steps */
.steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.steps li { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); }
.steps li:before { content: ""; display: block; height: 5px; border-radius: 5px; background: var(--line); margin-bottom: 6px; }
.steps li.done:before, .steps li.current:before { background: var(--accent); }
.steps li.current { color: var(--ink); font-weight: 600; }

/* flashes & badges */
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flash.error { background: var(--alert-soft); color: var(--alert); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.alert { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); margin-bottom: 16px; }
.notice.info { background: var(--accent-soft); }

/* approvals & activity */
.msg { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 8px 0; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.proposal textarea { min-height: 80px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.meta { font-size: .85rem; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--line); flex: none; }
.stat { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat + small { display: block; margin-top: 4px; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

/* playground */
.play-out { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg); display: none; white-space: pre-wrap; }
.play-out.show { display: block; }

/* hero */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2.3rem; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.how { counter-reset: s; }
.how .card { position: relative; padding-left: 64px; }
.how .card:before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.prose h2 { margin-top: 1.6em; }
.prose { max-width: 70ch; }
@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .card { padding: 16px; }
  .nav a, .nav button { padding: 8px 6px; font-size: .9rem; }
}
