/* ============================================================================
   celcam — design system
   ----------------------------------------------------------------------------
   Cool deep-blue dark. One accent, one rhythm, everything on a centre line.

   Two rules the whole product obeys:
     * ONE accent (blue) and it always means "this is the act".
     * TWO easings, `--ease` and `--ease-out`, and no page invents a third.
       Before that every file carried its own bezier and nothing felt related.
   ========================================================================== */

/* The typefaces are served from this origin. They used to be an @import of
   fonts.googleapis.com, which put every visitor's IP address in front of
   Google before a byte of celcam had rendered -- and made the privacy page's
   sentence about Cloudflare being the only third party untrue.

   The rules are in /fonts.css, linked from the HEAD of every page rather
   than imported from here: an @import chains (app.css must be parsed before
   the font CSS is even discovered, and only then can a woff2 be asked for),
   while a <link> fetches both stylesheets at once. Re-generate with
   tool/selfhost_fonts.py; do not hand-write @font-face rules, or the
   per-unicode-range splitting goes and a Latin page starts downloading
   the Arabic file. */

:root {
  --ink:      #050A16;
  --ink-2:    #070D1C;
  --panel:    #0D1526;
  --panel-2:  #111B30;
  --line:     rgba(150, 190, 255, .10);
  --line-2:   rgba(150, 190, 255, .19);

  --paper:    #EAF1FC;
  --muted:    #8FA3C4;
  --faint:    #5F718F;

  /* The blue. */
  --accent:    #2E7DFF;
  --accent-2:  #6BB0FF;
  --accent-lo: rgba(46, 125, 255, .13);
  --accent-ln: rgba(46, 125, 255, .42);

  --live:  #FF3B5C;
  --jade:  #3DDC97;
  --champ: #BFD6F5;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow:    0 20px 55px rgba(0, 6, 20, .6);
  --shadow-lo: 0 6px 20px rgba(0, 6, 20, .4);

  --ease:     cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t:    .3s;
  --t-lg: .6s;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Sora', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --arabic: 'IBM Plex Sans Arabic', 'Sora', system-ui, sans-serif;

  --maxw: 1080px;
}

html[dir='rtl'] { --display: 'IBM Plex Sans Arabic', 'Sora', sans-serif; --body: var(--arabic); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Atmosphere -----------------------------------------------------------
   One soft blue bloom behind the top of the page. The film grain that used to
   sit over everything is gone — it was texture for its own sake and it is the
   opposite of smooth on an LCD. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(78% 48% at 50% -8%, rgba(46, 125, 255, .20) 0%, transparent 64%),
    radial-gradient(52% 34% at 50% 4%, rgba(107, 176, 255, .07) 0%, transparent 72%);
}
main, header, footer, .shell { position: relative; z-index: 1; }

/* --- Type ----------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -.022em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.9rem); font-variation-settings: 'SOFT' 14, 'WONK' 1; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.4rem); letter-spacing: -.012em; }
p  { margin: 0; }

.lede { font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--muted); line-height: 1.65; font-weight: 300; }
.dim   { color: var(--muted); }
.faint { color: var(--faint); }
.tiny  { font-size: 12.5px; }
.small { font-size: 14px; }
.num   { font-variant-numeric: tabular-nums; }

/* --- Layout ---------------------------------------------------------------
   Everything sits on the centre line. Text blocks are capped by `ch` so a
   centred paragraph never runs so wide that the eye loses the return. */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; text-align: center; }
.wrap.narrow { max-width: 700px; }
.wrap.wide { max-width: 1260px; }


section { padding: clamp(56px, 7vw, 96px) 0; scroll-margin-top: 80px; }

.hold-w { max-width: 60ch; margin-inline: auto; }
.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.row.tight { gap: 8px; }

.between { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center; }
.grow    { flex: 1; min-width: 0; }
.hide    { display: none !important; }
/* Used on the login page since it shipped, and never defined — the language
   chip under the sign-in card sat hard left the whole time. */
.center  { text-align: center; }
[hidden] { display: none !important; }

/* --- The mark -------------------------------------------------------------
   celcam's mark since 2026-08-21: a geometric c with the lens at its centre.
   Two facts are load-bearing and both are generated, not typed — `tool/mark.py`
   emits this geometry into `app.js` and `favicon.svg` together:

     * the dot sits at the RING's centre, which is what "inside the c" means;
     * the ring is offset right in the 64-box (cx 34.22, not 32) so the painted
       INK is centred — the mouth opens right, so a ring centred on the box is
       visibly left-heavy. Measured: ink runs 10.12 → 53.88, dead centre.

   It opens by DRAWING itself rather than by assembling: one stroke coming in
   from the tail, then the lens. The old six-blade stagger is gone with the
   blades. */
