/* Generated by tools/i18n/build.py (rtlcss@4.3.0) from site.css for the Arabic pages: left and right exchanged. Do not edit; edit the English stylesheet and run the generator. */
/* Numa Koudsie · portfolio
   Editorial physics-journal layout: paper, ink, burgundy.
   IBM Plex Serif display · IBM Plex Sans text · IBM Plex Mono labels */

@import url('../fonts/plex.css'); @font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif/instrument-serif-400-latin.woff2') format('woff2'); } @font-face { font-family: 'Latin Modern Roman'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lm/lmroman10-regular.woff2') format('woff2'); } @font-face { font-family: 'Latin Modern Roman'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/lm/lmroman10-italic.woff2') format('woff2'); } @font-face { font-family: 'Latin Modern Roman'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lm/lmroman10-bold.woff2') format('woff2'); }

:root {
  --paper: #f5f1ea;
  --card: #fffaf3;
  --card-soft: #fbf6ee;
  --ink: #1c1518;
  --ink-2: #3a322e;
  --ink-3: #5a504b;
  --muted: #8b8079;
  --rule: #d9d0c2;
  --rule-soft: #e6dfd2;
  --accent: #7a1f2b;
  --accent-dark: #4d0f18;
  --accent-rose: #e2a2aa;
  --tan: #efe4c8;
  --tan-ink: #7a4b12;
  --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --grid:
    linear-gradient(rgba(122, 31, 43, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 31, 43, 0.075) 1px, transparent 1px);
  --shadow: 0 14px 40px rgba(60, 40, 20, 0.12);
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0;
}
p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection {
  background: var(--accent-rose);
  color: var(--ink);
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.skip-link {
  position: absolute;
  right: -9999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 100;
}
.skip-link:focus {
  right: 8px;
}

.mono {
  font-family: var(--mono);
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--tan);
  color: var(--tan-ink);
  padding: 3px 7px;
  border-radius: 3px;
  vertical-align: middle;
  white-space: nowrap;
}
.tag--soft {
  background: #f0eae0;
  color: var(--ink-3);
  border: 1px solid var(--rule-soft);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
}

/* ================= hero ================= */
/* The first screen fits the screen (Numa, 3 November 2026): logo, note, name, tagline, contacts and the three buttons all show
   without scrolling. Each size is the smaller of a width share and a height share, so a short laptop screen (720 to 800 px tall)
   shrinks the name and the gaps instead of pushing the buttons below the edge; a tall screen keeps the sizes it had. */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(16px, 4svh, 48px) 32px clamp(16px, 4svh, 40px);
  min-height: min(100svh, 860px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, min(4.2vw, 6.2svh), 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(10px, 2.4svh, 22px);
  animation: rise 0.9s ease both;
}
.hero__name span {
  display: block;
}
/* the name, small, over the title (5 November 2026: the large name read as self-praise) */
.hero__who {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--ink-2);
}
.hero__name .dot {
  display: inline;
  color: var(--accent);
}
.hero__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, min(2.2vw, 3svh), 27px);
  line-height: 1.3;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 0 clamp(12px, 3svh, 28px);
  animation: rise 0.9s 0.12s ease both;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: clamp(14px, 3.2svh, 30px);
  animation: rise 0.9s 0.22s ease both;
}
.hero__meta a {
  color: var(--accent);
}
.hero__mark {
  display: inline-block;
  line-height: 0;
  margin-bottom: clamp(8px, 2svh, 18px);
}
.hero__mark img {
  height: clamp(64px, 13svh, 120px);
  width: auto;
}
.hero__usul {
  margin: 0 0 clamp(10px, 2.4svh, 22px);
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #6f655f);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 0.9s 0.32s ease both;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 11px 20px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  white-space: nowrap;
  transition:
    background var(--dur-s) var(--ease),
    border-color var(--dur-s) var(--ease),
    box-shadow var(--dur-s) var(--ease),
    transform var(--dur-s) var(--ease);
}
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(122, 31, 43, 0.25);
  transform: translateY(var(--lift));
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--rule);
}
.btn--ghost:hover {
  background: var(--card);
  color: var(--accent-dark);
  border-color: var(--accent);
  box-shadow: none;
}

