/* ==========================================================================
   Mosamem Studio — coming-soon teasers (lamps.html, shop.html) and 404.html
   Lamps: a lamp in a dark room, the switch turns sketch into glow.
   Products: a drawing sheet with the pieces we are designing.
   404: a print that failed at layer 404.
   ========================================================================== */

/* AA: amber #C97800 on paper is about 3:1, too low for small labels.
   On paper surfaces, small accents use a deeper amber (same fix as home.css / students.css). */
.band--paper,
:root[data-theme="light"] main .band,
.ticket { --accent-text: color-mix(in srgb, var(--amber) 66%, var(--ink)); }

/* placeholder labels sit on a solid tag so they pass contrast on the stripes */
.soon-ph > span:first-child {
  background: var(--bg-2);
  color: var(--fg-2);
  padding: .3rem .6rem;
  line-height: 1.3;
}

.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }

/* down arrow inside buttons (no sideways hover nudge) */
.btn .down { display: inline-block; font-family: var(--font-mono); }

/* ==========================================================================
   LAMPS · the room
   ========================================================================== */
.room {
  --glow: 1;          /* 1 = light on, 0 = off (set by data-light) */
  --t-on: .55s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(1.25rem, .5rem + 3vw, 3.5rem);
}
.room[data-light="off"] { --glow: 0; }

/* warm light filling the room (physical left: the lamp always stands on the left) */
.room::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 30% 62%, rgba(255, 184, 31, .17), rgba(255, 184, 31, .05) 55%, transparent 75%),
    radial-gradient(circle at 26% 22%, rgba(255, 184, 31, .10), transparent 38%);
  opacity: var(--glow);
  transition: opacity var(--t-on) var(--ease);
}
/* the drawing board: a faint grid that shows when the light is off */
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(243, 242, 238, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243, 242, 238, .045) 1px, transparent 1px),
    linear-gradient(to right, rgba(243, 242, 238, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243, 242, 238, .08) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
  opacity: calc(1 - var(--glow));
  transition: opacity .35s var(--ease);
}

.room__grid {
  position: relative;
  display: grid;
  gap: var(--s-4);
  grid-template-areas: "scene" "text";
}

/* ---- scene: the lamp + the switch ---- */
.room__scene {
  grid-area: scene;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s-3);
  direction: ltr;     /* physical: lamp on the left, switch on the right, in both languages */
}
.room__scene > .switch { direction: inherit; }
html[dir="rtl"] .room__scene > .switch { direction: rtl; }

.room__lamp {
  display: block;
  width: min(100%, 250px);
  height: auto;
  overflow: visible;
  max-width: none;
}

/* lamp parts (SVG) */
.room__lamp .l-body { fill: var(--paper); transition: fill var(--t-on) var(--ease); }
.room__lamp .l-line {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.room__lamp .l-head {
  fill: var(--lamp);
  filter: drop-shadow(0 0 6px rgba(255, 184, 31, .9)) drop-shadow(0 0 18px rgba(255, 184, 31, .55));
  transition: fill var(--t-on) var(--ease);
}
.room__lamp .l-light { opacity: var(--glow); transition: opacity var(--t-on) var(--ease); }
.room__lamp .l-plan {
  fill: none;
  stroke: var(--lamp);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
  opacity: calc((1 - var(--glow)) * .75);
  transition: opacity .35s var(--ease);
}
.room__lamp .l-dims {
  color: var(--fg-2);
  opacity: calc(.28 + (1 - var(--glow)) * .67);
  transition: opacity .35s var(--ease);
}
.room__lamp .l-dims path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.room__lamp .l-dims .f { fill: currentColor; stroke: none; }
.room__lamp .l-dims .x { stroke-dasharray: 2 3; }
.room__lamp text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  direction: ltr;
  unicode-bidi: isolate;
}

/* off: the sketch. Body becomes a dark silhouette with a drawn outline. */
.room[data-light="off"] .l-body { fill: var(--ink-3); }
.room[data-light="off"] .l-line { opacity: .8; }
.room[data-light="off"] .l-head { fill: var(--steel); filter: none; }

