:root {
  --paper: #f6f0e4; --paper2: #fffaf0; --ink: #1d1a16; --soft: #6f6556; --line: #e0d5bf;
  --gold: #a57c2c; --gold2: #d9b76a; --night: #14120f; --ok: #2d7a55; --warn: #a8442f;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.6 Assistant, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Frank Ruhl Libre', serif; font-weight: 700; line-height: 1.15; margin: 0; }

.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; }
.brand { font-family: 'Frank Ruhl Libre', serif; font-size: 25px; font-weight: 900; text-decoration: none; letter-spacing: .3px; }
.brand small { font: 400 14px Assistant; color: var(--soft); margin-inline-start: 8px; }
.link { background: none; border: 0; padding: 4px; color: var(--soft); text-decoration: underline; cursor: pointer; font-size: 15px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 8px 20px 70px; }

.btn { background: var(--ink); color: var(--paper2); border: 0; border-radius: 4px; padding: 13px 26px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: #3a342b; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.gold { background: linear-gradient(100deg, #8e6a26, #d9b76a 55%, #a57c2c); color: #1c150a; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.small { padding: 8px 14px; font-size: 15px; }
.err { color: var(--warn); font-weight: 600; margin: 10px 0 0; }

/* Home */
.hero { background: var(--night); color: #f3e8cf; overflow: hidden; }
.hero .bar .brand small, .hero .link { color: #b9a988; }
.hero-in { max-width: 1060px; margin: 0 auto; padding: 26px 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 900; color: #f6e2a4; }
.hero p { font-size: 20px; color: #d8ccb2; max-width: 30em; margin: 18px 0 26px; }
.fan { position: relative; height: 470px; }
.fan > div { position: absolute; width: 262px; top: 34px; box-shadow: 0 18px 50px #000a; line-height: 0; }
.fan > div:nth-child(1) { left: 2%; transform: rotate(-9deg); top: 62px; }
.fan > div:nth-child(2) { left: 50%; transform: rotate(8deg); top: 66px; }
.fan > div:nth-child(3) { left: 25%; z-index: 2; top: 18px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; padding: 50px 0 10px; }
.steps b { font-family: 'Frank Ruhl Libre', serif; font-size: 23px; display: block; margin-bottom: 4px; }
.steps span { color: var(--soft); }
.num { font: 900 42px 'Frank Ruhl Libre', serif; color: var(--gold); display: block; }

/* Interview */
.ask { max-width: 620px; margin: 14px auto; }
.ask h1 { font-size: 36px; margin-bottom: 6px; }
.ask .sub { color: var(--soft); margin: 0 0 22px; }
.prog { height: 3px; background: var(--line); margin-bottom: 26px; }
.prog i { display: block; height: 100%; background: var(--gold); transition: width .25s; }
label.f { display: block; margin-bottom: 16px; font-weight: 700; }
label.f small { display: block; font-weight: 400; color: var(--soft); }
.in { width: 100%; background: var(--paper2); border: 1.5px solid var(--line); border-radius: 4px; padding: 11px 13px; margin-top: 5px; font-weight: 400; }
.in:focus { outline: none; border-color: var(--gold); }
textarea.in { min-height: 118px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.opt { background: var(--paper2); border: 1.5px solid var(--line); border-radius: 4px; padding: 10px 18px; cursor: pointer; font-weight: 600; }
.opt.on { background: var(--ink); color: var(--paper2); border-color: var(--ink); }
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* Concepts */
.top { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.top h1 { font-size: 34px; }
.top p { margin: 4px 0 0; color: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px 22px; }
.card .pic { line-height: 0; box-shadow: 0 8px 26px #5a451f40; background: #ddd; }
.card svg, .pic svg { width: 100%; height: auto; display: block; }
.card h3 { font-size: 21px; margin: 12px 0 2px; }
.card p { margin: 0 0 10px; color: var(--soft); font-size: 16px; }
.pill { font-size: 13.5px; color: var(--soft); display: block; margin-bottom: 8px; }
.loading { text-align: center; padding: 90px 10px; }
.loading h2 { font-size: 28px; margin-bottom: 8px; }
.spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 18px; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

/* Editor */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 26px; align-items: start; }
.stage { position: relative; line-height: 0; max-width: 560px; margin: 0 auto; width: 100%; box-shadow: 0 10px 34px #5a451f4d; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage svg { width: 100%; height: auto; display: block; }
.stage [data-layer] { cursor: move; }
.stage [data-locked] { cursor: default; }
.sel { position: absolute; border: 1.5px dashed #2f8fff; box-shadow: 0 0 0 1px #ffffffb0; pointer-events: none; }
.side { background: var(--paper2); border: 1px solid var(--line); border-radius: 6px; padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.side h3 { font-size: 20px; margin-bottom: 8px; }
.side .f { margin-bottom: 11px; font-size: 15px; }
.side .in { padding: 8px 10px; margin-top: 3px; }
.row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 118px; overflow: auto; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 3px; padding: 3px 9px; font-size: 14px; cursor: pointer; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.dot.on { box-shadow: 0 0 0 2px var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.note { font-size: 14.5px; color: var(--soft); margin: 5px 0 0; }
.banner { background: #fff5d9; border: 1px solid #e9d39a; padding: 11px 14px; border-radius: 4px; margin-bottom: 18px; font-size: 16px; }
.banner.ok { background: #e6f4ec; border-color: #bcdcc9; }
.log { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.log li { padding: 5px 0; border-top: 1px solid var(--line); }
.log b { color: var(--gold); }

/* Designer */
.list { border-top: 1px solid var(--line); }
.item { display: flex; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.item:hover { background: var(--paper2); }
.thumb { width: 56px; height: 78px; flex: none; background: #ddd; line-height: 0; }
.thumb svg { width: 100%; height: auto; }
.item b { font-size: 19px; display: block; }
.item span { color: var(--soft); font-size: 15px; }
.st { margin-inline-start: auto; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { background: none; border: 0; padding: 8px 2px; cursor: pointer; font-weight: 700; color: var(--soft); border-bottom: 2px solid transparent; }
.tab.on { color: var(--ink); border-color: var(--gold); }
.rule { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; }
  .fan { height: 340px; transform: scale(.72); transform-origin: top center; margin-inline: -40px; }
  .steps { grid-template-columns: 1fr; gap: 18px; padding-top: 30px; }
  .ed { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: min(560px, 60vh); }
  .side { position: static; max-height: none; }
  .two { grid-template-columns: 1fr; }
}
@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  .stage, .stage * { visibility: visible; }
  .stage { position: fixed; inset: 0; margin: 0; max-width: none; box-shadow: none; }
  .sel { display: none; }
  @page { size: 148mm 207mm; margin: 0; }
}
