/* حكاية أثر skin over the name page: the same engine and the same writing, in the home's paper and ink,
   light or dark as the visitor (or the device) chooses. */
html[data-mode=light] {
  --ink: #F1F0EC; --ink-2: #FBFAF7; --ink-3: #E8E5DD;
  --ivory: #111214; --ivory-2: #45464A; --ivory-3: #55565A;
  --line: rgba(17,18,20,.14); --line-2: rgba(17,18,20,.28);
  --champagne: #85590A; --champagne-2: #6E4A08;
  --kufi: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --kufi-name: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --amber: #856712;
  --text: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
}
html[data-mode=dark] {
  --ink: #0F1012; --ink-2: #18191C; --ink-3: #1F2024;
  --ivory: #ECEAE4; --ivory-2: #C9C7C0; --ivory-3: #ADABA4;
  --line: rgba(236,234,228,.14); --line-2: rgba(236,234,228,.3);
  --champagne: #DDAA4C; --champagne-2: #E9BE63;
  --kufi: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --kufi-name: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --text: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --amber: #D4AF37;
}
body { font-size: 16px; }
.wrap { max-width: 720px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 120px; }

/* header: the home's */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.smark { width: 22px; height: 22px; flex: none; color: var(--ivory); }
.brand b { font: 500 18px/1 var(--text); }
.brand span { font: 400 13px/1 var(--text); color: var(--ivory-3); padding-inline-start: 10px; border-inline-start: 1px solid var(--line-2); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 500 15px/1 var(--text); text-decoration: none; }
.back span { font-family: system-ui; }
.tools { display: flex; align-items: center; gap: 4px 14px; margin-inline-start: auto; }
.tools a, .tools button { font: 500 14px/1 var(--text); color: var(--ivory); text-decoration: none; background: none; border: 0; padding: 12px 2px 4px; min-height: 40px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.tools #mode { border-bottom: 0; font-size: 17px; padding-inline: 4px; }
.top { flex-wrap: wrap; }

/* one column, the result in the middle */
.grid, .grid.wide { grid-template-columns: minmax(0, 1fr) !important; padding-top: 22px; column-gap: 0; }
.grid > *, .grid > .stage { grid-column: 1 !important; grid-row: auto !important; }
.grid > .stage { position: relative; top: auto; margin: 6px 0 18px; }
.intro { order: 1; } .step-name { order: 2; } .trial { order: 3; } .stage { order: 3; } .step-signs { order: 4; } .step-look { order: 5; } .more-opts { order: 6; } .to-tales { order: 7; }
h1 { font: 300 30px/1.3 var(--text); margin: 0 0 2px; }
.intro .sub { margin: 0; color: var(--ivory-2); font-size: 15px; }
.step-name { border-top: 0; padding: 14px 0 6px; }
.name-input { font: 400 32px/1.4 var(--text); padding: 2px 0 8px; }
.help, .privacy { font-size: 13px; font-weight: 500; color: var(--ivory-2); }
.card-wrap { width: min(100%, calc(min(56svh, 520px) * var(--ar))); margin-inline: auto; }
html[data-mode=light] .card { box-shadow: 0 1px 0 var(--line), 0 18px 40px -22px rgba(17,18,20,.45); }
html[data-mode=dark] .card { box-shadow: 0 1px 0 var(--line), 0 18px 40px -22px rgba(0,0,0,.7); }
.approx { margin: 14px auto 0; max-width: 34ch; text-align: center; font: 500 13.5px/1.7 var(--text); color: var(--ivory-2); }
.approx b { font-weight: 500; color: var(--ivory); }
.replay { margin-inline: auto; }
.step-label .t { font: 500 16px var(--text); }
.step-label .meta { font: 500 13px var(--text); color: var(--ivory-2); }
.btn.primary, html[data-mode=light] .btn.primary { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
@media (max-width: 900px) { html[data-mode=light] .actions { background: rgba(241,240,236,.94); } html[data-mode=dark] .actions { background: rgba(15,16,18,.94); } }

/* designs: six picked, the rest behind “تصميمات أكثر” */
.looks:not(.all) .look:not([data-theme=linen]):not([data-theme=black]):not([data-theme=gold]):not([data-theme=lapis]):not([data-theme=papyrus]):not([data-theme=granite]):not([aria-pressed=true]) { display: none; }
.looks:not(.all) .look[aria-pressed=true] { display: block; }
.looks:not(.all) .look-group-h { display: none; }
.looks:not(.all).rail, .looks:not(.all) { gap: 10px; }
.more-looks { margin-top: 12px; display: inline-flex; gap: 8px; align-items: baseline; font: 500 15px/1.5 var(--text); background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 0 0 2px; cursor: pointer; }
.more-looks .n { font: 400 13px "Mona Sans", system-ui; color: var(--ivory-3); }

@media (max-width: 900px) { .rail { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } }

.reset-all { margin-top: 8px; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: 500 13px var(--text); color: var(--ivory-2); cursor: pointer; }

.trial { margin: 10px 0 4px; padding: 14px 16px; border: 1px solid var(--ivory); border-radius: 8px; background: var(--ink-2); display: grid; gap: 8px; }
.trial p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ivory-2); }
.trial p b { color: var(--ivory); font-weight: 500; }
.trial .was { font-weight: 500; font-size: 13.5px; }
.trial .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.trial .btn { height: 46px; padding: 0 16px; }