/* the switch: a wall rocker on a plate with a cut corner */
.switch {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 48px;
  margin: 0 0 .25rem;
  padding: .25rem;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  text-align: start;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.switch__plate {
  --cut: 10px;
  position: relative;
  flex: none;
  width: 56px;
  height: 84px;
  display: grid;
  place-items: center;
  background: #3A3F46;                      /* the plate's edge */
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}
.switch__plate::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: linear-gradient(160deg, #2A2E34, #1B1E22);
  clip-path: polygon(calc(var(--cut) - .4px) 0, 100% 0, 100% 100%, 0 100%, 0 calc(var(--cut) - .4px));
}
.switch__led {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #4A4F57;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.switch__rocker {
  position: relative;
  width: 28px;
  height: 46px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #15171A 0, #23272C 48%, #3C4148 52%, #2C3036 100%);
  box-shadow: 0 0 0 1px #0B0C0E, inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: perspective(140px) rotateX(16deg);
  transition: transform .16s var(--ease), background .16s var(--ease);
}
/* I (on) on the top half, O (off) on the bottom half: the pressed half is the state */
.switch__rocker::before,
.switch__rocker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.switch__rocker::before { top: 7px; width: 2px; height: 9px; background: #8E8D87; }
.switch__rocker::after { bottom: 7px; width: 9px; height: 9px; border: 1.5px solid #8E8D87; border-radius: 50%; box-sizing: border-box; }
.room[data-light="on"] .switch__led { background: var(--lamp); box-shadow: 0 0 8px rgba(255, 184, 31, .9); }
.room[data-light="off"] .switch__rocker {
  background: linear-gradient(to bottom, #2C3036 0, #3C4148 48%, #23272C 52%, #15171A 100%);
  transform: perspective(140px) rotateX(-16deg);
}
.switch:hover .switch__plate { background: #545A62; }
.switch:active .switch__rocker { transition-duration: .05s; }
.switch__text { display: grid; gap: .1rem; line-height: 1.3; }
@media (max-width: 899.98px) {
  .switch { flex-direction: column; gap: .5rem; text-align: center; }
  .switch__text { justify-items: center; }
}
.switch__label { font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
.switch__state {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
html[lang="ar"] .switch__state { letter-spacing: 0; }
.switch__state::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: .45em;
  vertical-align: .1em;
  border-radius: 50%;
  background: currentColor;
}
.room[data-light="on"] .switch__state { color: var(--lamp); }
.room[data-light="on"] .switch__off,
.room[data-light="off"] .switch__on { display: none; }

/* ---- text ---- */
.room__text {
  grid-area: text;
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: var(--s-4);
  padding-bottom: var(--s-6);
  /* a dark halo keeps letters clean where the beam passes */
  text-shadow: 0 0 2px var(--ink), 0 0 10px rgba(18, 20, 23, .7);
}
.room__text > * { max-width: 100%; }
.room h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.25rem);
  color: var(--paper);
  transition: color var(--t-on) var(--ease), text-shadow var(--t-on) var(--ease);
}
.room[data-light="off"] h1 { color: var(--fg-2); }
.room[data-light="on"] h1 {
  text-shadow: 0 0 2px var(--ink), 0 0 32px rgba(255, 184, 31, .28);
}
.room .lede { color: var(--fg-2); max-width: 34rem; }
.room__note {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
  max-width: 34rem;
}
html[lang="ar"] .room__note { font-family: var(--font-body); font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; }
.room__note b { font-weight: 500; color: var(--fg-2); }
.room__cta { margin-top: var(--s-2); text-shadow: none; }

/* ---- the floor: a small ruler with a pool of light on it ---- */
.room__floor {
  position: relative;
  z-index: 0;
  height: 30px;
}
.room__floor .ruler { position: absolute; inset: auto 0 0; --h: 12px; opacity: .8; }
.room__floor::before {
  content: "";
  position: absolute;
  left: 8%;
  width: 70%;
  bottom: -40px;
  height: 90px;
  background: radial-gradient(ellipse at 45% 50%, rgba(255, 184, 31, .35), rgba(255, 184, 31, .08) 45%, transparent 70%);
  opacity: var(--glow);
  transition: opacity var(--t-on) var(--ease);
}

/* switching on: a short flicker, like a real lamp */
.room.is-flicker .l-light,
.room.is-flicker::before,
.room.is-flicker .room__floor::before {
  animation: flicker .6s linear 1 both;
}
@keyframes flicker {
  0% { opacity: 0; }
  12% { opacity: .85; }
  20% { opacity: .15; }
  34% { opacity: 1; }
  44% { opacity: .45; }
  60%, 100% { opacity: 1; }
}

@media (min-width: 560px) {
  .room__lamp { width: min(100%, 300px); }
}
@media (min-width: 900px) {
  .room { min-height: min(calc(100svh - var(--header-h)), 760px); display: flex; flex-direction: column; }
  .room__grid {
    flex: 1;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "scene text";
    gap: var(--s-6);
    align-items: center;
  }
  /* keep the lamp physically on the left in Arabic too */
  html[dir="rtl"] .room__grid { grid-template-areas: "text scene"; }
  .room__scene { align-self: end; padding-bottom: 6px; }
  .room__lamp { width: min(100%, 470px); }
  .room__text { padding-block: var(--s-6) var(--s-8); }
  .room__floor { height: 18px; }
}

/* ==========================================================================
   Notify (waitlist) block — lamps + shop
   ========================================================================== */
.notify__grid { display: grid; gap: var(--s-6); align-items: start; }
.notify__intro { display: grid; gap: var(--s-4); justify-items: start; }
.notify__intro h2 { font-size: var(--fs-xl); }
.notify__intro .lede { font-size: var(--fs-base); }
.notify__why {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .2rem .75rem;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg-2);
  width: 100%;
}
.notify__why .spec { padding-top: .2em; color: var(--accent-text); }
.notify__sheet { --cut: 22px; }
.notify__sheet .form__note { margin-top: calc(var(--s-2) * -1); }
@media (min-width: 900px) {
  .notify__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
  .notify__intro { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ==========================================================================
   Meanwhile — the two live lines, as a "see also" list
   ========================================================================== */
.also { border-top: 1px solid var(--line); }
.also__grid { display: grid; gap: var(--s-5); }
.also__head { display: grid; gap: var(--s-3); align-content: start; }
.also__head h2 { font-size: var(--fs-xl); }
.also__list { list-style: none; border-top: 1px solid var(--line-strong); }
.also__list > li { border-bottom: 1px solid var(--line); }
.also__item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 1.5rem;
  gap: var(--s-3);
  align-items: start;
  padding-block: var(--s-5);
  min-height: 64px;
  text-decoration: none;
  color: var(--fg);
  transition: background-color .2s var(--ease);
}
.also__item:hover { color: var(--fg); background: var(--bg-2); }
.also__ref {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent-text);
  padding-top: .3em;
  padding-inline-start: .25rem;
}
.also__body { display: grid; gap: .3rem; }
.also__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.3;
}
.also__line { color: var(--fg-2); font-size: var(--fs-sm); max-width: 44rem; }
.also__go {
  align-self: center;
  font-size: var(--fs-lg);
  color: var(--accent-text);
  transition: transform .2s var(--ease);
}
html[dir="rtl"] .also__go { transform: scaleX(-1); }
.also__item:hover .also__go { transform: translateX(4px); }
html[dir="rtl"] .also__item:hover .also__go { transform: scaleX(-1) translateX(4px); }
.also__item:hover .also__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
@media (min-width: 900px) {
  .also__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-8); }
  .also__item { grid-template-columns: 3.5rem minmax(0, 1fr) 2rem; padding-inline-end: var(--s-3); }
}

