/* =========================================================
   Mizan Contract Analyzer — stylesheet (shared Mizan design system + app components)
   Palette: Saudi green + sand gold. Signature: the 8-point khatam star.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --brand:        #005C3A;   /* Saudi green: buttons, active states */
  --brand-hover:  #00472D;
  --brand-deep:   #003B26;   /* page title bands, top bar */
  --accent:       #005C3A;   /* green used for text and icons */
  --gold:         #A88A4E;   /* sand gold: patterns, rules, focus */
  --gold-ink:     #76602F;   /* gold that is readable as text */
  --green-soft:   #E2EEE7;
  --gold-soft:    #F3EDE0;

  --bg:        #F4F7F5;
  --surface:   #FFFFFF;
  --surface-2: #EBF0EC;
  --ink:       #14231C;
  --muted:     #51615A;
  --line:      #D5DDD8;
  --on-brand:  #FFFFFF;

  --danger: #A3322A;  --danger-soft: #FAE9E7;
  --ok:     #1F6B45;  --ok-soft:     #E2F1E8;
  --sev-high: #A3322A; --sev-high-soft: #FAE9E7;
  --sev-med:  #8A5A0B; --sev-med-soft:  #F7EDD8;
  --sev-low:  #3E6A56; --sev-low-soft:  #E6EFEA;
  --info: #22577A; --info-soft: #E4EEF5;

  --shadow-sm: 0 1px 2px rgb(20 35 28 / .06);
  --shadow:    0 1px 2px rgb(20 35 28 / .05), 0 18px 40px -22px rgb(20 35 28 / .35);
  --r-s: 6px; --r: 10px; --r-l: 16px;

  --font-body: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Amiri', 'Traditional Arabic', 'Times New Roman', serif;
  --lh-body: 1.85;
  --lh-head: 1.45;

  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* 8-point khatam tile, used as a mask so its colour follows the theme */
  --khatam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Cpath d='M0 28h7.5M48.5 28H56M28 0v7.5M28 48.5V56'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E");
  --star: polygon(50% 0%, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%, 100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0% 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%);
  color-scheme: light;
}

html[lang="en"] {
  --font-display: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --lh-body: 1.65;
  --lh-head: 1.2;
}

html[data-theme="dark"] {
  --brand:        #1D7A50;
  --brand-hover:  #238F5E;
  --brand-deep:   #0B1F16;
  --accent:       #63C496;
  --gold:         #C8AD6D;
  --gold-ink:     #D9C089;
  --green-soft:   #16301F;
  --gold-soft:    #2A2517;

  --bg:        #0C1611;
  --surface:   #121F19;
  --surface-2: #172821;
  --ink:       #E6EDE9;
  --muted:     #9FB1A7;
  --line:      #263A30;

  --danger: #F08C80;  --danger-soft: #3A1A17;
  --ok:     #7FD4A8;  --ok-soft:     #14301F;
  --sev-high: #F08C80; --sev-high-soft: #3A1A17;
  --sev-med:  #E3B35E; --sev-med-soft:  #33280F;
  --sev-low:  #8CC7A9; --sev-low-soft:  #16291F;
  --info: #8EC3E6; --info-soft: #132631;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow:    0 1px 2px rgb(0 0 0 / .3), 0 18px 40px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
html[data-theme="dark"] a:hover { color: var(--gold-ink); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: var(--lh-head);
  margin: 0 0 .5em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 1.35rem + 3.1vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.4vw, 2.35rem); }
