/*! pmtools.site — © Ahmed Youssef (ahmedyoussef.tech). All rights reserved. */
/* Inter (SIL Open Font License), self-hosted so no visitor data goes to Google Fonts */
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f0f0ec;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --border: #e2e2dc;
  --accent: #3d5afe;
  --accent-ink: #ffffff;
  --accent-soft: #e8ecff;
  --danger: #c62828;
  --line: #c9c9c2;
  --outcome: #6d28d9;   --outcome-soft: #f1eafd;
  --opp: #1d64d8;       --opp-soft: #e7f0fd;
  --sol: #16803c;       --sol-soft: #e6f5ec;
  --asm: #b45309;       --asm-soft: #fdf1e3;
  --ok: #16803c; --ok-soft: #e6f5ec;
  --warn: #b45309; --warn-soft: #fdf1e3;
  --bad: #c62828; --bad-soft: #fdeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b6b66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1b1b1a; --surface-2: #242422; --text: #ececea; --muted: #a0a09a;
    --border: #2f2f2c; --accent: #7b8cff; --accent-ink: #0d0d0c; --accent-soft: #232846; --danger: #ef6b6b; --line: #4a4a46;
    --outcome: #b794f6; --outcome-soft: #2a2140; --opp: #6ea8ff; --opp-soft: #1b2a40; --sol: #5fd08a; --sol-soft: #17301f;
    --asm: #f0a95a; --asm-soft: #35261a; --ok: #5fd08a; --ok-soft: #17301f; --warn: #f0a95a; --warn-soft: #35261a; --bad: #ef6b6b; --bad-soft: #3a1c1c;
    --shadow: none; color-scheme: dark;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23a0a09a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1b1b1a; --surface-2: #242422; --text: #ececea; --muted: #a0a09a;
  --border: #2f2f2c; --accent: #7b8cff; --accent-ink: #0d0d0c; --accent-soft: #232846; --danger: #ef6b6b; --line: #4a4a46;
  --outcome: #b794f6; --outcome-soft: #2a2140; --opp: #6ea8ff; --opp-soft: #1b2a40; --sol: #5fd08a; --sol-soft: #17301f;
  --asm: #f0a95a; --asm-soft: #35261a; --ok: #5fd08a; --ok-soft: #17301f; --warn: #f0a95a; --warn-soft: #35261a; --bad: #ef6b6b; --bad-soft: #3a1c1c;
  --shadow: none; color-scheme: dark;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23a0a09a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin-top: 1.6em; }