/* ==========================================================================
   SHOP · hero + the drawing sheet
   ========================================================================== */
.shop-hero { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4.5rem) clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.shop-hero__grid { display: grid; gap: var(--s-5); }
.shop-hero__main { display: grid; gap: var(--s-4); justify-items: start; }
.shop-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.25rem); max-width: 14ch; }
html[lang="ar"] .shop-hero h1 { max-width: 16ch; }
.shop-hero .lede { max-width: 34rem; }

.plan { display: grid; gap: var(--s-3); align-content: end; }
.plan__title { color: var(--fg-3); }
.plan__list { margin: 0; border-top: 1px solid var(--line-strong); }
.plan__list > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--s-3);
  padding-block: .6rem;
  border-bottom: 1px solid var(--line);
}
.plan__list dt { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--accent-text); padding-top: .25em; }
.plan__list dd { margin: 0; font-size: var(--fs-sm); }
.plan__note { font-size: var(--fs-xs); color: var(--fg-3); }
@media (min-width: 900px) {
  .shop-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-8); align-items: end; }
}

/* the sheet: a drawing sheet on the table, with a frame, a ruler and a title block */
.sheet-band { padding-block: clamp(2rem, 1.5rem + 3vw, 5rem); }
.sheet {
  position: relative;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 1px rgba(18, 20, 23, .04), 0 18px 40px -24px rgba(18, 20, 23, .35);
  padding: clamp(.6rem, .4rem + .6vw, 1rem);
}
.sheet__frame {
  position: relative;
  border: 1.5px solid var(--fg);
  padding: clamp(1rem, .6rem + 1.6vw, 2rem);
  padding-top: 0;
}
.sheet__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding-block: .7rem .55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
  direction: ltr;
}
.sheet__head b { font-weight: 500; color: var(--fg); }
.sheet__head .chip { letter-spacing: .12em; font-size: .6875rem; }
.sheet__ruler { margin-inline: calc(clamp(1rem, .6rem + 1.6vw, 2rem) * -1); --h: 12px; }

