/* Ahmed's Sketchbook — homepage world (EN + AR). Other pages still use styles.css. */

:root {
  --desk: #2338C9;
  /* desk roles: every aspect theme overrides these instead of restyling components */
  --desk-ink: var(--paper);
  --desk-focus: var(--mustard);
  --lang-on-fg: var(--desk);
  --lang-hover-bg: var(--ink);
  --lang-hover-fg: var(--paper);
  --btn-hover: var(--desk);
  --tab: var(--ink);
  --tab-focus: var(--ink);
  --paper: #FFFFFF;
  --ink: #141414;
  --red: #E8412C;
  --red-ink: #B92D1A;
  --mustard: #E9B21C;
  --green: #157A4E;
  --grid: #E3E9F5;
  --gutter: #DADADA;
  --pencil: #3B3B3B;

  --f-display: "Lalezar", "Alexandria", sans-serif;
  --f-body: "Alexandria", system-ui, sans-serif;
  --f-note: "Kalam", "Aref Ruqaa", cursive;

  --page-pad: clamp(20px, 4vw, 64px);
  --spread-gap: clamp(16px, 2.4vw, 32px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* blue-desk pages only (home has no theme class): cream paper; other desks keep white */
:root:not([class*="theme-"]), .theme-web { --paper: #FBF8E8; }

:lang(ar) {
  --f-note: "Kalam", "Aref Ruqaa", serif;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--ink) var(--desk); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
}

::selection { background: var(--mustard); color: var(--ink); }

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
/* on the ultramarine desk and dark cards red falls below 3:1, so the ring turns mustard */
.desk-bar a:focus-visible, .desk-foot a:focus-visible, .skip-link:focus-visible {
  outline-color: var(--desk-focus);
}
/* unflipped dark card fronts take a paper ring; flipped backs are white, so red returns */
.card--web:not(.is-flipped) .card-flip:focus-visible,
.card--ventures:not(.is-flipped) .card-flip:focus-visible,
.card--volunteering:not(.is-flipped) .card-flip:focus-visible {
  outline-color: var(--paper);
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--paper); color: var(--ink); padding: 10px 16px; z-index: 50;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.i-arrow { width: 1.4em; height: 0.8em; flex: none; }
[dir="rtl"] .i-arrow { transform: scaleX(-1); }

/* ---------- desk bar ---------- */

.desk-bar {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px var(--spread-gap) 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: var(--desk-ink);
}
.brand small {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-inline-start: 6px;
  opacity: 0.85;
}
.brand {
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  justify-self: start;
}
.desk-links {
  justify-self: end;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-weight: 500;
  font-size: 0.95rem;
}
.desk-links a { text-decoration: none; }
.desk-links a:hover { text-decoration: underline; }

.lang {
  display: flex;
  border: 2px solid var(--desk-ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}
.lang a, .lang span {
  padding: 9px 14px;
  text-decoration: none;
  min-width: 46px;
  text-align: center;
}
.lang [aria-current="page"] { background: var(--desk-ink); color: var(--lang-on-fg); }
.lang a:hover { background: var(--lang-hover-bg); color: var(--lang-hover-fg); }
.lang .ar-label { font-family: var(--f-body); padding-top: 5px; padding-bottom: 13px; }

/* ---------- spreads ---------- */

main { padding: 0 var(--spread-gap); }

.spread {
  position: relative;
  max-width: 1360px;
  margin: 0 auto var(--spread-gap);
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.spread::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: calc(50% - 1px);
  width: 2px;
  background: var(--gutter);
  pointer-events: none;
}
.page {
  position: relative;
  padding: var(--page-pad);
  overflow: hidden;
  min-width: 0;
}
.page--grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

.spread--open { min-height: calc(100svh - 84px - var(--spread-gap)); }

/* colour fields: flat gouache that multiplies where it overlaps */
.field { position: absolute; mix-blend-mode: multiply; pointer-events: none; }
.field--mustard { background: var(--mustard); }
.field--red { background: var(--red); }
.field--green { background: var(--green); }
.field--blue { background: var(--desk); }

/* ---------- opening spread: name page ---------- */

.page--name {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 36px);
}
.page--name .actions { margin-top: auto; padding-top: 32px; }
.page--name .field--mustard { width: 46%; height: 34%; inset-inline-start: -6%; bottom: -8%; }
.page--name .field--red { width: 22%; height: 18%; inset-inline-start: 30%; bottom: 14%; }

.portrait { position: relative; z-index: 1; width: clamp(132px, 12vw, 168px); margin: 0 0 22px; transform: rotate(1.6deg); }
[dir="rtl"] .portrait { transform: rotate(-1.6deg); }
/* on a wide spread it sits in the page's open space beside the actions, so the status line stays clear of the gouache */
@media (min-width: 1360px) {
  .portrait { position: absolute; bottom: 150px; inset-inline-end: clamp(32px, 5vw, 72px); width: clamp(150px, 11.5vw, 168px); margin: 0; }
}
@media (min-width: 901px) and (max-width: 1359px) {
  .portrait { width: 96px; margin-bottom: 14px; }
}
/* a short laptop screen has no height to spare above the status line */
@media (min-width: 901px) and (max-width: 1359px) and (max-height: 760px) {
  .portrait { position: absolute; bottom: 130px; inset-inline-end: 32px; margin: 0; }
}
.portrait img { width: 100%; padding: 6px; background: var(--paper); outline: 1.5px solid var(--ink); }
.title { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 36px); }
.title .name {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 8.4vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
}
:lang(ar) .title .name { line-height: 1.15; }
.title .offer {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.3vw, 2.75rem);
  line-height: 1.2;
  max-width: 15ch;
  text-wrap: balance;
}
:lang(ar) .title .offer { max-width: 14ch; line-height: 1.45; }