.figure {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fade 1.2s 0.3s ease both;
}
.figure__stage {
  position: relative;
  aspect-ratio: 1 / 1.02;
  background-color: var(--card);
  background-image: var(--grid);
  background-size: 24px 24px;
}
.figure__stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.figure__cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.figure__cap span {
  flex: 1;
}
.figure__cap b {
  font-weight: 500;
  color: var(--accent);
}
.figure__cap button {
  flex-shrink: 0;
  white-space: nowrap;
  font: inherit;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: inherit;
}
.figure__cap button:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ================= layout ================= */
.layout > * {
  min-width: 0;
}
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 80px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 64px;
}
.index {
  position: sticky;
  top: 28px;
  align-self: start;
  padding-top: 104px;
  min-width: 0;
}
.index__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 18px 12px 0;
}
.index ul {
  border-right: 1px solid var(--rule);
}
.index a {
  display: block;
  padding: 9px 18px 9px 0;
  margin-right: -1px;
  border-right: 2px solid transparent;
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none; line-height: 1.35;
  color: var(--ink-2);
  transition:
    color var(--dur-s) var(--ease),
    border-color var(--dur-s) var(--ease),
    padding-right var(--dur-s) var(--ease);
}
.index a:hover {
  color: var(--accent);
  text-decoration: none;
  padding-right: 20px;
}
.index a.active {
  color: var(--accent); font-weight: 500;
  border-right-color: var(--accent);
}
.content {
  min-width: 0;
} .ix-ic { width: 1.15em; height: 1.15em; flex: none; } .ix-t { min-width: 0; } /* the index as a panel (from 981 px): ink ground, large entries with line icons, the section on screen as a wine pill with a reading bar */ @media (min-width: 981px) { .layout { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; max-width: 1160px; } .index { margin-top: 112px; padding: 26px 14px 14px; background: #1c1518; border-radius: 18px; color: #f5f1ea; } .index__label { margin: 0 12px 18px; font: 500 13px/1 var(--sans); letter-spacing: 0.02em; text-transform: none; color: #b9ab98; } .index ul { border-right: 0; display: flex; flex-direction: column; gap: 4px; } .index a, .index a:hover { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 14px; margin: 0; border: 0; border-radius: 12px; font: 500 20px/1.2 var(--sans); letter-spacing: -0.01em; text-transform: none; color: #efe7db; overflow: hidden; transition: background 0.2s ease, color 0.2s ease; } .index a .ix-ic { color: #c9a8a3; } .index a:hover { background: rgba(245, 241, 234, 0.08); color: #fff; text-decoration: none; } .index a.active { background: var(--accent); color: #fff; } .index a.active .ix-ic { color: #fff; } .index a.active::after { content: ""; position: absolute; right: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: #f2c9c4; } .index li:has(> a:not([href^="#"])) { order: 1; } .index li:has(> a[href*="portfolios"]) { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(245, 241, 234, 0.14); } .index a:not([href^="#"]) { font-size: 16px; font-weight: 400; color: #cfc4b5; padding-top: 10px; padding-bottom: 10px; } } @media (prefers-reduced-motion: reduce) { .index a { transition: none; } } .index a:focus-visible { outline: 2px solid #f2c9c4; outline-offset: 2px; }

.section {
  padding-top: 104px;
} .content li, .content p { max-width: 34em; } .content .section__intro { max-width: 30em; }
.section h2 {
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  padding-top: 18px;
  position: relative;
}
.section h2::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.section.is-visible h2::before {
  width: 96px;
}
.section__intro {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 620px;
  margin: -8px 0 28px;
}

/* ================= timeline ================= */
.timeline {
  position: relative;
  padding-right: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  right: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--rule);
}
.timeline__line {
  position: absolute;
  right: 7px;
  top: 8px;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 1.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.timeline.is-visible .timeline__line {
  height: calc(100% - 16px);
}
.entry {
  position: relative;
  padding: 0 0 34px;
}
.entry:last-child {
  padding-bottom: 0;
}
.entry::before {
  content: '';
  position: absolute;
  right: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.entry--current::before {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(122, 31, 43, 0.35);
  animation: halo 2.6s ease-out infinite;
}
.entry__when {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.entry h3 {
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  margin: 4px 0 2px;
  transition: color var(--dur-s) var(--ease);
}
.entry:hover h3 {
  color: var(--accent);
}
.entry__org {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.bullets li {
  position: relative;
  padding-right: 16px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.bullets li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.66em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0.75;
}
.bullets li:last-child {
  margin-bottom: 0;
}

/* ================= ledger rows ================= */
.ledger {
  border-top: 1px solid var(--rule);
}
.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: background var(--dur-s) var(--ease);
}
.row:hover {
  background: linear-gradient(to left, var(--card-soft), transparent);
}
.row__when {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 6px;
}
.row h3 {
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
}
.row__org {
  font-size: 15px;
  color: var(--ink-2);
  margin: 2px 0 0;
}
.row__note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ================= research ================= */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.project {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 22px 20px 20px;
}
.project__status {
  font: 500 10px/1.6 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.project h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.project h3 a {
  color: inherit;
}
.project h3 a:hover {
  color: var(--accent);
}
.project__summary {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.project__open {
  align-self: flex-start;
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
  text-underline-offset: 4px;
  text-decoration: underline;
}

/* ================= plates (simulations) ================= */
.plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.plate {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-s) var(--ease),
    box-shadow var(--dur-s) var(--ease),
    border-color var(--dur-s) var(--ease);
}
.plate:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow);
  border-color: rgba(122, 31, 43, 0.4);
}
.plate__fig {
  height: 156px;
  padding: 12px 16px 6px;
  background-color: #fffdf9;
  background-image: var(--grid);
  background-size: 20px 20px;
  border-bottom: 1px solid var(--rule-soft);
}
.plate__fig svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform var(--dur) var(--ease);
}
.plate:hover .plate__fig svg {
  transform: scale(1.05);
}
.plate__fig .ink {
  stroke: var(--ink);
}
.plate__fig .acc {
  stroke: var(--accent);
}
.plate__fig .soft {
  stroke: var(--accent-rose);
}
.plate__fig .grey {
  stroke: #cdc1ae;
}
.plate__fig .acc-fill {
  fill: var(--accent);
}
.plate__fig .grey-fill {
  fill: var(--muted);
}
.plate__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.plate__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.plate h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  margin: 4px 0 8px;
}
.plate h3 a {
  color: inherit;
}
.plate h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}
.plate p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.plate__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.plate__launch {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 6px;
  transition:
    background var(--dur-s) var(--ease),
    transform var(--dur-s) var(--ease),
    box-shadow var(--dur-s) var(--ease);
}
.plate__launch::after {
  content: '←';
  transition: transform var(--dur-s) var(--ease);
}
.plate__launch:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(var(--lift));
  box-shadow: 0 8px 20px rgba(122, 31, 43, 0.25);
}
.plate__launch:hover::after {
  transform: translateX(-3px);
}
.plates__more {
  margin: 22px 0 0;
}

