/* ProPrompt by Simpla. Design language v2: "האדריכל" (Design DNA blueprint), native dark, 1.11.2026.
   Mobile first. All desktop rules live in the one min-width:1024px block at the end. */
:root {
  --bg: #16304F;
  --bg2: #1E3C63;
  --deep: #0F2440;
  --card: #FDFDF8;
  --ink: #122A47;
  --line: #4E7099;
  --text: #DCE8FA;
  --muted: #9DB4D2;
  --ctext: #22334A;
  --cmuted: #5E718C;
  --accent: #4B7FC4;
  --accent2: #F07A33;
  --accent3: #B9CBE6;
  --on-accent: #141414;
  --on-ink: #FFFFFF;
  --wire: #EAF2FF;
  --paper: #F3EFE2;
  --graphite: #444444;
  --orange-text: #FFB27F;
  --ok: #4FB07C;
  --ok-text: #8FDCAF;
  --danger: #E4715C;
  --danger-text: #FFA493;
  --wire-dash: rgba(234, 242, 255, .45);
  --wire-faint: rgba(234, 242, 255, .22);
  --radius: 0px;
  --lh: 1.75;
  --shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  --shadow-sm: 4px 4px 0 rgba(0, 0, 0, .35);
  --fd: "Amatic SC", "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
  --fb: "Noto Sans Hebrew", "Segoe UI", "Arial Hebrew", "Liberation Sans", Arial, sans-serif;
  --fld: "Caveat", "IBM Plex Sans", "Segoe Print", cursive;
  --flb: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", "Liberation Sans", Arial, sans-serif;
  --gutter: 16px;
  --pad-card: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--fb);
  font-size: 16px;
  line-height: var(--lh);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(234, 242, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 242, 255, .06) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
[lang="en"], .en { font-family: var(--flb); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  background: var(--accent2); color: var(--on-accent); padding: 8px 16px; font-weight: 700; text-decoration: none;
  border: 2px solid var(--wire);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--wire); outline-offset: 3px; }

svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- under construction strip (shared markup, restyled in the blueprint tokens) ---------- */
.wip-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px;
  background: var(--deep); color: var(--wire);
  border-bottom: 1.5px dashed var(--wire-dash);
  font: 500 14px/1.45 var(--fb);
  text-align: center;
}
.wip-strip strong { font-weight: 700; color: var(--orange-text); }
.wip-strip svg { width: 22px; height: 22px; flex: none; color: var(--orange-text); transform-origin: 50% 90%; }
@media (prefers-reduced-motion: no-preference) {
  .wip-strip svg { animation: wip-wobble 4s ease-in-out infinite; }
  @keyframes wip-wobble {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(-8deg); }
    90% { transform: rotate(7deg); }
    95% { transform: rotate(-4deg); }
  }
}
@media print { .wip-strip { display: none; } }

/* ---------- header ---------- */
.top {
  position: relative; z-index: 2;
  background: rgba(22, 48, 79, .94);
  border-bottom: 2px solid var(--wire);
}
.top-in {
  max-width: calc(1240px + 2 * var(--gutter)); margin: 0 auto;
  min-height: 60px; padding: 8px 12px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--wire); flex: none; }
