/* Elll Cut: base layout, typography, controls, dialogs, sign-in and credits.
   Built strictly in the Elll Logo Identity: dark #0C110F canvas, #394B44 logo green blocks,
   #F2EFE7 paper cream primary action, square geometry, zero circles, zero shadows, zero gradients,
   zero text under 13px, zero horizontal overflow across 1280px and 375px in EN LTR and AR RTL. */

@font-face { font-family: "Avenir"; src: url("fonts/Avenir-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TheYearOfTheCamel"; src: url("fonts/TheYearofTheCamel-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "TheYearOfTheCamel"; src: url("fonts/TheYearofTheCamel-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "TheYearOfTheCamel"; src: url("fonts/TheYearofTheCamel-Bold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "TheYearOfTheCamel"; src: url("fonts/TheYearofTheCamel-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --elll: #394B44;
  --sage: #85B49A;
  --sage-ink: #0C110F;
  --canvas: #0C110F;
  --surface-1: #121916;
  --surface-2: #19221E;
  --surface-hover: #212C27;
  --border: #26322D;
  --border-strong: #5E6F68;
  --text-1: #F2EFE7;
  --text-2: #BCC5C0;
  --text-3: #8F9B95;
  --block: #394B44;
  --block-hover: #42574F;
  --block-ink: #F2EFE7;
  --block-line: #C9D3CE;
  --paper: #F2EFE7;
  --ink: #0C110F;
  --accent: #F2EFE7;
  --accent-hover: #FFFFFF;
  --accent-ink: #0C110F;
  --accent-text: #A8CBBB;
  --accent-soft: #1C2823;
  --ok: #8FCBAA;
  --ok-soft: #142319;
  --warn: #E9C27A;
  --warn-soft: #2A2214;
  --bad: #F2958A;
  --bad-soft: #2C1816;
  --shadow: none;
  --glow: none;
  --r-card: 0px;
  --r-ctl: 3px;
  --gutter: clamp(18px, 4.2vw, 60px);
  --rise: cubic-bezier(.2, .7, .2, 1);
  --font: "Avenir", "TheYearOfTheCamel", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-2xs: 0.8125rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.3125rem;
  --fs-2xl: 1.625rem;
  --fs-3xl: 2.0625rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --sage: #2F5446;
  --sage-ink: #F3F0E8;
  --canvas: #F3F0E8;
  --surface-1: #FBF9F4;
  --surface-2: #E8E5DC;
  --surface-hover: #DFDCD2;
  --border: #D3CFC3;
  --border-strong: #7C8781;
  --text-1: #0F1513;
  --text-2: #3B4742;
  --text-3: #56635D;
  --block: #394B44;
  --block-hover: #2F3F39;
  --block-ink: #F3F0E8;
  --block-line: #CBD5D0;
  --paper: #F3F0E8;
  --ink: #0F1513;
  --accent: #0F1513;
  --accent-hover: #26322D;
  --accent-ink: #F3F0E8;
  --accent-text: #2F5446;
  --accent-soft: #E1E8E3;
  --ok: #2E6650;
  --ok-soft: #E0EDE3;
  --warn: #764A0D;
  --warn-soft: #F4E8CC;
  --bad: #9A382A;
  --bad-soft: #F5E4DE;
}

:root[dir="rtl"], [dir="rtl"] {
  --font: "TheYearOfTheCamel", "Avenir", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); overflow-x: clip; font-synthesis: none; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--canvas);
  color: var(--text-1);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
#app { min-height: 100svh; display: flex; flex-direction: column; }
body:has(.backdrop) { overflow-y: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
svg.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.ico.lg { width: 18px; height: 18px; }
svg.ico.sm { width: 14px; height: 14px; }

:focus-visible { outline: 2px solid var(--text-1); outline-offset: 2px; }
::selection { background: var(--elll); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); width: 100%; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
[hidden] { display: none !important; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

html[dir="ltr"] .bidi-start,
html[dir="ltr"] [dir="auto"]:not(input, textarea, select, bdi) {
  text-align: left;
  unicode-bidi: plaintext;
}
html[dir="rtl"] .bidi-start,
html[dir="rtl"] [dir="auto"]:not(input, textarea, select, bdi) {
  text-align: right;
  unicode-bidi: plaintext;
}

/* ── Elll Logo Mark & Header ─────────────────────────────────────────────────── */
.elll-mark {
  display: inline-block; flex: none; width: 30px; height: 30px; background: currentColor;
  -webkit-mask: url("logo-mark.svg?v=2026-12-03.3") center / contain no-repeat;
  mask: url("logo-mark.svg?v=2026-12-03.3") center / contain no-repeat;
}

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 58px; }

.studio-wordmark {
  display: inline-flex; gap: 11px; align-items: center; flex: none;
  min-height: 36px; color: var(--text-1);
}
.studio-wordmark > span {
  font-family: "Avenir", system-ui, sans-serif;
  font-weight: 400; font-size: 19px; line-height: 1;
  letter-spacing: .01em; color: var(--text-2);
}
.studio-wordmark > span.wm-ar {
  font-family: "TheYearOfTheCamel", system-ui, sans-serif;
  font-weight: 500; font-size: 18px; letter-spacing: 0;
}

.shell-nav {
  display: inline-flex; align-items: center; gap: 4px;
  margin-inline-start: 10px;
}
.shell-nav-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; min-width: 36px;
  padding: 0 13px; border-radius: var(--r-ctl);
  border: 1px solid transparent; color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 400; white-space: nowrap;
  transition: background .15s, color .15s;
}
html[dir="rtl"] .shell-nav-link { font-weight: 500; }
.shell-nav-link .ico { display: none; }
.shell-nav-link:hover { color: var(--text-1); background: var(--surface-1); }
.shell-nav-link.on { color: var(--text-1); background: var(--surface-2); }

.appearance-tools { display: flex; gap: 4px; flex: none; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 0 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong); background: transparent;
  font-size: var(--fs-xs); color: var(--text-1); white-space: nowrap;
  flex-shrink: 0; transition: border-color .15s, background .15s;
}
button.credits-pill { cursor: pointer; font: inherit; font-size: var(--fs-xs); }
button.credits-pill:hover { border-color: var(--text-2); background: var(--surface-2); }
.credits-pill[aria-current="page"],
button.credits-pill[aria-expanded="true"] { background: var(--surface-2); border-color: var(--text-1); }
.pill.warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; min-width: 38px; padding: 0 9px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  background: transparent; color: var(--text-1);
  cursor: pointer; font-size: var(--fs-sm); flex-shrink: 0;
  transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--surface-2); }

