:root {
  --ground: #f6f7f9;
  --surface: #ffffff;
  --ink: #14181f;
  --muted: #566170;
  --line: #dde1e7;
  --accent: #0b6b6b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1f0;
  --warn: #8a3a12;
  --warn-soft: #fbeee6;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--accent); }

.welcome { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; max-width: 520px; margin: 0 auto; padding: 32px 20px; }
.welcome .lede { font-size: 1.15rem; color: var(--muted); }

header.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 880px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand { font-weight: 700; letter-spacing: -0.02em; margin-right: auto; font-size: 1.1rem; }
nav.areas, .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.areas button, .tabs button { min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.areas button[aria-current="page"], .tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: #b9dcda; }
.areas small { display: block; font-size: 0.7rem; font-weight: 400; line-height: 1; }

main.page { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; display: flex; flex-direction: column; gap: 24px; }
.who { color: var(--muted); }
section.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1 1 220px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 6px; }

label { font-size: 0.9rem; font-weight: 500; }
input[type="text"], input:not([type]), textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b6bdc8; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid #6fb7b4; outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; }
.check input { width: 20px; height: 20px; }

button { font: inherit; }
button.primary, button.quiet, button.danger { min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
button.quiet { background: #fff; color: var(--ink); border: 1px solid #b6bdc8; }
button.danger { background: #fff; color: var(--warn); border: 1px solid #d9a98f; }

ul.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ul.list > li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
ul.list > li:first-child { border-top: 0; padding-top: 0; }
.meta { font-size: 0.85rem; color: var(--muted); }
.snippet { color: var(--muted); overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.badge.plain { background: #eceff3; color: var(--muted); }
.scope { font-size: 0.85rem; color: var(--muted); }

.answer { background: var(--accent-soft); border: 1px solid #b9dcda; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.answer pre { margin: 0; white-space: pre-wrap; font: inherit; overflow-wrap: anywhere; }
.notice { background: var(--accent-soft); border: 1px solid #b9dcda; border-radius: 10px; padding: 12px 16px; }
.error { background: var(--warn-soft); border: 1px solid #d9a98f; color: var(--warn); border-radius: 10px; padding: 12px 16px; }
.preview { background: #f1f3f6; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.fine { font-size: 0.85rem; color: var(--muted); }
.empty { color: var(--muted); }