/* ================= skills ================= */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  border-top: 1px solid var(--rule);
}
.skills > div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14.5px;
  color: var(--ink-2);
}
.skills dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.skills dd {
  margin: 0;
}
.skills .lvl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-right: 6px;
}

/* ================= footer ================= */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
footer a {
  color: var(--ink-3);
}

/* ================= motion ================= */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes halo {
  to {
    box-shadow: 0 0 0 14px rgba(122, 31, 43, 0);
  }
}
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--rise-dur) var(--ease) var(--d, 0ms),
    transform var(--rise-dur) var(--ease) var(--d, 0ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js .reveal.is-visible.plate:hover {
  transform: translateY(var(--lift));
}

/* ================= responsive ================= */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
    padding: 40px 20px 28px;
  }
  .figure {
    max-width: 540px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 20px 60px;
  }
  .index {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0;
    margin: 0 -20px;
    background: rgba(245, 241, 234, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--rule);
  }
  .index__label {
    display: none;
  }
  .index ul {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    border-right: 0;
    padding: 0 12px;
    scrollbar-width: none;
  }
  .index ul::-webkit-scrollbar {
    display: none;
  }
  .index a,
  .index a:hover {
    padding: 14px 10px;
    margin: 0;
    border-right: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px;
  }
  .index a.active {
    border-bottom-color: var(--accent);
  }
  .section {
    padding-top: 64px;
  }
  .projects,
  .plates,
  .skills {
    grid-template-columns: 1fr;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .row__when {
    padding-top: 0;
  }
  footer {
    padding: 24px 20px 36px;
  }
}
@media (max-width: 480px) {
  .hero__name {
    font-size: 34px;
  }
  .skills > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero__name,
  .hero__tag,
  .hero__meta,
  .hero__cta,
  .figure {
    animation: none;
  }
  .entry--current::before {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .timeline.is-visible .timeline__line {
    transition: none;
  }
}
@media print {
  .index,
  .skip-link,
  .btn,
  .figure {
    display: none;
  }
  body {
    background: #fff;
  }
  .hero {
    min-height: 0;
  }
}

/* ================= the simulation plates as a shelf (since 2 November 2026) =================
   One row that scrolls sideways and snaps plate by plate: 3 plates in view from 701 px of column, 2 below that, and on a
   phone one plate with the edge of the next. index.html adds dots, arrows, a counter and the edge fade; without JavaScript
   the row is a plain sideways scroll with its scrollbar. In print the plates fall back to two columns. */
.plates {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 16px) / 3);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  padding: 8px 2px 14px;
  margin: -8px -2px 0;
}
.plates > .plate {
  scroll-snap-align: start;
}
.plates:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 12px;
}
.plates .plate__fig {
  height: 128px;
  padding: 10px 12px 4px;
}
.plates .plate__body {
  padding: 14px 16px 16px;
}
.plates .plate h3 {
  font-size: 19px;
  line-height: 1.2;
}
.plates .plate p {
  font-size: 13.5px;
  line-height: 1.55;
}
.plates .plate__tags .tag {
  font-size: 10px;
}
.js .plates.is-shelf {
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
}
.js .plates.is-shelf::-webkit-scrollbar {
  display: none;
}
.shelf-nav {
  display: none;
}
.js .shelf-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.shelf__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  cursor: pointer;
  transition: background var(--dur-s) var(--ease), color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.shelf__btn svg {
  width: 18px;
  height: 18px;
}
[dir='rtl'] .shelf__btn svg {
  transform: scaleX(-1);
}
.shelf__btn:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.shelf__btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.shelf__dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.shelf__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--rule);
  cursor: pointer;
  transition: width var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}