.aperture { display: block; }
.aperture .cee { stroke-linecap: round; }
.aperture.open .cee {
  stroke-dasharray: 104; stroke-dashoffset: 104;
  animation: ceeDraw 1s var(--ease-out) forwards;
}
.aperture.open .pupil {
  transform-box: fill-box; transform-origin: center;
  animation: pupilIn .5s .42s var(--ease-out) both;
}
@keyframes ceeDraw { to { stroke-dashoffset: 0 } }
@keyframes pupilIn { from { transform: scale(0); opacity: 0 } to { transform: none; opacity: 1 } }
.aperture.spin { animation: apSpin 2.6s linear infinite; }
@keyframes apSpin { to { transform: rotate(360deg) } }

/* --- Brand lockup --------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.logo .aperture { width: 26px; height: 26px; flex: none; }
.logo b {
  font-family: var(--display); font-weight: 900; font-size: 21px; letter-spacing: -.03em;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
}
.logo b i { font-style: normal; color: var(--accent-2); }

/* --- Header --------------------------------------------------------------- */
header.top {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(5, 10, 22, .7);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-lg) var(--ease), background var(--t-lg) var(--ease);
}
header.top.stuck { border-bottom-color: var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.navlinks { display: flex; align-items: center; gap: 26px; }
.navlinks a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  position: relative; padding: 4px 0; transition: color var(--t) var(--ease);
}
.navlinks a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--accent); transition: right var(--t-lg) var(--ease);
}
.navlinks a:hover { color: var(--paper); }
.navlinks a:hover::after { right: 0; }
@media (max-width: 880px) { .navlinks { display: none } }

/* --- Buttons --------------------------------------------------------------
   The lift is 1px and slow. It used to be 1.5px at .16s, which on a trackpad
   reads as a twitch rather than a response. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-size: 15px; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--paper); color: #0A1120;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), opacity var(--t) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 6, 20, .5); }
.btn:active { transform: translateY(0) scale(.99); transition-duration: .09s; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .4; pointer-events: none; }

.btn.accent {
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-2) 130%);
  color: #04122E; box-shadow: 0 8px 28px rgba(46, 125, 255, .3);
}
.btn.accent:hover { box-shadow: 0 14px 40px rgba(46, 125, 255, .42); }

.btn.ghost { background: transparent; color: var(--paper); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent-ln); background: var(--accent-lo); color: var(--accent-2); box-shadow: none; }

.btn.quiet { background: var(--panel); color: var(--paper); border-color: var(--line); }
.btn.quiet:hover { background: var(--panel-2); box-shadow: none; }

.btn.live { background: linear-gradient(140deg, #FF3B60, #E01F45); color: #fff; box-shadow: 0 8px 26px rgba(255, 45, 85, .3); }
.btn.danger { background: transparent; color: var(--live); border-color: rgba(255, 45, 85, .3); }
.btn.danger:hover { background: rgba(255, 45, 85, .1); border-color: var(--live); }

.btn.sm { padding: 9px 16px; font-size: 13.5px; gap: 7px; }
.btn.lg { padding: 16px 32px; font-size: 16.5px; }
.btn.block { width: 100%; }
.btn svg { flex: none; }

.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  cursor: pointer; transition: all var(--t) var(--ease);
}
.ibtn:hover { color: var(--paper); border-color: var(--line-2); background: var(--panel-2); }
.ibtn.on { color: var(--accent-2); border-color: var(--accent-ln); background: var(--accent-lo); }

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: linear-gradient(168deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
}
.card.pad-lg { padding: clamp(24px, 4vw, 36px); }
.card.hoverable { transition: border-color var(--t-lg) var(--ease), transform var(--t-lg) var(--ease), box-shadow var(--t-lg) var(--ease); }
.card.hoverable:hover { border-color: var(--accent-ln); transform: translateY(-3px); box-shadow: var(--shadow); }
.card.lit::before {
  content: ''; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
}

/* --- Chips --------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  white-space: nowrap;
}
.chip.accent { color: var(--accent-2); border-color: var(--accent-ln); background: var(--accent-lo); }
.chip.jade  { color: var(--jade); border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .1); }
.chip.live  { color: #fff; border-color: transparent; background: var(--live); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot.pulse { animation: dotPulse 2s var(--ease) infinite; }
@keyframes dotPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,59,92,.5) } 60% { box-shadow: 0 0 0 8px rgba(255,59,92,0) } }

/* --- Forms ---------------------------------------------------------------- */
label.field { display: block; text-align: center; }
label.field > span {
  display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 7px;
}
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], textarea, select {
  width: 100%; font-family: var(--body); font-size: 15px; color: var(--paper); text-align: center;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 13px 15px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
textarea { resize: vertical; min-height: 92px; }
input::placeholder, textarea::placeholder { color: var(--faint); text-align: center; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent-ln); background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 4px rgba(46, 125, 255, .13);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%238FA3C4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px;
}
html[dir='rtl'] select { background-position: left 15px center; padding-right: 15px; padding-left: 38px; }

