/* Qalamgard — the writing tool at /qalamgard/ (Brand Book v1.0 tokens).
   Layout: one narrow writing column under a slim top bar; decisions rise as sheets from the bottom edge on phones. */
@font-face { font-family: "Darker Grotesque"; src: url("/fonts/DarkerGrotesque-VF.woff") format("woff"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Noora"; src: url("/fonts/Noora-VF.woff") format("woff"); font-weight: 200 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+00AB, U+00BB, U+2026; }
@font-face { font-family: "DG in RTL"; src: url("/fonts/DarkerGrotesque-VF.woff") format("woff"); font-weight: 300 900; font-display: swap; size-adjust: 118%; }
:root {
  --ink: #2B2D42; --slate: #8D99AE; --cloud: #EDF2F4; --root: #D90429; --signal: #EF233C;
  --line: rgba(43,45,66,.14); --line-strong: rgba(43,45,66,.32); --line-d: rgba(237,242,244,.14);
  --muted: rgba(43,45,66,.68); --muted-d: rgba(237,242,244,.66);
  --rtl: "Noora", "DG in RTL", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --latin: "Darker Grotesque", "Noora", ui-sans-serif, system-ui, sans-serif;
  --font: var(--rtl);
  --ease: cubic-bezier(.65,0,.35,1); --ease-out: cubic-bezier(.22,1,.36,1);
  --gutter: clamp(16px, 4.4vw, 48px); --col: min(820px, 100% - 2 * var(--gutter));
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 88%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; background: var(--cloud); }
html[dir="ltr"] { font-size: 100%; --font: var(--latin); }
body { margin: 0; background: var(--cloud); color: var(--ink); font-family: var(--font); font-size: clamp(1.18rem, 1.28vw, 1.32rem); font-weight: 400; line-height: 1.85; overflow-x: clip; }
html[dir="ltr"] body { font-size: clamp(1.22rem, 1.36vw, 1.4rem); font-weight: 500; line-height: 1.5; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
/* coming from the site's pages and going back to them: the same soft cross-fade those pages have among themselves */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
:focus-visible { outline: 2px solid var(--root); outline-offset: 3px; border-radius: 4px; }
.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; }
[lang="en"] { font-family: var(--latin); }
[lang="fa"], [lang="ar"] { font-family: var(--rtl); }

/* top strip: back to the site, page language */
.notice { margin: 0; background: var(--ink); color: var(--cloud); font-size: .9rem; font-weight: 500; text-align: center; padding: 7px 16px 8px; line-height: 1.6; }
.strip { width: var(--col); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.strip a { font-family: var(--latin); font-size: 1.06rem; direction: ltr; padding: 4px 0; }
.strip a:hover { color: var(--ink); }
.uilang { display: flex; gap: 2px; }
.uilang button { min-width: 36px; height: 30px; padding: 0 8px 1px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 650; font-size: .9rem; }
.uilang button:hover { color: var(--ink); }
.uilang button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.bar { width: var(--col); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 8px 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 0; font-weight: 700; font-size: 1.55rem; line-height: 1.4; }
.brand i { width: 12px; height: 12px; background: var(--root); transform: rotate(45deg); border-radius: 3px; flex: none; }
.brand[lang="en"] { font-size: 1.85rem; font-weight: 800; line-height: 1.2; }
.bar nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.brand { flex: none; }
.link { border: 0; background: none; height: 40px; padding: 0 12px 2px; border-radius: 999px; font-weight: 650; font-size: 1rem; transition: background-color .2s var(--ease); }
.link:hover { background: var(--line); }
.link[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.link.new { display: inline-flex; align-items: center; gap: 6px; }
.link.new .plus { font-family: var(--latin); font-size: 1.9rem; font-weight: 500; line-height: 1; padding-bottom: 3px; }
#nav-acct { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-acct.handle { direction: ltr; font-family: var(--latin); font-size: 1.2rem; }
main { width: var(--col); margin-inline: auto; }
#v-notes { padding-bottom: 56px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px 2px; border-radius: 999px; border: 0; font-weight: 700; font-size: 1.06rem; white-space: nowrap; transition: transform .25s var(--ease-out), background-color .25s var(--ease-out), color .25s var(--ease-out); }
.btn:active { transform: scale(.96); }
.btn-ink { background: var(--ink); color: var(--cloud); }
.btn-ink:hover:not(:disabled) { background: var(--root); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--cloud); box-shadow: none; }
.btn.sm { min-height: 40px; padding-inline: 18px; font-size: .98rem; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px 2px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: .98rem; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--cloud); }
.seg svg, .tag svg { width: 15px; height: 15px; flex: none; }
.pick { display: inline-flex; align-items: center; gap: 8px; height: 46px; max-width: 100%; padding: 0 16px 2px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 650; font-size: .98rem; white-space: nowrap; }
.pick b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.pick i { width: 8px; height: 8px; background: var(--signal); transform: rotate(45deg); border-radius: 2px; flex: none; }

/* editor */
.langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 14px; }
.langs button { height: 36px; padding: 0 14px 2px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 650; font-size: .96rem; }
.langs button[aria-selected="true"] { background: var(--ink); color: var(--cloud); box-shadow: none; }
.langs .add { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); font-family: var(--font); }
.langs .add:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.langs .gap { flex: 1 1 0; }
.langs .text { padding-inline: 6px; color: var(--muted); box-shadow: none; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; font-family: var(--font); }
.langs .text:hover { color: var(--root); }
.paper { padding-top: 10px; font-family: var(--rtl); }
.title-in, .body-in { display: block; width: 100%; border: 0; background: transparent; outline: none; border-radius: 0; font-family: inherit; }
.title-in { padding: 8px 0 4px; font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 300; line-height: 1.45; }
.body-in { min-height: 38vh; min-height: max(240px, calc(100dvh - 366px)); padding: 8px 0 28px; resize: none; overflow: hidden; font-size: clamp(1.22rem, 1.5vw, 1.4rem); font-weight: 400; line-height: 2; }
html[dir="rtl"] .paper .title-in { font-size: clamp(2.1rem, 5.1vw, 3.35rem); }
html[dir="ltr"] .paper .body-in { font-size: clamp(1.08rem, 1.32vw, 1.24rem); }
.title-in::placeholder, .body-in::placeholder { color: rgba(43,45,66,.38); }
.paper[lang="en"] { font-family: var(--latin); }
.paper[lang="en"] .title-in { line-height: 1.08; font-size: clamp(2.3rem, 5.4vw, 3.6rem); }
.paper[lang="en"] .body-in { line-height: 1.45; font-size: clamp(1.45rem, 1.8vw, 1.7rem); font-weight: 450; }
html[dir="ltr"] .paper[lang="en"] .title-in { font-size: clamp(2.05rem, 4.75vw, 3.15rem); }
html[dir="ltr"] .paper[lang="en"] .body-in { font-size: clamp(1.28rem, 1.58vw, 1.5rem); }
.dock { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-inline: calc(var(--gutter) * -1); padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom)); background: rgba(237,242,244,.94); border-top: 1.5px solid var(--line); }
.dock .side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.pick svg { width: 20px; height: 20px; flex: none; }
/* pictures of the text being written */
.pic-list { padding: 4px 0 26px; scroll-margin-bottom: 96px; }
.has-pics .body-in { min-height: max(150px, calc(100dvh - 610px)); }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.thumb { margin: 0; width: 132px; }
.thumb img { display: block; width: 132px; height: 96px; object-fit: cover; border-radius: 10px; background: rgba(43,45,66,.08); }
.thumb.gone img { visibility: hidden; }
.thumb figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.thumb figcaption bdi { font-family: var(--latin); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.thumb .link { height: 28px; padding: 0 6px 1px; font-size: .82rem; color: var(--root); flex: none; }
.state { margin: 0; color: var(--muted); font-size: .92rem; font-weight: 500; }

/* my notes */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 16px; padding-top: 18px; }
.head h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 300; line-height: 1.4; }
html[dir="ltr"] .head h1 { line-height: 1.1; font-weight: 400; }
.head h1 small { display: block; min-height: 1.6em; font-size: .98rem; font-weight: 600; color: var(--muted); line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 18px; border-block: 1.5px solid var(--line); }
.stat { padding: 14px 16px 16px; border-inline-start: 1.5px solid var(--line); min-width: 0; }
.stat:first-child { border-inline-start: 0; padding-inline-start: 2px; }
.stat b { display: block; font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 300; line-height: 1.25; font-variant-numeric: tabular-nums; }
html[dir="ltr"] .stat b { font-weight: 400; line-height: 1.05; }
.stat span { display: block; color: var(--muted); font-size: .95rem; font-weight: 650; line-height: 1.5; }
.stat small { display: block; color: var(--root); font-size: .84rem; font-weight: 600; }
#tabs { margin-top: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 14px; }
.filters:empty { display: none; }
.filters .set { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { height: 34px; padding: 0 13px 2px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; font-size: .92rem; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--cloud); box-shadow: none; }
.rows { margin-top: 16px; border-top: 1.5px solid var(--line); }
.row { display: flex; align-items: center; gap: 8px; border-bottom: 1.5px solid var(--line); }
.row-main { flex: 1 1 auto; min-width: 0; display: block; padding: 16px 2px 18px; border: 0; background: none; text-align: start; transition: padding .3s var(--ease-out); }
.row-main:hover { padding-inline-start: 10px; }
.icon-btn { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--line); color: var(--root); }
.icon-btn svg { width: 20px; height: 20px; }
.row h3 { margin: 0; font-size: 1.42rem; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
html[dir="ltr"] .row h3 { text-align: left; }
html[dir="rtl"] .row h3 { text-align: right; }   /* a title keeps its own direction but lines up with the page */
html[dir="rtl"] .row h3[lang="fa"], html[dir="rtl"] .row h3[lang="ar"] { font-size: 1.42rem; }
html[dir="ltr"] .row h3[lang="fa"], html[dir="ltr"] .row h3[lang="ar"] { font-size: 1.25rem; }
.row h3[lang="en"] { font-size: 1.7rem; line-height: 1.2; font-weight: 550; }
html[dir="ltr"] .row h3[lang="en"] { font-size: 1.5rem; }
.row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; color: var(--muted); font-size: .92rem; font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 10px 1px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); font-size: .84rem; font-weight: 700; white-space: nowrap; }
.tag.pub { background: var(--ink); color: var(--cloud); box-shadow: none; }
.tag.rev { color: var(--root); box-shadow: inset 0 0 0 1.5px var(--root); }
.tag.lang { box-shadow: none; padding: 0; color: var(--muted); font-weight: 650; }
.empty { margin-top: 16px; padding: 34px 0 10px; border-top: 1.5px solid var(--line); }
.empty p { margin: 0 0 18px; max-width: 44ch; color: var(--muted); }
.empty .acts { margin-top: 0; }