.logo-box {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  background: var(--accent2); border: 2px solid var(--wire); box-shadow: 2.5px 2.5px 0 rgba(0, 0, 0, .35);
}
.logo-box svg { width: 17px; height: 17px; fill: none; stroke: var(--on-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.word { font-family: var(--fld); font-weight: 700; font-size: 1.45rem; line-height: .95; white-space: nowrap; }
.word small { display: block; font-family: var(--flb); font-weight: 500; font-size: 11px; line-height: 1.2; color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.word small b { color: var(--wire); font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.nav a {
  white-space: nowrap; text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.5;
  padding: 4px 8px; border: 1.5px dashed var(--wire-dash); color: var(--text);
}
.nav a:hover { border-color: var(--wire); color: var(--wire); }
.nav a[aria-current="page"] { background: var(--accent2); border: 1.5px solid var(--accent2); color: var(--on-accent); font-weight: 700; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; border-top: 2px solid var(--wire); background: var(--deep); margin-top: auto; }
.foot-in {
  max-width: calc(1240px + 2 * var(--gutter)); margin: 0 auto;
  min-height: 56px; padding: 12px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  font-size: 14px; color: var(--muted);
}
.foot .by { font-family: var(--fld); font-weight: 700; font-size: 1.35rem; line-height: 1.1; color: var(--wire); direction: ltr; unicode-bidi: isolate; }
.foot a { color: var(--wire); text-decoration: underline; text-decoration-color: var(--accent2); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.foot a:hover { color: var(--orange-text); }
.foot a[aria-current="page"] { font-weight: 700; }

/* ---------- page ---------- */
.page { position: relative; flex: 1 0 auto; }
.page-in { position: relative; z-index: 1; max-width: calc(1240px + 2 * var(--gutter)); margin: 0 auto; padding: 26px var(--gutter) 44px; }
.narrow { max-width: calc(800px + 2 * var(--gutter)); }
.stack > * + * { margin-top: 18px; }

/* ---------- type ---------- */
h1, .h1 {
  font-family: var(--fd); font-weight: 700; color: var(--wire);
  font-size: clamp(3.3rem, 15.5vw, 6.2rem); line-height: .98; letter-spacing: .02em;
}
h2, .h2 { font-family: var(--fd); font-weight: 700; color: var(--wire); font-size: clamp(2.5rem, 10.5vw, 3.8rem); line-height: 1.05; letter-spacing: .02em; }
h3, .h3 { font-family: var(--fd); font-weight: 700; color: var(--wire); font-size: 1.9rem; line-height: 1.15; letter-spacing: .03em; }
h1 [lang="en"], h2 [lang="en"], h3 [lang="en"], .h3 [lang="en"], h1[lang="en"], h2[lang="en"], h3[lang="en"],
.sec-title [lang="en"], .res-head [lang="en"], .dhead [lang="en"] { font-family: var(--fld); letter-spacing: 0; }
mark, .hl { background: none; color: var(--accent2); padding: 0; }
.lead { font-size: 1.04rem; color: var(--muted); line-height: 1.7; max-width: 34em; }
.small { font-size: 14px; color: var(--muted); line-height: 1.6; }
.label { font-family: var(--fd); font-weight: 700; font-size: 1.6rem; line-height: 1.25; color: var(--wire); letter-spacing: .04em; }
.sec-title { font-family: var(--fd); font-weight: 700; font-size: 1.65rem; line-height: 1.2; color: var(--wire); letter-spacing: .04em; margin-bottom: 8px; }

.stamp {
  display: inline-block; font-family: var(--fd); font-weight: 700; font-size: 1.3rem; line-height: 1.5;
  color: var(--orange-text); border: 2.5px solid var(--accent2); padding: 0 14px;
  transform: rotate(-2deg); letter-spacing: .06em; background: rgba(18, 40, 71, .75);
}
.kicker {
  display: inline-block; background: var(--wire); color: var(--ink);
  font-family: var(--fd); font-weight: 700; font-size: 1.3rem; line-height: 1.5; padding: 0 16px; letter-spacing: .1em;
}

/* ---------- buttons ---------- */
.btn {
  min-height: 44px; padding: 6px 18px; border-radius: var(--radius);
  font-family: var(--fb); font-weight: 700; font-size: 15px; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; white-space: nowrap; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn.primary {
  background: var(--accent2); color: var(--on-accent); border: 2.5px solid var(--wire); box-shadow: 5px 5px 0 rgba(0, 0, 0, .35);
  font-family: var(--fd); font-size: 1.9rem; line-height: 1.1; letter-spacing: .05em; padding: 4px 26px 6px;
}
.btn.primary svg.i { width: 24px; height: 24px; stroke-width: 2.2; }
.btn.primary:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(0, 0, 0, .35); }
.btn.secondary { background: transparent; color: var(--wire); border: 1.5px solid var(--wire); }
.btn.secondary:hover { background: var(--wire); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: transparent; color: var(--muted); border: 2px dashed var(--wire-dash); box-shadow: none; cursor: not-allowed; transform: none;
}
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; font-size: 14px; padding: 4px 14px; gap: 7px; }
.btn.sm svg.i { width: 17px; height: 17px; }
.btn.link {
  min-height: 0; height: auto; padding: 4px 2px; border: 0; background: none; color: var(--orange-text); font-weight: 700; white-space: normal;
  text-decoration: underline; text-decoration-color: var(--accent2); text-decoration-style: dashed; text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.btn.link:hover { color: var(--wire); }

/* ---------- fields: paper on the drafting table ---------- */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; min-width: 0; }
.field > legend { padding: 0; margin-bottom: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.count { font-family: var(--flb); font-size: 13px; font-weight: 500; color: var(--muted); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.count.over { color: var(--danger-text); font-weight: 600; }
.input, .textarea, .select {
  width: 100%; background: var(--paper); color: var(--graphite);
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  font-size: 16px; line-height: 1.6;
}
.input, .select { height: 50px; padding: 0 14px; }
.textarea { min-height: 120px; padding: 12px 14px; resize: vertical; display: block; }
.textarea.big {
  min-height: 132px; font-size: 1.06rem; line-height: 1.75;
  background-image:
    linear-gradient(rgba(75, 127, 196, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 127, 196, .16) 1px, transparent 1px);
  background-size: 14px 14px;
}
.input::placeholder, .textarea::placeholder { color: #66625A; opacity: 1; }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.is-error { border-color: var(--danger) !important; outline: 2px solid var(--danger); outline-offset: 2px; }
.select-wrap { position: relative; }
.select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; cursor: pointer; }
.select option { color: var(--ctext); background: var(--card); }
.select-wrap svg.i { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--graphite); }
.help { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.help.err { color: var(--danger-text); font-weight: 500; }
.help svg.i { width: 18px; height: 18px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px;
  border: 1.5px dashed var(--wire-dash); border-radius: var(--radius); padding: 3px 12px;
  font-size: 14px; font-weight: 700; line-height: 1.4; background: transparent; color: var(--text); white-space: nowrap;
}
button.chip:hover, button.chip:focus-visible { border-color: var(--accent2); color: var(--orange-text); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent2); border: 1.5px solid var(--accent2); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.chip.tag { font-weight: 500; font-size: 13px; min-height: 28px; padding: 1px 10px; color: var(--muted); }
.chip svg.i { width: 16px; height: 16px; stroke-width: 2.5; }
.chip:disabled { cursor: default; }
.chip:disabled:not(.on) { opacity: .6; }
.chip:disabled:hover { border-color: var(--wire-dash); color: var(--text); }
.chip.on:disabled:hover { color: var(--on-accent); border-color: var(--accent2); }

/* ---------- sheets: the drawing paper that holds every block ---------- */
.card, .sheet {
  position: relative; background-color: var(--bg2); color: var(--text);
  border: 2.5px solid var(--wire); border-radius: var(--radius); box-shadow: 7px 7px 0 rgba(0, 0, 0, .35);
  padding: var(--pad-card);
  background-image:
    linear-gradient(rgba(234, 242, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 242, 255, .07) 1px, transparent 1px);
  background-size: 18px 18px;
}
.card::before, .sheet::before { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(234, 242, 255, .3); pointer-events: none; }
.card > *, .sheet > * { position: relative; z-index: 1; min-width: 0; }
.sep { border: 0; border-top: 1.5px dashed var(--wire-faint); }

/* ---------- the upgrade screen ---------- */
.up-grid { display: grid; gap: 26px; align-items: start; }
.up-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.up-head h1 { margin-top: 4px; }
.desk {
  position: relative; background: var(--deep); border: 2.5px solid var(--wire); box-shadow: var(--shadow);
  padding: 18px 16px 20px;
}
.desk::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(234, 242, 255, .2); pointer-events: none; }
.desk > * { position: relative; z-index: 1; }
.up-input form { display: flex; flex-direction: column; gap: 18px; }
.up-input .chips { margin-top: -4px; }

.targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.target {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center;
  min-height: 62px; padding: 9px 11px; cursor: pointer; text-align: start;
  border: 1.5px dashed var(--wire-dash); color: var(--text);
  transition: transform .15s ease;
}
.target input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.target .ic { grid-row: span 2; width: 26px; height: 26px; fill: none; stroke: var(--wire); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.target b { font-family: var(--flb); font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.target .k, .target > span:not(.tick) { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.target:hover { transform: translateY(-2px); border-color: var(--wire); }
.target.sel { background: var(--accent2); border: 1.5px solid var(--accent2); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.target.sel .ic { stroke: var(--on-accent); }
.target.sel .k, .target.sel > span:not(.tick) { color: var(--on-accent); }
.target .tick {
  position: absolute; top: -8px; inset-inline-end: -8px; width: 20px; height: 20px;
  background: var(--wire); color: var(--ink); border: 1.5px solid var(--ink); display: none; align-items: center; justify-content: center;
}
.target.sel .tick { display: flex; }
.target .tick svg.i { width: 13px; height: 13px; stroke-width: 3; }
.target:has(input:focus-visible) { outline: 2px solid var(--wire); outline-offset: 3px; }

.spec { font-size: 14px; line-height: 1.65; color: var(--text); border-inline-start: 3px solid var(--accent2); padding-inline-start: 10px; margin-top: -4px; }
.spec b { color: var(--orange-text); font-family: var(--flb); font-weight: 600; }
.go-hint { margin-top: -8px; text-align: center; }
.ts:empty { display: none; }
.ts { display: flex; justify-content: center; }
#go { font-size: 2.05rem; }

.up-out { min-width: 0; scroll-margin-top: 16px; }
.out-empty { display: none; }

/* loading: a measuring tape that keeps drawing */
.status-line { display: flex; flex-direction: column; gap: 14px; font-weight: 500; }
.bar { height: 10px; border-block: 1.5px solid var(--wire); background: repeating-linear-gradient(90deg, var(--wire-faint) 0 1.5px, transparent 1.5px 12px); overflow: hidden; position: relative; }
.bar::after {
  content: ""; position: absolute; inset-block: 2px; width: 34%; background: var(--accent2);
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { inset-inline-start: -34%; } 100% { inset-inline-start: 100%; } }

/* alerts: error, not connected, privacy */
.alert {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  background: var(--deep); color: var(--text); border: 2px solid var(--danger); box-shadow: var(--shadow-sm); padding: 16px 16px;
}
.alert > svg.i { color: var(--danger-text); margin-top: 4px; }
.alert .alert-body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; }
.alert p { font-weight: 500; }
.alert.info { border: 2px dashed var(--wire); }
.alert.info > svg.i { color: var(--orange-text); }

.limit-card { display: flex; flex-direction: column; gap: 12px; }
.limit-card p { font-family: var(--fd); font-weight: 700; font-size: 2rem; line-height: 1.2; color: var(--wire); letter-spacing: .03em; }
.limit-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* result sheet */
.result { display: flex; flex-direction: column; gap: 16px; }
.result:focus { outline: none; }
.result:focus-visible { outline: 2px solid var(--wire); outline-offset: 4px; }
.res-head { font-family: var(--fd); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--wire); letter-spacing: .04em; }
.res-head span { color: var(--orange-text); font-size: 1.9rem; }
.understood { color: var(--text); }
.understood b { font-weight: 700; color: var(--orange-text); }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.block-title { font-family: var(--fd); font-weight: 700; font-size: 1.55rem; line-height: 1.2; color: var(--wire); letter-spacing: .04em; }

/* a prompt is drawn as a dimensioned block: a measured line runs along its start edge */
.prompt {
  position: relative; background: rgba(15, 36, 64, .72); color: var(--wire);
  border-block: 1.5px solid rgba(234, 242, 255, .55); padding: 12px 14px; padding-inline-start: 32px;
  font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}
.prompt::before {
  content: ""; position: absolute; inset-block: 10px; inset-inline-start: 12px; width: 9px;
  border-block: 1.5px solid var(--wire); background: linear-gradient(var(--wire), var(--wire)) center / 1.5px 100% no-repeat;
  pointer-events: none;
}
.prompt::after {
  content: ""; position: absolute; top: 50%; inset-inline-start: 13.5px; width: 7px; height: 7px; margin-top: -3.5px;
  background: var(--accent2); pointer-events: none;
}
.prompt[lang="en"] { font-family: var(--flb); direction: ltr; text-align: left; unicode-bidi: isolate; }
.prompt[contenteditable] { cursor: text; }
.prompt[contenteditable]:hover { background: rgba(15, 36, 64, .92); }
.prompt[contenteditable]:focus { outline: 2px solid var(--accent2); outline-offset: 3px; }
.tok { background: rgba(240, 122, 51, .18); color: var(--orange-text); border-bottom: 1.5px dashed var(--accent2); padding: 0 3px; font-weight: 600; }
.nw { white-space: nowrap; }
.edit-hint { margin-top: -8px; }
.note { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); }
.note svg.i { width: 18px; height: 18px; color: var(--orange-text); }
.dots li { position: relative; padding-inline-start: 18px; font-size: 15px; line-height: 1.65; }
.dots li + li { margin-top: 6px; }
.dots li::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; width: 7px; height: 7px; background: var(--accent2); }
.dots li b { font-weight: 700; color: var(--wire); }
.notes { counter-reset: n; display: grid; gap: 9px; }
.notes li { counter-increment: n; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.notes li::before {
  content: counter(n); width: 23px; height: 23px; border: 1.5px solid var(--wire); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--flb); font-size: 12px; font-weight: 600; color: var(--wire); margin-top: 1px;
}
.notes li b { font-weight: 700; color: var(--orange-text); }
.fill li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 15px; line-height: 1.55; }
.fill li + li { margin-top: 8px; }
.fill .tok { font-family: var(--flb); font-size: 14px; direction: ltr; unicode-bidi: isolate; }
.fill .tok[lang="he"] { font-family: var(--fb); direction: rtl; }
.two { display: grid; gap: 18px; }
.qs { display: flex; flex-direction: column; gap: 12px; border-top: 1.5px dashed var(--wire-faint); padding-top: 14px; }
.q-grid { display: grid; gap: 14px; }
.q { display: flex; flex-direction: column; gap: 8px; }
.q label { font-size: 15px; line-height: 1.55; }
.res-foot { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1.5px dashed var(--wire-faint); }
.fb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--text); }
.refine-status { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }

/* title block, like the corner of a technical drawing */
.tb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5px; background: rgba(234, 242, 255, .6); border: 2px solid var(--wire); }
.tb > div { background: var(--bg2); padding: 7px 10px; min-width: 0; }
.tb dt { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.tb dd { font-size: 14.5px; font-weight: 500; color: var(--wire); line-height: 1.45; overflow-wrap: anywhere; }
.tb .big dd { font-family: var(--fld); font-size: 1.5rem; font-weight: 700; line-height: 1.1; }

.toast {
  position: fixed; z-index: 40; inset-inline: 16px; bottom: 16px; margin: 0 auto; max-width: 420px;
  display: flex; gap: 8px; align-items: center; justify-content: center;
  background: var(--deep); color: var(--ok-text); border: 2px solid var(--ok); box-shadow: var(--shadow-sm);
  padding: 11px 18px; font-weight: 700; font-size: 15px;
}
.toast svg.i { stroke-width: 2.5; }
.toast.info { color: var(--wire); border-color: var(--wire); }

dialog.confirm {
  border: 2.5px solid var(--wire); border-radius: var(--radius); background: var(--bg2); color: var(--text); box-shadow: 7px 7px 0 rgba(0, 0, 0, .45);
  padding: 22px; width: min(92vw, 440px); margin: auto;
}
dialog.confirm::backdrop { background: rgba(15, 36, 64, .78); }
dialog.confirm h2 { font-size: 2.1rem; margin-bottom: 6px; }
dialog.confirm p { color: var(--text); margin-bottom: 18px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dlg-actions .btn { flex: 1 1 150px; }
.dlg-actions .btn.primary { font-size: 1.6rem; }

/* ---------- empty state: the line drawing (desktop) ---------- */
.drawing svg { width: 100%; height: auto; display: block; overflow: visible; }
.drawing .w { fill: none; stroke: var(--wire); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drawing .thin { stroke-width: 1.1; opacity: .75; }
.drawing .cl { fill: none; stroke: var(--wire); stroke-width: 1; opacity: .5; stroke-dasharray: 14 5 3 5; }
.drawing .hid { fill: none; stroke: var(--wire); stroke-width: 1.1; opacity: .6; stroke-dasharray: 5 4; }
.drawing .or { fill: none; stroke: var(--accent2); stroke-width: 2; stroke-linecap: round; }
.drawing .ray { fill: none; stroke: var(--accent2); stroke-width: 1.3; stroke-dasharray: 6 5; opacity: .9; }
.drawing .dot { fill: var(--accent2); }
.drawing text { font-family: var(--fd); font-weight: 700; font-size: 21px; fill: var(--orange-text); }
.empty-cap { border: 1.5px dashed var(--wire-dash); padding: 12px 16px; margin-top: 18px; background: rgba(15, 36, 64, .6); }
.empty-cap b { display: block; font-family: var(--fd); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--wire); letter-spacing: .04em; }
.empty-cap p { color: var(--muted); font-size: 14.5px; }

/* ---------- before and after: from sketch to blueprint ---------- */
.ba { margin-top: 48px; }
.sechead { text-align: center; margin-bottom: 22px; }
.sechead h2 { margin-top: 8px; }
.sechead p { color: var(--muted); font-size: .97rem; max-width: 36em; margin: 6px auto 0; }
.ba-more { text-align: center; margin-top: 22px; }

.ex-sheet { display: grid; gap: 24px; padding: 24px 16px 18px; }
.sketch {
  position: relative; background: var(--paper); color: var(--graphite);
  padding: 18px 20px 22px; transform: rotate(-1.6deg); box-shadow: 4px 5px 0 rgba(0, 0, 0, .3); margin: 8px 6px 0;
}
.sketch::before, .sketch::after { content: ""; position: absolute; top: -10px; width: 60px; height: 18px; background: rgba(236, 229, 205, .82); border: 1px solid rgba(0, 0, 0, .08); }
.sketch::before { inset-inline-start: 18px; transform: rotate(-6deg); }
.sketch::after { inset-inline-end: 18px; transform: rotate(5deg); }
.sketch .rough { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); pointer-events: none; overflow: visible; }
.sketch .rough path { fill: none; stroke: #5A5A5A; stroke-width: 1.2; opacity: .55; vector-effect: non-scaling-stroke; }
.tag { position: relative; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .03em; color: #3D3D3D; }
.tag svg.i { width: 16px; height: 16px; }
.sketch .before-text, .sketch > p {
  position: relative; font-family: var(--fd); font-weight: 700; font-size: 2.1rem; line-height: 1.2; color: #333333; margin-top: 8px; overflow-wrap: anywhere;
}
.sketch [lang="en"] { font-family: var(--fld); font-size: .9em; }
.sketch .scrib { position: relative; display: block; width: 72%; height: 10px; margin-top: 6px; }
.sketch .scrib path { fill: none; stroke: #6A6A6A; stroke-width: 1.4; stroke-linecap: round; opacity: .7; }

.draw { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dhead h3, .dhead .dt { font-family: var(--fd); font-weight: 700; font-size: 1.65rem; line-height: 1.25; color: var(--wire); letter-spacing: .04em; }
.dhead [lang="en"] { color: var(--orange-text); font-size: 1.12em; }
.neg-title { font-family: var(--fd); font-weight: 700; font-size: 1.45rem; line-height: 1.2; color: var(--wire); letter-spacing: .04em; }

.dims { border-block: 1.5px solid rgba(234, 242, 255, .55); }
.dim { display: grid; grid-template-columns: 6.1rem 22px minmax(0, 1fr); column-gap: 10px; padding: 8px 0; }
.dim + .dim { border-top: 1px dashed var(--wire-faint); }
.dim .lab { align-self: center; font-family: var(--fd); font-weight: 700; font-size: 1.5rem; line-height: 1.05; color: var(--orange-text); }
.dim .lab small { display: block; font-family: var(--flb); font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .1em; margin-bottom: 2px; }
.dim .dl { position: relative; }
.dim .dl::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 50%; border-left: 1.5px solid var(--wire); }
.dim .dl::after { content: ""; position: absolute; top: 5px; bottom: 5px; left: calc(50% - 6px); width: 13px; border-top: 1.5px solid var(--wire); border-bottom: 1.5px solid var(--wire); }
.dim .dl i { position: absolute; top: 50%; right: -10px; width: calc(50% + 10px); border-top: 1.5px dashed var(--accent2); }
.dim .dl i::after { content: ""; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; background: var(--accent2); }
.dim .tx { align-self: center; direction: ltr; text-align: left; font-family: var(--flb); font-size: .95rem; line-height: 1.62; color: var(--wire); overflow-wrap: anywhere; }
.fillnote { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text); }
.fillnote svg.i { width: 18px; height: 18px; color: var(--orange-text); margin-top: 3px; }

.render figure, .ex-media { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.frame, .ex-media .frame {
  position: relative; border: 2.5px solid var(--wire); box-shadow: var(--shadow); background: var(--deep);
  max-width: 380px; width: 100%; margin-inline: auto; border-radius: var(--radius); overflow: hidden;
}
.frame::after { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(253, 253, 248, .65); pointer-events: none; z-index: 2; }
.frame.wide { max-width: 560px; }
.frame img, .frame video { display: block; width: 100%; height: auto; }
.ill { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; font-size: 12px; font-weight: 700; line-height: 1.4; padding: 2px 9px; background: var(--ink); color: var(--on-ink); font-family: var(--fb); }
.render figcaption { font-size: 13.5px; color: var(--muted); text-align: center; }
.render figcaption b { color: var(--wire); font-weight: 500; }
.lat { unicode-bidi: isolate; font-family: var(--flb); }
.ex-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; text-align: center; }
.ex-cap .small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 1px 10px; border: 1.5px solid var(--wire); color: var(--wire); }
.badge.result { background: var(--wire); color: var(--ink); font-family: var(--fb); }
.vid-btn {
  position: absolute; inset-inline-start: 14px; bottom: 14px; z-index: 3;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--deep); color: var(--wire); border: 2px solid var(--wire); box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
}
.vid-btn:hover { background: var(--accent2); color: var(--on-accent); }
.vid-btn svg.i { width: 18px; height: 18px; stroke-width: 2.5; }
.ex-aside {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1.5px dashed var(--wire-dash); padding: 12px 14px; background: rgba(15, 36, 64, .6);
  font-size: 14px; line-height: 1.6; color: var(--text);
}
.ex-aside svg.i { color: var(--orange-text); margin-top: 2px; width: 18px; height: 18px; }
.ex-aside a, .fn a {
  color: var(--orange-text); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--accent2); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.notes-block h3, .notes-block .sec-title { margin-bottom: 8px; }

/* ---------- examples ---------- */
.ex-top { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seg .chip {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; justify-content: start;
  min-height: 52px; padding: 7px 11px; font-family: var(--flb); font-weight: 600; font-size: 15px; text-align: start;
}
.seg .chip svg.i { width: 24px; height: 24px; stroke-width: 1.6; }
.seg .chip.on { color: var(--on-accent); }
.ex-list { display: grid; gap: 34px; }
.ex.ex-sheet { gap: 22px; }
#try { align-self: flex-start; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* guide: how each tool reads a prompt */
.guide { margin-top: 52px !important; padding-top: 36px; border-top: 2px dashed var(--wire-dash); display: flex; flex-direction: column; gap: 16px; }
.guide > .kicker { align-self: flex-start; }
.guide-grid { display: grid; gap: 22px; }
.guide-card { display: flex; flex-direction: column; gap: 14px; }
.guide-card.on { border-color: var(--accent2); box-shadow: 7px 7px 0 rgba(240, 122, 51, .35); }
.guide-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guide-head h3 { font-family: var(--fld); font-size: 2rem; line-height: 1.1; letter-spacing: 0; }
.ib { width: 38px; height: 38px; border: 1.5px dashed var(--wire-dash); display: flex; align-items: center; justify-content: center; flex: none; color: var(--wire); }
.guide-card.on .ib { background: var(--accent2); border: 1.5px solid var(--accent2); color: var(--on-accent); }
.on-tag { display: none; font-size: 12.5px; font-weight: 700; color: var(--orange-text); border: 1.5px solid var(--accent2); padding: 0 8px; }
.guide-card.on .on-tag { display: inline-block; }
.rules { counter-reset: rule; display: flex; flex-direction: column; gap: 10px; }
.rules li { counter-increment: rule; position: relative; padding-inline-start: 36px; font-size: 15px; line-height: 1.65; }
.rules li::before {
  content: counter(rule); position: absolute; inset-inline-start: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--wire); color: var(--wire);
  font-family: var(--flb); font-size: 12px; font-weight: 600; line-height: 21px; text-align: center;
}
code { font-family: var(--flb); font-size: .92em; background: rgba(15, 36, 64, .8); color: var(--orange-text); border: 1px solid var(--wire-faint); padding: 0 5px; unicode-bidi: isolate; white-space: nowrap; }
.fn { font-size: 13px; line-height: 1.6; color: var(--muted); padding-top: 10px; border-top: 1.5px dashed var(--wire-faint); margin-top: auto; overflow-wrap: anywhere; }

/* ---------- about ---------- */
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.person { display: flex; gap: 16px; align-items: center; }
.portrait {
  flex: none; width: 128px; height: 128px; object-fit: cover; object-position: 50% 50%;
  border-radius: 20px; background: var(--deep); border: 2.5px solid var(--wire); box-shadow: var(--shadow-sm);
}
.person .small { margin-top: 2px; }
.svc li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.svc li + li { margin-top: 10px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form .label { font-size: 1.5rem; }
.ok-msg {
  display: flex; gap: 10px; align-items: center; background: var(--deep); color: var(--ok-text);
  border: 2px solid var(--ok); padding: 16px 18px; font-weight: 700;
}
.how > * + *, .bio > * + * { margin-top: 14px; }
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 42px; font-size: 16px; line-height: 1.7; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0;
  width: 30px; height: 30px; border: 1.5px dashed var(--wire); background: var(--deep); color: var(--wire);
  font-family: var(--flb); font-size: 14px; font-weight: 600; line-height: 27px; text-align: center;
}
.steps b { font-weight: 700; color: var(--wire); }
.privacy p { font-weight: 400; }
.privacy p b { font-weight: 700; color: var(--wire); }
.facts li { font-size: 16px; }
.about-side { min-width: 0; }

/* ---------- terms ---------- */
.terms { display: flex; flex-direction: column; }
.terms section + section { border-top: 1.5px dashed var(--wire-faint); margin-top: 16px; padding-top: 16px; }
.terms h2 { font-size: 2rem; margin-bottom: 2px; }
.terms p { font-size: 16px; }

/* ---------- 404 ---------- */
.lost { display: grid; gap: 22px; align-items: center; }
.lost .drawing { max-width: 280px; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .bar::after { width: 100%; opacity: .35; inset-inline-start: 0; }
}

/* ============ Desktop (one block) ============ */
@media (min-width: 1024px) {
  :root { --gutter: 48px; --pad-card: 26px; }
  .top-in { min-height: 70px; padding: 10px var(--gutter); }
  .logo-box { width: 34px; height: 34px; }
  .logo-box svg { width: 19px; height: 19px; }
  .word { font-size: 1.85rem; }
  .word small { display: inline; font-size: 12.5px; margin-top: 0; margin-inline-start: 7px; }
  .nav { gap: 8px; }
  .nav a { font-size: 15px; padding: 5px 14px; }
  .page-in { padding-top: 48px; padding-bottom: 64px; }
  .foot .by { font-size: 1.5rem; }

  .up-grid {
    grid-template-columns: minmax(0, 1fr) 500px;
    grid-template-areas: "head form" "out form";
    grid-template-rows: auto 1fr;
    column-gap: 56px; row-gap: 26px;
  }
  .up-head { grid-area: head; }
  .up-input { grid-area: form; }
  .up-out { grid-area: out; }
  .desk { padding: 24px 24px 24px; }
  .out-empty { display: block; max-width: 460px; }
  .textarea.big { min-height: 150px; }
  .q-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .two { grid-template-columns: 1fr 1fr; gap: 24px; }
  .res-foot { flex-direction: row; justify-content: space-between; align-items: center; }
  .res-foot .btn { min-width: 220px; }
  .tb { grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); }
  .result .tb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prompt { font-size: 15.5px; }

  .ba { margin-top: 72px; }
  .ex-sheet {
    grid-template-columns: 270px minmax(0, 1fr) 290px;
    grid-template-areas: "sketch draw render" "notes draw render" "tb tb tb";
    gap: 26px 30px; padding: 34px 30px 26px; align-items: start;
  }
  .ex-sheet.wide-media { grid-template-columns: 260px minmax(0, 1fr) 360px; }
  .ex-sheet.no-media { grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "sketch draw" "notes draw" "tb tb"; }
  .ex-sheet .sketch { grid-area: sketch; }
  .ex-sheet .draw { grid-area: draw; }
  .ex-sheet .render { grid-area: render; }
  .ex-sheet .notes-block { grid-area: notes; }
  .ex-sheet .tb { grid-area: tb; }
  .sketch .before-text, .sketch > p { font-size: 2rem; }
  .frame.wide { max-width: none; }

  .seg { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 820px; }
  .ex-list { gap: 44px; }
  .guide-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  .about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; align-items: start; }
  .portrait { width: 160px; height: 160px; border-radius: 24px; }
  .lost { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .lost .drawing { max-width: 300px; }
}