h3 { font-size: 1.3rem; }
html[lang="en"] h3 { font-size: 1.2rem; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: #1B1407; }

.icon { flex: none; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 200;
  background: var(--brand); color: var(--on-brand); padding: .6rem 1rem; border-radius: var(--r-s);
}
.skip-link:focus { top: 1rem; color: var(--on-brand); }
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1.2rem; min-height: 44px;
  border: 1px solid transparent; border-radius: var(--r-s);
  font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: .85rem 1.5rem; min-height: 52px; font-size: 1.02rem; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--gold { background: var(--gold); color: #1B1407; }
.btn--gold:hover { background: #BA9C5C; color: #1B1407; }
.btn[disabled] { opacity: .65; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.text-btn {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .4rem;
  background: none; border: 0; color: var(--muted); font-size: .9rem; cursor: pointer; border-radius: 4px;
}
.text-btn:hover { color: var(--danger); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; text-decoration: none; color: var(--accent);
}
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(4px); }

/* ---------- Top bar ---------- */
.topbar { background: var(--brand-deep); color: #DCE8E1; font-size: .86rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar__info { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; }
.topbar__info li { display: inline-flex; align-items: center; gap: .45rem; }
.topbar__info .icon { color: var(--gold); }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__lang { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; padding: .2rem .5rem; border-radius: 4px; }
.topbar__lang .icon { color: var(--gold); }

/* ---------- Header / navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .3s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: var(--brand); color: var(--gold); clip-path: var(--star);
}
html[data-theme="dark"] .brand__mark { color: #E6D4A6; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; }
.brand__text small { font-size: .74rem; color: var(--muted); margin-top: .2rem; }

.nav { margin-inline-start: auto; }
.nav__list { display: flex; align-items: center; gap: .15rem; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .7rem; border-radius: var(--r-s);
  color: var(--muted); font-weight: 500; font-size: .96rem; text-decoration: none; white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after {
  content: ''; position: absolute; inset-inline: .7rem; bottom: -.95rem; height: 2px; background: var(--gold);
}
.nav__drawer-head, .nav__drawer-cta { display: none; }

.header__actions { display: flex; align-items: center; gap: .5rem; }
.lang-btn { font-weight: 700; font-size: .92rem; }
html[lang="en"] .lang-btn { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 1.05rem; }
.theme-btn__sun { display: none; }
html[data-theme="dark"] .theme-btn__sun { display: block; }
html[data-theme="dark"] .theme-btn__moon { display: none; }
.nav-toggle { display: none; }
.nav-backdrop { position: fixed; inset: 0; z-index: 90; background: rgb(6 14 10 / .55); }
.nav-backdrop[hidden] { display: none; }

@media (max-width: 1060px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 100;
    width: min(22rem, 88vw); margin: 0; padding: 1rem 1.25rem 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    background: var(--surface); border-inline-start: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateX(105%); visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
    overflow-y: auto;
  }
  [dir="rtl"] .nav { transform: translateX(-105%); }
  .nav-open .nav { transform: none; visibility: visible; transition: transform .3s var(--ease); }
  .nav__drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
  .nav__drawer-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
  .nav__list { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav__link { display: flex; padding: .8rem .9rem; font-size: 1.02rem; color: var(--ink); }
  .nav__link.is-active { background: var(--green-soft); }
  .nav__link.is-active::after { inset-inline: auto 0; inset-inline-start: 0; top: .6rem; bottom: .6rem; width: 3px; height: auto; }
  .nav__drawer-cta { display: inline-flex; margin-top: auto; }
  .nav-open { overflow: hidden; }
  .nav-open .site-header { z-index: 110; }
}
@media (max-width: 720px) {
  .topbar__hide-md { display: none !important; }
}
@media (max-width: 560px) {
  .topbar__status > span:not(.topbar__pill) { display: none; }
  .topbar__status--user { visibility: hidden; }
  .header__inner { gap: .75rem; min-height: 66px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__text small { display: none; }
  .icon-btn { width: 40px; height: 40px; }
}

/* ---------- Khatam pattern pieces ---------- */
.khatam-band {
  height: 26px; background: var(--gold); opacity: .55;
  -webkit-mask: var(--khatam) center / 26px 26px repeat-x; mask: var(--khatam) center / 26px 26px repeat-x;
}
.hero__pattern, .page-hero__pattern, .cta-band__pattern {
  position: absolute; inset: 0; pointer-events: none; background: var(--gold);
  -webkit-mask-image: var(--khatam), linear-gradient(to left, #000, transparent 60%);
  -webkit-mask-size: 56px 56px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-image: var(--khatam), linear-gradient(to left, #000, transparent 60%);
  mask-size: 56px 56px, 100% 100%;
  mask-composite: intersect;
}
[dir="rtl"] .hero__pattern, [dir="rtl"] .page-hero__pattern, [dir="rtl"] .cta-band__pattern {
  -webkit-mask-image: var(--khatam), linear-gradient(to right, #000, transparent 60%);
  mask-image: var(--khatam), linear-gradient(to right, #000, transparent 60%);
}

/* Octagram badge used for icons */
.star-badge {
  display: grid; place-items: center; width: 56px; height: 56px; flex: none;
  background: var(--green-soft); color: var(--accent); clip-path: var(--star);
}
.star-badge--lg { width: 68px; height: 68px; }

.seal {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  background: var(--gold); color: #1B1407; clip-path: var(--star);
}
.seal--lg { width: 72px; height: 72px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tint { background: var(--surface-2); }
.section__head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head p { color: var(--muted); font-size: 1.08rem; }
.section__head--split { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.section__head--split > div { max-width: 40rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--surface); padding-block: clamp(3rem, 7vw, 6rem); }
.hero__pattern { opacity: .22; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__title { max-width: 19ch; margin-bottom: .45em; }
html[lang="en"] .hero__title { max-width: 20ch; }
.hero__lead { max-width: 36rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* One orchestrated entrance, hero only */
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__lead, .hero__actions, .hero__sheet { animation: rise .7s var(--ease) both; }
  .hero__lead    { animation-delay: .08s; }
  .hero__actions { animation-delay: .16s; }
  .hero__sheet   { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- The "petition sheet" form ---------- */
.sheet {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden;
}
.sheet::before { content: ''; display: block; height: 4px; background: linear-gradient(90deg, var(--brand), var(--gold)); }
.sheet__head { display: flex; align-items: center; gap: .9rem; padding: 1.2rem 1.5rem; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.sheet__title { font-size: 1.3rem; margin: 0; }
.sheet__sub { margin: 0; font-size: .88rem; color: var(--muted); }
.sheet__body { padding: 1.4rem 1.5rem 1.5rem; }
.sheet__label { display: block; font-weight: 600; margin-bottom: .5rem; }
.sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; flex-wrap: wrap; }
.sheet__note { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .86rem; color: var(--muted); }
.sheet__note .icon { color: var(--gold-ink); }

textarea.ruled {
  display: block; width: 100%; resize: vertical; min-height: 11rem;
  padding: .35rem .9rem; border: 1px solid var(--line); border-radius: var(--r);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2rem - 1px), var(--line) calc(2rem - 1px), var(--line) 2rem);
  background-attachment: local;
  background-position: 0 .35rem;
  line-height: 2rem; font-size: 1.02rem;
  transition: border-color .2s, box-shadow .2s;
}
textarea.ruled::placeholder { color: var(--muted); opacity: .8; }
textarea.ruled:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Home: practice area grid ---------- */
.area-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.area-cell {
  display: flex; flex-direction: column; gap: .2rem; height: 100%;
  padding: 1.8rem 1.6rem; background: var(--surface); color: var(--ink); text-decoration: none;
  transition: background-color .2s;
}
.area-cell:hover { background: var(--surface-2); color: var(--ink); }
.area-cell .star-badge { margin-bottom: .9rem; transition: background-color .2s, color .2s; }
.area-cell:hover .star-badge { background: var(--brand); color: var(--on-brand); }
.area-cell h3 { margin-bottom: .3rem; }
.area-cell p { color: var(--muted); font-size: .97rem; }

/* ---------- Numbered steps (real sequences only) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.steps--four { grid-template-columns: repeat(4, 1fr); }
.steps__item { position: relative; padding-top: 4.4rem; counter-increment: step; }
.steps__item::before {
  content: counter(step); position: absolute; top: 0; inset-inline-start: 0;
  font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-weight: 700; color: var(--gold);
}
html[lang="ar"] .steps__item::before { content: counter(step, arabic-indic); }
.steps__item::after {
  content: ''; position: absolute; top: 1.75rem; inset-inline-start: 3.4rem; inset-inline-end: -1rem;
  height: 1px; background: var(--line);
}
.steps__item:last-child::after { display: none; }
.steps__item p { color: var(--muted); }

/* ---------- Trust statements ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.trust__item { display: flex; gap: 1rem; align-items: flex-start; }
.trust__item > .icon { color: var(--gold-ink); margin-top: .35rem; }
.trust__item h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.trust__item p { color: var(--muted); font-size: .97rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--brand-deep); color: #E8F0EB; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band__pattern { opacity: .3; }
.cta-band__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { max-width: 40rem; color: #C8D8CF; }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--brand-deep); color: #E8F0EB; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-hero__pattern { opacity: .28; }
.page-hero__inner { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero__lead { max-width: 42rem; font-size: 1.1rem; color: #C8D8CF; }
.crumbs { display: flex; gap: .5rem; font-size: .88rem; margin-bottom: 1rem; color: #A9C0B4; }
.crumbs a { color: var(--gold); text-decoration: none; }
html[data-theme="dark"] .crumbs a { color: var(--gold-ink); }
.crumbs a:hover { text-decoration: underline; color: #fff; }

/* ---------- About ---------- */
.story { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.prose p { max-width: 38rem; font-size: 1.08rem; }
.story__quote {
  margin: 0; padding: 2.5rem 2rem; text-align: center;
  border-block: 1px solid var(--gold);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.story__quote blockquote { margin: 0; }
.story__quote blockquote p { font-family: var(--font-display); font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem); line-height: 1.4; color: var(--accent); margin: 0; }
.story__quote figcaption { color: var(--muted); font-size: .92rem; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.values__item .star-badge { margin-bottom: 1rem; background: var(--surface); }
.values__item p { color: var(--muted); font-size: .97rem; }

.notice {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  margin-top: clamp(2.5rem, 5vw, 4rem); padding: 1.5rem 1.75rem;
  border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: var(--r);
  background: var(--gold-soft);
}
.notice > .icon { color: var(--gold-ink); }
.notice > div { flex: 1 1 22rem; }
.notice__title { font-size: 1.25rem; margin-bottom: .2rem; }
.notice p { color: var(--muted); margin: 0; }
.notice--accent { background: var(--green-soft); border-inline-start-color: var(--brand); }
.notice--accent > .icon { color: var(--accent); }

/* ---------- Services ---------- */
.practice-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); }
.practice { display: flex; gap: 1.4rem; padding-block: 2.2rem; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.practice:nth-child(-n+2) { padding-top: 0; }
.practice h2 { font-size: 1.55rem; margin-bottom: .3rem; }
.practice__body > p { color: var(--muted); }
.practice__matters { font-size: .95rem; padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--r-s); }
.practice__matters strong { color: var(--ink); font-weight: 600; }
.practice:target .star-badge { background: var(--brand); color: var(--on-brand); }

/* ---------- Analyzer ---------- */
.analyzer { display: grid; grid-template-columns: 1.25fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.analyzer .sheet__head .pill { margin-inline-start: auto; }
.analyzer__meta { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.counter { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 600; }
.field__hint { font-size: .9rem; color: var(--muted); margin: -.2rem 0 .7rem; }

.samples { margin-top: 1.1rem; }
.samples__label { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.samples__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: .9rem; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--green-soft); }

.pill {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--warn { background: var(--gold-soft); color: var(--gold-ink); }

.result {
  position: sticky; top: 100px;
  padding: 1.6rem 1.6rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
}
.result__heading { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; color: var(--muted); padding-bottom: .9rem; margin-bottom: 1.25rem; border-bottom: 1px dashed var(--line); }
.result__empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .8rem; padding: 2.5rem 1rem; color: var(--muted); margin: 0; }
.result__empty .icon { color: var(--gold); }
.result__kicker { font-size: .9rem; color: var(--muted); margin-bottom: .2rem; }
.result__label { font-family: var(--font-display); font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.5rem); font-weight: 700; line-height: 1.3; color: var(--accent); margin-bottom: 1.2rem; }
.result__sub { font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--muted); margin: 1.6rem 0 .8rem; }
.result__muted { color: var(--muted); font-size: .92rem; margin-top: 1rem; }
.result__cta { margin-top: 1.6rem; width: 100%; }
.result__disclaimer { display: flex; align-items: center; gap: .45rem; margin: .9rem 0 0; font-size: .84rem; color: var(--muted); }
.result__disclaimer .icon { color: var(--gold-ink); }
.result.is-fresh #resultBody { animation: rise .45s var(--ease) both; }

.meter-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .92rem; margin-bottom: .45rem; }
.meter-row strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.meter { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--brand), var(--gold)); border-radius: inherit; transition: width .7s var(--ease); }
[dir="rtl"] .meter span { background: linear-gradient(-90deg, var(--brand), var(--gold)); }
.meter--thin { height: 6px; }
.meter--thin span { background: var(--muted); opacity: .55; }
.bars { display: grid; gap: .8rem; }
.bars__row { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: .3rem; }
.bars__row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid; margin-bottom: 1.25rem; }
.alert p { margin: 0; }
.alert .icon { margin-top: .2rem; }
.alert--error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.alert--success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.alert__title { font-family: var(--font-body); font-size: 1.05rem; margin: 0 0 .15rem; color: inherit; }

/* ---------- Knowledge ---------- */
.kb { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group h2 { font-size: 1.6rem; padding-bottom: .6rem; border-bottom: 2px solid var(--gold); margin-bottom: .25rem; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-weight: 600; font-size: 1.05rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq__chev { color: var(--gold-ink); transition: transform .25s var(--ease); }
.faq[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding-bottom: 1.25rem; color: var(--muted); max-width: 44rem; }

.kb__side { display: grid; gap: 1.25rem; position: sticky; top: 100px; }
.side-box { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.side-box__title { display: flex; align-items: center; gap: .55rem; font-size: 1.3rem; }
.side-box__title .icon { color: var(--gold-ink); }
.side-box > p { color: var(--muted); font-size: .95rem; }
.law-list { display: grid; gap: .1rem; margin-top: .5rem; }
.law-list li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.law-list li:last-child { border-bottom: 0; }
.law-list .icon { color: var(--accent); }
.side-box--green { background: var(--brand-deep); border-color: transparent; color: #E8F0EB; }
.side-box--green .side-box__title { color: #fff; }
.side-box--green .side-box__title .icon { color: var(--gold); }
.side-box--green > p { color: #C8D8CF; }

/* ---------- Contact / forms ---------- */
.contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.field__opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  display: block; width: 100%; padding: .72rem .9rem; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  transition: border-color .2s, box-shadow .2s;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field--error input, .field--error textarea { border-color: var(--danger); }
.field__error { display: flex; align-items: center; gap: .35rem; color: var(--danger); font-size: .88rem; margin: .4rem 0 0; }
.select { position: relative; }
.select select { appearance: none; padding-inline-end: 2.5rem; cursor: pointer; }
.select__chev { position: absolute; inset-inline-end: .8rem; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--muted); }

.check { display: flex !important; align-items: flex-start; gap: .7rem; font-weight: 400 !important; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; margin-top: .2rem;
  border: 1.5px solid var(--line); border-radius: 5px; background: var(--surface); color: transparent;
  transition: background-color .2s, border-color .2s;
}
.check input:checked + .check__box { background: var(--brand); border-color: var(--brand); color: #fff; }
.check input:focus-visible + .check__box { outline: 2px solid var(--gold); outline-offset: 2px; }
.field--error .check__box { border-color: var(--danger); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact__info { padding-top: .5rem; }
.contact__info h2 { font-size: 1.6rem; }
.info-list { margin: 0; }
.info-list > div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.info-list dt { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--muted); margin-bottom: .25rem; }
.info-list dt .icon { color: var(--gold-ink); }
.info-list dd { margin: 0; font-weight: 500; font-size: 1.05rem; }
.info-list a { color: var(--ink); text-decoration: none; }
.info-list a:hover { color: var(--accent); text-decoration: underline; }
.contact__remote { display: flex; gap: .6rem; margin-top: 1.5rem; padding: 1rem; background: var(--green-soft); border-radius: var(--r); font-size: .95rem; }
.contact__remote .icon { color: var(--accent); margin-top: .25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 0; }
.site-footer .khatam-band { opacity: .35; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer__brand p { color: var(--muted); font-size: .95rem; max-width: 26rem; margin-top: 1rem; }
.footer__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.footer__col ul { display: grid; gap: .55rem; }
.footer__col a { color: var(--muted); text-decoration: none; }
.footer__col a:hover { color: var(--accent); text-decoration: underline; }
.footer__contact li { display: flex; gap: .6rem; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.footer__contact .icon { color: var(--gold-ink); margin-top: .3rem; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap;
  padding-block: 1.25rem 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted);
}
.footer__bottom p { margin: 0; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; z-index: 60;
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; background: var(--brand); color: var(--on-brand);
  box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s linear .25s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s var(--ease), background-color .2s; }
.to-top:hover { background: var(--brand-hover); }
.to-top > .icon { grid-area: 1 / 1; }
.to-top__ring { grid-area: 1 / 1; width: 52px; height: 52px; transform: rotate(-90deg); }
.to-top__ring circle { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; stroke-linecap: round; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .steps--four { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .steps--four .steps__item:nth-child(2)::after { display: none; }
}
@media (max-width: 900px) {
  .hero__grid, .story, .analyzer, .kb, .contact { grid-template-columns: 1fr; }
  .hero__title { max-width: none; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .practice-list { grid-template-columns: 1fr; }
  .practice:nth-child(2) { padding-top: 2.2rem; }
  .trust { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .steps__item::after { display: none; }
  .result, .kb__side { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .area-grid { grid-template-columns: 1fr; }
  .values, .steps--four { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .sheet__head, .sheet__body { padding-inline: 1.1rem; }
  .analyzer .sheet__head .pill { margin-inline-start: 0; }
  .sheet__foot .btn { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .to-top { inset-block-end: 1rem; inset-inline-end: 1rem; width: 48px; height: 48px; }
  .to-top__ring { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .topbar, .site-header, .to-top, .khatam-band, .nav-backdrop, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}

/* =========================================================
   Contract Analyzer components
   ========================================================= */

/* ---------- Top bar status ---------- */
.topbar__status { display: flex; align-items: center; gap: .5rem; margin: 0; min-width: 0; }
.topbar__status--user .icon { flex: none; }
.topbar__status > span:not(.topbar__pill) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__status .icon { color: var(--gold); }
.topbar__pill { padding: .05rem .6rem; border-radius: 999px; background: rgb(255 255 255 / .12); font-weight: 600; white-space: nowrap; }
.topbar__link { font-weight: 600; color: var(--gold) !important; text-decoration: underline !important; }

/* ---------- Navbar with auth actions ---------- */
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav__auth { display: flex; align-items: center; gap: .5rem; }
.nav__auth form { margin: 0; }
.btn.is-current { border-color: var(--accent); color: var(--accent); }
@media (max-width: 1060px) {
  .nav { align-items: stretch; gap: 1rem; }
  .nav__auth { flex-direction: column; align-items: stretch; margin-top: auto; }
  .nav__auth .btn, .nav__auth form { width: 100%; }
}

.btn--block { width: 100%; }
.btn--danger { background: var(--sev-high); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--sev-high) 85%, #000); color: #fff; }
html[data-theme="dark"] .btn--danger { color: #1A0B09; }

.flash-wrap { padding-top: 1.25rem; }
.flash-wrap .alert { margin-bottom: .75rem; }
.alert--info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: var(--info); }

/* ---------- Home hero: annotated clause ---------- */
.hero__formats { display: flex; align-items: center; gap: .45rem; margin-top: 1.25rem; font-size: .9rem; color: var(--muted); }
.hero__formats .icon { color: var(--gold-ink); }
.demo { position: relative; margin: 0; padding-block: 1rem; display: flex; flex-direction: column; }
.demo__paper {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
  padding: 1.6rem 1.7rem 1.8rem; position: relative;
}
.demo__paper::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--gold); border-start-start-radius: var(--r-l); border-end-start-radius: var(--r-l); }
.demo__head { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: .6rem; }
.demo__text { font-size: 1.02rem; line-height: 2; margin-bottom: 1rem; }
.demo__text mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--sev-med) 30%, transparent) 55%); color: inherit; padding-inline: .1rem; }
.demo__lines { display: grid; gap: .7rem; }
.demo__lines span { height: 7px; border-radius: 4px; background: var(--surface-2); }
.demo__lines span:nth-child(2) { width: 88%; } .demo__lines span:nth-child(3) { width: 94%; } .demo__lines span:nth-child(4) { width: 70%; } .demo__lines span:nth-child(5) { width: 80%; }
.demo__note {
  position: relative; display: grid; gap: .25rem; width: fit-content; max-width: 18rem; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid; border-radius: var(--r);
  box-shadow: var(--shadow); font-size: .9rem;
}
.demo__note span:last-child:not(.sev-tag) { color: var(--muted); }
.demo__note .sev-tag { justify-self: start; }
.demo__note--medium { border-inline-start-color: var(--sev-med); align-self: flex-end; margin-top: -2.4rem; margin-inline-end: -1.25rem; }
.demo__note--high { border-inline-start-color: var(--sev-high); align-self: flex-start; margin-top: -.9rem; margin-inline-start: 1.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero__demo { animation: rise .7s var(--ease) .24s both; }
  .demo__note--medium { animation: rise .6s var(--ease) .75s both; }
  .demo__note--high { animation: rise .6s var(--ease) 1s both; }
}
@media (max-width: 900px) { .demo__note--medium { margin-inline-end: .75rem; } }
@media (max-width: 480px) { .demo__note { max-width: 14.5rem; } }

/* ---------- Home: checks & modes ---------- */
.check-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.check-cell { padding: 1.8rem 1.6rem; background: var(--surface); }
.check-cell .star-badge { margin-bottom: .9rem; }
.check-cell p { color: var(--muted); font-size: .97rem; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 24rem)); gap: 1.5rem; }
.mode { display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.mode--member { border: 2px solid var(--brand); }
.mode h3 { display: flex; align-items: center; gap: .6rem; margin: 0; }
.mode h3 .icon { color: var(--gold-ink); }
.mode ul { display: grid; gap: .6rem; flex: 1; }
.mode li { display: flex; gap: .55rem; align-items: flex-start; }
.mode li .icon { color: var(--accent); margin-top: .3rem; }
.mode li.is-off { color: var(--muted); }
.mode li.is-off .icon { color: var(--muted); }
@media (max-width: 900px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .check-grid, .modes { grid-template-columns: 1fr; } }

/* ---------- Auth ---------- */
.auth__wrap { max-width: 31rem; }
.auth .sheet__title { font-size: 1.5rem; }
.auth__switch { margin-top: 1.1rem; text-align: center; color: var(--muted); }
.auth__switch a { font-weight: 600; }
.auth__or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.1rem; color: var(--muted); font-size: .9rem; }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth__note { font-size: .86rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.pw { position: relative; }
.pw input { padding-inline-end: 3rem !important; }
.pw__toggle {
  position: absolute; inset-inline-end: .35rem; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pw__toggle:hover { color: var(--accent); background: var(--surface-2); }
.field input[type="password"] {
  display: block; width: 100%; padding: .72rem .9rem; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  transition: border-color .2s, box-shadow .2s;
}
.field input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field--error input[type="password"] { border-color: var(--danger); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }

/* ---------- Analyze ---------- */
.analyze { max-width: 50rem; }
.guest-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem;
  padding: .8rem 1rem; border-radius: var(--r); background: var(--gold-soft); color: var(--ink); font-size: .95rem;
}
.guest-bar .icon { color: var(--gold-ink); }
.guest-bar a { font-weight: 600; margin-inline-start: auto; }
.notice--guest { margin-top: 0; margin-bottom: 1.5rem; }
.notice__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.tabs { margin-bottom: 1.2rem; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs__bar { display: flex; gap: .25rem; padding: .25rem; background: var(--surface-2); border-radius: var(--r); margin-bottom: 1rem; }
.tabs__bar label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 7px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tabs__bar label:hover { color: var(--ink); }
#mode-upload:checked ~ .tabs__bar label[for="mode-upload"],
#mode-paste:checked ~ .tabs__bar label[for="mode-paste"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
#mode-upload:focus-visible ~ .tabs__bar label[for="mode-upload"],
#mode-paste:focus-visible ~ .tabs__bar label[for="mode-paste"] { outline: 2px solid var(--gold); outline-offset: 2px; }
.tabs__panel { display: none; }
#mode-upload:checked ~ .tabs__panel--upload, #mode-paste:checked ~ .tabs__panel--paste { display: block; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center;
  padding: 2.2rem 1.25rem; border: 2px dashed var(--line); border-radius: var(--r-l);
  background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--green-soft); }
.drop.has-file { border-style: solid; border-color: var(--accent); }
.drop__icon { display: grid; place-items: center; width: 64px; height: 64px; background: var(--green-soft); color: var(--accent); clip-path: var(--star); }
.drop__title { font-weight: 600; }
.drop__hint { font-size: .87rem; color: var(--muted); }
.drop__file { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: .92rem; }
.drop__file.is-error { background: var(--danger-soft); color: var(--danger); }
.drop__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop__input:focus-visible + .drop__tip, .drop:focus-within { outline: none; }
.drop__input:focus-visible ~ * { }
.drop__tip { display: flex; gap: .4rem; align-items: flex-start; margin-top: .7rem; }
.drop__tip .icon { margin-top: .25rem; color: var(--gold-ink); }
.counter { text-align: end; margin: .4rem 0 0; }
.sheet__foot .btn[aria-busy="true"] { opacity: .75; cursor: progress; }

/* ---------- Report: summary ---------- */
.section--report { padding-top: clamp(2rem, 4vw, 3rem); }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip-meta { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: rgb(255 255 255 / .1); color: #E8F0EB; font-size: .88rem; }
.chip-meta .icon { color: var(--gold); }

.summary {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: 1.75rem; margin-bottom: 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-sm);
}
.score { display: flex; align-items: center; gap: 1.25rem; }
.score__star {
  --c: var(--sev-low);
  display: grid; place-items: center; align-content: center; width: 132px; height: 132px; flex: none;
  background: var(--c); color: #fff; clip-path: var(--star); position: relative;
}
.score--medium .score__star { --c: var(--sev-med); }
.score--high .score__star { --c: var(--sev-high); }
html[data-theme="dark"] .score__star { color: #10140F; }
.score__num { font-family: var(--font-display); font-size: 2.9rem; font-weight: 700; line-height: 1; }
.score__of { font-size: .74rem; opacity: .9; margin-top: .2rem; }
.score__label { margin: 0; font-size: .9rem; color: var(--muted); }
.score__level { margin: .1rem 0 .5rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.score--low .score__level { color: var(--sev-low); }
.score--medium .score__level { color: var(--sev-med); }
.score--high .score__level { color: var(--sev-high); }
.score__counts { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 0; font-size: .88rem; }
.sev-dot { display: inline-flex; align-items: center; gap: .4rem; }
.sev-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.sev-dot--high { color: var(--sev-high); } .sev-dot--medium { color: var(--sev-med); } .sev-dot--low { color: var(--sev-low); }

.summary__complete .meter { height: 12px; margin-bottom: 1.25rem; }
.summary__complete .meter span { background: var(--brand); }
.summary__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem 1.5rem; margin: 0; }
.summary__meta dt { font-size: .82rem; color: var(--muted); }
.summary__meta dd { margin: 0; font-weight: 600; }

/* Severity tags */
.sev-tag { display: inline-flex; align-items: center; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.sev-tag--high { background: var(--sev-high-soft); color: var(--sev-high); }
.sev-tag--medium { background: var(--sev-med-soft); color: var(--sev-med); }
.sev-tag--low { background: var(--sev-low-soft); color: var(--sev-low); }

/* ---------- Report: body ---------- */
.report { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.report__h { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; font-size: 1.6rem; margin: 1rem 0 1rem; }
.report__h--map { margin-top: 3rem; }
.report__count { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); }
.report__lead { color: var(--muted); margin-top: -.5rem; }
.report__side { display: grid; gap: 1.25rem; position: sticky; top: 100px; margin-top: 1rem; }

.findings { display: grid; gap: .9rem; counter-reset: none; }
.finding {
  padding: 1.15rem 1.3rem; background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--sev-low); border-radius: var(--r);
}
.finding--high { border-inline-start-color: var(--sev-high); }
.finding--medium { border-inline-start-color: var(--sev-med); }
.finding__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .35rem; }
.finding__head h3 { font-size: 1.15rem; margin: 0; }
.finding__desc { color: var(--muted); font-size: .97rem; margin-bottom: .6rem; }
.finding__quote {
  margin: 0 0 .6rem; padding: .7rem .9rem; border-radius: var(--r-s);
  background: var(--surface-2); font-size: .95rem; line-height: 1.8;
  border-inline-start: 2px solid var(--gold);
}
.finding__where { margin: 0 0 .5rem; font-size: .88rem; }
.finding__where a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.finding__where a:hover span { text-decoration: underline; }
.finding__rec { margin: 0; font-size: .95rem; }
.finding__rec strong { color: var(--accent); }

.clause-map { display: grid; gap: .5rem; }
.clause { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line); border-radius: var(--r); scroll-margin-top: 100px; }
.clause--high { border-inline-start-color: var(--sev-high); }
.clause--medium { border-inline-start-color: var(--sev-med); }
.clause--low { border-inline-start-color: var(--sev-low); }
.clause:target { box-shadow: 0 0 0 2px var(--gold); }
.clause summary { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.clause summary::-webkit-details-marker { display: none; }
.clause__n { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); font-size: .82rem; font-weight: 700; color: var(--muted); }
.clause__head { flex: 1; font-weight: 600; min-width: 0; }
.clause__tags { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.tag { padding: .1rem .55rem; border-radius: 999px; background: var(--green-soft); color: var(--accent); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.tag--muted { background: var(--surface-2); color: var(--muted); }
.clause__chev { color: var(--muted); transition: transform .2s var(--ease); }
.clause details[open] .clause__chev { transform: rotate(180deg); }
.clause__text { padding: 0 1rem 1rem 1rem; white-space: pre-line; color: var(--muted); font-size: .95rem; line-height: 1.9; border-top: 1px dashed var(--line); padding-top: .8rem; margin-inline: 1rem; padding-inline: 0; }
@media (max-width: 600px) {
  .clause summary { flex-wrap: wrap; }
  .clause__tags { width: 100%; justify-content: flex-start; padding-inline-start: 2.6rem; }
}

.facts { display: grid; gap: 1rem; margin: 0; }
.facts dt { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.facts dt .icon { color: var(--gold-ink); }
.facts dd { margin: 0 0 .3rem; padding: .35rem .65rem; background: var(--surface-2); border-radius: var(--r-s); font-size: .93rem; font-weight: 500; overflow-wrap: anywhere; }
.facts .facts__none { background: none; padding: 0; color: var(--muted); font-weight: 400; font-style: italic; }

.checklist { display: grid; gap: .1rem; }
.checklist li { display: flex; align-items: center; gap: .55rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist .is-ok .icon { color: var(--ok); }
.checklist .is-missing .icon { color: var(--sev-high); }
.checklist__state { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.checklist .is-missing .checklist__state { color: var(--sev-high); font-weight: 600; }

.report__disclaimer { display: flex; gap: .6rem; align-items: flex-start; margin: 2.5rem 0 1.25rem; padding: 1rem 1.2rem; border-radius: var(--r); background: var(--gold-soft); font-size: .92rem; }
.report__disclaimer .icon { color: var(--gold-ink); margin-top: .25rem; flex: none; }
.report__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.report__actions form { margin: 0; }
[dir="rtl"] .report__actions form { margin-inline-start: auto; }
[dir="ltr"] .report__actions form { margin-inline-start: auto; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dash-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 2rem; }
.stats > div { padding: 1.2rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.stats dt { font-size: .88rem; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--accent); line-height: 1.3; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: .9rem 1.1rem; text-align: start; border-bottom: 1px solid var(--line); font-size: .95rem; }
.table thead th { font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody th { font-weight: 600; }
.table tbody th a { color: var(--ink); text-decoration: none; }
.table tbody th a:hover { color: var(--accent); text-decoration: underline; }
.risk-pill { display: inline-flex; padding: .15rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.risk-pill--high { background: var(--sev-high-soft); color: var(--sev-high); }
.risk-pill--medium { background: var(--sev-med-soft); color: var(--sev-med); }
.risk-pill--low { background: var(--sev-low-soft); color: var(--sev-low); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-l); }
.empty > .icon { color: var(--gold); }
.empty p { color: var(--muted); }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Account ---------- */
.account { max-width: 44rem; display: grid; gap: 1.5rem; }
.panel { padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel__title { display: flex; align-items: center; gap: .55rem; font-size: 1.3rem; margin-bottom: 1rem; }
.panel__title .icon { color: var(--gold-ink); }
.panel--danger { border-color: color-mix(in srgb, var(--sev-high) 40%, var(--line)); }
.panel--danger .panel__title .icon { color: var(--sev-high); }
.panel--danger > p { color: var(--muted); }

.footer__note { display: flex; gap: .55rem; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.footer__note .icon { color: var(--gold-ink); margin-top: .3rem; flex: none; }

/* ---------- Report responsive + print ---------- */
@media (max-width: 900px) {
  .summary { grid-template-columns: 1fr; }
  .report { grid-template-columns: 1fr; }
  .report__side { position: static; }
}
@media (max-width: 600px) {
  .summary { padding: 1.25rem; }
  .score__star { width: 108px; height: 108px; }
  .score__num { font-size: 2.3rem; }
  .summary__meta { grid-template-columns: repeat(2, 1fr); }
  .report__actions .btn, .report__actions form { width: 100%; }
}
@media print {
  .page-hero { background: none !important; color: #000; padding: 0 0 1rem; }
  .page-hero h1 { color: #000; }
  .page-hero__pattern, .crumbs, .report__actions, .notice--guest, .flash-wrap, .site-footer { display: none !important; }
  .chip-meta { color: #000; background: #eee; }
  .clause details > .clause__text { display: block; }
  .report { grid-template-columns: 1fr; }
  .finding, .clause, .summary, .side-box { break-inside: avoid; box-shadow: none; }
}

/* v1.1: review workspace refinements */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: .65rem .85rem; min-height: 46px; max-width: 100%; }
.report-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-sm); margin: 1.5rem 0 .75rem; }
.report-toolbar .field { flex: 1 1 150px; margin: 0; }
.report-toolbar .field:first-child { flex-grow: 2; }
.report-toolbar select { width: 100%; }
.finding-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-block: 1rem; }
.finding-toolbar label { font-weight: 600; }
#findingStatus { color: var(--muted); font-size: .9rem; }
.review-note { background: var(--gold-soft); border: 1px solid var(--line); border-inline-start: 3px solid var(--gold); border-radius: var(--r); padding: 1rem 1.25rem; margin-block: 0 1.5rem; font-size: .94rem; }
.review-note summary { cursor: pointer; font-weight: 600; }
.review-note p { margin-block: .7rem 0; }
.readable { max-width: 820px; margin-inline: auto; }
.readable p { margin-block: 0 1.5rem; }
.table tbody tr:hover { background: var(--surface-2); }
.table th a { display: inline-block; padding-block: .35rem; }
.finding, .clause, .table th, .facts dd { overflow-wrap: anywhere; }
.clause { scroll-margin-top: 110px; }
.clause:target { outline: 2px solid var(--gold); outline-offset: 3px; }
.tabs input[type=radio]:focus-visible ~ .tabs__bar { outline: 2px solid var(--gold); outline-offset: 4px; }
.form-feedback { color: var(--danger); font-weight: 600; margin-block: .5rem; }
@media (max-width: 600px) { .report-toolbar { padding: 1rem; } .report-toolbar .field { flex-basis: 100%; } .finding-toolbar select { flex: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  .finding-toolbar, .review-note, .report-toolbar { display: none !important; }
  .finding[hidden] { display: block !important; }
  .clause__text { overflow: visible !important; max-height: none !important; }
  .finding { break-inside: avoid; }
}

/* v1.2: coordinated palettes and full-width introduction */
html[data-palette="navy"] { --brand:#193B66;--brand-hover:#102C50;--brand-deep:#102640;--accent:#193B66;--gold:#8AACC9;--gold-ink:#456B8A;--green-soft:#EAF0F8;--gold-soft:#EDF3FA; }
html[data-palette="burgundy"] { --brand:#762E49;--brand-hover:#60223A;--brand-deep:#421C2C;--accent:#762E49;--gold:#B78B99;--gold-ink:#815565;--green-soft:#F6EAF0;--gold-soft:#FAEFF2; }
html[data-palette="slate"] { --brand:#354653;--brand-hover:#243440;--brand-deep:#202E38;--accent:#354653;--gold:#94A5AE;--gold-ink:#566B77;--green-soft:#EDF1F4;--gold-soft:#F0F3F5; }
html[data-theme="dark"][data-palette="navy"] { --brand:#315D91;--brand-hover:#3A6DA8;--brand-deep:#101E30;--accent:#9AC4F1;--green-soft:#182A41;--gold-soft:#1A2939;--gold-ink:#B1CEE8; }
html[data-theme="dark"][data-palette="burgundy"] { --brand:#994361;--brand-hover:#AE5071;--brand-deep:#29151F;--accent:#E8ACC0;--green-soft:#381F2B;--gold-soft:#32212A;--gold-ink:#E4B8C6; }
html[data-theme="dark"][data-palette="slate"] { --brand:#536D7F;--brand-hover:#617D91;--brand-deep:#18232B;--accent:#B0CADC;--green-soft:#24333E;--gold-soft:#243039;--gold-ink:#C4D2DC; }
.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; }
.palette-control select { max-width:148px;font-size:.78rem;min-height:38px;padding:.35rem .5rem;border-radius:8px; }
.home-slideshow { position:relative;width:100%;overflow:hidden;background:var(--brand-deep);color:white; }
.home-slide { position:relative;min-height:600px; }
.slide-pattern { position:absolute;inset:0;background:radial-gradient(ellipse at 80% 10%,color-mix(in srgb,var(--gold) 25%,transparent),transparent 65%);pointer-events:none; }
.slide-pattern::after { content:"";position:absolute;inset:0;opacity:.08;background:var(--gold);mask-image:var(--khatam);-webkit-mask-image:var(--khatam); }
.slide-grid { position:relative;display:grid;grid-template-columns:1.15fr .85fr;align-items:center;gap:4rem;padding-block:70px 90px;min-height:600px; }
.slide-eyebrow { display:flex;align-items:center;gap:10px;font-size:.9rem;font-weight:600;letter-spacing:.035em;color:#e7dfc9;margin:0 0 22px; }
.slide-eyebrow>span { width:26px;height:2px;background:currentColor; }
.slide-copy h1,.slide-copy h2 { font-family:var(--font-display);font-size:clamp(2.5rem,4.3vw,4.4rem);line-height:1.3;letter-spacing:-.02em;color:white;max-width:760px;margin:0 0 24px; }
.slide-lead { color:#e0e7e4;font-size:1.12rem;line-height:1.9;max-width:620px;margin:0 0 28px; }
.home-slideshow .btn--primary { background:white;color:var(--brand-deep);border-color:white; }
.home-slideshow .btn--primary:hover { background:#edf2ef; }
.home-slideshow .btn--ghost { background:transparent;color:white;border-color:#ffffff66; }
.slide-facts { display:flex;flex-wrap:wrap;gap:12px 20px;list-style:none;padding:0;margin:28px 0 0;font-size:.8rem;color:#d2dfd8; }
.slide-facts li { display:flex;align-items:center;gap:6px; }
.slide-art { position:relative;max-width:400px;width:100%;justify-self:center;padding:25px; }
.slide-orbit { position:absolute;inset:-25px;border:1px solid #ffffff29;border-radius:50%;aspect-ratio:1; }
.slide-orbit::after { content:"";position:absolute;inset:24px;border:1px solid #ffffff1c;border-radius:50%; }
.slide-document { position:relative;background:#fcfcf9;color:#23362e;padding:32px;border-radius:10px;box-shadow:0 22px 65px #0004;transform:rotate(-4deg); }
[dir="rtl"] .slide-document { transform:rotate(4deg); }
.slide-doc-icon { display:inline-grid;place-items:center;width:66px;height:66px;background:var(--green-soft);color:var(--brand);border-radius:15px; }
.slide-doc-overline { color:#607268;font-size:.8rem;font-weight:bold;margin:22px 0 8px; }
.slide-document h3 { color:#172b21;font-size:1.45rem;line-height:1.5;margin:0 0 12px; }
.slide-document>p:not(.slide-doc-overline) { font-size:.88rem;line-height:1.7;color:#55645c; }
.slide-doc-lines { display:grid;gap:10px;margin:24px 0; }
.slide-doc-lines span { height:6px;background:#e1e8e2;border-radius:9px; }
.slide-doc-lines span:nth-child(2) { width:80%; }.slide-doc-lines span:nth-child(3){width:60%}
.slide-doc-stamp { display:flex;align-items:center;gap:8px;border-top:1px solid #d9e1da;padding-top:16px;font-size:.78rem;color:#466352; }
.slide-badge { position:absolute;inset-inline-end:-12px;bottom:12px;display:flex;align-items:center;gap:12px;background:var(--gold-soft);color:var(--ink);border:1px solid var(--gold);border-radius:10px;padding:16px 20px;box-shadow:0 10px 30px #0003;font-size:.85rem; }
.slideshow-controls { position:relative;display:flex;align-items:center;gap:20px;margin-top:-62px;padding-bottom:20px;z-index:2; }
.slide-dots { display:flex;gap:6px; }.slide-dots button{display:grid;place-items:center;width:36px;height:36px;border:0;background:transparent;cursor:pointer}.slide-dots span{width:8px;height:8px;background:#ffffff66;border-radius:50%}.slide-dots [aria-current="true"] span{width:28px;border-radius:6px;background:white}
.slide-counter{font-size:.8rem;color:#d8e1dc}.slide-navigation{display:flex;align-items:center;gap:8px;margin-inline-start:auto}.slide-navigation .icon-btn{color:white;border:1px solid #ffffff44;font-size:1.5rem}.slide-navigation .btn{font-size:.8rem;min-height:38px;padding:.35rem .7rem}
.export-panel{background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--brand);border-radius:var(--r-l);margin:28px 0;box-shadow:var(--shadow-sm)}
.export-panel>summary{display:flex;align-items:center;gap:10px;padding:20px;font-weight:700;cursor:pointer}.export-panel>summary::after{content:"+";margin-inline-start:auto;font-size:1.4rem}.export-panel[open]>summary::after{content:"−"}
.export-form{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;padding:0 24px 24px}.export-form .field{margin:0}.export-form select{width:100%}.export-form__intro,.export-form__wide,.export-buttons{grid-column:1/-1}.export-buttons{display:flex;gap:10px;flex-wrap:wrap}.export-form__intro{color:var(--muted)}
@media(max-width:900px){.slide-grid{gap:1rem;grid-template-columns:1.15fr .85fr}.slide-art{padding:15px}.slide-document{padding:22px}.slide-badge{inset-inline-end:0;padding:12px}.slide-copy h1,.slide-copy h2{font-size:2.7rem}}
@media(max-width:600px){.slide-grid{grid-template-columns:1fr;padding-block:38px 96px;gap:32px;min-height:760px}.slide-copy h1,.slide-copy h2{font-size:2.35rem}.slide-lead{font-size:1rem}.slide-art{max-width:255px;padding:12px}.slide-document{padding:18px}.slide-doc-icon{width:44px;height:44px}.slide-doc-icon svg{width:28px;height:28px}.slide-doc-overline{margin-top:12px}.slide-document h3{font-size:1.05rem}.slide-doc-lines{margin:14px 0;gap:6px}.slide-document>p:not(.slide-doc-overline){display:none}.slide-badge{font-size:.7rem;padding:10px;bottom:0;inset-inline-end:-12px}.slide-facts{gap:8px 12px;font-size:.72rem;margin-top:18px}.slide-orbit{inset:-8px}.slideshow-controls{gap:8px}.slide-counter{display:none}.slide-dots{gap:0}.slide-dots button{width:28px}.slide-navigation{gap:5px}.export-form{grid-template-columns:1fr;padding:0 16px 16px}.palette-control select{max-width:100px;font-size:.72rem}.brand__text small{max-width:130px}.header__actions{gap:5px}}
@media print{.export-panel,.home-slideshow{display:none!important}}
@media(max-width:600px){.header__inner{flex-wrap:wrap;gap:10px;padding-block:12px}.header__actions{margin-inline-start:auto}.brand__text small{display:none}.header__actions .icon-btn{width:34px;height:34px}.palette-control select{max-width:92px}.header__inner>.brand{gap:7px}.brand__mark{width:34px;height:34px}}
@media(max-width:360px){.palette-control select{max-width:78px}.header__actions{gap:3px}.header__inner{column-gap:6px}.brand__text strong{font-size:1.2rem}.header__actions .icon-btn{width:30px;height:30px}}