.items {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: var(--s-5);
}
.item {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
  padding-block: var(--s-4);
  border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; padding-top: 0; }
.item__shot { display: flex; align-items: flex-end; justify-content: center; }
.item .ph { width: 100%; padding: .5rem; font-size: .625rem; }
.item--key .ph { --ph-ratio: 1 / 1; align-content: start; padding-top: 14%; }
.item--mark .ph { --ph-ratio: 2 / 3; width: 70%; }
.item--set .ph { --ph-ratio: 4 / 3; }
.item__cap { display: grid; gap: .35rem; justify-items: start; }
.item__cap h3 { font-size: var(--fs-md); }
.item__cap p { color: var(--fg-2); font-size: var(--fs-sm); }
.item__ref { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .12em; color: var(--fg-3); }

/* engraving area on the keychain: where your name goes */
.engrave {
  position: absolute;
  inset-inline: 14%;
  bottom: 12%;
  display: grid;
  place-items: center;
  min-height: 1.9rem;
  padding: .2rem .4rem;
  border: 1px dashed var(--accent-text);
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}
.engrave::after {
  content: "ENGRAVE";
  position: absolute;
  top: -1.35em;
  inset-inline-end: -1px;
  font-family: var(--font-mono);
  font-size: .5625rem;
  letter-spacing: .14em;
  color: var(--accent-text);
  direction: ltr;
}

/* title block, bottom corner of the sheet */
.tblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--s-5) 0 0;
  border: 1px solid var(--fg);
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  direction: ltr;
}
.tblock > div { padding: .4rem .6rem; border-inline-end: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); min-width: 0; }
.tblock > div:nth-child(2n) { border-inline-end: 0; }
.tblock > div:nth-last-child(-n+2) { border-bottom: 0; }
.tblock > .tblock__wide { grid-column: 1 / -1; border-inline-end: 0; }
.tblock dt { color: var(--fg-3); font-size: .5625rem; }
.tblock dd { margin: 0; color: var(--fg); font-weight: 500; overflow-wrap: anywhere; }

