:root {
  --bg: #f7f6f3;
  --card: #fff;
  --line: #e3e0d8;
  --ink: #1c1c1f;
  --muted: #57554f;
  --accent: #876a16;
  --wash: #f4ecd5;
  --accent-ink: #6b530f;
  --ease: cubic-bezier(.22,1,.36,1);
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
}
main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 0;
}
[hidden] { display: none !important; }
.eyebrow {
  margin: 0;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 8px 0 16px;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.name {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.tier {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 16px;
}
.tier:empty { display: none; }
.tile {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  animation: rise .5s var(--ease);
}
.tile-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
}
.tile h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.status {
  margin: 24px 0;
  color: var(--muted);
  font-size: 18px;
}
.bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  background: var(--bg);
}
button {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.bar button:hover:not(:disabled) { background: var(--accent-ink); }
button:active:not(:disabled) { transform: scale(.98); }
button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: default;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
  button { transition: none; }
}
/* Proposals: the list, the form and one proposal. Same tokens, same sizes; nothing below 16px. */
main > section { flex: 0 0 auto; }
label, .label {
  display: block;
  margin: 24px 0 8px;
  font-size: 18px;
  font-weight: 600;
}
input[type=text], textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.4;
}
input[type=text]:focus, textarea:focus {
  border-color: var(--accent);
  outline: 3px solid var(--wash);
}
.err {
  margin: 6px 0 0;
  color: #a8231a;
  font-size: 16px;
}
.err:empty { display: none; }
button.ghost, button.choice, button.link, button.tab, button.row, button.ver {
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
button.ghost {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 18px;
}
button.ghost:hover:not(:disabled) { border-color: var(--accent); }
button.ghost:disabled { background: var(--bg); color: var(--muted); }
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
button.choice {
  min-height: 60px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 18px;
}
button.choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--wash);
  color: var(--accent-ink);
}
button.link {
  width: auto;
  min-height: 48px;
  padding: 0;
  background: none;
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 500;
  text-align: left;
}
.picked { margin: 8px 0 0; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.seg {
  display: flex;
  gap: 4px;
  margin: 20px 0 16px;
  padding: 4px;
  border-radius: 16px;
  background: #ebe9e3;
}
button.tab {
  flex: 1;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}
button.tab.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
button.row {
  display: block;
  width: 100%;
  min-height: 0;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font-weight: 400;
  text-align: left;
  animation: rise .5s var(--ease);
}
button.row:hover { border-color: var(--accent); }
button.row p { margin: 0; }
.rt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rt b {
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c {
  flex: 0 0 auto;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 600;
}
.c.info { background: #e8eefc; color: #2b56c6; }
.c.ok { background: #e1f3e8; color: #05683f; }
.c.neutral { background: #ecebe6; color: #4d4b45; }
.c.bad { background: #fbe7e5; color: #a8231a; }
.mono { margin: 6px 0 2px; font-family: var(--mono); font-size: 16px; letter-spacing: -.02em; }
.by { color: var(--muted); font-size: 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.head .mono { margin: 0; }
.alert {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #ecebe6;
  color: #4d4b45;
  font-size: 18px;
}
.alert.warn { background: #fdf0e1; color: #8f4205; }
.pages canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.sect {
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
button.ver {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 18px;
  font-weight: 400;
  text-align: left;
}
button.ver.on .vn { color: var(--accent); }
.vn { margin-right: 10px; color: var(--accent-ink); font-weight: 700; }
.vm { color: var(--muted); font-size: 16px; }
.vnote { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.panel {
  margin: 12px 0;
  padding: 4px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.panel .status { margin: 16px 0 0; }
@media (prefers-reduced-motion: reduce) {
  button.row { animation: none; }
  button.ghost, button.choice, button.link, button.tab, button.row, button.ver { transition: none; }
}

@media (min-width: 1024px) {
  main { max-width: 760px; padding-top: 72px; }
  h1 { font-size: 64px; }
  .name { font-size: 28px; }
  .tile { padding: 40px; }
  .tile h2 { font-size: 48px; }
  .status, .tile-label { font-size: 20px; }
}
