:root {
  --ink: #1E1B2E;
  --muted: #5d5a6e;
  --paper: #FFFDF8;
  --card: #FFFFFF;
  --line: #E7E2D6;
  --red: #E1262D; --green: #1E9A4B; --yellow: #FFC20E; --blue: #1D5FD8; --pink: #F0559E;
  --main: var(--red);
  --tint: color-mix(in srgb, var(--main) 9%, white);
  --display: "Yeseva One", Georgia, serif;
  --serif: "Lora", Georgia, serif;
  --sans: "Nunito Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2 { font-weight: 400; margin: 0; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.home { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 15px; min-width: 0; }
.home span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home svg { flex: none; }
.langs { display: flex; gap: 2px; background: var(--line); padding: 3px; border-radius: 999px; flex: none; }
.langs a { text-decoration: none; font-weight: 800; font-size: 13px; padding: 5px 11px; border-radius: 999px; color: var(--muted); }
.langs a.on { background: var(--ink); color: #fff; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

.band { display: flex; justify-content: center; align-items: center; gap: 6px; }
.border { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }

/* home */
.hero { text-align: center; padding: 32px 0 12px; }
.hero h1 { font-family: var(--display); font-size: clamp(44px, 11vw, 72px); line-height: 1; margin-top: 16px; color: var(--red); }
.hero .theme { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 10px 0 0; }
.hero .conf { font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: .02em; margin: 4px 0 0; }
.hero .intro { max-width: 480px; margin: 18px auto 0; }
.cards { display: grid; gap: 16px; margin-top: 24px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--main);
  border-radius: 14px; padding: 20px 20px 20px; overflow: hidden; }
.card-mark { position: absolute; right: -10px; top: -10px; opacity: .9; }
.card-short { font-family: var(--display); color: var(--main); font-size: 30px; line-height: 1.05; margin: 0; padding-right: 50px; }
.card h2 { font-family: var(--sans); font-weight: 800; font-size: 18px; margin-top: 4px; }
.card-links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--main); color: #fff; border: 2px solid var(--main); font: 800 15px var(--sans); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--main); }
.btn:focus-visible, .langs a:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 40px; }
.foot p { margin: 10px 0; }

/* sheet */
.tabs { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; }
.back { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.seg { display: flex; background: var(--line); padding: 3px; border-radius: 999px; }
.seg a { text-decoration: none; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg a.on { background: var(--main); color: #fff; }

.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px 18px; }
.sheet-head { text-align: center; margin: 10px 0 18px; }
.kicker { margin: 0; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet-head h1 { font-family: var(--display); color: var(--main); font-size: clamp(38px, 10vw, 56px); line-height: 1.05; margin-top: 4px; }
.survey .sheet-head h1 { font-size: clamp(28px, 7vw, 40px); }
.sheet-head .sub { font-weight: 800; font-size: 19px; margin: 6px 0 0; }

.body { display: flex; flex-direction: column; gap: 18px; }
.body h2 { font-family: var(--display); color: var(--main); font-size: 26px; text-align: center; margin-top: 12px; line-height: 1.15; }
.body h2.sh { font-size: 22px; text-align: left; padding-bottom: 4px; border-bottom: 2px solid var(--yellow); }
.body p { margin: 0; }
.lede { font-size: 18.5px; text-align: center; }
.note { font-style: italic; text-align: center; color: var(--muted); }
.anon { font-style: italic; text-align: center; background: var(--tint); border-radius: 10px; padding: 10px 14px; }

.bullets li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.bullets li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 9px; transform: rotate(45deg); background: var(--main); }
.bullets li:nth-child(3n+2)::before { background: var(--yellow); }
.bullets li:nth-child(3n)::before { background: var(--pink); }

.steps li { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.steps .n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--main); margin-top: -2px; }
.steps li:nth-child(2) .n { background: var(--yellow); color: var(--ink); }
.steps li:nth-child(3) .n { background: var(--pink); }
.steps li:nth-child(4) .n { background: var(--blue); }
.steps li:nth-child(5) .n { background: var(--green); }

.verse { margin: 0; text-align: center; font-family: var(--serif); font-size: 18px; line-height: 1.45; padding: 0 6px; }
.verse cite { display: block; font: 800 13px var(--sans); color: var(--main); margin-top: 4px; font-style: normal; }
.verse.big { font-size: 22px; border-top: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); padding: 16px 6px; }

.example { background: color-mix(in srgb, var(--yellow) 18%, white); border-radius: 12px; padding: 14px 16px; }
.example ul { margin-top: 10px; display: grid; gap: 8px; }
.example .ph { font-weight: 800; display: block; }
.example .lab { font-size: 15px; color: var(--main); font-style: italic; }

/* fillable */
.q, .sq { display: block; border: 0; margin: 0; padding: 0; min-width: 0; }
.qt { display: flex; gap: 8px; font-weight: 800; margin-bottom: 8px; padding: 0; }
.qn { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--main); color: #fff; display: grid; place-items: center; font-size: 13px; margin-top: 1px; }
textarea { display: block; width: 100%; min-height: 64px; resize: vertical; font: 17px/1.5 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea:focus { border-color: var(--main); outline: none; }
.notes { margin-top: 8px; padding-top: 16px; border-top: 2px dashed var(--line); }
.notes textarea { min-height: 120px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; }
.opt input { appearance: none; flex: none; width: 22px; height: 22px; border: 2px solid var(--main); border-radius: 50%; margin: 0; display: grid; place-items: center; }
.opt input:checked::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--main); }
.opt:has(input:checked) { border-color: var(--main); background: var(--tint); }
.opt:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }

.tools { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.privacy { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.saved { color: var(--green); font-weight: 800; white-space: nowrap; }
.tool-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sheet .foot { margin-top: 24px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.is-sent { opacity: 1; background: var(--green); border-color: var(--green); }
.send-msg { margin: 12px 0 0; text-align: right; font-weight: 700; font-size: 15px; }
.send-msg:empty { display: none; }
.send-msg.ok { color: var(--green); }
.send-msg.err { color: var(--red); }

@media (min-width: 640px) {
  .sheet { padding: 30px 40px 24px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card { display: flex; flex-direction: column; }
  .card-links { margin-top: auto; padding-top: 16px; }
  .survey .opts { flex-direction: row; flex-wrap: wrap; }
  .survey .opt { flex: 1 1 40%; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar, .tabs, .tools { display: none; }
  main { max-width: none; padding: 0; }
  .sheet { border: 0; padding: 0; }
  textarea { border: 0; border-bottom: 1px solid #999; border-radius: 0; resize: none; overflow: hidden; }
  .q, .sq, .verse, .example { break-inside: avoid; }
}