.shelf__dot:hover {
  background: var(--accent-rose);
}
.shelf__dot.is-on {
  width: 22px;
  background: var(--accent);
}
.shelf__dot:focus-visible,
.shelf__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.shelf__count {
  flex: none;
  min-width: 5.5ch;
  font: 500 12px/1 var(--mono);
  color: var(--muted);
  text-align: center;
}
@media (max-width: 760px) {
  .plates {
    grid-auto-columns: calc((100% - 16px) / 2);
  }
}
@media (max-width: 560px) {
  .plates {
    grid-auto-columns: 82%;
  }
  .shelf__dot {
    width: 6px;
    height: 6px;
  }
  .shelf__dot.is-on {
    width: 16px;
  }
  .shelf-nav {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shelf__dot,
  .shelf__btn {
    transition: none;
  }
}
@media print {
  .plates {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .shelf-nav {
    display: none !important;
  }
}

/* the rail of dots at the edge of the shelf, the bubble beside it, and the plate it picked (index.html, end) */
.shelf {
  position: relative;
}
.shelf__rail {
  position: absolute;
  top: 50%;
  inset-inline-end: -6px;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 14px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  touch-action: none;
  cursor: ns-resize;
}
.shelf__rail .shelf__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}
/* the plates in view: wine with a soft ring, the same size as the others, so the dots never move under a finger */
.shelf__rail .shelf__dot.is-on {
  width: 8px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.16);
}
.shelf__tip {
  position: absolute;
  inset-inline-end: 42px;
  top: 50%;
  z-index: 3;
  width: 184px;
  padding: 8px 10px 10px;
  border: 1px solid rgba(122, 31, 43, 0.35);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease), top var(--dur-s) var(--ease);
}
.shelf__tip.is-on {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.shelf__tipfig {
  height: 74px;
  margin-bottom: 6px;
  border-radius: 6px;
  background-color: #fffdf9;
  background-image: var(--grid);
  background-size: 14px 14px;
}
.shelf__tipfig svg {
  width: 100%;
  height: 100%;
  display: block;
}
.shelf__tipfig .ink { stroke: var(--ink); }
.shelf__tipfig .acc { stroke: var(--accent); }
.shelf__tipfig .soft { stroke: var(--accent-rose); }
.shelf__tipfig .grey { stroke: #cdc1ae; }
.shelf__tipfig .acc-fill { fill: var(--accent); }
.shelf__tipfig .grey-fill { fill: var(--muted); }
.shelf__tipnum {
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.shelf__tiptitle {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  color: var(--ink);
}
.js .reveal.is-visible.plate.is-picked,
.plate.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.18), var(--shadow);
}
@media (max-width: 560px) {
  .shelf__rail {
    gap: 16px;
    padding: 14px 10px;
    inset-inline-end: -4px;
  }
  .shelf__tip {
    width: 160px;
    inset-inline-end: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shelf__rail .shelf__dot,
  .shelf__tip {
    transition: none;
  }
}
@media print {
  .shelf__rail,
  .shelf__tip {
    display: none;
  }
}

/* Tapping (Numa, 3 November 2026): Android Chrome's blue tap highlight is switched off everywhere; a tapped link or button dims to
   72 % for the press instead, and the keyboard focus ring (:focus-visible, in the accent colour) stays as it is. */
html, a, button, input, select, textarea, label, summary, [role="button"], [tabindex] { -webkit-tap-highlight-color: transparent; }
a:active, button:active { opacity: .72; transition: opacity calc(var(--dur-s) / 4) var(--ease); }   /* the press is quick to show (a tap lasts about 0.1 s) */
input[type="range"]:active { opacity: 1; }
