/* Sheets — landing, welcome and start pages.
   The platform's landing language (teal, IBM Plex, soft grid, the typing logo, the dark-teal footer),
   with paper as the hero: every drawing is a real question type. */

:root {
  --brand: #3495BA; --brand-ink: #206E8E; --brand-deep: #134e66; --brand-soft: #EBF5F9; --brand-2: #DCEEF5; --brand-line: rgba(52,149,186,.32);
  --violet: #7B6DAB; --violet-soft: #F1EEF8;
  --ink: #0F172A; --ink-2: #475569; --ink-3: #8a96a3; --line: rgba(14,30,37,.08); --line-2: rgba(14,30,37,.14);
  --bg: #F7FCFC; --surface: #fff; --sunk: #F1F5F7; --red: #c53b3b;
  --r: 20px; --ease: cubic-bezier(.16,1,.3,1);
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --border: rgba(14,30,37,.08); --border-hover: rgba(52,149,186,.22); --border-tied: #eef1f3;
  --shadow: 0 2px 8px rgba(15,23,42,.04), 0 10px 30px -14px rgba(52,149,186,.2);
  --shadow-lg: 0 24px 60px -20px rgba(52,149,186,.3), 0 2px 6px rgba(15,23,42,.04);
  --font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  --num: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; scroll-behavior: smooth; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { letter-spacing: -.01em; text-wrap: balance; }          /* no lonely last word in a heading */
p, li, dd, figcaption { text-wrap: pretty; }
::selection { background: rgba(52,149,186,.2); color: inherit; }
html { -webkit-tap-highlight-color: transparent; }
/* touch screens have no hover: a tapped card shouldn't stay lifted */
@media (hover: none) {
  .role:hover, button.chip-f:hover { transform: none; }
  .vs-show:hover .vsp.s1 { transform: translateY(38px) rotate(-2deg); } .vs-show:hover .vsp.s2 { transform: translateY(6px); }
  .vs-show:hover .vsp.s3 { transform: translateY(26px) rotate(1.5deg); } .vs-show:hover .vsp.s4 { transform: translateY(58px) rotate(-1deg); }
  .fan:hover .p1 { transform: rotate(-8deg) translateY(30px); } .fan:hover .p3 { transform: rotate(7deg) translateY(24px); }
  .role:hover .role-pg { transform: translateX(-50%) rotate(-3deg); }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; position: relative; }
.sp { flex: 1; }
kbd { font: 500 11px/1 var(--num); padding: 3px 6px; border-radius: 6px; background: var(--sunk); color: var(--ink-3); box-shadow: inset 0 -1px 0 var(--line-2); }
.pg { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 14px;
  font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.btn i { font-size: 18px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(52,149,186,.85); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(15,23,42,.05); color: var(--ink); }
.btn-soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn-soft:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn-sm { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; border-radius: 16px; font-size: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ============================================================
   Header and footer (as on the platform's landing)
   ============================================================ */
.hdr { position: fixed; inset: 0 0 auto; z-index: 120; padding: 1.1rem 0; background: transparent; border-bottom: 1px solid transparent;
  transition: background .45s var(--ease), padding .45s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease); }
.hdr.is-scrolled, .hdr.is-solid { background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line); padding: .5rem 0; box-shadow: 0 2px 8px rgba(15,23,42,.04); }
.hdr.is-hidden { transform: translateY(-110%); }
.hdr-in { display: flex; align-items: center; gap: 1rem; }
.lock { display: inline-flex; align-items: center; gap: 12px; }
.lock img { height: 48px; width: auto; object-fit: contain; transition: height .45s var(--ease); }
.hdr.is-scrolled .lock img, .hdr.is-solid .lock img { height: 40px; }
.lock-sep { width: 1px; height: 26px; background: var(--line-2); }
.lock-name { font: 600 20px/1 var(--num); letter-spacing: -.02em; color: var(--brand-ink); }
.lock.is-light img { filter: brightness(0) invert(1); height: 50px; }
.lock.is-light .lock-sep { background: rgba(255,255,255,.35); }
.lock.is-light .lock-name { color: #fff; }
.hdr-acts { display: flex; align-items: center; gap: .6rem; }
.trigger { position: relative; width: 52px; height: 42px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-xs); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.trigger:hover { border-color: var(--brand); }
.trigger span { display: block; width: 22px; height: 2.2px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s, width .4s var(--ease); }
.trigger span:nth-child(2) { width: 16px; }
.trigger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.trigger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.trigger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }
.mega { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.mega-back { position: absolute; inset: 0; background: rgba(15,23,42,.18); opacity: 0; transition: opacity .35s var(--ease); }
.mega-panel { position: absolute; inset: 0 0 auto; padding: 96px max(2rem, calc((100% - 1136px) / 2)) 2rem; background: var(--bg); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem;
  transform: translateY(-104%); transition: transform .5s var(--ease); box-shadow: 0 30px 60px -30px rgba(15,23,42,.35); border-radius: 0 0 28px 28px; }
body.mega-open .mega { pointer-events: auto; }
body.mega-open .mega-back { opacity: 1; }
body.mega-open .mega-panel { transform: none; }
body.mega-open { overflow: hidden; }
body.mega-open .hdr { background: var(--bg); box-shadow: none; border-color: transparent; }
.mega-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
.mega-nav a { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; transition: background .2s, box-shadow .2s; }
.mega-nav a { border: 1px solid transparent; }
.mega-nav a:hover, .mega-nav a:focus-visible { background: var(--surface); border-color: var(--border); }
.mega-nav i { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 20px; }
.mega-nav span { display: grid; }
.mega-nav b { font-size: 15.5px; }
.mega-nav small { font-size: 13px; color: var(--ink-3); }
.mega-side { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.mega-side b { font-size: 18px; }
.mega-side p { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.mega-home { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding-top: 6px; font: 500 13px/1 var(--num); color: var(--ink-3); }
.mega-home:hover { color: var(--brand); }

.ft { position: relative; overflow: hidden; margin-top: 64px; padding: 4.5rem 0 3rem; background: linear-gradient(135deg, var(--brand) 0%, #2e2e2e 100%); color: #fff; }
.ft::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1.6px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0, #000, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0, #000, transparent 70%); }
.ft-in { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6rem; }
.ft p { margin: 0; max-width: 560px; color: rgba(255,255,255,.85); line-height: 1.9; }
.ft-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.ft-links a { color: rgba(255,255,255,.85); font-weight: 500; position: relative; padding-bottom: 4px; }
.ft-links a::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: #fff; transform: translateX(-50%); transition: width .3s var(--ease); }
.ft-links a:hover { color: #fff; }
.ft-links a:hover::after { width: 100%; }
.ft-socials { display: flex; gap: .4rem; }
.ft-socials a { width: 52px; height: 52px; display: grid; place-items: center; color: rgba(255,255,255,.9); transition: transform .3s var(--ease); }
.ft-socials a:hover { transform: translateY(-4px); color: #fff; }
.ft-socials svg { width: 26px; height: 26px; fill: currentColor; }
.ft .ft-copy { width: 100%; max-width: none; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.15); font-size: 14px; color: rgba(255,255,255,.72); }

/* ============================================================
   Landing
   ============================================================ */
.hero { position: relative; padding: 140px 0 70px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(52,149,186,.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(52,149,186,.07) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 65%); mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 65%); }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero-bg .blob.a { width: 520px; height: 420px; inset-inline-end: -120px; top: -80px; background: radial-gradient(circle, #cfe8f2, transparent 70%); }
.hero-bg .blob.b { width: 420px; height: 360px; inset-inline-start: -140px; top: 220px; background: radial-gradient(circle, #e5e0f4, transparent 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 5px 18px; border-radius: 99px; background: var(--surface);
  border: 1px solid var(--border); font-size: 13.5px; color: var(--ink-2); }
.pill b { padding: 3px 10px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; }
.hero h1 { margin: 22px 0 18px; font-size: clamp(36px, 4.8vw, 60px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 0; font-size: 18px; line-height: 1.95; color: var(--ink-2); max-width: 33em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 34px; margin: 40px 0 0; }
.trust div { display: grid; }
.trust dt { font: 700 28px/1.2 var(--num); letter-spacing: -.02em; }
.trust dd { margin: 0; font-size: 13.5px; color: var(--ink-3); }

/* the hero fan: three real pages, the front one turning to its answer key */
.fan { position: relative; aspect-ratio: 1 / 1; max-width: 560px; justify-self: center; width: 100%; }
.fan-p { position: absolute; width: 54%; top: 6%; border-radius: 8px; box-shadow: 0 0 0 1px rgba(15,23,42,.05), 0 30px 50px -26px rgba(15,23,42,.45); background: #fff;
  transition: transform .8s var(--ease); }
.fan-p .pg { border-radius: 8px; }
.fan-p.p1 { inset-inline-start: 2%; transform: rotate(-8deg) translateY(30px); }
.fan-p.p2 { inset-inline-start: 23%; transform: rotate(-1deg) translateY(-6px); z-index: 1; }
.fan-p.p3 { inset-inline-start: 44%; transform: rotate(7deg) translateY(24px); z-index: 2; }
.fan:hover .p1 { transform: rotate(-11deg) translate(12px, 34px); }
.fan:hover .p3 { transform: rotate(10deg) translate(-12px, 28px); }
.flip { position: relative; }
.flip .flip-b { position: absolute; inset: 0; opacity: 0; animation: keyflip 7s var(--ease) 1.2s infinite; }
@keyframes keyflip { 0%, 40% { opacity: 0; } 48%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
.chip-f { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: 0 14px 30px -20px rgba(15,23,42,.3); font-size: 13px; font-weight: 600; white-space: nowrap;
  animation: bob 6s ease-in-out infinite; }
.chip-f i { font-size: 18px; color: var(--brand); }
.chip-f span { display: grid; line-height: 1.35; }
.chip-f small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.chip-f.c2 { inset-inline-start: 6%; top: 4%; animation: none; }
/* «A4» printed small at the front page's bottom-left, like a printer's mark */
.pg-print { position: absolute; left: 7%; bottom: 3.2%; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px 6px 10px; border-radius: 8px;
  background: var(--ink); color: #fff; font: 600 10.5px/1 var(--num); letter-spacing: .02em; }
.pg-print i { font-size: 12px; color: #9fd3e8; }
.chip-f .tg { width: 34px; height: 20px; border-radius: 99px; background: var(--brand-2); position: relative; display: block; animation: tg 7s var(--ease) 1.2s infinite; }
.chip-f .tg i { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3);
  animation: tgk 7s var(--ease) 1.2s infinite; }
@keyframes tg { 0%, 40% { background: var(--brand-2); } 48%, 88% { background: var(--brand); } 96%, 100% { background: var(--brand-2); } }
@keyframes tgk { 0%, 40% { transform: none; } 48%, 88% { transform: translateX(-14px); } 96%, 100% { transform: none; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
/* the answer-key chip is a switch: once touched, the page follows it, not the loop */
button.chip-f { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; }
button.chip-f:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -20px rgba(15,23,42,.38); }
button.chip-f:active { transform: translateY(0) scale(.98); }
button.chip-f:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.fan.is-manual .flip .flip-b { animation: none; transition: opacity .55s var(--ease); }
.fan.is-manual.show-key .flip .flip-b { opacity: 1; }
.fan.is-manual .chip-f .tg, .fan.is-manual .chip-f .tg i { animation: none; transition: background .3s var(--ease), transform .35s var(--ease); }
.fan.is-manual.show-key .chip-f .tg { background: var(--brand); }
.fan.is-manual.show-key .chip-f .tg i { transform: translateX(-14px); }
.fan.is-manual.show-key .p3 { transform: rotate(5deg) translateY(16px); }

/* sections */
.sec { padding: 96px 0; position: relative; scroll-margin-top: 72px; }
.sec-tight { padding: 40px 0; }
.sec-alt { background: linear-gradient(180deg, transparent, rgba(235,245,249,.6) 12%, rgba(235,245,249,.6) 88%, transparent); }
.sec-h { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.sec-h.is-start { text-align: start; margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.badge i { font-size: 15px; }
.sec-h h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.3; text-wrap: balance; }
.sec-h p { margin: 0; font-size: 16.5px; color: var(--ink-2); line-height: 1.9; }
.sec-h a { color: var(--brand-ink); font-weight: 600; }

.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 32px 36px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); }
.vs small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.vs-old ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.vs-old li { position: relative; padding-inline-start: 22px; color: var(--ink-3); font-size: 15px; text-decoration: line-through; text-decoration-color: rgba(197,59,59,.45); }
.vs-old li::before { content: "×"; position: absolute; inset-inline-start: 0; color: var(--red); opacity: .6; }
/* a hand-drawn arrow, drawn in when the card comes into view */
.vs-arrow { width: 120px; height: 70px; color: var(--violet); overflow: visible; }
html[dir=ltr] .vs-arrow { transform: scaleX(-1); }
@media (min-width: 1100px) { .vs-arrow { transform: translateX(64px); } html[dir=ltr] .vs-arrow { transform: translateX(-64px) scaleX(-1); } }
.vs-arrow-l { stroke-dasharray: 230; stroke-dashoffset: 230; }
.vs-arrow-h { stroke-dasharray: 24; stroke-dashoffset: 24; }
.vs.is-in .vs-arrow-l { animation: draw 1.1s cubic-bezier(.65,0,.35,1) .35s forwards; }
.vs.is-in .vs-arrow-h { animation: draw .35s ease-out 1.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.vs-new p { margin: 0; font-size: 18px; line-height: 1.85; font-weight: 600; }
.vs-new small { color: var(--brand); }
/* under the comparison: what Sheets prints, as pages rising out of a deep teal band */
.vs-show { position: relative; margin-top: 14px; height: 330px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: #2e2e2e; }
.vs-show::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 32px 32px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.vs-show-in { position: absolute; inset: 48px 6% 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4%; align-items: start; }
.vsp { margin: 0; position: relative; transition: transform .7s var(--ease); }
.vsp .pg { border-radius: 7px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 50px -20px rgba(0,0,0,.7); }
.vsp figcaption { position: absolute; top: -13px; inset-inline-start: 14px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px;
  background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
.vsp figcaption i { font-size: 13px; color: var(--brand); }
.vsp.s1 { transform: translateY(38px) rotate(-2deg); }
.vsp.s2 { transform: translateY(6px); }
.vsp.s3 { transform: translateY(26px) rotate(1.5deg); }
.vsp.s4 { transform: translateY(58px) rotate(-1deg); }
.vs-show:hover .vsp.s1 { transform: translateY(26px) rotate(-3deg); }
.vs-show:hover .vsp.s2 { transform: translateY(-4px); }
.vs-show:hover .vsp.s3 { transform: translateY(14px) rotate(2.5deg); }
.vs-show:hover .vsp.s4 { transform: translateY(46px) rotate(-2deg); }
@media (max-width: 920px) { .vs-show { height: 280px; } .vs-show-in { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vsp.s4 { display: none; } }
@media (max-width: 560px) { .vs-show { height: 230px; border-radius: 22px; } .vs-show-in { inset: 40px 5% 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } .vsp.s3 { display: none; } }

.steps, .feats, .faq { display: grid; gap: 1px; background: var(--border-tied); border: 1px solid var(--border-tied); border-radius: 26px; overflow: hidden; }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; padding: 28px; background: var(--surface); transition: background-color .35s var(--ease); }
.step:hover, .feat:hover, .faq details:hover { background: #FBFDFE; }
.step .ill { transition: background-color .35s var(--ease); }
.step:hover .ill { background: var(--brand-soft); }
.step .ill { height: 170px; border-radius: 18px; background: var(--sunk); margin-bottom: 22px; position: relative; overflow: hidden; }
.step h3 { margin: 0 0 8px; font-size: 18.5px; display: flex; align-items: center; gap: 10px; }
.step h3 b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }
.ill-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; align-content: center; padding: 0 20px; }
.ill-chips span { padding: 7px 13px; border-radius: 99px; background: #fff; font-size: 12.5px; color: var(--ink-2); box-shadow: 0 0 0 1px var(--line); }
.ill-chips span.on { background: var(--ink); color: #fff; box-shadow: none; }
.ill-chips span.on2 { background: var(--brand); color: #fff; box-shadow: none; }
.ill-drag { display: grid; align-content: center; gap: 9px; padding: 0 16%; }
.ill-drag .r { height: 30px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ill-drag .r.mv { display: flex; align-items: center; padding: 0 10px; box-shadow: 0 18px 30px -12px rgba(15,23,42,.35); transform: translateX(-10%) rotate(-2.5deg); }
.ill-drag .r.mv span { font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 8px; border-radius: 99px; }
.ill-drag hr { margin: 0; border: 0; height: 2.5px; border-radius: 2px; background: var(--brand); }
.ill-print { display: flex; gap: 14px; align-items: flex-end; justify-content: center; padding-top: 18px; }
.ill-print .pp { width: 92px; display: grid; gap: 6px; text-align: center; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ill-print .pp .pg { border-radius: 5px; box-shadow: 0 12px 24px -14px rgba(15,23,42,.4); }
.ill-print .pp:last-child { transform: translateY(-8px); }
.ill-print .pp:last-child span { color: var(--brand); }

.types { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.type { margin: 0; display: grid; gap: 14px; align-content: start; cursor: default; outline: 0; }
.type-p { position: relative; border-radius: 8px; border: 1px solid var(--border); transition: transform .5s var(--ease), border-color .4s var(--ease); background: #fff; }
.type:hover .type-p { border-color: var(--border-hover); }
.type-p .pg { border-radius: 8px; }
.type-p .flip-b { position: absolute; inset: 0; opacity: 0; transition: opacity .35s var(--ease); }
.type:hover .type-p, .type:focus-visible .type-p { transform: translateY(-6px); }
.type:hover .flip-b, .type:focus-visible .flip-b { opacity: 1; }
.type:focus-visible .type-p { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.type figcaption { display: grid; gap: 2px; }
.type figcaption b { font-size: 15px; }
.type figcaption span { font-size: 13px; color: var(--ink-3); line-height: 1.7; }

.makes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.make { position: relative; padding: 0 26px 26px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color .4s var(--ease); }
.make:hover { border-color: var(--border-hover); }
.make .art { position: relative; height: 200px; margin: 0 -26px 22px; background: linear-gradient(180deg, var(--brand-soft), #fff); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.make .art > div { width: 118px; border-radius: 6px 6px 0 0; overflow: hidden; box-shadow: 0 -6px 26px -12px rgba(15,23,42,.35); transition: transform .5s var(--ease); }
.make .art .pg-b { transform: translate(-14px, 40px) rotate(-7deg); }
.make .art .pg-f { transform: translate(14px, 22px) rotate(3deg); margin-inline-start: -30px; }
.make:hover .art .pg-f { transform: translate(18px, 8px) rotate(4deg); }
.make:hover .art .pg-b { transform: translate(-22px, 32px) rotate(-10deg); }
.make .yr { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 1; font: 700 13px/1 var(--num); color: var(--brand-ink); background: #fff; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--border); }
.make h3 { margin: 0 0 8px; font-size: 19px; }
.make p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }

.feats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feat { position: relative; padding: 92px 30px 30px; background: var(--surface); transition: background-color .35s var(--ease); }
.feat i { position: absolute; top: 0; inset-inline-start: 0; display: grid; place-items: center; width: 64px; height: 64px; border-end-end-radius: 20px;
  background: var(--brand-soft); color: var(--brand); font-size: 26px; transition: transform .4s var(--ease); }
.feat:nth-child(3n+2) i { background: var(--violet-soft); color: var(--violet); }
.feat:nth-child(3n+3) i { background: #EFEFEF; color: #2e2e2e; }
.feat:hover i { transform: scale(1.06); }
.feat h3 { margin: 0 0 6px; font-size: 17px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }

.faq-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }
.faq details { background: var(--surface); transition: background-color .35s var(--ease); }
.faq details[open] { background: #FBFDFE; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; margin-inline-end: 6px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px);
  transition: transform .35s var(--ease), border-color .35s; }
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); border-color: var(--violet); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--ink-2); line-height: 1.9; font-size: 14.5px; }

.final { position: relative; overflow: hidden; display: flex; align-items: center; gap: 2rem; padding: 56px 52px; border-radius: 30px; background: #2e2e2e; color: #fff; min-height: 280px; }
.final::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 36px 36px; -webkit-mask-image: linear-gradient(to right, #000, transparent 75%); mask-image: linear-gradient(to right, #000, transparent 75%); }
.final-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 0; }
.final-copy .btn { margin-top: 26px; }
.final h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; }
.final p { margin: 0; color: rgba(255,255,255,.8); font-size: 16px; }
.final .btn { position: relative; z-index: 1; background: #fff; color: #2e2e2e; box-shadow: none; }
.final .btn:hover { background: var(--brand-soft); color: var(--brand-ink); }
.final-art { position: absolute; inset-inline-end: 4%; bottom: -60px; display: flex; gap: 14px; }
.final-art > div { width: 130px; border-radius: 6px; overflow: hidden; box-shadow: 0 -10px 30px -10px rgba(0,0,0,.4); transform: rotate(-4deg); }
.final-art > div + div { transform: rotate(5deg) translateY(-24px); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .final-art { display: none; }
}
@media (max-width: 920px) {
  .hero { padding-top: 110px; }
  .hero-in { grid-template-columns: 1fr; }
  .fan { max-width: 440px; }
  .steps, .makes, .feats, .faq-in { grid-template-columns: 1fr; }
  .vs { grid-template-columns: 1fr; }
  .vs-arrow { transform: rotate(-90deg); justify-self: center; width: 90px; }
  html[dir=ltr] .vs-arrow { transform: rotate(-90deg) scaleY(-1); }
  .mega-panel { grid-template-columns: 1fr; padding: 84px 16px 16px; }
  .mega-nav { grid-template-columns: 1fr; }
  .final { flex-direction: column; align-items: flex-start; padding: 40px 28px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hdr-cta { display: none; }
  .lock { gap: 7px; }
  .lock img { height: 38px; }
  .lock-sep { height: 20px; }
  .lock-name { font-size: 17px; }
  .hero { padding-top: 136px; }
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec { padding: 64px 0; }
  .chip-f.c1 { inset-inline-end: 0; }
}

/* ============================================================
   Welcome
   ============================================================ */
.wl { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(900px 500px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.wl-card { width: min(660px, 100%); text-align: center; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.wl-card .lock { margin-bottom: 34px; }
.wl-card h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); line-height: 1.35; }
.wl-card > p { margin: 0 0 34px; color: var(--ink-2); font-size: 16px; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: start; }
.role { position: relative; display: grid; border-radius: 24px; background: var(--surface); cursor: pointer; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border); transition: box-shadow .3s var(--ease), transform .45s var(--ease); }
.role:hover { box-shadow: 0 0 0 1px var(--border-hover), 0 18px 40px -28px rgba(15,23,42,.35); transform: translateY(-3px); }
.role input { position: absolute; opacity: 0; pointer-events: none; }
/* the card's picture: a real page rising from a soft band */
.role-art { position: relative; display: block; height: 170px; background: var(--sunk); overflow: hidden; transition: background .35s var(--ease); }
.role-art::before { content: ""; position: absolute; inset: 0; opacity: .7;
  background-image: linear-gradient(rgba(14,30,37,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(14,30,37,.045) 1px, transparent 1px);
  background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 75%); mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 75%); }
.role-pg { position: absolute; left: 50%; bottom: -52%; width: 46%; transform: translateX(-50%) rotate(-3deg); transition: transform .6s var(--ease);
  filter: drop-shadow(0 18px 24px rgba(15,23,42,.16)); }
.role-pg .pg { border-radius: 6px; }
.role:hover .role-pg { transform: translateX(-50%) translateY(-8px) rotate(-1.5deg); }
.role-tag { position: absolute; top: 16px; inset-inline-start: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; font-weight: 600; color: var(--brand-ink);
  box-shadow: 0 0 0 1px var(--border); }
.role-tag i { font-size: 14px; color: var(--brand); }
.role .tick { position: absolute; top: 16px; inset-inline-end: 16px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1.5px var(--line-2); display: grid; place-items: center; color: transparent; font-size: 15px; transition: background .25s, box-shadow .25s, color .25s, transform .35s var(--ease); }
.role-tx { display: grid; gap: 4px; padding: 18px 20px 20px; }
.role-tx b { font-size: 17px; }
.role-tx span { color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.role:has(input:checked) { box-shadow: 0 0 0 1.5px var(--brand), 0 18px 40px -28px rgba(52,149,186,.5); }
.role:has(input:checked) .role-art { background: var(--brand-soft); }
.role:has(input:checked) .tick { background: var(--brand); box-shadow: none; color: #fff; transform: scale(1.05); }
.role:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.wl-name { margin: 22px auto 0; max-width: 360px; text-align: start; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.wl-name small { color: var(--ink-3); }
.wl-name input { height: 48px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); outline: 0; font-size: 15px; }
.wl-name input:focus { box-shadow: 0 0 0 1.5px var(--brand), 0 0 0 5px var(--brand-soft); }
.wl-go { margin-top: 28px; }
.wl-go .btn { min-width: 240px; height: 52px; font-size: 15.5px; }
@media (max-width: 560px) { .roles { grid-template-columns: 1fr; } .role-art { height: 132px; } .role-pg { width: 38%; } }

/* ============================================================
   Start: a guided flow
   ============================================================ */
.st { min-height: 100vh; display: flex; flex-direction: column; }
.st-main { flex: 1; padding-top: 96px; padding-bottom: 120px; }
.view.is-in { animation: viewin .5s var(--ease) both; }
@keyframes viewin { from { opacity: 0; transform: translateY(12px); } }
::view-transition-old(root) { animation: .22s ease both vt-out; }
::view-transition-new(root) { animation: .45s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* the account menu */
.me { position: relative; }
.me > button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0; padding-inline: 12px 5px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.me > button:hover, .me > button[aria-expanded="true"] { background: rgba(15,23,42,.05); }
.me .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.me .who { display: grid; text-align: start; line-height: 1.3; }
.me .who b { font-size: 13.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { font-size: 12px; color: var(--ink-3); }
.menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 250px; padding: 6px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 20px 40px -16px rgba(15,23,42,.3); animation: pop .16s var(--ease); z-index: 40; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--sunk); color: var(--ink); }
.menu i { font-size: 18px; color: var(--ink-3); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 5px 4px; }
.menu form { margin: 0; }

.hello { padding: 30px 0 26px; }
.hello small { display: block; font-size: 15px; color: var(--ink-3); margin-bottom: 4px; }
.hello h1 { margin: 0; font-size: clamp(30px, 3.8vw, 44px); line-height: 1.25; }

/* 0 · three ways to start */
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pick { position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--border); padding: 0; border-radius: 26px; background: var(--surface); cursor: pointer; text-align: start; overflow: hidden;
  transition: border-color .35s var(--ease), transform .45s var(--ease); }
.pick:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.pick-art { position: relative; height: 190px; display: block; background: var(--sunk); overflow: hidden; transition: background .3s; }
.pick.is-main .pick-art { background: linear-gradient(160deg, var(--brand-soft), var(--brand-2)); }
.pick:hover .pick-art { background: var(--brand-soft); }
.pick-art .pg-s { position: absolute; left: 50%; width: 112px; bottom: -44px; margin-left: -56px; border-radius: 6px; overflow: hidden; box-shadow: 0 -8px 24px -12px rgba(15,23,42,.35); transition: transform .5s var(--ease); }
.pick-art .s1 { transform: translateX(34px) rotate(6deg); }
.pick-art .s2 { transform: translateX(-24px) rotate(-3deg) translateY(-14px); }
.pick:hover .pick-art .s1 { transform: translateX(46px) rotate(9deg) translateY(-6px); }
.pick:hover .pick-art .s2 { transform: translateX(-30px) rotate(-5deg) translateY(-26px); }
.pick-art .yr { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; font: 700 13px/1 var(--num); color: var(--brand-ink); background: #fff; padding: 6px 9px; border-radius: 9px; box-shadow: var(--shadow); }
.pick-tx { padding: 22px 24px 26px; display: grid; gap: 8px; align-content: start; }
.pick-tx b { font-size: 19px; transition: color .3s var(--ease); }
.pick-tx > span { font-size: 15.5px; color: var(--ink-2); line-height: 1.85; min-height: calc(1.85em * 2); text-wrap: pretty; }
.pick:hover .pick-tx b { color: var(--brand-ink); }
.pick:active { transform: translateY(-1px) scale(.995); }
.pick .k { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; background: rgba(255,255,255,.85); }
@media (hover: none) { .pick .k { display: none; } }

/* breadcrumbs and the step header */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding-top: 22px; font-size: 14px; color: var(--ink-3); }
.crumbs button, .crumbs a { border: 0; background: transparent; padding: 6px 8px; border-radius: 9px; color: var(--ink-2); cursor: pointer; }
.crumbs button:hover, .crumbs a:hover { background: rgba(15,23,42,.05); color: var(--ink); }
.crumbs .cr-back { display: grid; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 18px; margin-inline-end: 6px; }
.crumbs .cr-back:hover { box-shadow: 0 0 0 1px var(--brand); color: var(--brand); background: var(--surface); }
.crumbs [aria-current] { padding: 6px 8px; color: var(--ink); font-weight: 600; }
.cr-sep { font-size: 16px; opacity: .6; }
.v-h { margin: 18px 0 26px; }
.v-h h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.25; }
.v-sub { margin: 6px 0 0; color: var(--ink-3); font-size: 15px; }

/* 1 · stage cards (the landing's node cards) */
.nodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.node { position: relative; height: 200px; display: flex; flex-direction: column; padding: 24px; border: 1px solid rgba(255,255,255,.2); border-radius: 22px; overflow: hidden; cursor: pointer;
  background: var(--node-color, var(--brand)); color: #fff; text-align: start; box-shadow: var(--shadow-xs); transition: transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .7s cubic-bezier(.2,.7,.2,1);
  animation: cardin .6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes cardin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.node::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.22), rgba(0,0,0,0) 50%); }
.node::before { content: ""; position: absolute; top: -26px; inset-inline-end: -26px; width: 220px; height: 160px; opacity: .55;
  background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 2px); background-size: 12px 12px; }
.node:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -22px var(--node-color, rgba(15,23,42,.5)); }
.node:active { transform: translateY(-1px) scale(.99); transition-duration: .15s; }
.node::after { transition: opacity .7s cubic-bezier(.2,.7,.2,1); }
.node:hover::after { opacity: .7; }
.node:focus-visible { outline: 3px solid var(--node-color); outline-offset: 3px; }
.node-tx { position: relative; z-index: 1; display: grid; gap: 8px; max-width: 74%; }
.node-tx b { font-size: 24px; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,.18); }
.node-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.95); }
.node-stats span { display: inline-flex; align-items: center; gap: 5px; }
.node-stats i { font-size: 15px; opacity: .9; }
.node-ill { position: absolute; z-index: 1; bottom: -30px; inset-inline-end: 16px; width: 120px; height: 120px; display: grid; place-items: center; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.node-ill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.node-ill i { font-size: 72px; color: rgba(255,255,255,.9); }
.node-ill img + i { display: none; }
.node:hover .node-ill { transform: translateY(-6px) rotate(4deg) scale(1.04); }

/* 2 · subject cards (the landing's subject cards) */
.subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.subj { position: relative; display: flex; align-items: center; gap: 14px; height: 92px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  text-align: start; cursor: pointer; overflow: hidden; transition: transform .65s cubic-bezier(.2,.7,.2,1), border-color .5s cubic-bezier(.2,.7,.2,1);
  animation: cardin .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.subj::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--c, var(--brand)), transparent 62%); opacity: 0; transition: opacity .7s cubic-bezier(.2,.7,.2,1); }
.subj:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c, var(--brand)) 30%, transparent); }
.subj:active { transform: translateY(-1px) scale(.99); transition-duration: .15s; }
.subj-im img, .subj-im { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.subj:hover .subj-im { transform: scale(1.05) rotate(-2deg); }
.subj-tx b { transition: color .5s cubic-bezier(.2,.7,.2,1); }
.subj:hover .subj-tx b { color: color-mix(in srgb, var(--c, var(--brand)) 80%, #000); }
.subj:hover::before { opacity: .08; }
.subj.is-going { opacity: .6; pointer-events: none; }
.subj-im { position: relative; z-index: 1; width: 66px; height: 66px; flex: none; display: grid; place-items: center; border-radius: 15px; overflow: hidden;
  background: var(--c, var(--brand)); color: #fff; font-size: 24px; font-weight: 800; border: 1px solid var(--line); }
.subj-im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: var(--brand-soft); }
.subj-tx { position: relative; z-index: 1; flex: 1; min-width: 0; display: grid; }
.subj-tx b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.subj-tx small { font-size: 13px; color: var(--ink-3); }

/* 3a · naming a new sheet */
.naming { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: center; padding: 40px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); }
.naming-copy h2 { margin: 0 0 8px; font-size: clamp(28px, 3.2vw, 38px); }
.naming-copy p { margin: 0 0 22px; color: var(--ink-2); font-size: 15.5px; }
.naming-copy input { unicode-bidi: plaintext; text-align: start; width: 100%; height: 60px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--sunk); outline: 0; font-size: 19px; font-weight: 600; transition: box-shadow .2s, background .2s; }
.naming-copy input:focus { background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 0 0 7px var(--brand-soft); }
.naming-copy input::placeholder { font-weight: 400; color: var(--ink-3); }
.sugs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 26px; }
.sug { height: 34px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--sunk); color: var(--ink-2); font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s; }
.sug:hover { background: var(--brand-soft); color: var(--brand-ink); }
.naming-art { position: relative; border-radius: 8px; box-shadow: 0 0 0 1px rgba(15,23,42,.05), 0 30px 50px -26px rgba(15,23,42,.45); transform: rotate(3deg); }
.naming-art .pg { border-radius: 8px; }
.naming-title { position: absolute; top: 6.4%; inset-inline: 9%; font-size: 13px; font-weight: 700; color: var(--brand-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  unicode-bidi: plaintext; text-align: start; background: #EBF5F9; padding: 4px 6px; }

/* 3b · what to print */
.items-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.ih-subj { display: flex; align-items: center; gap: 14px; }
.ih-subj .im { position: relative; width: 58px; height: 58px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--node-color, var(--brand)); color: #fff; font-size: 22px; font-weight: 800; }
.ih-subj .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: var(--brand-soft); }
.ih-subj > span:last-child { display: grid; }
.ih-subj small { font-size: 13px; color: var(--ink-3); }
.ih-subj b { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; }
/* what to print: one quiet dropdown (whole exams, or one unit) */
.scope { position: relative; }
.scope-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  cursor: pointer; text-align: start; max-width: min(420px, 70vw); transition: border-color .3s var(--ease), background .3s var(--ease); }
.scope-btn:hover, .scope-btn[aria-expanded="true"] { border-color: var(--border-hover); }
.scope-btn.is-on { background: var(--brand-soft); border-color: var(--brand-line); }
.scope-ic { font-size: 18px; color: var(--brand); }
.scope-t { display: grid; min-width: 0; line-height: 1.25; }
.scope-t small { font-size: 11px; color: var(--ink-3); }
.scope-t b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-ch { font-size: 18px; color: var(--ink-3); transition: transform .35s var(--ease); }
.scope-btn[aria-expanded="true"] .scope-ch { transform: rotate(180deg); }
.scope-menu { position: absolute; z-index: 40; top: calc(100% + 8px); inset-inline-start: 0; width: min(380px, calc(100vw - 32px)); max-height: min(60vh, 440px); overflow-y: auto;
  padding: 6px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 50px -24px rgba(15,23,42,.28); animation: pop .18s var(--ease); }
.scope-menu [role=option] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; text-align: start; cursor: pointer; }
.scope-menu [role=option] > span { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.scope-menu [role=option] small { font-size: 11.5px; color: var(--ink-3); }
.scope-menu [role=option] b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-menu [role=option] em { font-style: normal; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.scope-menu [role=option] > i { font-size: 17px; color: var(--brand); visibility: hidden; }
.scope-menu [role=option][aria-selected="true"] > i { visibility: visible; }
.scope-menu [role=option]:hover, .scope-menu [role=option]:focus-visible { background: var(--sunk); outline: none; }
.scope-sep { margin: 6px 12px 2px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.scope-hint { margin: -2px 0 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--brand-ink); }
.scope-hint[hidden] { display: none; }
.list-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.list-bar .items-hint { margin: 0; }
.lnk { border: 0; background: transparent; font-size: 13.5px; color: var(--ink-2); cursor: pointer; padding: 7px 10px; border-radius: 9px; display: inline-flex; align-items: center; gap: 4px; }
.lnk:hover { color: var(--ink); background: rgba(15,23,42,.05); }
.items { padding: 10px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.items-hint { margin: 6px 12px 8px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rw { display: flex; align-items: center; gap: 4px; border-radius: 14px; transition: background .15s; }
.rw:hover { background: var(--sunk); }
.rw:has(.box:checked) { background: var(--brand-soft); }
.rw .grip { width: 30px; height: 44px; border: 0; background: transparent; color: var(--ink-3); cursor: grab; border-radius: 9px; display: grid; place-items: center; opacity: .35; transition: opacity .15s; }
.rw:hover .grip, .rw .grip:focus-visible { opacity: 1; }
.rw label { flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px; padding-inline-start: 4px; cursor: pointer; min-width: 0; }
.rw label .box { margin-inline-start: 6px; }
.rw input, .unit-h input { appearance: none; -webkit-appearance: none; width: 21px; height: 21px; margin: 0; border-radius: 7px; flex: none; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line-2); background: #fff center / 14px no-repeat; transition: background-color .15s, box-shadow .15s; }
.rw input:checked, .unit-h input:checked { background-color: var(--brand); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.unit-h input:indeterminate { background-color: var(--brand); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6.5 12h11'/%3E%3C/svg%3E"); }
.rw .yr { font: 700 16px/1 var(--num); min-width: 48px; }
.rw .ln { font: 600 12px/1 var(--num); min-width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); }
.rw:has(.box:checked) .ln { background: #fff; color: var(--brand-ink); }
.rw .tt { flex: 1; min-width: 0; display: grid; font-size: 15px; line-height: 1.5; }
.rw .tt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; text-align: start; }
.rw .tt small { font-size: 12px; color: var(--ink-3); letter-spacing: .01em; }
.rw .mx { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.rw .mx b { font-family: var(--num); color: var(--ink-2); font-weight: 600; }
.rw .mx .tot { color: var(--ink-2); font-weight: 600; }
.rw .eye { width: 36px; height: 36px; flex: none; margin-inline-start: 2px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3);
  font-size: 18px; cursor: pointer; opacity: .55; transition: opacity .2s, background .2s, color .2s; }
.rw:hover .eye, .rw .eye:focus-visible, .rw.is-peek .eye { opacity: 1; }
.rw .eye:hover, .rw.is-peek .eye { background: var(--surface); color: var(--brand); box-shadow: 0 0 0 1px var(--border); }
.rw.is-peek { background: var(--sunk); }
.rw.is-out { opacity: .38; }
.rw.is-out label { cursor: default; }
@media (hover: none) { .rw .eye { opacity: 1; } }
.unit + .unit { margin-top: 8px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--line); }
.unit-h { display: flex; align-items: center; gap: 12px; padding: 4px 16px 4px 4px; padding-inline-start: 4px; padding-inline-end: 16px; }
.unit-tg { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: start; cursor: pointer;
  transition: background .3s var(--ease); }
.unit-tg:hover { background: var(--sunk); }
.unit-ch { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--sunk); color: var(--ink-2); font-size: 18px;
  transition: transform .45s var(--ease), background .3s; }
.unit.is-open .unit-ch { transform: rotate(180deg); background: var(--brand-soft); color: var(--brand); }
.unit-sel { flex: none; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 600; }
.unit-sel[hidden] { display: none; }
.unit-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.unit.is-open .unit-b { grid-template-rows: 1fr; }
.unit-b > .rows { min-height: 0; overflow: hidden; }
.unit.is-open .unit-b > .rows { padding-bottom: 6px; }
.unit-t { flex: 1; min-width: 0; display: grid; line-height: 1.4; }
.unit-t small { font-size: 11.5px; font-weight: 600; color: var(--brand); letter-spacing: .02em; }
.unit-t b { font-size: 15px; }
.unit-n { font-size: 12.5px; color: var(--ink-3); }
.unit .rows { padding-inline-start: 34px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { background: #fff; box-shadow: var(--shadow-lg); }
.empty { padding: 32px; text-align: center; color: var(--ink-3); font-size: 15px; }

.dock { position: fixed; z-index: 35; inset-inline: 0; bottom: 22px; margin: 0 auto; width: min(460px, calc(100% - 32px)); display: flex; align-items: center; gap: 8px;
  padding: 8px; padding-inline-start: 20px; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: 0 24px 48px -16px rgba(15,23,42,.5);
  transform: translateY(150%); transition: transform .5s var(--ease); }
.dock.is-on { transform: none; }
.dock .sum { flex: 1; min-width: 0; margin: 0; font-size: 14px; color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock .sum b { color: #fff; font-weight: 600; }
.dock form { margin: 0; }
.dock .btn { height: 42px; border-radius: 13px; font-size: 14px; padding: 0 16px; }
.dock .btn-ghost { color: rgba(255,255,255,.82); }
.dock .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.dock .btn-primary { box-shadow: none; padding: 0 22px; }

/* the preview: a quiet panel from the far side */
.pv-back { position: fixed; inset: 0; z-index: 125; background: rgba(15,23,42,.12); opacity: 0; transition: opacity .28s var(--ease); }
.pv-back.is-open { opacity: 1; }
.pv { position: fixed; z-index: 130; top: 12px; bottom: 12px; inset-inline-end: 12px; width: min(480px, calc(100% - 24px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 30px 70px -30px rgba(15,23,42,.35); overflow: hidden;
  transform: translateX(calc(-104% * var(--toward, 1))); opacity: 0; transition: transform .38s var(--ease), opacity .25s; }
html[dir=rtl] .pv { --toward: 1; } html[dir=ltr] .pv { --toward: -1; }
.pv.is-open { transform: none; opacity: 1; }
.pv-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; }
.pv-tt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pv-tt small { font-size: 12px; font-weight: 600; color: var(--brand); }
.pv-tt b { font-size: 19px; line-height: 1.4; }
#pvMeta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
#pvMeta b { color: var(--ink-2); }
.pv-x { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--sunk); color: var(--ink-2); font-size: 18px; cursor: pointer; }
.pv-x:hover { background: #e7edef; color: var(--ink); }
.pv-key { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; transition: background .2s, color .2s; }
.pv-key:hover { background: var(--sunk); color: var(--ink); }
.pv-key input { position: absolute; opacity: 0; pointer-events: none; }
.pv-key .sw { width: 32px; height: 19px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .25s; }
.pv-key .sw i { position: absolute; top: 2.5px; inset-inline-start: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.pv-key input:checked + .sw { background: var(--brand); }
html[dir=rtl] .pv-key input:checked + .sw i { transform: translateX(-13px); } html[dir=ltr] .pv-key input:checked + .sw i { transform: translateX(13px); }
.pv-key input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.pv-b { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 24px; display: grid; align-content: start; gap: 4px; border-top: 1px solid var(--border); }
.pv-b[dir=ltr] { font-family: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif; }
.pv-q { padding: 14px 0; display: grid; gap: 10px; }
.pv-q + .pv-q { border-top: 1px dashed var(--line-2); }
.pv-q-t { display: flex; gap: 10px; align-items: flex-start; }
.pv-n { flex: none; min-width: 24px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); font: 600 12px/1 var(--num); margin-top: 3px; }
.pv-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.85; }
.pv-text p, .pv-ex-h p { margin: 0; }
.pv-text img, .pv-opts img, .pv-bank img { max-width: 100%; height: auto; max-height: 220px; object-fit: contain; border-radius: 6px; vertical-align: middle; }
.pv-text p:has(> img:only-child) { margin: 6px 0; }
.pv-opts img { max-height: 110px; display: block; }
.pv-b table { max-width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.pv-b th, .pv-b td { border: 1px solid var(--line-2); padding: 4px 8px; text-align: center; }
.pv-b th { background: var(--brand-soft); color: var(--brand-ink); }
.pv-b .table-responsive { overflow-x: auto; }
.pv-b .code-snippet, .pv-b .code, .pv-b .code-block { font-family: ui-monospace, 'SF Mono', Menlo, monospace; direction: ltr; unicode-bidi: isolate; background: #e0f2f1; border-radius: 5px; font-size: .9em; }
.pv-b .code-snippet, .pv-b .code { padding: 0 5px; }
.pv-b .code-block { display: block; padding: 8px 10px; white-space: pre-wrap; text-align: left; }
.pv-b .fraction-container { display: inline-block; text-align: center; vertical-align: middle; margin: 0 3px; line-height: 1.2; }
.pv-b .fraction-container .numerator { display: block; border-bottom: 1px solid currentColor; font-size: .9em; }
.pv-b .fraction-container .denominator { display: block; font-size: .9em; }
.pv-b .mixed-number-wrapper, .pv-b .sqrt-wrapper, .pv-b .cuberoot-symbol-wrapper { display: inline-flex; align-items: center; direction: ltr; unicode-bidi: isolate; }
.pv-b .sqrt-symbol { display: inline-block; transform: scaleX(-1); }
.pv-b .radicand, .pv-b .overline { text-decoration: overline; }
.pv-b .cuberoot-index { font-size: .7em; position: relative; top: -.4em; }
.pv-b .textbook-ref, .pv-b .curriculum-ref, .pv-b .source-ref { display: none; }
.pv-b .question-image-note { display: block; color: var(--ink-3); font-style: italic; font-size: .9em; }
.pv-bank span :is(p, div) { display: inline; margin: 0; }
.pv-tf { display: flex; gap: 8px; padding-inline-start: 34px; }
.pv-tf span, .pv-opts li { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.pv-tf span { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); }
.pv-opts { list-style: none; margin: 0; padding: 0; padding-inline-start: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.pv-opts li i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); }
.pv-bank { display: flex; flex-wrap: wrap; gap: 6px; padding-inline-start: 34px; }
.pv-ex-h .pv-bank { padding: 0; margin-top: 8px; }
.pv-bank span { padding: 3px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--border); font-size: 13px; }
.pv-blank { display: inline-block; min-width: 64px; height: 1.45em; vertical-align: middle; margin: 0 3px; border: 1.5px dashed var(--brand-line); border-radius: 6px; text-align: center; }
.pv-match { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; padding-inline-start: 34px; font-size: 13.5px; }
.pv-ml, .pv-mr { display: flex; gap: 8px; align-items: center; }
.pv-ml b { font: 600 12px/1 var(--num); color: var(--ink-3); }
.pv-mr em { width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1.5px solid var(--line-2); font: 600 11px/17px var(--num); font-style: normal; text-align: center; color: transparent; }
.pv-lines { padding-inline-start: 34px; display: grid; gap: 12px; }
.pv-lines i { display: block; height: 1px; background: var(--line-2); }
.pv-model { margin: 0; padding-inline-start: 34px; font-size: 13.5px; }
.pv-ex { margin: 12px 0 4px; }
.pv-ex-h { padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); }
.pv-ex-h small { display: block; font-size: 11.5px; font-weight: 600; color: var(--brand); }
.pv-ex-h b { display: block; font-size: 15px; margin: 2px 0 4px; }
.pv-ex-h p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.pv-ex .pv-q-t .pv-text { padding-inline-start: 0; }
.pv .ans { display: none; }
.pv.show-key .ans { display: inline; color: var(--brand-ink); font-weight: 600; }
.pv.show-key .pv-model.ans { display: block; padding: 8px 12px; margin-inline-start: 34px; border-radius: 10px; background: var(--brand-soft); }
.pv.show-key .pv-model.ans ~ .pv-lines, .pv.show-key .pv-lines:has(+ .pv-model) { display: none; }
.pv.show-key .pv-tf span.ok { background: var(--brand); border-color: var(--brand); color: #fff; }
.pv.show-key .pv-opts li.ok { color: var(--brand-ink); font-weight: 600; }
.pv.show-key .pv-opts li.ok i { background: var(--brand); border-color: var(--brand); }
.pv.show-key .pv-mr em { color: var(--brand-ink); border-color: var(--brand); }
.pv-skel { display: grid; gap: 14px; padding-top: 14px; }
.pv-skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--sunk), #e9eff1, var(--sunk)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.pv-skel i:nth-child(3n+2) { width: 70%; } .pv-skel i:nth-child(3n) { width: 45%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pv-f { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); }
.pv-nav { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--ink-2); font-size: 20px; cursor: pointer; }
.pv-nav:hover { border-color: var(--border-hover); color: var(--ink); }
.pv-pick { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.pv-pick:hover { border-color: var(--brand); color: var(--brand-ink); }
.pv-pick.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pv-pick:disabled { opacity: .45; cursor: default; }
.pv-pick i { font-size: 17px; }

/* an English subject's pages */
.is-en { --font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif; }

/* your sheets */
.mine { margin-top: 60px; scroll-margin-top: 90px; }
.mine-h { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.mine-h h2 { margin: 0; font-size: 22px; }
.mine-h small { font: 600 12px/1 var(--num); color: var(--ink-2); background: var(--sunk); padding: 5px 8px; border-radius: 8px; }
.mine-h input { width: min(280px, 50vw); height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); outline: 0; font-size: 14px; }
.mine-h input:focus { box-shadow: 0 0 0 1.5px var(--brand), 0 0 0 5px var(--brand-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 22px; }
.sh { position: relative; display: grid; gap: 12px; align-content: start; }
.sh .pp { position: relative; display: block; border-radius: 8px; box-shadow: 0 0 0 1px rgba(15,23,42,.06), 0 16px 30px -20px rgba(15,23,42,.4); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.sh .pp .pg { border-radius: 8px; }
.sh:hover .pp { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 0 0 1px rgba(15,23,42,.06), 0 28px 44px -22px rgba(15,23,42,.5); }
.sh .cnt { position: absolute; inset-inline-start: 8px; bottom: 8px; font-size: 11.5px; line-height: 1; color: var(--ink-2); background: rgba(241,245,247,.95); padding: 6px 9px; border-radius: 8px; }
.sh .cnt b { font-weight: 600; }
.sh .acts { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(15,23,42,.3); opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .15s; }
.sh:hover .acts, .sh:focus-within .acts { opacity: 1; transform: none; }
.sh .acts form { display: contents; }
.sh .acts button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 15px; }
.sh .acts button:hover { background: var(--sunk); color: var(--ink); }
.sh .acts button.danger:hover { background: rgba(197,59,59,.1); color: var(--red); }
.sh .t { display: grid; gap: 2px; min-width: 0; }
.sh .t strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.sh .t small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh .t input { font-size: 14px; font-weight: 600; border: 0; border-bottom: 1.5px solid var(--brand); border-radius: 0; background: transparent; outline: 0; padding: 0 0 2px; width: 100%;
  unicode-bidi: plaintext; text-align: start; }
.sh-new { display: grid; place-items: center; aspect-ratio: 210 / 297; border: 1.5px dashed var(--line-2); border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 14px;
  transition: border-color .2s, color .2s, background .2s; }
.sh-new:hover { border-color: var(--brand); color: var(--brand-ink); background: rgba(235,245,249,.6); }
.sh-new span { display: grid; place-items: center; gap: 8px; }
.sh-new i { font-size: 28px; }
.mine-empty { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.mine-empty .me-art { width: 72px; flex: none; border-radius: 5px; overflow: hidden; box-shadow: 0 12px 24px -14px rgba(15,23,42,.4); transform: rotate(-4deg); }
.mine-empty > div:nth-child(2) { flex: 1; }
.mine-empty b { display: block; font-size: 16.5px; margin-bottom: 4px; }
.mine-empty span { color: var(--ink-2); font-size: 14.5px; }
.toast { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 11px 18px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .16s var(--ease); }

/* arrows that point "forward" follow the reading direction */
html[dir=ltr] .crumbs .cr-back i, html[dir=ltr] .cr-sep { transform: scaleX(-1); }

@media (max-width: 980px) {
  .picks { grid-template-columns: 1fr; }
  .pick { grid-template-columns: 170px 1fr; grid-template-rows: auto; }
  .pick-art { height: auto; min-height: 150px; }
  .pick-art .pg-s { width: 80px; margin-left: -40px; bottom: -30px; }
  .nodes, .subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .naming { grid-template-columns: 1fr; padding: 26px; }
  .naming-art { display: none; }
}
@media (max-width: 620px) {
  .st-main { padding-top: 80px; }
  .pick { grid-template-columns: 1fr; }
  .pick-art { min-height: 130px; }
  .nodes, .subjects { grid-template-columns: 1fr; }
  .node { height: 170px; }
  .me .who { display: none; }
  .rw .mx span:not(.tot) { display: none; }
  .pv { top: auto; bottom: 0; inset-inline: 0; width: 100%; height: 86vh; border-radius: 22px 22px 0 0; transform: translateY(104%); }
  .pv.is-open { transform: none; }
  .pv-opts, .pv-match { grid-template-columns: 1fr; }
  .mine-empty { flex-wrap: wrap; }
  .dock { padding-inline-start: 14px; }
}
/* phones: one thumb, one column of choices, everything within reach */
@media (max-width: 620px) {
  .st-main { padding-top: 76px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .picks { gap: 12px; }
  .pick { grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: auto; border-radius: 20px; }
  .pick-art { min-height: 0; height: auto; }
  .pick-art .pg-s { width: 54px; margin-left: -27px; bottom: -18px; }
  .pick-art .s1 { transform: translateX(16px) rotate(6deg); }
  .pick-art .s2 { transform: translateX(-12px) rotate(-3deg) translateY(-8px); }
  .pick-art .yr { top: 10px; inset-inline-start: 10px; font-size: 11px; padding: 4px 6px; border-radius: 7px; }
  .pick-tx { padding: 16px 16px 18px; gap: 4px; }
  .pick-tx b { font-size: 16.5px; }
  .pick-tx > span { font-size: 13.5px; line-height: 1.7; min-height: 0; }
  .pick:hover { transform: none; }
  .mine { margin-top: 40px; }
  .mine-h { flex-wrap: wrap; row-gap: 12px; }
  .mine-h input { order: 9; width: 100%; height: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .sh .t strong { font-size: 13.5px; }
  .node { height: 128px; padding: 18px 20px; border-radius: 20px; }
  .node-tx b { font-size: 21px; }
  .node-ill { width: 86px; height: 86px; bottom: -18px; }
  .node-ill i { font-size: 52px; }
  .subjects { gap: 10px; }
  .subj { height: 76px; border-radius: 16px; }
  .subj-im { width: 54px; height: 54px; border-radius: 13px; }
  .dock { bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 20px); border-radius: 20px; }
  .crumbs { row-gap: 4px; }
  .pv { height: 88dvh; padding-bottom: env(safe-area-inset-bottom); }
  .pv::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line-2); }
  .pv-h { padding-top: 24px; }
}
/* iOS zooms the page into any field under 16px: on touch screens they are 16px */
@media (hover: none) and (max-width: 1024px) { input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px; } }

/* a sheet's actions on a touch screen: behind one «⋯», opened by a tap, closed by the next */
.sh .more { display: none; }
@media (hover: none) {
  .sh .more { display: grid; place-items: center; position: absolute; z-index: 2; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.96); color: var(--ink-2); font-size: 18px; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(15,23,42,.35); transition: opacity .2s, transform .25s var(--ease); }
  .sh .acts { opacity: 0; pointer-events: none; transform: scale(.92); transform-origin: top left; transition: opacity .2s, transform .25s var(--ease); }
  html[dir=ltr] .sh .acts { transform-origin: top right; }
  .sh.is-acts .acts { opacity: 1; pointer-events: auto; transform: none; }
  .sh.is-acts .more { opacity: 0; transform: scale(.8); pointer-events: none; }
  .sh .acts button { width: 36px; height: 36px; }
  .sh:hover .acts { opacity: 0; }
  .sh.is-acts:hover .acts { opacity: 1; }
}
/* the «استمر» bar never covers the end of the page */
body:has(.dock.is-on) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.me .av { overflow: hidden; }
.me .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