@media (min-width: 760px) {
  .items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    column-gap: 0;
    margin-top: var(--s-6);
  }
  .item {
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 clamp(.75rem, .2rem + 1.5vw, 2rem);
    border-top: 0;
  }
  .item + .item { border-inline-start: 1px dashed var(--line-strong); }
  .item:first-child { padding-inline-start: 0; }
  .item:last-child { padding-inline-end: 0; }
  .item__shot { height: clamp(14rem, 8rem + 14vw, 22rem); padding-bottom: 0; }
  .item--key .ph { width: 78%; }
  .item--mark .ph { --ph-ratio: 2 / 5; width: 40%; }
  .item--set .ph { width: 92%; }
  /* the plate every piece stands on */
  .item__plate { height: 14px; margin-inline: calc(clamp(.75rem, .2rem + 1.5vw, 2rem) * -1); border-top: 2px solid var(--fg); }
  .item:first-child .item__plate { margin-inline-start: 0; }
  .item:last-child .item__plate { margin-inline-end: 0; }
  .item__cap { padding-top: var(--s-3); }
  .tblock {
    grid-template-columns: repeat(5, auto);
    width: max-content;
    max-width: 100%;
    margin-inline-start: auto;
    margin-top: var(--s-6);
  }
  .tblock > div { border-bottom: 0; }
  .tblock > div:nth-child(2n) { border-inline-end: 1px solid var(--line-strong); }
  .tblock > div:last-child { border-inline-end: 0; }
  .tblock > .tblock__wide { grid-column: auto; border-inline-end: 1px solid var(--line-strong); }
}
@media (max-width: 759.98px) {
  .item__plate { display: none; }
}

/* checkbox cards on the shop form: room for two lines */
.picks { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.picks .choice__box { min-height: 64px; align-content: center; }

/* ==========================================================================
   404 · failed print
   ========================================================================== */
.nf { padding-block: clamp(1.5rem, 1rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 3vw, 5rem); }
.nf__grid { display: grid; gap: var(--s-5); align-items: center; }
.nf__art { order: -1; }
.nf__text { display: grid; gap: var(--s-4); justify-items: start; }
.nf h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); max-width: 14ch; }
html[lang="ar"] .nf h1 { max-width: 15ch; }
.nf .lede { max-width: 32rem; }

/* the printer's little screen */
.nf__screen {
  --cut: 8px;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--fg);
  direction: ltr;
  max-width: 100%;
}
.nf__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.nf__caret { width: .55em; height: 1.05em; background: currentColor; opacity: .7; animation: caret 1.1s steps(1) infinite; flex: none; }
@keyframes caret { 50% { opacity: 0; } }

.nf__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-2); }
.nf__to { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; opacity: .75; }
html[lang="ar"] .nf__to { font-family: var(--font-body); letter-spacing: 0; font-size: var(--fs-sm); }
.nf__report { font-size: var(--fs-sm); color: var(--fg-2); }
.nf__report a { color: var(--fg); }
.nf__report a:hover { color: var(--accent-text); }

/* the drawing */
.fail {
  --fil: var(--lamp);
  display: block;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  height: auto;
  overflow: visible;
  color: var(--fg-2);
}
:root[data-theme="light"] .fail { --fil: var(--accent-text); }
.fail * { vector-effect: non-scaling-stroke; }
.fail path, .fail rect, .fail polygon, .fail line { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.fail .faint { opacity: .45; }
.fail .solid { fill: currentColor; stroke: none; }
.fail .layers { opacity: .55; }
.fail .fil { stroke: var(--fil); stroke-width: 1.4; }
.fail .fil--b { opacity: .7; }
.fail .acc { stroke: var(--fil); }
.fail .acc-f { fill: var(--fil); stroke: none; }
.fail text {
  fill: currentColor;
  stroke: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  direction: ltr;
  unicode-bidi: isolate;
}
.fail .t-acc { fill: var(--fil); }
.fail .strand { transform-box: view-box; transform-origin: 223px 86px; animation: sway 4.5s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }

@media (min-width: 900px) {
  .nf { min-height: min(calc(100svh - var(--header-h)), 720px); display: grid; align-items: center; }
  .nf__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-8); }
  .nf__art { order: 0; }
  .fail { max-width: 600px; }
}

@media (prefers-reduced-motion: reduce) {
  .fail .strand, .nf__caret { animation: none; }
  .room.is-flicker .l-light, .room.is-flicker::before, .room.is-flicker .room__floor::before { animation: none; }
}