/* faces, the profile sheet */
.face { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: rgba(43,45,66,.1); color: var(--ink); font-weight: 700; font-size: 1.1rem; line-height: 1; flex: none; overflow: hidden; vertical-align: middle; }
.face.sm { width: 28px; height: 28px; font-size: .8rem; margin-inline-end: 8px; }
.face.big { width: 96px; height: 96px; font-size: 2.2rem; font-weight: 300; }
#who a, #who button { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
#who button { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.f .lbl { display: block; font-size: .92rem; font-weight: 700; color: var(--muted); }
.photo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.photo-row label.btn { cursor: pointer; }
.photo-row .link { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.f textarea { display: block; width: 100%; border: 0; border-bottom: 1.5px solid var(--line-strong); border-radius: 0; background: transparent; padding: 6px 0 9px; font-size: 1.12rem; line-height: 1.7; resize: vertical; }
.f textarea:focus { outline: none; border-bottom-color: var(--ink); }

/* public pages: a note to read, a writer */
#v-pub { padding-bottom: 56px; }
.pub-wait { margin: 0; padding-top: 40px; color: var(--muted); }
.read { padding-top: 14px; }
.read .paper h1 { margin: 6px 0 0; font-size: clamp(2.1rem, 5.1vw, 3.35rem); font-weight: 300; line-height: 1.45; overflow-wrap: anywhere; text-wrap: balance; }
.read .paper[lang="en"] h1 { line-height: 1.08; font-weight: 400; font-size: clamp(2.3rem, 5.4vw, 3.6rem); }
.kicker { margin: 18px 0 0; color: var(--root); font-weight: 700; font-size: .95rem; }
.byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 4px 0; font-family: var(--font); }
.byline b { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.byline small { display: block; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.byline:hover b { text-decoration: underline; text-underline-offset: 4px; }
.read .text { margin-top: 26px; max-width: 34em; font-size: clamp(1.22rem, 1.5vw, 1.4rem); line-height: 2.05; }
.read .paper[lang="en"] .text { font-size: clamp(1.4rem, 1.7vw, 1.62rem); line-height: 1.5; font-weight: 450; }
.read .text p { margin: 0 0 1.1em; white-space: pre-wrap; overflow-wrap: anywhere; }
.shot { margin: 0 0 1.3em; }
.shot img { display: block; max-width: 100%; height: auto; border-radius: 14px; background: rgba(43,45,66,.06); }
.shot figcaption { margin-top: 8px; color: var(--muted); font-size: .86em; line-height: 1.7; }
.read-foot { margin-top: 26px; padding-top: 12px; border-top: 1.5px solid var(--line); }
.read-foot .link { padding-inline: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.read-foot .link:hover { background: none; color: var(--root); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 40px; padding: 22px 24px; border-radius: 14px; background: var(--ink); color: var(--cloud); }
.cta p { margin: 0; font-size: 1.15rem; }
.cta .btn-ink { background: var(--cloud); color: var(--ink); }
.cta .btn-ink:hover:not(:disabled) { background: #fff; }
.writer { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); padding: 26px 0 8px; }
.writer h1 { margin: 0; font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 300; line-height: 1.4; overflow-wrap: anywhere; }
html[dir="ltr"] .writer h1 { font-weight: 400; line-height: 1.1; }
.writer .at { margin: 0; color: var(--muted); font-family: var(--latin); font-size: 1.25rem; line-height: 1.5; }
.writer .bio { margin: 8px 0 0; max-width: 46ch; color: var(--muted); overflow-wrap: anywhere; }
#v-pub .rows { margin-top: 22px; }
a.row-main { color: inherit; }

/* following */
.follow[aria-pressed="true"] { background: var(--ink); color: var(--cloud); box-shadow: none; }
.by-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; font-family: var(--font); }
.by-row .byline { margin-top: 0; }
.w-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.w-acts:empty { display: none; }
.fcount { color: var(--muted); font-size: .95rem; font-weight: 600; }
.fw h2 { margin: 26px 0 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
.find { margin-top: 22px; max-width: 460px; }
#find-out .people { margin-top: 12px; }
#find-out .fw-none { margin-top: 12px; }
.fw .empty { margin-top: 26px; }
.people { margin-top: 10px; border-top: 1.5px solid var(--line); }
.panel .people { margin-top: 18px; }
.person { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 2px; border-bottom: 1.5px solid var(--line); }
.p-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; color: inherit; }
.p-name { display: grid; min-width: 0; }
.p-name b { font-weight: 650; font-size: 1.05rem; line-height: 1.5; overflow-wrap: anywhere; }
.p-name small { color: var(--muted); font-size: .88rem; font-weight: 500; }
a.p-main:hover b { text-decoration: underline; text-underline-offset: 4px; }
.person .btn { flex: none; }
.fw .rows { margin-top: 10px; }
.fw-none { margin: 10px 0 0; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-weight: 600; font-size: 1.02rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .4em 0 0; accent-color: var(--ink); flex: none; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.hint.legal { margin-top: 18px; }
.hint.legal a, .foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot { width: var(--col); margin: 56px auto 0; padding: 14px 0 28px; border-top: 1.5px solid var(--line); font-size: .92rem; font-weight: 600; }

/* guide */
.guide { margin-top: 18px; padding-top: 22px; border-top: 1.5px solid var(--line); }
.guide .lead { margin: 0 0 8px; max-width: 46ch; font-size: 1.22rem; line-height: 1.75; text-wrap: pretty; }
html[dir="ltr"] .guide .lead { line-height: 1.4; }
.guide dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); }
.guide dl > div { padding: 18px 0 20px; border-bottom: 1.5px solid var(--line); }
.guide dt { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.12rem; }
.guide dt::before { content: ""; width: 8px; height: 8px; background: var(--signal); transform: rotate(45deg); border-radius: 2px; flex: none; }
.guide dd { margin: 6px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.85; text-wrap: pretty; }
html[dir="ltr"] .guide dd { line-height: 1.45; }
@media (max-width: 720px) { .guide dl { grid-template-columns: 1fr; } }

/* story export */
.export { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(22px, 5vw, 56px); align-items: start; padding-block: clamp(28px, 5vw, 48px) 8px; }
.export[hidden] { display: none; }
.export h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 300; line-height: 1.4; text-wrap: balance; }
html[dir="ltr"] .export h2 { font-weight: 500; line-height: 1.15; }
.export .note { margin: 10px 0 0; max-width: 46ch; color: var(--muted); font-size: 1.02rem; line-height: 1.8; text-wrap: pretty; }
html[dir="ltr"] .export .note { line-height: 1.45; }
.export .f { max-width: 340px; }
.ex-status { min-height: 1.9em; margin: 14px 0 0; font-weight: 600; }
.ex-support { margin: 0; color: var(--muted); font-size: .95rem; }
.ex-prev { display: grid; gap: 12px; justify-items: center; width: clamp(180px, 22vw, 250px); }
.ex-prev canvas, .ex-prev video { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: var(--ink); display: block; }
@media (max-width: 640px) { .export { grid-template-columns: 1fr; } .ex-prev { width: min(250px, 70%); margin-inline: auto; } }

