/* Layout concept: cinematic and photo-led. Full-bleed project photography, graphite night sections
   against white and desert-sand daylight sections; red appears only on actions and the logo. */
:root {
  --white: #FFFFFF;
  --paper: #F4F2EE;
  --sand: #E7E0D4;
  --sand-2: #D9CFBE;
  --ink: #15181B;
  --ink-2: #2A2E33;
  --graphite: #1C2024;
  --muted: #676D72;
  --line: #E6E3DD;
  --line-2: #D6D1C8;
  --red: #B90012;
  --red-deep: #8E101B;
  --red-tint: #FBEDEE;
  --ok: #1E7A4C; --warn: #A15C00; --review: #2F5B8C; --na: #6E7378;
  --display: 'Syne', 'Hanken Grotesk', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ar: 'Alexandria', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --maxw: 1360px;
  --hdr: 76px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .display { font-family: var(--ar); letter-spacing: 0; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--ink); }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) { .wrap { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); } }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6.4vw, 6rem); line-height: .98; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; }
html[lang="ar"] h1 { line-height: 1.2; font-weight: 700; }
html[lang="ar"] h2 { line-height: 1.25; }
p { margin: 0; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 58ch; line-height: 1.55; }
.kicker { font-size: .95rem; color: var(--red); font-weight: 600; }
.on-dark .kicker { color: #FF6B74; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border: 1.5px solid currentColor; background: transparent; text-decoration: none; font-weight: 600; font-size: .98rem; cursor: pointer; transition: background .25s, color .25s, border-color .25s; border-radius: 999px; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-white { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-white:hover { background: transparent; color: var(--white); border-color: var(--white); }
.btn-ghost-light { color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.link { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.link:hover { color: var(--red); }

/* Header */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); transition: background .3s, border-color .3s; }
.hdr.over { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; }
.hdr.over .nav a, .hdr.over .lang { color: var(--white); }
.hdr.over .lang { border-color: rgba(255,255,255,.4); background: transparent; }
.hdr.over .burger { border-color: rgba(255,255,255,.4); background: transparent; }
.hdr.over .burger span { background: var(--white); }
.hdr.over .brand { background: var(--white); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: var(--hdr); }
.brand { display: flex; align-items: center; flex: none; padding: 6px 10px; border-radius: 4px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 12px; color: var(--ink-2); border-radius: 999px; transition: background .2s; }
.nav a:hover { background: rgba(127,127,127,.12); }
.nav a.on { color: var(--red); font-weight: 600; }
.hdr.over .nav a.on { color: var(--white); background: rgba(255,255,255,.14); }
.hdr-tools { display: flex; align-items: center; gap: 10px; }
.lang { border: 1px solid var(--line-2); background: var(--white); padding: 8px 14px; font-weight: 600; font-size: .9rem; cursor: pointer; border-radius: 999px; }
html[lang="en"] .lang { font-family: var(--ar); }
.burger { display: none; width: 46px; height: 42px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; border-radius: 999px; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto; }
@media (max-width: 1180px) {
  .nav { position: fixed; inset: calc(var(--hdr) + env(safe-area-inset-top, 0px)) 0 0 0; flex-direction: column; background: var(--ink); padding: 24px max(24px, env(safe-area-inset-left, 0px)) 40px; gap: 0; opacity: 0; pointer-events: none; transition: opacity .25s; overflow: auto; }
  .nav.open { opacity: 1; pointer-events: auto; }
  .nav a, .hdr.over .nav a { font-family: var(--display); font-size: 2rem; font-weight: 600; padding: 12px 0; color: var(--white); border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  html[lang="ar"] .nav a { font-family: var(--ar); }
  .nav a.on, .hdr.over .nav a.on { color: #FF6B74; background: none; }
  .burger { display: block; }
  .hdr-tools { margin-inline-start: auto; }
  .hdr-cta { display: none; }
}
@media (max-width: 420px) { .brand img { height: 36px; } }

/* Hero — the one orchestrated moment: a slow crossfade through real projects */
.hero { position: relative; height: clamp(560px, 92vh, 980px); background: var(--ink); color: var(--white); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero-slide.on img { animation: drift 9s linear forwards; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,14,.55) 0%, rgba(10,12,14,0) 28%, rgba(10,12,14,.1) 50%, rgba(10,12,14,.85) 100%), linear-gradient(90deg, rgba(10,12,14,.45) 0%, rgba(10,12,14,0) 60%); pointer-events: none; }
html[dir="rtl"] .hero::after { background: linear-gradient(180deg, rgba(10,12,14,.55) 0%, rgba(10,12,14,0) 28%, rgba(10,12,14,.1) 50%, rgba(10,12,14,.85) 100%), linear-gradient(270deg, rgba(10,12,14,.45) 0%, rgba(10,12,14,0) 60%); }
.hero-body { position: absolute; inset: auto 0 0 0; z-index: 2; padding-bottom: clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 40px; align-items: end; }
.hero h1 { max-width: 13ch; }
.hero .lead { color: rgba(255,255,255,.82); margin-top: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-now { display: grid; gap: 14px; justify-items: start; }
.hero-now a { text-decoration: none; display: grid; gap: 2px; }
.hero-now .pn { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
html[lang="ar"] .hero-now .pn { font-family: var(--ar); }
.hero-now .pm { color: rgba(255,255,255,.7); font-size: .92rem; }
.hero-bars { display: flex; gap: 6px; width: 100%; }
.hero-bars button { flex: 1; height: 22px; background: none; border: 0; padding: 10px 0; cursor: pointer; }
.hero-bars button i { display: block; height: 2px; background: rgba(255,255,255,.3); position: relative; overflow: hidden; }
.hero-bars button.on i::after { content: ""; position: absolute; inset: 0; background: var(--white); transform-origin: left; animation: fill 7s linear forwards; }
html[dir="rtl"] .hero-bars button.on i::after { transform-origin: right; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-now { display: none; } }

/* Statement */
.statement { padding-block: clamp(80px, 11vw, 160px); }
.statement-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.statement p.big { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.22; letter-spacing: -0.015em; font-weight: 500; max-width: 30ch; text-wrap: pretty; }
html[lang="ar"] .statement p.big { font-family: var(--ar); line-height: 1.6; font-weight: 400; }
.statement p.big b { font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line-2); }
.facts b { font-family: var(--display); font-size: clamp(2.2rem, 3.6vw, 3.4rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; display: block; }
.facts span { color: var(--muted); display: block; margin-top: 8px; max-width: 24ch; }
@media (max-width: 860px) { .statement-grid { grid-template-columns: 1fr; gap: 20px; } .facts { grid-template-columns: 1fr; gap: 24px; } }

/* Section heads */
.sec { padding-block: clamp(72px, 9vw, 128px); }
.sec-sand { background: var(--paper); }
.sec-dark { background: var(--graphite); color: #ECEAE6; }
.sec-dark .lead, .sec-dark .muted { color: #A8ADB2; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.head > div { display: grid; gap: 16px; max-width: 760px; }

/* Project mosaic */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile { position: relative; overflow: hidden; text-decoration: none; color: var(--white); background: var(--ink); border-radius: 6px; isolation: isolate; display: block; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.tile:hover img { transform: scale(1.045); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%); z-index: 1; }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 22px 24px; z-index: 2; display: grid; gap: 4px; }
.tile .cap h3 { font-size: 1.3rem; }
.tile .cap span { font-size: .9rem; color: rgba(255,255,255,.78); }
.t-a { grid-column: span 7; aspect-ratio: 7 / 5; }
.t-b { grid-column: span 5; min-height: 280px; }
.t-c { grid-column: span 4; aspect-ratio: 4 / 3.4; }
.t-w { grid-column: span 12; aspect-ratio: 21 / 8; }
@media (max-width: 900px) { .t-a, .t-b, .t-c { grid-column: span 6; aspect-ratio: 4 / 3; min-height: 0; } .t-w { aspect-ratio: 16 / 9; } }
@media (max-width: 600px) { .t-a, .t-b, .t-c, .t-w { grid-column: span 12; aspect-ratio: 4 / 3; } }

/* Portfolio grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { border: 1px solid var(--line-2); background: var(--white); padding: 9px 16px; font-size: .92rem; font-weight: 500; cursor: pointer; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; }
.chip .n { color: var(--muted); font-size: .8rem; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip.on .n { color: #A8ADB2; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.pcard { text-decoration: none; display: grid; gap: 14px; align-content: start; }
.pcard .pimg { overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; background: var(--sand); max-width: 100%; }
.pcard .pimg img, .pcard .pimg svg { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.pcard:hover .pimg img { transform: scale(1.04); }
.pcard .meta { display: grid; gap: 2px; }
.pcard h3 { font-size: 1.2rem; }
.pcard:hover h3 { color: var(--red); }
.pcard .sub { color: var(--muted); font-size: .92rem; }
@media (max-width: 960px) { .pgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pgrid { grid-template-columns: 1fr; } }

/* Services — expertise list on graphite */
.svc-list { border-top: 1px solid rgba(255,255,255,.14); }
.svc-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 32px; padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,.14); text-decoration: none; align-items: start; }
.svc-row h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 600; transition: color .2s; }
.svc-row:hover h3 { color: #FF6B74; }
.svc-row p { color: #A8ADB2; }
.svc-row .items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.svc-row .items span { border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 999px; font-size: .85rem; color: #D8D6D2; }
.svc-row .go { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.svc-row:hover .go { background: var(--red); border-color: var(--red); }
html[dir="rtl"] .svc-row .go svg { transform: scaleX(-1); }
@media (max-width: 860px) { .svc-row { grid-template-columns: 1fr; gap: 10px; } .svc-row .go { display: none; } }

/* Studio band */
.studio-band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.studio-band .ar-line { font-family: var(--ar); font-size: 1.3rem; line-height: 1.7; color: var(--ink); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 700; color: var(--red); }
.plan-frame { background: var(--graphite); border-radius: 8px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(21,24,27,.55); }
.plan-frame svg { display: block; width: 100%; height: auto; }
.plan-preview { background: #22272B; border-radius: 8px; overflow: hidden; }
.plan-preview svg { display: block; width: 100%; height: auto; }
@media (max-width: 960px) { .studio-band { grid-template-columns: 1fr; } }

/* Clients — original logos in one tone (CSS mask) */
.logo { display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; transition: background-color .3s; }
.clients-band { overflow: hidden; }
.clients-band .head { margin-bottom: 48px; }
.strip { display: flex; overflow: hidden; color: var(--sand-2); -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip-track { list-style: none; margin: 0; padding: 8px 0; display: flex; align-items: center; gap: clamp(56px, 7vw, 104px); padding-inline-end: clamp(56px, 7vw, 104px); flex: none; animation: marquee 48s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip li { display: flex; align-items: center; height: 96px; }
.strip li:hover .logo { background-color: var(--white); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
html[dir="rtl"] .strip-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .strip { flex-wrap: wrap; justify-content: center; -webkit-mask: none; mask: none; } .strip-track { animation: none; flex-wrap: wrap; justify-content: center; padding-inline: 24px; } .strip-track[aria-hidden] { display: none; } }
.logo-wall { min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.logo-wall li { display: grid; justify-items: center; align-content: center; gap: 26px; padding: 56px 24px 40px; color: var(--ink); position: relative; }
.logo-wall li:nth-child(n+4) { border-top: 1px solid var(--line-2); }
.logo-wall li:not(:nth-child(3n+1)) { border-inline-start: 1px solid var(--line-2); }
.logo-wall li .logo { min-height: 0; }
.logo-wall li:hover .logo { background-color: var(--red); }
.logo-wall .cn { display: grid; justify-items: center; gap: 2px; font-size: .9rem; color: var(--muted); text-align: center; }
.logo-wall .cn [lang="ar"] { font-family: var(--ar); font-size: .85rem; }
@media (max-width: 760px) { .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-wall li, .logo-wall li:nth-child(n+4), .logo-wall li:not(:nth-child(3n+1)) { padding: 36px 12px 28px; border: 0; } .logo-wall li:nth-child(n+3) { border-top: 1px solid var(--line-2); } .logo-wall li:nth-child(2n) { border-inline-start: 1px solid var(--line-2); } .logo-wall li:last-child:nth-child(odd) { grid-column: span 2; } .logo-wall .logo { max-width: 100%; } }

/* Why */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
.why > div { display: grid; gap: 10px; align-content: start; }
.why .ic { width: 44px; height: 44px; color: var(--red); }
.why p { color: var(--muted); font-size: .98rem; }
@media (max-width: 960px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why { grid-template-columns: 1fr; } }

/* CTA + footer */
.cta { position: relative; color: var(--white); overflow: hidden; background: var(--ink); }
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.cta .wrap { position: relative; padding-block: clamp(80px, 10vw, 140px); display: grid; gap: 28px; justify-items: start; }
.cta h2 { max-width: 16ch; }
.cta .lead { color: rgba(255,255,255,.8); }
.ftr { background: var(--ink); color: #A8ADB2; font-size: .95rem; }
.ftr .wrap { padding-block: 72px 32px; display: grid; gap: 56px; }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.ftr-logo { background: var(--white); padding: 14px 18px; border-radius: 6px; justify-self: start; }
.ftr-logo img { height: 60px; width: auto; }
.ftr h4 { color: var(--white); font-weight: 600; font-size: 1rem; margin: 0 0 16px; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.ftr a { text-decoration: none; }
.ftr a:hover { color: var(--white); }
.ftr-bot { border-top: 1px solid #2C3136; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.ftr .sel { user-select: all; }
@media (max-width: 960px) { .ftr-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ftr-top { grid-template-columns: 1fr; } }

/* Inner page hero with photo */
.phero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.phero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.phero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,14,.5), rgba(10,12,14,.75)); }
.phero .wrap { position: relative; z-index: 2; padding-block: calc(var(--hdr) + clamp(64px, 9vw, 130px)) clamp(48px, 6vw, 88px); display: grid; gap: 20px; }
.phero .lead { color: rgba(255,255,255,.82); }
.crumbs { font-size: .9rem; color: rgba(255,255,255,.7); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--white); }

/* About */
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.prose { display: grid; gap: 20px; font-size: 1.08rem; max-width: 64ch; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.photo-pair { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; margin-top: 64px; }
.photo-pair img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; aspect-ratio: 4/3; }
.photo-pair img:last-child { aspect-ratio: 3/4; }
@media (max-width: 700px) { .photo-pair { grid-template-columns: 1fr; } .photo-pair img:last-child { aspect-ratio: 4/3; } }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags span, .tags a { border: 1px solid var(--line-2); padding: 9px 16px; font-weight: 500; font-size: .95rem; border-radius: 999px; text-decoration: none; background: var(--white); }
.tags a:hover { border-color: var(--red); color: var(--red); }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.principles div { padding: 22px 16px 22px 0; border-bottom: 1px solid var(--line-2); font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
html[lang="ar"] .principles div { font-family: var(--ar); }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr 1fr; } }

/* Services page */
.sgroup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); padding-block: 64px; border-top: 1px solid var(--line-2); scroll-margin-top: calc(var(--hdr) + 16px); }
.sgroup:first-child { border-top: 0; padding-top: 0; }
.sgroup .gh { display: grid; gap: 18px; align-content: start; position: sticky; top: calc(var(--hdr) + 24px); align-self: start; }
.sgroup .gh img { border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.svc { border-bottom: 1px solid var(--line-2); scroll-margin-top: calc(var(--hdr) + 24px); }
.svc:first-child { border-top: 1px solid var(--line-2); }
.svc > summary { list-style: none; cursor: pointer; padding: 26px 0; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.svc > summary::-webkit-details-marker { display: none; }
.svc > summary h3 { font-size: 1.4rem; }
.svc > summary .alt { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.svc > summary .pm { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; transition: transform .25s, background .25s; font-size: 1.2rem; }
.svc[open] > summary .pm { transform: rotate(45deg); background: var(--ink); color: var(--white); border-color: var(--ink); }
.svc .body { padding: 0 0 32px; display: grid; gap: 18px; max-width: 64ch; }
.svc .body ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.svc .body li { display: flex; gap: 12px; }
.svc .body li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-top: .65em; flex: none; }
@media (max-width: 860px) { .sgroup { grid-template-columns: 1fr; } .sgroup .gh { position: static; } }
.note { border-inline-start: 3px solid var(--red); padding: 12px 18px; background: var(--paper); font-size: .95rem; color: var(--ink-2); border-radius: 0 4px 4px 0; }
html[dir="rtl"] .note { border-radius: 4px 0 0 4px; }

/* Project detail */
.pd-hero { position: relative; height: clamp(460px, 78vh, 860px); background: var(--ink); color: var(--white); overflow: hidden; }
.pd-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,14,.45) 0%, rgba(10,12,14,0) 30%, rgba(10,12,14,.8) 100%); }
.pd-hero .wrap { position: absolute; inset: auto 0 0 0; z-index: 2; padding-bottom: clamp(32px, 5vw, 64px); display: grid; gap: 14px; }
.pd-hero h1 { font-size: clamp(2.4rem, 5.4vw, 5rem); max-width: 18ch; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); }
.spec { margin: 0; }
.spec > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.spec > div:first-child { border-top: 2px solid var(--ink); }
.spec dt { color: var(--muted); font-size: .92rem; }
.spec dd { margin: 0; font-weight: 600; }
.spec dd.pending { color: var(--muted); font-weight: 400; font-style: italic; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.gallery button { padding: 0; border: 0; background: var(--sand); cursor: zoom-in; overflow: hidden; border-radius: 6px; grid-column: span 3; aspect-ratio: 4/3; }
.gallery button:nth-child(3n+1), .gallery button:last-child:nth-child(3n+2) { grid-column: span 6; aspect-ratio: 21/9; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gallery button:hover img { transform: scale(1.03); }
@media (max-width: 600px) { .gallery button, .gallery button:nth-child(3n+1) { grid-column: span 6; aspect-ratio: 4/3; } }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10,12,14,.94); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; }
.lightbox .x { top: calc(16px + env(safe-area-inset-top, 0px)); inset-inline-end: 16px; }
.lightbox .pv { left: 16px; top: 50%; }
.lightbox .nx { right: 16px; top: 50%; }

/* Credentials */
.cred { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cred > div { background: var(--paper); padding: 36px; display: grid; gap: 14px; align-content: start; border-radius: 6px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; width: fit-content; color: var(--warn); background: #F8EEDD; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (max-width: 760px) { .cred { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.cinfo { display: grid; gap: 4px; align-content: start; }
.cinfo .row { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.cinfo .row .k { color: var(--muted); font-size: .9rem; }
.cinfo .row .v { font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.copyrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.copybtn { border: 1px solid var(--line-2); background: var(--white); font-size: .8rem; padding: 4px 12px; cursor: pointer; border-radius: 999px; }
.copybtn:hover { border-color: var(--ink); }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: end; }
.form { background: var(--paper); border-radius: 8px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; position: relative; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .f2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; padding: 13px 15px; border: 1px solid var(--line-2); background: var(--white); border-radius: 6px; width: 100%; box-sizing: border-box; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(185,0,18,.12); }
.field .err { color: var(--red); font-size: .85rem; min-height: 1em; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { border: 1px solid var(--line-2); background: var(--white); padding: 20px; display: grid; gap: 12px; border-radius: 6px; }
.form-done pre { white-space: pre-wrap; font-family: var(--mono); font-size: .8rem; background: var(--paper); padding: 14px; margin: 0; max-height: 240px; overflow: auto; border-radius: 4px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.legal { max-width: 760px; display: grid; gap: 20px; }
.legal h2 { font-size: 1.5rem; margin-top: 16px; }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--white); padding: 12px 20px; font-size: .92rem; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; border-radius: 999px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.studio-page { padding-top: 0; }

.pd-desc { font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; max-width: 40ch; font-weight: 500; }
html[lang="ar"] .pd-desc { font-family: var(--ar); line-height: 1.8; font-weight: 400; }

/* ================= MEMARION STUDIO ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.studio { background: var(--paper); min-height: calc(100vh - var(--hdr)); }
.st-steps { background: var(--ink); color: #C9CDD0; position: sticky; top: calc(var(--hdr) + env(safe-area-inset-top, 0px)); z-index: 40; }
.st-steps-in { display: flex; align-items: center; gap: 2px; overflow-x: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); scrollbar-width: none; }
.st-step { background: none; border: 0; color: inherit; padding: 12px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; display: flex; gap: 8px; align-items: center; border-bottom: 2px solid transparent; white-space: nowrap; }
.st-step .mono { color: #7D8287; font-size: .72rem; }
.st-step.on { color: #fff; border-bottom-color: var(--red); }
.st-step:disabled { opacity: .4; cursor: default; }
.st-ref { margin-inline-start: auto; font-size: .75rem; color: #fff; border: 1px solid #3A4045; padding: 3px 8px; white-space: nowrap; }
.st-saved { font-size: .72rem; color: #8D9398; white-space: nowrap; padding-inline-start: 10px; }
.st-intro { padding-block: clamp(40px, 6vw, 80px); }
.st-intro-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; }
@media (max-width: 960px) { .st-intro-grid { grid-template-columns: 1fr; } }
.st-card { background: var(--white); border: 1px solid var(--line-2); padding: 24px; display: grid; gap: 14px; }
.st-card h3 { font-size: 1.05rem; }
.st-list { list-style: none; padding: 0; margin: 0; display: grid; }
.st-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-list li > div:first-child { display: grid; min-width: 0; }
.st-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-list .mono { font-size: .72rem; color: var(--muted); }
.st-rel { width: 100%; border-collapse: collapse; font-size: .88rem; }
.st-rel td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.st-rel td:first-child { padding-inline-end: 14px; white-space: nowrap; width: 1%; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; font-weight: 500; white-space: nowrap; border: 1px solid currentColor; line-height: 1.3; }
html[lang="ar"] .pill { font-family: var(--ar); text-transform: none; font-size: .75rem; letter-spacing: 0; }
.pill-pass { color: var(--ok); background: #EAF4EE; }
.pill-attn { color: var(--red); background: var(--red-tint); }
.pill-review { color: var(--review); background: #EBF1F7; }
.pill-na { color: var(--na); background: #F0F0EE; }
.st-input { font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--white); border-radius: 2px; width: 100%; box-sizing: border-box; color: var(--ink); }
.st-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(185,0,18,.12); }
.st-input:disabled { background: #EFEFEC; color: var(--muted); }
.st-form { padding-block: clamp(32px, 5vw, 64px); }
.st-form-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
.st-col { display: grid; gap: 28px; align-content: start; min-width: 0; }
.st-sticky { position: sticky; top: calc(var(--hdr) + 72px); align-self: start; }
@media (max-width: 960px) { .st-form-grid { grid-template-columns: 1fr; } .st-sticky { position: static; order: -1; } }
.st-fs { display: grid; gap: 16px; padding: 24px; background: var(--white); border: 1px solid var(--line-2); }
.f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .f3 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--ink); width: fit-content; border-radius: 2px; overflow: hidden; }
.seg button { background: var(--white); border: 0; padding: 9px 14px; font-weight: 600; font-size: .85rem; cursor: pointer; border-inline-end: 1px solid var(--ink); }
.seg button:last-child { border-inline-end: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.seg-wrap { flex-wrap: wrap; width: auto; border: 0; gap: 8px; }
.seg-wrap button { border: 1px solid var(--line-2); border-radius: 2px; }
.seg-wrap button:last-child { border-inline-end: 1px solid var(--line-2); }
.seg-wrap button.on { border-color: var(--ink); }
.st-area { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 14px; }
.st-area b { font-size: 1.8rem; font-weight: 500; }
.st-verts table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.st-verts th { font-family: var(--mono); font-size: .7rem; color: var(--muted); text-align: start; padding: 4px; font-weight: 500; }
.st-verts td { padding: 3px 4px; }
.st-verts td:first-child { width: 36px; }
.st-street { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; font-size: .92rem; }
.st-street label { display: flex; gap: 8px; align-items: center; }
.st-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.st-num { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.stepper { display: grid; grid-template-columns: 36px 1fr 36px; border: 1px solid var(--line-2); background: var(--white); }
.stepper button { border: 0; background: var(--paper); cursor: pointer; font-size: 1.1rem; }
.stepper button:hover { background: var(--ink); color: #fff; }
.stepper input { border: 0; text-align: center; font-family: var(--mono); font-size: 1rem; width: 100%; padding: 8px 0; min-width: 0; background: transparent; }
.st-chks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.st-chk { display: flex; gap: 10px; align-items: start; font-size: .92rem; }
.st-chk input { margin-top: 4px; accent-color: var(--red); }

/* Editor */
.is-editor { display: flex; flex-direction: column; }
.ed { display: flex; flex-direction: column; height: calc(100dvh - var(--hdr) - 46px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: 560px; }
.ed-top { display: flex; align-items: center; gap: 6px; padding: 8px max(12px, env(safe-area-inset-left, 0px)); background: var(--white); border-bottom: 1px solid var(--line-2); overflow-x: auto; flex: none; scrollbar-width: thin; }
.ed-name { font: inherit; font-weight: 700; border: 1px solid transparent; padding: 6px 8px; min-width: 120px; max-width: 220px; background: transparent; border-radius: 2px; }
.ed-name:hover, .ed-name:focus { border-color: var(--line-2); outline: none; background: var(--paper); }
.ed-b { border: 1px solid var(--line-2); background: var(--white); padding: 6px 10px; font-size: .82rem; font-weight: 600; cursor: pointer; border-radius: 2px; white-space: nowrap; min-height: 34px; }
.ed-b:hover:not(:disabled) { border-color: var(--ink); }
.ed-b:disabled { opacity: .45; cursor: default; }
.ed-red { background: var(--red); color: #fff; border-color: var(--red); }
.ed-red:hover { background: var(--red-deep) !important; }
.ed-sep { width: 1px; height: 22px; background: var(--line-2); margin-inline: 4px; flex: none; }
.ed-zoom { font-size: .75rem; min-width: 44px; text-align: center; }
.ed-sel { font: inherit; font-size: .82rem; border: 1px solid var(--line-2); padding: 6px 8px; background: var(--white); border-radius: 2px; min-height: 34px; }
.ed-work { flex: 1; display: grid; grid-template-columns: 184px minmax(0, 1fr) 320px; min-height: 0; }
.ed-tools { background: var(--white); border-inline-end: 1px solid var(--line-2); padding: 12px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.ed-toolgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-tool { border: 1px solid var(--line-2); background: var(--white); padding: 8px 4px 6px; display: grid; justify-items: center; gap: 4px; font-size: .7rem; font-weight: 600; cursor: pointer; border-radius: 2px; }
.ed-tool svg { width: 22px; height: 22px; }
.ed-tool:hover { border-color: var(--ink); }
.ed-tool.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ed-opt { display: grid; gap: 6px; font-size: .78rem; font-weight: 700; }
.ed-opt summary { cursor: pointer; }
.ed-layers { display: grid; gap: 4px; font-weight: 500; margin-top: 6px; }
.ed-layers label { display: flex; gap: 6px; align-items: center; }
.ed-layers input { accent-color: var(--red); }
.ed-legend { display: grid; gap: 4px; font-size: .72rem; color: var(--muted); }
.ed-legend span { display: flex; gap: 6px; align-items: center; }
.ed-legend i { width: 14px; height: 10px; border: 1px solid var(--ink); display: inline-block; }
.z-g { background: #FBEDEE; } .z-f { background: #fff; } .z-s { background: #EDF0F3; } .z-c { background: #F2F2EF; } .z-o { background: #EEF3EC; }
.ed-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--paper); }
.ed-canvas svg#cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv[data-tool="select"] .it { cursor: move; }
#cv[data-tool="pan"] { cursor: grab; }
#cv[data-tool="room"], #cv[data-tool="corridor"], #cv[data-tool="wall"], #cv[data-tool="door"], #cv[data-tool="window"], #cv[data-tool="stair"], #cv[data-tool="lift"] { cursor: crosshair; }
.hdl-n, .hdl-s { cursor: ns-resize; } .hdl-e, .hdl-w { cursor: ew-resize; } .hdl-nw, .hdl-se { cursor: nwse-resize; } .hdl-ne, .hdl-sw { cursor: nesw-resize; } .hdl-p1, .hdl-p2 { cursor: crosshair; }
.ed-north { position: absolute; top: 12px; right: 12px; pointer-events: none; }
.ed-status { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 12px; font-size: .7rem; color: var(--muted); background: rgba(245,245,243,.92); border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-side { background: var(--white); border-inline-start: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; }
.ed-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-2); flex: none; }
.ed-tabs button { background: none; border: 0; padding: 12px 6px; font-size: .82rem; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); display: flex; gap: 6px; justify-content: center; align-items: center; }
.ed-tabs button.on { color: var(--ink); border-bottom-color: var(--red); }
.ed-badge:not(:empty) { background: var(--red); color: #fff; font-family: var(--mono); font-size: .65rem; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }
.ed-panel { overflow-y: auto; padding: 4px 16px 24px; flex: 1; font-size: .88rem; }
.pp-sec { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pp-sec h4 { margin: 0; font-size: .95rem; }
.pp { display: grid; gap: 4px; }
.pp label { font-size: .72rem; font-weight: 700; color: var(--muted); }
.pp2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp .st-input { padding: 7px 9px; font-size: .88rem; }
.pp-area { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 8px; }
.pp-area b { font-size: 1.25rem; font-weight: 500; }
.mini { margin: 0; display: grid; gap: 4px; font-size: .8rem; }
.mini > div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.mini dt { color: var(--muted); }
.mini dd { margin: 0; word-break: break-word; }
.chk-sum { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.chk { border-bottom: 1px solid var(--line); padding: 10px 0; }
.chk summary { display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; align-items: center; cursor: pointer; list-style: none; }
.chk summary::-webkit-details-marker { display: none; }
.chk-id { font-size: .7rem; color: var(--muted); }
.chk-n { font-weight: 600; font-size: .85rem; }
.chk p { margin: 8px 0; font-size: .84rem; color: var(--ink-2); }
.tip { border-inline-start: 3px solid var(--line-2); padding: 8px 12px; margin: 10px 0; background: var(--paper); display: grid; gap: 4px; }
.tip p { font-size: .85rem; }
.tip-k { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .tip-k { font-family: var(--ar); text-transform: none; letter-spacing: 0; font-size: .75rem; }
.tip-s { border-color: #9AA0A5; } .tip-v { border-color: var(--red); } .tip-v .tip-k { color: var(--red); } .tip-e { border-color: var(--review); } .tip-e .tip-k { color: var(--review); }
.vlist { list-style: none; margin: 0; padding: 0; display: grid; }
.vlist li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.ed-modal { position: fixed; inset: 0; background: rgba(25,29,32,.45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.ed-dialog { background: var(--white); max-width: 560px; width: 100%; padding: 28px; display: grid; gap: 14px; position: relative; max-height: 90vh; overflow: auto; border-top: 3px solid var(--red); }
.ed-x { position: absolute; top: 10px; inset-inline-end: 10px; border: 0; background: none; font-size: 1.5rem; cursor: pointer; width: 36px; height: 36px; }
.ex-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-dialog .steps li { border-top-color: var(--line); }
@media (max-width: 1100px) { .ed-work { grid-template-columns: 150px minmax(0, 1fr) 280px; } .ed-tool span { font-size: .64rem; } }
@media (max-width: 860px) {
  .ed { height: auto; min-height: 0; }
  .ed-work { grid-template-columns: 1fr; }
  .ed-tools { border: 0; border-bottom: 1px solid var(--line-2); padding: 8px; display: flex; overflow-x: auto; gap: 10px; align-items: center; }
  .ed-toolgrid { display: flex; gap: 6px; }
  .ed-tool { min-width: 58px; }
  .ed-opt { min-width: 140px; }
  .ed-opt[open], details.ed-opt { min-width: 150px; }
  .ed-legend, details.ed-opt { display: none; }
  .ed-tools { align-items: flex-end; }
  .ed-canvas { height: 62vh; min-height: 360px; }
  .ed-side { border: 0; border-top: 1px solid var(--line-2); }
  .ed-panel { max-height: none; }
}
/* Summary + concept sheet */
.sm-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
@media (max-width: 900px) { .sm-grid { grid-template-columns: 1fr; } }
.sm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .9rem; }
.sm-list li { display: flex; gap: 10px; align-items: start; }
.sheet-out { background: #fff; border: 1px solid var(--line-2); overflow-x: auto; }
.cs { background: #fff; display: grid; grid-template-columns: minmax(0, 1fr) 240px; border: 2px solid var(--ink); margin: 16px; min-width: 640px; }
.sheet-out.a3 .cs { aspect-ratio: 420 / 297; }
.sheet-out.a4 .cs { aspect-ratio: 297 / 210; }
.cs-plans { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; padding: 20px; align-items: center; }
.cs-plans figure { margin: 0; display: grid; gap: 8px; }
.cs-plans svg { width: 100%; height: auto; max-height: 420px; }
.cs-plans figcaption { font-size: .8rem; border-top: 1px solid var(--ink); padding-top: 4px; display: flex; justify-content: space-between; }
.cs-tb { border-inline-start: 2px solid var(--ink); display: flex; flex-direction: column; font-size: .72rem; }
.cs-tb > div { padding: 8px 10px; border-bottom: 1px solid var(--ink); display: grid; gap: 2px; }
.cs-tb span { color: var(--muted); font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.cs-tb b { font-weight: 600; word-break: break-word; }
.cs-logo img { width: 100%; height: auto; }
.cs-disc { margin-top: auto; background: var(--paper); border-bottom: 0 !important; }
.cs-disc b { font-family: var(--ar); font-size: .8rem; color: var(--red); }
.cs-disc span { text-transform: none !important; letter-spacing: 0 !important; font-size: .66rem !important; }

@media print {
  .hdr, .st-steps, .ftr, .cta-band, .studio .sec-head, .sm-grid, #sheetWrap > div:first-child, #sheetWrap > p, .toast { display: none !important; }
  body { background: #fff; }
  .st-form { padding: 0; }
  .sheet-out { border: 0; overflow: visible; }
  .cs { margin: 0; min-width: 0; width: 100%; }
}