.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; min-width: 38px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  background: transparent; color: var(--text-1); cursor: pointer;
  font-size: var(--fs-sm); white-space: nowrap; flex-shrink: 0;
  transition: background .15s;
}
.lang-btn:hover { background: var(--surface-2); }
.lang-btn [lang="ar"] { font-family: "TheYearOfTheCamel", system-ui, sans-serif; }
.lang-btn [lang="en"] { font-family: "Avenir", system-ui, sans-serif; }

.avatar {
  width: 38px; height: 38px; border-radius: var(--r-ctl); flex-shrink: 0;
  background: var(--surface-2); color: var(--text-1);
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 400;
  border: 1px solid var(--border-strong);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.avatar:hover { background: var(--surface-hover); border-color: var(--text-2); }

.menu {
  position: fixed; inset-inline-end: max(18px, calc((100vw - 1120px) / 2)); top: 60px;
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: 0; min-width: 224px; padding: 6px; z-index: 50;
}
.menu.context { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu .who-name { font-size: var(--fs-base); color: var(--text-1); }
html[dir="rtl"] .menu .who-name { font-weight: 600; }
.menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  text-align: start; min-height: 42px; padding: 8px 12px;
  border: 0; background: none; border-radius: var(--r-ctl);
  cursor: pointer; font-size: var(--fs-sm); color: var(--text-1);
}
.menu button:hover { background: var(--surface-2); }

.credits-panel { min-width: 260px; max-width: min(320px, calc(100vw - 32px)); padding: 14px 16px; display: grid; gap: 10px; }
.credits-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: var(--fs-sm); color: var(--text-2); }
.credits-row b { color: var(--text-1); font-weight: 400; white-space: nowrap; }
html[dir="rtl"] .credits-row b { font-weight: 600; }
.credits-row.lead b { font-size: var(--fs-xl); letter-spacing: -0.02em; }
.credits-low { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--warn); font-size: var(--fs-sm); }
.credits-who { margin: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.credits-panel .btn { width: 100%; justify-content: center; }

.studio-main { padding-bottom: 48px; flex: 1; }
.studio-footer {
  margin: auto auto 0; padding-block: 24px 20px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: var(--fs-xs);
}

/* ── Typography ──────────────────────────────────────────────────────────────── */
h1 { font-size: var(--fs-3xl); line-height: 1.08; letter-spacing: -0.03em; margin: 24px 0 8px; font-weight: 400; color: var(--text-1); }
h2 { font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -0.015em; margin: 24px 0 12px; font-weight: 400; color: var(--text-1); }
h3 { font-size: var(--fs-lg); margin: 0 0 6px; font-weight: 400; color: var(--text-1); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.lead { font-size: var(--fs-base); color: var(--text-2); margin: 0 0 20px; max-width: 640px; line-height: 1.55; }

/* ── Controls, Cards & Inputs ────────────────────────────────────────────────── */
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 0; }
.pad { padding: 20px; }

label.field { display: block; min-width: 0; }
label.field > span {
  display: block; font-size: var(--fs-xs); font-weight: 400;
  color: var(--text-2); margin-bottom: 6px;
}
html[dir="rtl"] label.field > span { font-weight: 500; }

input[type=text], input[type=url], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-width: 0; border: 1.5px solid var(--border-strong);
  background: var(--surface-1); color: var(--text-1);
  border-radius: var(--r-ctl); padding: 10px 13px;
  outline: none; transition: border-color .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { border-color: var(--text-1); }
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-ctl);
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font-weight: 400; font-size: var(--fs-base); letter-spacing: .005em;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
html[dir="rtl"] .btn { font-weight: 600; letter-spacing: 0; }
.btn:hover:not([disabled]) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled] { background: var(--surface-2); border-color: var(--border); color: var(--text-3); cursor: not-allowed; }
.btn.subtle { background: transparent; color: var(--text-1); border-color: var(--border-strong); }
.btn.subtle:hover:not([disabled]) { background: var(--surface-2); border-color: var(--text-2); }
.btn.ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn.ghost:hover:not([disabled]) { background: var(--surface-2); color: var(--text-1); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.btn.danger:hover:not([disabled]) { background: color-mix(in srgb, var(--bad) 22%, var(--canvas)); }
.btn.small { min-height: 36px; min-width: 36px; padding: 0 13px; font-size: var(--fs-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 26px; padding: 2px 9px; border-radius: 0;
  font-size: var(--fs-xs); background: var(--surface-2); color: var(--text-2);
  font-weight: 400; white-space: nowrap; border: 1px solid var(--border);
}
html[dir="rtl"] .chip { font-weight: 500; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.run { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

.tabs {
  display: inline-flex; padding: 3px; border-radius: 0;
  background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; gap: 2px;
}
.tabs button {
  min-height: 36px; min-width: 36px; padding: 0 13px; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--text-2); font-size: var(--fs-xs);
  font-weight: 400; cursor: pointer; transition: background .15s, color .15s;
}
.tabs button.on { background: var(--surface-1); color: var(--text-1); }

.searchbox { position: relative; min-width: 210px; flex: 1 1 210px; max-width: 280px; }
.searchbox input { padding-inline-start: 34px; min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: var(--fs-sm); }
.searchbox .ico { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }

.library-filters {
  display: flex; gap: 16px; border-block-end: 1px solid var(--border); margin-block: 8px 18px; flex-wrap: wrap;
}
.library-filters button {
  cursor: pointer; background: transparent; color: var(--text-3); padding: 10px 8px;
  border: 0; border-block-end: 2px solid transparent; font-size: var(--fs-sm); font-weight: 400;
  min-height: 40px; min-width: 36px;
}
html[dir="rtl"] .library-filters button { font-weight: 500; }
.library-filters button[aria-pressed=true] { border-color: var(--text-1); color: var(--text-1); }

.empty {
  padding: 28px 20px; text-align: center; color: var(--text-2);
  border: 1px dashed var(--border-strong); background: var(--surface-1);
}

.notice {
  display: flex; gap: 11px; align-items: center; flex-wrap: wrap;
  padding: 12px 15px; border-radius: 0;
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 36%, transparent);
  font-size: var(--fs-sm);
}
.notice.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 36%, transparent); }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 36%, transparent); }
.notice.info { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 36%, transparent); }
.notice .grow { color: inherit; }