/* the ball: the same panel as the blog atlas */
.atlas-wrap { position: relative; margin-top: 18px; background: var(--ink); color: var(--cloud); border-radius: 12px; overflow: hidden; }
.atlas-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; padding: 18px 20px; border-bottom: 1px solid var(--line-d); flex-wrap: wrap; }
.atlas-top .ttl { font-size: 1.4rem; font-weight: 300; line-height: 1.5; }
html[dir="ltr"] .atlas-top .ttl { font-weight: 500; line-height: 1.3; }
.atlas-top .ttl small { display: block; font-size: .92rem; font-weight: 600; color: var(--muted-d); line-height: 1.7; }
.atlas-search { background: rgba(237,242,244,.06); border: 0; border-radius: 999px; height: 42px; padding: 0 18px 2px; min-width: min(280px, 100%); color: var(--cloud); box-shadow: inset 0 0 0 1px var(--line-d); font-size: 1rem; }
.atlas-search::placeholder { color: var(--muted-d); }
.atlas-search:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--cloud); }
.pillar-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }
.pillar-chips button { height: 34px; padding: 0 13px 2px; border-radius: 999px; border: 0; background: rgba(237,242,244,.06); color: var(--cloud); font-weight: 650; font-size: .94rem; box-shadow: inset 0 0 0 1px var(--line-d); }
.pillar-chips button[aria-pressed="true"] { background: var(--signal); box-shadow: none; }
.atlas-stage { position: relative; height: clamp(460px, 62vw, 620px); }
.atlas-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.atlas-stage.dragging .atlas-canvas { cursor: grabbing; }
.atlas-hint { position: absolute; inset-inline: 0; bottom: 12px; margin: 0; padding-inline: 18px; text-align: center; color: var(--muted-d); font-size: .92rem; font-weight: 500; line-height: 1.7; text-wrap: balance; pointer-events: none; transition: opacity .6s var(--ease); }
.atlas-wrap.touched .atlas-hint { opacity: 0; }
.atlas-hint .for-touch { display: none; }
.atlas-wrap.is-touch .atlas-hint, .atlas-wrap.is-touch.touched .atlas-hint { opacity: 1; }
.atlas-wrap.is-touch .atlas-hint .for-mouse { display: none; }
.atlas-wrap.is-touch .atlas-hint .for-touch { display: inline; }
.atlas-card { position: absolute; z-index: 3; inset-inline: 0; bottom: 16px; margin-inline: auto; width: min(380px, calc(100% - 28px)); background: var(--cloud); color: var(--ink); border-radius: 10px; padding: 16px 18px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.3); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s .25s; }
.atlas-card.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.atlas-card .k { font-size: .92rem; font-weight: 700; color: var(--root); padding-inline-end: 36px; }
.atlas-card h4 { margin: 4px 0 0; font-size: 1.35rem; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
html[dir="ltr"] .atlas-card h4 { font-weight: 550; line-height: 1.25; }
.atlas-card p { margin: 4px 0 0; font-size: .98rem; color: var(--muted); font-weight: 500; line-height: 1.8; overflow-wrap: anywhere; }
html[dir="ltr"] .atlas-card p { line-height: 1.45; }
.atlas-card .go { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px 2px; margin-top: 12px; border-radius: 999px; border: 0; background: var(--ink); color: var(--cloud); font-weight: 700; font-size: 1rem; }
.atlas-card .go:hover { background: var(--root); }
.atlas-card .x { position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.atlas-card .x:hover { background: var(--line); color: var(--ink); }
.atlas-card .x svg { width: 16px; height: 16px; }
.atlas-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 14px 20px 16px; border-top: 1px solid var(--line-d); color: var(--muted-d); font-weight: 600; font-size: .94rem; }
.atlas-foot span { display: inline-flex; align-items: center; gap: 8px; }
.lg-post { width: 10px; height: 10px; background: var(--cloud); border-radius: 50%; }
.lg-seed { width: 9px; height: 9px; box-shadow: inset 0 0 0 1.5px var(--slate); transform: rotate(45deg); }
.lg-pillar { width: 10px; height: 10px; background: var(--signal); transform: rotate(45deg); border-radius: 2px; }

/* sheets and toast */
.scrim { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; background: rgba(43,45,66,.52); animation: fade .2s var(--ease-out); }
.panel { position: relative; width: min(520px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--cloud); border-radius: 18px 18px 0 0; padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); animation: rise .3s var(--ease-out); }
@media (min-width: 640px) { .scrim { align-items: center; } .panel { border-radius: 18px; padding: 30px 30px 28px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.panel h2 { margin: 0; padding-inline-end: 36px; font-size: 1.7rem; font-weight: 400; line-height: 1.5; text-wrap: balance; overflow-wrap: anywhere; }
html[dir="ltr"] .panel h2 { font-weight: 600; line-height: 1.2; font-size: 1.9rem; }
.panel .sub { margin: 6px 0 0; color: var(--muted); font-size: 1.02rem; overflow-wrap: anywhere; }
.panel .sub.id { direction: ltr; text-align: end; font-family: var(--latin); font-size: 1.25rem; }
html[dir="ltr"] .panel .sub.id { text-align: start; }
.panel .close { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; }
.panel .close:hover { background: var(--line); color: var(--ink); }
.panel .close svg { width: 17px; height: 17px; }
.f { margin-top: 18px; }
.f label { display: block; font-size: .92rem; font-weight: 700; color: var(--muted); }
.f input { width: 100%; border: 0; border-bottom: 1.5px solid var(--line-strong); border-radius: 0; background: transparent; padding: 6px 0 9px; font-size: 1.3rem; }
.f input:focus { outline: none; border-bottom-color: var(--ink); }
.f input[dir="ltr"] { font-family: var(--latin); font-size: 1.5rem; text-align: left; }
.f .err { margin: 4px 0 0; min-height: 1.5em; color: var(--root); font-size: .9rem; font-weight: 600; line-height: 1.5; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.acts .link { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.opts { display: grid; gap: 6px; margin-top: 16px; }
.opts button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px 2px; border: 0; border-radius: 12px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; text-align: start; overflow-wrap: anywhere; }
.opts button:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.opts button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.opts button small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.opts button.danger { color: var(--root); }
.toast { position: fixed; z-index: 60; inset-inline: 0; top: 12px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); padding: 9px 18px 11px; border-radius: 999px; background: var(--ink); color: var(--cloud); font-size: .98rem; font-weight: 600; line-height: 1.6; text-align: center; box-shadow: 0 0 0 1.5px rgba(237,242,244,.3), 0 14px 34px rgba(43,45,66,.28); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.toast.on { opacity: 1; transform: none; }
@media (max-width: 560px) {
  .link.new .lbl { display: none; }
  .link.new { width: 40px; padding: 0 0 2px; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
  .bar nav { gap: 4px; } .bar .link { padding-inline: 10px; } #nav-acct { max-width: 6.5em; }
  .bar nav.out #nav-notes { display: none; }
  .brand[lang="en"] { font-size: 1.6rem; }
  .dock .side.grow { width: 100%; justify-content: space-between; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; padding-inline-start: 2px; }
  .stat:nth-child(n+3) { border-top: 1.5px solid var(--line); }
  #tabs { display: flex; } #tabs button { flex: 1 1 auto; justify-content: center; padding-inline: 8px; font-size: .9rem; }
  .atlas-card h4 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ---------- the front page (/qalamgard/ for a visitor): what it is, a sample atlas, how it works, everyone's public notes ---------- */
#app.at-home { --col: min(1120px, 100% - 2 * var(--gutter)); }
#v-home { padding-bottom: 24px; }
#v-home h2 { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.6rem); font-weight: 300; line-height: 1.45; text-wrap: balance; }
html[dir="ltr"] #v-home h2 { font-weight: 400; line-height: 1.12; }
#v-home > section + section { margin-top: clamp(64px, 9vw, 118px); }
#v-home .lead { margin: 14px 0 0; max-width: 46ch; color: var(--muted); }

.h-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4.5vw, 64px); align-items: center; padding-top: clamp(18px, 3.4vw, 46px); }
.h-copy > * { animation: rise .56s var(--ease-out) both; }
.h-copy > :nth-child(2) { animation-delay: .07s; } .h-copy > :nth-child(3) { animation-delay: .14s; } .h-copy > :nth-child(4) { animation-delay: .2s; }
.h-ball { animation: rise .6s var(--ease-out) .12s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.h-hero h1 { margin: 0; font-size: clamp(2.5rem, 5.3vw, 4.5rem); font-weight: 300; line-height: 1.38; text-wrap: balance; }
html[dir="ltr"] .h-hero h1 { font-weight: 400; line-height: 1.02; letter-spacing: -.01em; }
.h-hero .lead { font-size: 1.08em; max-width: 34ch; margin-top: 20px; }
.h-hero .acts { margin-top: 28px; }
.h-hero .hint { margin-top: 14px; max-width: 38ch; }
.h-ball .atlas-wrap { margin-top: 0; }
.hero-ball .atlas-search { display: none; }
.hero-ball .atlas-stage { height: clamp(380px, 44vw, 500px); }
.h-ball .cap { margin: 10px 2px 0; color: var(--muted); font-size: .92rem; font-weight: 500; }

.h-steps ol { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3.4vw, 44px); }
.h-steps li { border-top: 1.5px solid var(--ink); padding-top: 14px; }
.h-steps .no { display: block; font-size: 3rem; font-weight: 200; line-height: 1.25; color: var(--muted); }
html[dir="ltr"] .h-steps .no { font-weight: 300; line-height: 1; padding-bottom: 6px; }
.h-steps h3 { margin: 8px 0 0; font-size: 1.3rem; font-weight: 650; line-height: 1.6; }
html[dir="ltr"] .h-steps h3 { font-size: 1.45rem; font-weight: 700; line-height: 1.25; }
.h-steps p { margin: 6px 0 0; color: var(--muted); max-width: 36ch; }

/* one sentence on what matters here, set large */
.h-say p { margin: 0; max-width: 17em; font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 300; line-height: 1.5; text-wrap: balance; }
html[dir="ltr"] .h-say p { font-weight: 400; line-height: 1.1; letter-spacing: -.01em; }

.h-pub .h-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 24px; }
.h-pub .h-count { color: var(--muted); font-size: .96rem; font-weight: 600; }
.h-pub .atlas-wrap { margin-top: 14px; }
.h-pub .pub-wait { padding-top: 24px; }
.h-pub .empty { margin-top: 24px; }
.h-pub .find { margin-top: 34px; }

.h-end { position: relative; border-top: 1.5px solid var(--ink); padding-top: clamp(28px, 4vw, 44px); }
.h-end::before { content: ""; position: absolute; top: -6.5px; inset-inline-start: 0; width: 12px; height: 12px; background: var(--root); border-radius: 3px; transform: rotate(45deg); }
#v-home .h-end h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.h-end .acts { margin-top: 24px; }

@media (max-width: 900px) {
  .h-hero { grid-template-columns: 1fr; }
  .h-hero .lead { max-width: 40ch; }
}
@media (max-width: 640px) {
  .h-steps ol { grid-template-columns: 1fr; gap: 22px; }
  .hero-ball .atlas-stage { height: 400px; }
  .h-hero .acts .btn, .h-end .acts .btn { flex: 1 1 auto; }
}