.circled { position: relative; display: inline-block; white-space: nowrap; z-index: 0; }
.circled svg {
  position: absolute;
  left: -6%; top: -16%;
  width: 112%; height: 134%;
  overflow: visible;
  z-index: -1;
  pointer-events: none;
}
.circled path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }

.status {
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 44ch;
  color: var(--pencil);
}

.actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 18px 26px;
  text-decoration: none;
  transform: rotate(-1.5deg);
  transition: transform 260ms var(--ease-out), background-color 160ms;
}
.btn:hover { transform: rotate(0deg) translateY(-2px); background: var(--btn-hover); }
.btn:active { transform: rotate(0deg) translateY(0); }
.link-pencil {
  font-family: var(--f-note);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}
.link-pencil:hover { color: var(--red-ink); border-color: var(--red-ink); }

/* ---------- opening spread: the working page ---------- */

.plan { container-type: inline-size; position: relative; }
.plan-title {
  font-family: var(--f-note);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 30ch;
}

.plan-board { position: relative; aspect-ratio: 600 / 560; }
.plan-board > * { position: absolute; }

.paste {
  margin: 0;
  background: var(--paper);
  padding: 6px;
  outline: 1.5px solid var(--ink);
}
.paste img { width: 100%; }
.tape {
  position: absolute;
  width: 18%; height: 7%;
  background: var(--mustard);
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.plan-shot { left: 26%; top: 0; width: 72%; transform: rotate(1.5deg); }
.plan-shot .tape--a { left: 6%; top: -5%; transform: rotate(-6deg); }
.plan-shot .tape--b { right: 4%; bottom: -6%; transform: rotate(5deg); }

.plan-wire { left: 0; top: 38%; width: 36%; height: auto; background: var(--paper); }
.plan-wire path { fill: none; stroke: var(--pencil); stroke-linecap: round; stroke-linejoin: round; opacity: 0.92; }

/* numbered pins tie notes to the screenshot where arrows can't (narrow pages) */
.pin, .pin-no { display: none; }
.pin {
  position: absolute; left: var(--x); top: var(--y);
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border: 2.5px solid var(--red); border-radius: 50%;
  background: var(--paper); color: var(--red-ink);
  font: 700 0.85rem/21px var(--f-body); text-align: center;
}

.plan-arrows { inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.plan-arrows path { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.notes { list-style: none; margin: 0; padding: 0; inset: 0; }
.note {
  position: absolute;
  font-family: var(--f-note);
  font-weight: 700;
  color: var(--red-ink);
  font-size: clamp(0.95rem, 3.1cqi, 1.2rem);
  line-height: 1.3;
}
.note--1 { left: 42%; top: 52%; width: 50%; }
.note--2 { left: 42%; top: 66.5%; width: 50%; }
.note--3 { left: 42%; top: 81.5%; width: 50%; }

.plan-close {
  margin-top: 18px;
  font-family: var(--f-note);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.3;
  max-width: 34ch;
}
.plan-close mark { background: none; color: inherit; box-shadow: inset 0 -0.35em 0 rgba(233, 178, 28, 0.75); }
.plan-caption { margin-top: 10px; font-size: 0.95rem; color: var(--pencil); }

.peek {
  position: absolute;
  inset-inline-end: 12%;
  bottom: -64px;
  width: 150px; height: 110px;
  background: var(--red);
  outline: 1.5px solid var(--ink);
  transform: rotate(-5deg);
  transition: transform 300ms var(--ease-out);
  display: block;
}
.peek:hover, .peek:focus-visible { transform: rotate(-3deg) translateY(-16px); }
.peek span {
  position: absolute; inset-inline-start: 12px; top: 10px;
  font-family: var(--f-note); font-weight: 700; font-size: 0.95rem; color: var(--ink);
}

/* narrow working page: stack instead of pinning */
@container (max-width: 480px) {
  .plan-board { aspect-ratio: auto; display: grid; gap: 16px; }
  .plan-board > * { position: static; }
  .plan-shot { width: 100%; transform: rotate(1deg); }
  .plan-wire { width: 58%; }
  .plan-arrows { display: none; }
  .notes { display: grid; gap: 12px; }
  .notes li.note { position: relative; left: auto; top: auto; width: auto; font-size: 1.0625rem; padding-inline-start: 36px; }
  .pin { display: block; }
  .pin-no {
    display: block; position: absolute; inset-inline-start: 0; top: 0;
    width: 26px; height: 26px;
    border: 2.5px solid var(--red); border-radius: 50%;
    color: var(--red-ink); font: 700 0.85rem/21px var(--f-body); text-align: center;
  }
}

/* ---------- headings on later spreads ---------- */

.h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1;
  margin-bottom: 22px;
  text-wrap: balance;
}
:lang(ar) .h2 { line-height: 1.25; }
.lede { max-width: 40ch; font-size: 1.0625rem; }
.aside-note {
  font-family: var(--f-note);
  font-weight: 700;
  color: var(--red-ink);
  font-size: 1.2rem;
  margin-top: 18px;
}

/* ---------- sides: the cards ---------- */

.page--sides-intro .field--green { width: 40%; height: 30%; inset-inline-end: -8%; bottom: -6%; }
.page--sides-intro .field--mustard { width: 24%; height: 22%; inset-inline-end: 20%; bottom: 12%; }

.cards {
  list-style: none;
  margin: 0; padding: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px) clamp(14px, 2vw, 24px);
}
.card { position: relative; display: grid; min-height: 310px; transition: transform 300ms var(--ease-out); }
/* 3D layers are slow to paint on phones, so a card only becomes 3D once it's touched, hovered or focused (home.js) */
.card.is-live { perspective: 1200px; }
.card:nth-child(odd) { transform: rotate(-1.6deg); }
.card:nth-child(even) { transform: rotate(1.4deg) translateY(18px); }
.card:nth-child(3n) { transform: rotate(-0.6deg) translateY(-6px); }
/* the card in hand always comes to the top of the stack */
.cards .card:hover, .cards .card:focus-within, .cards .card.is-flipped { z-index: 5; }

/* photo corners hold each card to the page */
.corners::before, .corners::after,
.card-inner::before, .card-inner::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  background: var(--ink);
  z-index: 3;
}
.corners::before { left: -7px; top: -7px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.corners::after { right: -7px; top: -7px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.card-inner::before { left: -7px; bottom: -7px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.card-inner::after { right: -7px; bottom: -7px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

.card-inner {
  position: relative;
  display: grid;
  min-height: 310px;
}
.is-live .card-inner { transform-style: preserve-3d; transition: transform 600ms var(--ease-out); }
.card-face {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  padding: 22px 16px 58px 18px;
  outline: 1.5px solid var(--ink);
  display: flex; flex-direction: column; gap: 8px;
}
.is-live .card-face { backface-visibility: hidden; }
.is-live .card-back { transform: rotateY(180deg); }
html.js .card:not(.is-live) .card-back { visibility: hidden; }
.card-back { background: var(--paper); color: var(--ink); font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }
.card.is-flipped .card-inner { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .is-live .card-inner { transition: none; } }

.card-no { font-family: var(--f-note); font-weight: 700; font-size: 0.95rem; }
.card h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.2rem, 1.65vw, 1.75rem); line-height: 1.1; }
.card .card-line { font-family: var(--f-note); font-weight: 700; font-size: 1.2rem; line-height: 1.3; margin-top: auto; }
.card-back a { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; margin-top: auto; }

.card-flip {
  position: absolute;
  inset-inline-end: 12px; bottom: 12px;
  z-index: 4;
  font: 700 0.85rem/1 var(--f-body);
  padding: 9px 12px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.card-flip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.card--medicine .card-front { background: var(--red); color: var(--ink); }
.card--web .card-front { background: var(--desk); color: var(--paper); }
.card--voice .card-front { background: var(--mustard); color: var(--ink); }
.card--ventures .card-front { background: var(--green); color: var(--paper); }
.card--volunteering .card-front { background: var(--ink); color: var(--paper); }
.card--learning .card-front { background: var(--paper); color: var(--ink); }
.card--web .card-flip, .card--ventures .card-flip, .card--volunteering .card-flip { color: var(--paper); }
.card.is-flipped .card-flip { color: var(--ink); }
/* hover inverts against whatever face the button sits on */
.cards .card .card-flip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cards .card--web:not(.is-flipped) .card-flip:hover,
.cards .card--ventures:not(.is-flipped) .card-flip:hover,
.cards .card--volunteering:not(.is-flipped) .card-flip:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* without JS the cards simply show both faces, stacked */
html:not(.js) .card-inner { transform: none; min-height: 0; }
html:not(.js) .card-face { grid-area: auto; backface-visibility: visible; padding-bottom: 16px; }
html:not(.js) .card-back { transform: none; }
html:not(.js) .card-flip { display: none; }

.more { margin-top: 28px; }

/* ---------- work spread ---------- */

.work-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 26px; }
.work-list li { display: grid; gap: 4px; max-width: 48ch; }
.work-list h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; }
.work-list .tag { font-family: var(--f-note); font-weight: 700; color: var(--red-ink); font-size: 1.0625rem; }
.work-list a { font-weight: 600; }

.page--work-shots { display: grid; gap: 40px; align-content: start; padding-top: calc(var(--page-pad) + 10px); }
.shot { position: relative; margin: 0; }
.shot:nth-child(1) { transform: rotate(-1.8deg); width: 88%; }
.shot:nth-child(2) { transform: rotate(1.6deg); width: 82%; justify-self: end; }
.shot .tape { width: 22%; height: 9%; left: 38%; top: -5%; transform: rotate(-4deg); }
.shot figcaption {
  margin-top: 8px;
  font-family: var(--f-note);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.page--work-shots .field--green { width: 22%; height: 16%; inset-inline-end: -5%; top: -3%; }

/* ---------- Codzita + contact ---------- */

.page--codzita .field--red { width: 34%; height: 24%; inset-inline-start: -6%; bottom: -6%; }
.codzita-name {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1;
  margin: 6px 0 18px;
}
.page--codzita p + p { margin-top: 14px; }
.page--codzita .lede { max-width: 42ch; }

.page--contact { background: var(--paper); }
.contact-slip {
  position: relative;
  background: var(--mustard);
  padding: clamp(24px, 3.4vw, 44px);
  transform: rotate(-1.2deg);
  outline: 1.5px solid var(--ink);
}
.contact-slip .h2 { margin-bottom: 16px; }
.contact-slip p { max-width: 42ch; }
.contact-actions { display: grid; justify-items: start; gap: 12px; margin-top: 26px; }
.contact-slip .btn { font-size: 1.2rem; transform: rotate(1deg); overflow-wrap: anywhere; }
.contact-slip .btn:nth-child(2) { transform: rotate(-0.8deg); }
.contact-slip .btn:hover { transform: rotate(0) translateY(-2px); }
.socials { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; }

/* ---------- footer on the desk ---------- */

.desk-foot {
  max-width: 1360px;
  margin: 0 auto;
  padding: 8px var(--spread-gap) 40px;
  color: var(--desk-ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 0.95rem;
}
.desk-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.desk-foot a { text-decoration: none; }
.desk-foot a:hover { text-decoration: underline; }

/* ---------- the one authored moment: pencil marks draw in (driven by home.js) ---------- */

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; }
  .spread::after { display: none; }
  .page + .page { border-top: 2px solid var(--gutter); }
  .spread--open { min-height: 0; }
  .page--name .actions { padding-top: 40px; padding-bottom: 24px; }
  .page--sides-intro { padding-bottom: 170px; }
  /* fixed sizes: percentages of a taller Arabic page pushed the fields up into the note */
  .page--sides-intro .field--green { height: 96px; bottom: 0; }
  .page--sides-intro .field--mustard { height: 84px; bottom: 44px; }
  .peek { display: none; }
  .desk-links { display: none; }
  .desk-bar { grid-template-columns: 1fr auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot:nth-child(1), .shot:nth-child(2) { width: 100%; }
  /* thumb-sized targets: 44px tall, with negative margins where the link sits in running text */
  .lang a, .lang span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding-block: 0; }
  .brand { padding-block: 8px; margin-block: -8px; }
  .desk-foot nav { gap: 0 20px; }
  .desk-foot a { display: inline-block; padding-block: 10px; }
  .socials { gap: 0 22px; }
  .socials a { display: inline-block; padding-block: 12px; }
  .link-pencil { min-height: 44px; }
  .card-back a { min-height: 44px; }
  .work-list a, .plan-caption a, .aside-note a, .shot figcaption a { display: inline-block; padding-block: 12px; margin-block: -12px; }
}

/* the smallest phones: the INTERN MD mark drops under the name so the toggle still fits */
@media (max-width: 360px) {
  .brand small { display: block; margin: 0; }
}

@media (max-width: 520px) {
  body { font-size: 0.95rem; }
  /* the ring clears the first letter at this size */
  .offer .circled svg { left: -9%; width: 118%; }
  /* phones are the primary view: one column of full-width cards, with room for the facts and a real tap target */
  .cards { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .card, .card-inner { min-height: 200px; }
  .card:nth-child(odd) { transform: rotate(-0.8deg); }
  .card:nth-child(even) { transform: rotate(0.8deg); }
  .card:nth-child(3n) { transform: rotate(-0.4deg); }
  .card-face { padding: 20px 18px 70px; }
  .card h3 { font-size: 1.75rem; }
  .card .card-line { font-size: 1.2rem; }
  .card-back { font-size: 1.0625rem; }
  .card-flip { inset-inline-end: 12px; bottom: 12px; min-height: 44px; padding: 0 16px; font-size: 0.95rem; }
  .btn { width: 100%; justify-content: space-between; }
  .page--name .field--mustard { width: 42%; height: 120px; inset-inline-start: auto; inset-inline-end: -8%; top: -20px; bottom: auto; }
  .page--name .field--red { width: 18%; height: 34px; inset-inline-start: auto; inset-inline-end: 30%; top: -8px; bottom: auto; }
  .page--codzita { padding-bottom: 130px; }
  .page--sides-intro { padding-bottom: 170px; }
}

/* Ruqaa sits small on its body; Arabic notes get a larger size to read like the Latin hand */
:lang(ar) .note { font-size: clamp(1.2rem, 3.6cqi, 1.4rem); line-height: 1.35; text-align: start; }
:lang(ar) .note [dir="ltr"] { white-space: nowrap; }
@media (max-width: 520px) { :lang(ar) .card-back [dir="ltr"] { white-space: nowrap; } }
:lang(ar) .plan-title, :lang(ar) .plan-close { font-size: 1.75rem; line-height: 1.45; }
:lang(ar) .card .card-line, :lang(ar) .aside-note, :lang(ar) .work-list .tag,
:lang(ar) .shot figcaption, :lang(ar) .link-pencil, :lang(ar) .peek span { font-size: 1.4rem; line-height: 1.4; }
:lang(ar) .card-no { font-family: var(--f-body); font-weight: 700; font-size: 0.95rem; }
@container (max-width: 480px) { :lang(ar) .notes li.note { font-size: 1.4rem; } }