input.code {
  text-align: center; font-size: 30px; font-weight: 600; letter-spacing: .42em;
  padding: 18px 15px 18px calc(15px + .42em); font-variant-numeric: tabular-nums; direction: ltr;
}

.sw { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .track {
  width: 44px; height: 26px; border-radius: 999px; flex: none; position: relative;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.sw .track::after {
  content: ''; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--muted);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.sw input:checked + .track { background: var(--accent-lo); border-color: var(--accent-ln); }
.sw input:checked + .track::after { background: var(--accent); transform: translateX(18px); }
html[dir='rtl'] .sw input:checked + .track::after { transform: translateX(-18px); }
.sw input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(46, 125, 255, .18); }
.sw .lbl { font-size: 14.5px; }

/* --- Segmented control ----------------------------------------------------
   The active pill SLIDES. It used to pop between buttons, which is the single
   most obviously unsmooth thing a tab bar can do. `--i` is set in JS. */
.seg {
  display: inline-flex; position: relative;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; gap: 2px;
}
.seg::before {
  content: ''; position: absolute; z-index: 0; top: 4px; bottom: 4px;
  inset-inline-start: 4px; width: var(--segw, 0px);
  transform: translateX(calc(var(--segx, 0px) * var(--segdir, 1)));
  background: var(--panel-2); border-radius: 999px; box-shadow: var(--shadow-lo);
  transition: transform var(--t-lg) var(--ease), width var(--t-lg) var(--ease), opacity .2s ease;
  opacity: var(--segop, 0);
}
html[dir='rtl'] .seg { --segdir: -1; }
.seg button {
  position: relative; z-index: 1;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted);
  background: transparent; border: none; cursor: pointer;
  padding: 8px 17px; border-radius: 999px; white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.seg button.on { color: var(--paper); }

/* --- Copyable value ------------------------------------------------------- */
.copy {
  display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 11px 13px; cursor: pointer;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.copy:hover { border-color: var(--accent-ln); background: rgba(46, 125, 255, .07); }
.copy code {
  flex: 0 1 auto; min-width: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px; color: var(--champ); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; direction: ltr; text-align: center;
}
.copy .ic { color: var(--faint); flex: none; transition: color var(--t) var(--ease); }
.copy:hover .ic { color: var(--accent-2); }

/* --- QR ------------------------------------------------------------------- */
.qr {
  background: var(--paper); border-radius: var(--r); padding: 12px;
  display: inline-flex; line-height: 0; box-shadow: var(--shadow-lo);
}
.qr img, .qr canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }

/* --- Rows ----------------------------------------------------------------- */
.rows { display: flex; flex-direction: column; text-align: center; }
.rows > .r { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.rows > .r:last-child { border-bottom: none; }
.rows > .r:hover .rowact { opacity: 1; }
.rowact { display: flex; gap: 6px; opacity: .35; transition: opacity var(--t) var(--ease); }
@media (hover: none) { .rowact { opacity: 1 } }

/* --- Toast ---------------------------------------------------------------- */
#toast {
  position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 22px);
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--paper);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t-lg) var(--ease-out);
  max-width: calc(100vw - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { border-color: rgba(255,59,92,.4); color: #FFC9D3; }

/* --- Modal ---------------------------------------------------------------- */
.scrim {
  position: fixed; inset: 0; z-index: 150; display: none;
  background: rgba(3, 6, 14, .76); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 20px; overflow-y: auto;
}
.scrim.open { display: flex; align-items: center; justify-content: center; animation: fade .25s var(--ease) both; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; max-width: 460px; margin: auto; text-align: center;
  background: linear-gradient(168deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: var(--r-xl);
  padding: 28px; box-shadow: var(--shadow);
  animation: pop .42s var(--ease-out) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.975) } to { opacity: 1; transform: none } }
.modal h3 { margin-bottom: 6px; }

/* --- App shell ------------------------------------------------------------ */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 10, 22, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.appbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 62px; }
.appmain { flex: 1; padding: 30px 0 90px; }

.crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.crumb .sep { color: var(--faint); flex: none; }
.crumb .cur { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #04122E;
  font-weight: 700; font-size: 14px; cursor: pointer; border: none; font-family: var(--body);
  text-transform: uppercase; transition: transform var(--t) var(--ease);
}
.avatar:hover { transform: scale(1.06); }

/* --- Grids ---------------------------------------------------------------- */
/* CENTRED, not auto-filled.
   `repeat(auto-fill, minmax(270px, 1fr))` reserves the empty tracks, so two
   cards in a three-track row sat hard LEFT while the heading above them was
   centred in the same wrap — at every width where the count did not divide
   evenly the page read as broken rather than as sparse. Flex with a basis
   centres the short row and still fills the long one. */
.cards { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: stretch; }
.cards > * { flex: 1 1 270px; max-width: 360px; }

/* The same shape for panels that belong side by side once there is room. */
.cols { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: flex-start; }
.cols > * { flex: 1 1 320px; max-width: 420px; margin-bottom: 0 !important; }
.media { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* --- Empty state ---------------------------------------------------------- */
.empty { text-align: center; padding: clamp(38px, 8vw, 68px) 20px; }
.empty .aperture { margin: 0 auto 18px; width: 44px; height: 44px; opacity: .38; }
.empty h3 { margin-bottom: 8px; }

/* --- Skeleton ------------------------------------------------------------- */
.sk { background: linear-gradient(90deg, #0D1526 25%, #16223A 50%, #0D1526 75%);
      background-size: 240% 100%; animation: skm 1.6s linear infinite; border-radius: var(--r-sm); }
@keyframes skm { to { background-position: -240% 0 } }

/* --- Motion ---------------------------------------------------------------
   `.rise` fires on load for what is already on screen; `.reveal` waits for the
   section to come into view. Both land in the same place with the same easing,
   so the page reads as one continuous movement rather than two systems. */
.rise { animation: riseIn .85s var(--ease-out) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
.d1 { animation-delay: .06s } .d2 { animation-delay: .12s } .d3 { animation-delay: .18s }
.d4 { animation-delay: .24s } .d5 { animation-delay: .3s }  .d6 { animation-delay: .36s }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.s1 { transition-delay: .07s } .reveal.s2 { transition-delay: .14s }
.reveal.s3 { transition-delay: .21s } .reveal.s4 { transition-delay: .28s }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* --- Footer --------------------------------------------------------------- */
footer.foot { border-top: 1px solid var(--line); padding: 40px 0 44px; margin-top: 30px; }
footer.foot a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color var(--t) var(--ease); }
footer.foot a:hover { color: var(--accent-2); }

/* --- Language switch ------------------------------------------------------ */
.lang {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all var(--t) var(--ease);
}
.lang:hover { color: var(--paper); border-color: var(--line-2); }

/* --- Narrow screens -------------------------------------------------------
   Measured at 360 px and 390 px through `tool/shots.py`, not guessed. The
   layout is fluid everywhere; these are the places where fluid was not
   enough. */
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }

  /* A bar with a FIXED height must not be allowed to wrap. `.row` wraps by
     default, so the language chip and "All events" dropped onto a second line
     INSIDE the 62 px appbar and drew on top of the breadcrumb. */
  .appbar .wrap { gap: 10px; height: 58px; }
  .appbar .row { flex-wrap: nowrap; flex: none; }
  header.top .wrap { gap: 10px; height: 62px; flex-wrap: nowrap; }
  header.top .row { flex-wrap: nowrap; flex: none; }

  .btn { padding: 12px 20px; font-size: 14.5px; }
  .btn.sm { padding: 9px 15px; font-size: 13.5px; }
  .lang { padding: 6px 11px; font-size: 12px; }
  .hide-sm { display: none !important; }

  section { padding: 48px 0; }
  .appmain { padding: 24px 0 70px; }
  .card { padding: 20px 16px; }
  .modal { padding: 24px 18px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 13px; }
  .card { padding: 18px 14px; }
}