.back {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; min-width: 36px;
  margin-top: 14px; color: var(--text-2); font-size: var(--fs-sm);
}
.back:hover { color: var(--text-1); }

/* ── Focused Modal Dialogs ───────────────────────────────────────────────────── */
html.dialog-open { overflow: hidden; }
.backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(12, 17, 15, 0.8);
  display: grid; place-items: center; padding: 16px;
}
.dialog {
  width: 100%; max-width: 680px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: 0; overflow: hidden;
}
.dialog.narrow { max-width: 440px; }
.dialog.wide { max-width: 860px; }
.dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.dialog-head h2 { margin: 0; font-size: var(--fs-lg); }
.dialog-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.dialog-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-1);
}

/* ── Toast & 3-bar Sound-Meter Spinner (zero gradient, zero circle) ──────────── */
#toast {
  position: fixed; inset-inline: 16px; bottom: 18px;
  display: flex; justify-content: center; pointer-events: none; z-index: 80;
}
#toast .t {
  background: var(--text-1); color: var(--canvas);
  padding-block: 8px; padding-inline: 14px 8px; border-radius: 0; font-size: var(--fs-sm);
  display: inline-flex; gap: 8px; align-items: center;
  animation: rise .18s var(--rise); pointer-events: auto; max-width: 100%;
}
html[dir="rtl"] #toast .t { font-weight: 500; }
#toast .t button {
  border: 1px solid color-mix(in srgb, var(--canvas) 35%, transparent);
  background: transparent; color: inherit; border-radius: var(--r-ctl);
  padding: 4px 10px; min-height: 36px; font-size: var(--fs-xs); cursor: pointer;
}
#toast .t button.dismiss {
  border: 0; padding: 0; width: 36px; min-width: 36px; height: 36px;
  display: grid; place-items: center; opacity: 0.78;
}
#toast .t button.dismiss:hover { opacity: 1; background: color-mix(in srgb, var(--canvas) 14%, transparent); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.spin {
  position: relative; display: inline-block; flex-shrink: 0;
  width: 3px; height: 13px; margin-inline: 6px; vertical-align: -1px;
  border: 0; color: inherit; background: currentColor; transform-origin: bottom;
  animation: elll-meter-mid .9s ease-in-out infinite;
}
.spin::before, .spin::after {
  content: ""; position: absolute; bottom: 0; width: 3px; height: 100%;
  background: currentColor; transform-origin: bottom;
  animation: elll-meter .9s ease-in-out infinite;
}
.spin::before { left: -6px; }
.spin::after { right: -6px; animation-delay: -.45s; }
@keyframes elll-meter { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes elll-meter-mid { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.35); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Sign In & Promotable Standalone Landing (#/signin) ─────────────────────── */
.signin-fallback { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.cut-signin-top .wrap { min-height: 58px; flex-wrap: nowrap; }
.cut-signin-main {
  flex: 1;
  padding-block: clamp(24px, 5vw, 64px) clamp(36px, 6vw, 64px);
}
.cut-signin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 410px);
  grid-template-areas:
    "head card"
    "pillars card";
  gap: 24px clamp(28px, 5vw, 64px);
  align-items: start;
}
.cut-hero-head {
  grid-area: head;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.cut-pillars-wrap {
  grid-area: pillars;
  min-width: 0;
}
.cut-hero-title {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 15ch;
  color: var(--text-1);
}
html[dir="rtl"] .cut-hero-title {
  line-height: 1.28;
  letter-spacing: 0;
  max-width: 18ch;
}
.cut-hero-sub {
  margin: 0;
  max-width: 48ch;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-2);
}
.cut-pillars {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cut-pillar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 20px;
  background: var(--block);
  color: var(--block-ink);
}
.cut-pillar-num {
  font-size: var(--fs-sm);
  color: var(--block-line);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.cut-pillar-title {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.25;
  color: var(--block-ink);
}
html[dir="rtl"] .cut-pillar-title { font-weight: 600; }
.cut-pillar-line {
  margin: 4px 0 0;
  font-size: var(--fs-sm);
  line-height: 1.48;
  color: var(--block-line);
}

.cut-signin-card {
  grid-area: card;
  padding: 26px 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  display: grid;
  gap: 16px;
}
.cut-signin-card h2 {
  margin: 0;
  font-size: var(--fs-xl);
}
.cut-signin-sub {
  margin: 4px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.cut-signin-form { display: grid; gap: 14px; }
.cut-signin-form input { min-height: 46px; }
.cut-signin-form .btn[type="submit"] { width: 100%; min-height: 50px; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { padding-inline-end: 46px; }
.pw-toggle {
  position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-hover); color: var(--text-1); }

.cut-dev-block {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cut-dev-label {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.cut-dev-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cut-dev-row .btn { flex: 1 1 130px; }

/* ── Credits & Ledger ────────────────────────────────────────────────────────── */
.budget-heading { margin-block: 12px 22px; display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.budget-heading h1 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.budget-summary { background: var(--surface-1); border: 1px solid var(--border); padding: clamp(18px, 3vw, 32px); }
.budget-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; gap: 15px; align-items: end; }
.budget-summary dt { color: var(--text-2); font-size: var(--fs-sm); }
.budget-summary dd { margin: 6px 0 0; font-size: clamp(1.35rem, 3.2vw, 2.75rem); letter-spacing: -.04em; line-height: 1.15; }
.credits-summary { display: grid; gap: 14px; }
.credits-summary p { margin: 0; }
.credits-explain { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; color: var(--text-2); max-width: 640px; }
.credits-explain .ico { margin-top: 4px; }
.credits-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.credits-form { display: grid; gap: 12px; align-content: start; padding: 18px 20px; background: var(--surface-1); border: 1px solid var(--border); }
.credits-form h2 { margin: 0; font-size: var(--fs-lg); }
.credits-form p { margin: 0; }
.credits-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.credits-form-row .field:first-child { flex: 0 1 150px; }
.credits-form-row .field.grow { flex: 1 1 200px; }
.credits-receipt:empty { display: none; }
.credits-receipt .notice { margin: 0; }
.receipt.ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: var(--fs-sm); }

.table-wrap { overflow-x: auto; max-width: 100%; }
table.ledger { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.ledger th, table.ledger td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.ledger th { color: var(--text-3); font-weight: 400; font-size: var(--fs-xs); white-space: nowrap; }
table.ledger tr:last-child td { border-bottom: 0; }

.brand-logo {
  width: 44px; height: 44px; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-2);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-monogram {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: var(--fs-lg); font-weight: 400; line-height: 1;
}

@media (max-width: 900px) {
  .cut-signin-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "card"
      "pillars";
    gap: 20px;
  }
}
@media (max-width: 760px) {
  .credits-forms { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: var(--fs-2xl); margin-top: 20px; }
}
@media (max-width: 560px) {
  .top .wrap { gap: 6px; min-height: 54px; }
  .budget-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-summary dl > div:last-child { grid-column: 1 / -1; }
  .searchbox { max-width: none; width: 100%; }
  .cut-signin-card { padding: 20px 18px; }
}