/* “خصّص أكثر” */
.more-opts { border-top: 1px solid var(--line); }
.more-opts > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; font: 500 16px var(--text); }
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts > summary small { font: 500 13px var(--text); color: var(--ivory-2); }
.more-opts > summary::after { content: "+"; font: 300 26px/1 var(--text); }
.more-opts[open] > summary::after { content: "−"; }
.more-opts .step:first-of-type { border-top: 1px solid var(--line); }

/* from a sign to the stories */
.learn-more { display: inline-flex; gap: 8px; margin-top: 12px; font: 500 14.5px/1.5 var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.to-tales { border-top: 1px solid var(--ivory); margin-top: 26px; padding-top: 16px; display: grid; gap: 6px; }
.to-tales .lbl { font: 500 13px var(--text); color: var(--ivory-2); }
.to-tales h2 { margin: 0; font: 300 26px/1.35 var(--text); }
.to-tales p { margin: 0; color: var(--ivory-2); font-size: 15.5px; }
.to-tales a { justify-self: start; margin-top: 8px; font: 500 15px/1.5 var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.gallery-head h2, .faq h2, .cta-sheta h3 { font-family: var(--text) !important; font-weight: 300 !important; }
.sig-note { margin: 28px 0 0; font-size: 13px; line-height: 1.7; color: var(--ivory-2); }

/* hidden means hidden, whatever display a component sets */
[hidden] { display: none !important; }

/* The name field: a framed box with room inside; while it waits for a name, a thread of gold light goes round it (it
   rests once the field is in use, and never moves when the device asks for less motion). The privacy line under it is
   small and quiet. */
@property --orbit { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.name-field { position: relative; display: block; border-radius: 14px; }
.name-input { padding: 10px 16px 12px; }
.name-field::before { content: ''; position: absolute; inset: -1px; border-radius: 15px; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: conic-gradient(from var(--orbit), transparent 0deg 250deg, rgba(231,201,140,0) 262deg, rgba(231,201,140,.85) 322deg, #FFF1CF 340deg, rgba(231,201,140,.85) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
html[data-mode=light] .name-field::before { background: conic-gradient(from var(--orbit), transparent 0deg 250deg, rgba(168,124,48,0) 262deg, rgba(168,124,48,.9) 322deg, #7A5618 340deg, rgba(168,124,48,.9) 350deg, transparent 360deg); }
@media (prefers-reduced-motion: no-preference) {
  .name-field.waiting::before { opacity: 1; animation: nameOrbit 5s linear infinite; }
  @keyframes nameOrbit { to { --orbit: 360deg; } }
}
.privacy { margin-top: 10px; font-size: 12.5px; font-weight: 400; color: var(--ivory-3); }
.privacy svg { width: 13px; height: 13px; }
/* the three actions share the width; Share stays the filled one */
.actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools #mode svg { display: block; }
@media (max-width: 440px) { .actions .btn { flex-direction: column; gap: 3px; height: 58px; padding: 0 4px; font-size: 13px; line-height: 1.2; } .actions .btn svg { width: 20px; height: 20px; } }
/* the privacy line's sign: the shen ring, protection that encircles (a cartouche is a shen ring drawn long) */
.privacy { align-items: flex-start; gap: 8px; line-height: 1.6; }
.privacy .shen { flex: none; font: 19px/1 var(--hiero); color: var(--champagne); margin-top: 1px; }
html[data-mode=light] .privacy .shen { color: var(--champagne-2); }