h3 { font-size: 1.05rem; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1em 0 .3em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 48px; outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.logo svg { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .8rem; padding: 6px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.btn.menu-btn { display: none; }
@media (max-width: 900px) {
  .btn.menu-btn { display: inline-flex; order: 3; }
  .header-tools { order: 2; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: .85rem; }
.footer-inner { padding-top: 20px; padding-bottom: 20px; }
.footer-inner p { margin: 0 0 4px; }

/* ---------- generic ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 760px; }
.page-head { padding: 32px 0 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: .9rem; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: .8rem; }
.btn.icon { padding: 6px 10px; min-width: 36px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status-validated { background: var(--ok-soft); color: var(--ok); }
.status-testing { background: var(--warn-soft); color: var(--warn); }
.status-invalidated { background: var(--bad-soft); color: var(--bad); }
.notice { background: var(--warn-soft); color: var(--text); border-left: 3px solid var(--warn); padding: 10px 12px; border-radius: 6px; font-size: .9rem; }
.empty { text-align: center; padding: 32px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field-label { font-size: .82rem; font-weight: 600; }
.field-hint { font-size: .8rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
/* Native selects render differently per browser/OS; draw our own chevron so they match the inputs */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 32px; text-overflow: ellipsis;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
}
select:hover:not(:focus) { border-color: var(--line); }
select option { background: var(--surface); color: var(--text); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.inline { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; }
.inline select, .inline input { width: auto; }
input.short { width: 140px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
/* Once the toolbar wraps, the spacer would strand a lone button on the right */
@media (max-width: 700px) { .toolbar .spacer { display: none; } }

.about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0 16px; }
.about summary { cursor: pointer; padding: 14px 20px; font-weight: 600; }
.about-body { padding: 0 20px 16px; max-width: 900px; }
.about-body li { margin-bottom: 6px; }
.source { font-size: .8rem; color: var(--muted); font-style: italic; }

.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; display: flex; align-items: baseline; gap: 8px; }
.stat strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }

#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .9rem; transition: .2s; z-index: 20; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- home ---------- */
.hero { padding: 56px 0 24px; max-width: 820px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.hero .row { margin-top: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card { text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; display: flex; flex-direction: column; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card p:not(.eyebrow) { color: var(--muted); flex: 1; }
.tool-card .link { color: var(--accent); font-weight: 600; font-size: .9rem; }
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.flow-steps li { display: flex; gap: 12px; }
.flow-steps p { color: var(--muted); font-size: .9rem; }
.flow-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.privacy { margin-top: 32px; font-size: .9rem; color: var(--muted); }

/* ---------- OST ---------- */
.ost-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ost-layout { grid-template-columns: 1fr; } }
/* Canvas only scrolls sideways; a nested vertical scroller traps trackpad and touch gestures */
.canvas { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding: 24px 12px; min-height: 420px; background-color: var(--surface);
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; }
@media (min-width: 901px) { .editor { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; } }
.editor .eyebrow.type-outcome { color: var(--outcome); }
.editor .eyebrow.type-opportunity { color: var(--opp); }
.editor .eyebrow.type-solution { color: var(--sol); }
.editor .eyebrow.type-assumption { color: var(--asm); }

.tree { display: inline-block; min-width: 100%; text-align: center; }
.tree ul { position: relative; display: flex; justify-content: center; padding: 20px 0 0; margin: 0; }
.tree > ul { padding-top: 0; }
.tree li { position: relative; list-style: none; padding: 20px 6px 0; display: flex; flex-direction: column; align-items: center; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 2px solid var(--line); }
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 20px; border-left: 2px solid var(--line); }
.tree > ul > li { padding-top: 0; }
.tree > ul > li::before, .tree > ul > li::after { display: none; }

.node {
  width: 200px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.node:hover { transform: translateY(-1px); }
.node.selected { box-shadow: 0 0 0 3px var(--accent); }
.node-outcome { --c: var(--outcome); background: var(--outcome-soft); width: 240px; }
.node-opportunity { --c: var(--opp); }
.node-solution { --c: var(--sol); }
.node-assumption { --c: var(--asm); }
.node.is-target { background: var(--opp-soft); }
.node-type { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.node-type .star { color: var(--warn); }
.node-title { font-size: .88rem; font-weight: 500; margin: 4px 0; overflow-wrap: anywhere; }
.node-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.node-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.mini { font: inherit; font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.mini:hover { color: var(--accent); border-color: var(--accent); }
.tips { margin-top: 16px; }
.tips h2 { margin-top: 0; }

/* ---------- Interviews ---------- */
.cadence-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.cadence h2 { margin-top: 0; }
.bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; height: 140px; align-items: end; margin-top: 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar { width: 100%; max-width: 40px; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar.empty { background: var(--border); }
.bar-val { font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-label { font-size: .7rem; color: var(--muted); text-align: center; line-height: 1.2; }
.iv-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .iv-layout { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid h2 { margin-top: 0; }
.span2 { grid-column: 1 / -1; }
.snapshots { display: flex; flex-direction: column; gap: 12px; }
.snapshot header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.snapshot h3 { margin: 0; }
.snapshot blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-style: italic; }
.opp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.opp-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--opp-soft); border-radius: 8px; }

/* ---------- CIRCLES ---------- */
.stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.step {
  font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 10px; padding: 10px 6px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; text-align: center;
}
.step-letter { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.step-name { font-size: .7rem; line-height: 1.2; }
.step.done { color: var(--ok); border-color: var(--ok); }
.step.done::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: .7rem; }
.step.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 700px) { .step-name { display: none; } }
.step-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.step-head h2 { margin: 0; }
.step-badge { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 1.6rem; font-weight: 700; display: grid; place-items: center; }
.questions { background: var(--surface-2); border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; }
.questions summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.questions ul { margin: 8px 0 0; padding-left: 20px; font-size: .9rem; }
.step-body { max-width: 900px; }
.step-nav { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.item-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.item { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg); }
.item.chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.story-grid { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 0 12px; }
@media (max-width: 700px) { .item-grid, .story-grid, .form-grid { grid-template-columns: 1fr; } }
.item-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-title h3 { margin: 0; }
.focus-box { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.summary { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 16px; font: .85rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }

/* ---------- tables / RICE ---------- */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr.chosen td { background: var(--accent-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table select { width: auto; min-width: 120px; }
.rice-table { min-width: 900px; }
.name-cell { min-width: 220px; }
.name-cell input { margin-bottom: 4px; }
.notes-input { font-size: .8rem !important; padding: 4px 8px !important; color: var(--muted) !important; }
.num-input { width: 90px !important; text-align: right; }
.score-cell { min-width: 140px; }
.score-cell strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.score-bar { height: 6px; background: var(--surface-2); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.formula { margin-bottom: 16px; }
.formula-eq { font-size: clamp(1rem, 2.5vw, 1.35rem); font-weight: 700; margin-bottom: 12px; }
.formula-eq .f-div { color: var(--muted); }
.f-r { color: var(--opp); } .f-i { color: var(--outcome); } .f-c { color: var(--sol); } .f-e { color: var(--asm); }
.scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; font-size: .85rem; }
.scales dt { font-weight: 700; }
.scales dd { margin: 0; color: var(--muted); }
.add-form h2 { margin-top: 0; }
.add-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.3fr 1fr auto; gap: 12px; align-items: start; }
/* Line up with the inputs: skip the field label (.82rem × 1.55 + 4px gap), match input height (15px × 1.55 + padding + border) */
.add-btn { margin-top: calc(.82rem * 1.55 + 4px); min-height: calc(15px * 1.55 + 18px); }
@media (max-width: 1000px) { .add-grid { grid-template-columns: 1fr 1fr; } .add-grid > :first-child { grid-column: 1 / -1; } .add-btn { margin-top: 0; } }
@media (max-width: 520px) { .add-grid { grid-template-columns: 1fr; } }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .toolbar, .about, .editor, .tips, .add-form, .node-actions, .stepper, .step-nav { display: none !important; }
  body { background: #fff; }
  .ost-layout { display: block; }
  .canvas { max-height: none; overflow: visible; border: 0; background: none; }
  .card { box-shadow: none; }
}

/* ---------- accounts ---------- */
.account-btn { position: relative; }
.account-btn:disabled { opacity: .5; cursor: default; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; display: none; flex: none; }
.account-btn[data-status] .sync-dot, .sync-status .sync-dot { display: inline-block; }
[data-status="saved"] .sync-dot, .sync-status[data-status="saved"] .sync-dot { background: var(--ok); }
[data-status="saving"] .sync-dot, .sync-status[data-status="saving"] .sync-dot { background: var(--warn); }
[data-status="error"] .sync-dot, .sync-status[data-status="error"] .sync-dot { background: var(--bad); }
.account-btn[data-status=""] .sync-dot { display: none; }
@media (max-width: 520px) { .account-label { display: none; } .header-inner { gap: 8px; } }
@media (max-width: 400px) {
  .header-tools { gap: 4px; }
  .lang button { padding: 6px 8px; }
  .account-btn { padding: 6px 10px; }
}

.modal { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.modal::backdrop { background: rgba(0,0,0,.45); }
.modal-body { padding: 20px 24px 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.modal-head h2, .modal-body > h2 { margin: 0; font-size: 1.2rem; }
.modal-body > h2 { margin-bottom: 8px; }
.modal-head .btn.icon { border-color: transparent; }
.modal form { margin-top: 12px; }
.modal .row { margin-top: 12px; }
.modal-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: .85rem; color: var(--muted); }
.btn.block { width: 100%; margin-top: 4px; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.form-error { color: var(--danger); font-size: .85rem; margin: 10px 0 0; min-height: 0; }
.form-error:empty { display: none; }
.account-email { font-weight: 600; margin: 8px 0 4px; overflow-wrap: anywhere; }
.sync-status { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }

/* ---------- legal ---------- */
.legal { max-width: 820px; }
.legal h2 { margin-top: 1.2em; }
.legal section:first-child h2 { margin-top: 0; }
