/* Merkazit — look and feel.
   Idea: a white bus with coloured stripes. Four colours borrowed from Israeli bus
   companies, one per area of the app, ink-black outlines, and scores shown like
   platform signs. Colours only: no company logos or names are used. */

:root {
  color-scheme: light dark;
  --paper: #F5F1E8;
  --card: #FFFFFF;
  --soft: #EFEADF;
  --ink: #15171B;
  --muted: #5F6570;
  --border: #15171B;
  --shadow-color: #15171B;
  --like: #D9304A;
  --danger: #C0321F;

  /* the four bus colours, and the text colour that reads well on each */
  --green: #027E3F;   /* Egged */
  --navy: #03296A;    /* Kavim, Superbus */
  --orange: #F58113;  /* Metropoline */
  --lime: #99CA3C;    /* Kavim */
  --on-green: #FFFFFF;
  --on-navy: #FFFFFF;
  --on-orange: #15171B;
  --on-lime: #15171B;

  /* score colours, worst to best */
  --band-0: #EE6A55;
  --band-1: #F4924A;
  --band-2: #F5BE1E;
  --band-3: #A6CF45;
  --band-4: #3DBB75;
  --badge-ink: #15171B;

  --radius: 14px;
  --shadow: 3px 3px 0 var(--shadow-color);
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --width: 560px;
  --wide: 1120px; /* the widest the content gets on a computer */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101216;
    --card: #1A1D23;
    --soft: #252931;
    --ink: #F4F0E7;
    --muted: #A0A6B1;
    --border: #4B515D;
    --shadow-color: #000000;
    --like: #FF6B81;
    --danger: #FF8A78;
    --navy: #2F5FC4; /* the real navy disappears on a dark background */
  }
}

/* section colours: feed green, leaderboard navy, rating orange, profile lime */
:root, #app { --accent: var(--green); --on-accent: var(--on-green); }
#app[data-section='board'] { --accent: var(--navy); --on-accent: var(--on-navy); }
#app[data-section='rate'] { --accent: var(--orange); --on-accent: var(--on-orange); }
#app[data-section='profile'] { --accent: var(--lime); --on-accent: var(--on-lime); }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

#app {
  max-width: var(--width);
  margin-inline: auto;
  min-height: 100dvh;
}

/* ---------- frame ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 17px;
  background: var(--card);
  color: var(--ink);
}
/* the livery stripe: all four colours, with slanted joins */
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background: linear-gradient(115deg,
    var(--green) 0 25%, var(--navy) 25% 50%, var(--orange) 50% 75%, var(--lime) 75% 100%);
}

/* While a screen is loading, the stripe under the top bar runs like a passing bus. */
#app.is-loading .topbar::after {
  background-image: linear-gradient(115deg,
    var(--green) 0 12.5%, var(--navy) 12.5% 25%, var(--orange) 25% 37.5%, var(--lime) 37.5% 50%,
    var(--green) 50% 62.5%, var(--navy) 62.5% 75%, var(--orange) 75% 87.5%, var(--lime) 87.5% 100%);
  background-size: 200% 100%;
  animation: stripe-run 0.8s linear infinite;
}
@keyframes stripe-run { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Before the very first screen arrives, a spinner in the empty space. */
.main:empty::before {
  content: ''; display: block;
  width: 36px; height: 36px; margin: 72px auto 0;
  border: 4px solid var(--soft); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topbar__tools { display: flex; align-items: center; gap: 8px; }

/* the round icon links in the top bar: find people, and the bell */
.topicon, .bell {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
}
.topicon:hover, .bell:hover { background: var(--soft); }
/* on the narrowest phones, make room for both icons next to the name */
@media (max-width: 350px) {
  .topbar__tools { gap: 2px; }
  .wordmark { font-size: 22px; }
  .lang { padding-inline: 9px; }
}
.bell__count {
  position: absolute; top: 1px; inset-inline-end: -1px;
  display: grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--danger); color: var(--card);
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 900; font-size: 26px; letter-spacing: -0.02em; line-height: 1;
}
.wordmark__mark { display: inline-flex; gap: 3px; transform: skewX(-14deg); }
.wordmark__mark i { width: 6px; height: 22px; border-radius: 2px; }
.wordmark__mark i:nth-child(1) { background: var(--green); }
.wordmark__mark i:nth-child(2) { background: var(--navy); }
.wordmark__mark i:nth-child(3) { background: var(--orange); }
.wordmark__mark i:nth-child(4) { background: var(--lime); }

.lang {
  padding: 6px 12px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
}
.lang:hover { background: var(--ink); color: var(--card); }

/* shown while the app is loading, and if it fails to load */
.boot { padding: 48px 20px; color: var(--muted); text-align: center; }
.boot h1 { margin: 0 0 12px; color: var(--ink); font-size: 26px; font-weight: 900; }
.boot p { max-width: 420px; margin: 8px auto; }
.boot a { color: inherit; text-decoration: underline; }

/* The small footer on the home screen: what the app is, and links to the terms and privacy pages. */
.site-foot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 10px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  color: var(--muted); font-size: 13px; text-align: center;
}
.site-foot strong { color: var(--ink); }
.site-foot a { color: inherit; text-decoration: underline; }
.site-foot a:hover { color: var(--ink); }

.main { padding: 16px 16px 112px; }

.view { display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Two columns on a computer (see "computers" at the end of this file). On a phone these wrappers
   step aside, and everything inside them simply follows one another down the page. */
.split, .split__main, .split__side { display: contents; }
.desk-only { display: none; }

/* Computers get a navigation bar along the top instead of the tabs along the bottom. */
.topnav { display: none; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  max-width: var(--width); margin-inline: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 2px solid var(--border);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 12px; font-weight: 500;
}
.tabbar__item .icon { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 999px; }
.tabbar__item.is-on { color: var(--ink); }
.tabbar__item--feed.is-on .icon { background: var(--green); color: var(--on-green); }
.tabbar__item--board.is-on .icon { background: var(--navy); color: var(--on-navy); }
.tabbar__item--profile.is-on .icon { background: var(--lime); color: var(--on-lime); }
/* the Rate button is always filled: it's the main thing to do */
.tabbar__item--rate .icon { background: var(--orange); color: var(--on-orange); }
.tabbar__item--rate.is-on .icon { box-shadow: 0 0 0 2px var(--ink); }

.icon { display: inline-grid; line-height: 0; }
.icon svg { width: 22px; height: 22px; }
[dir='rtl'] .icon--flip { transform: scaleX(-1); }

/* ---------- text ---------- */

.title { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.title::after {
  content: ''; display: block;
  width: 46px; height: 6px; margin-top: 8px;
  background: var(--accent); border-radius: 2px;
  transform: skewX(-14deg);
}
.welcome .title::after { margin-inline: auto; }
.section-title { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.note { color: var(--muted); font-size: 13.5px; }
.note--box { padding: 10px 12px; background: var(--soft); border-radius: 10px; color: var(--ink); }
/* something the person should notice: hidden content, or a sign-in that can't work here */
.note--warn { border-inline-start: 5px solid var(--orange); }
.tag.tag--warn { background: var(--orange); color: var(--on-orange); }
.row--tight { gap: 6px; }
.inapp { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: start; }

.back { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; color: var(--muted); font-weight: 500; }
.back:hover { color: var(--ink); }

.link { padding: 0; background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.link:hover { color: var(--ink); }
.link--center { align-self: center; margin-top: 12px; }

/* ---------- surfaces ---------- */

.card {
  padding: 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px 16px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); text-align: center;
}

/* ---------- buttons and inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: #15171B; }
.btn--orange { background: var(--orange); color: var(--on-orange); border-color: #15171B; }
/* Google's button keeps Google's own look, per its sign-in guidelines */
.btn--google { gap: 10px; background: #FFFFFF; color: #1F1F1F; border-color: #747775; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--muted); opacity: 0.4; }
.btn--danger { color: var(--danger); }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn--icon { min-width: 48px; padding-inline: 10px; }
.btn--small { min-height: 36px; padding: 4px 12px; box-shadow: none; font-size: 14px; }
label.btn { cursor: pointer; }
label.btn:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }

.round {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--card); border: 2px solid var(--border); border-radius: 50%;
}

.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--border); border-radius: 12px;
  /* Hebrew and English typed in the same box each read in their own direction. */
  unicode-bidi: plaintext;
}
.input::placeholder { color: var(--muted); }
.input--lg { min-height: 54px; font-size: 18px; }
textarea.input { resize: vertical; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 14px; font-weight: 700; }
.field__hint { font-weight: 400; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 12px; }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; gap: 4px;
  background: var(--soft);
  border-radius: 12px;
}
.seg__item {
  padding: 8px 10px;
  background: transparent; border: 0; border-radius: 9px;
  color: var(--muted); font-weight: 700; text-align: center;
}
.seg__item.is-on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 2px var(--border); }

/* ---------- score sign ---------- */

.score {
  flex: none; display: inline-grid; place-items: center;
  min-width: 48px; height: 40px; padding: 0 8px;
  background: var(--soft); color: var(--muted);
  border: 2px solid #15171B; border-radius: 10px;
  font-weight: 900; font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1;
  direction: ltr;
}
.score--xl { min-width: 96px; height: 84px; border-radius: 16px; font-size: 44px; box-shadow: var(--shadow); }
.score--sm, .catpick__num { min-width: 42px; height: 32px; border-radius: 8px; font-size: 16px; }
[data-band='0'] { background: var(--band-0); color: var(--badge-ink); }
[data-band='1'] { background: var(--band-1); color: var(--badge-ink); }
[data-band='2'] { background: var(--band-2); color: var(--badge-ink); }
[data-band='3'] { background: var(--band-3); color: var(--badge-ink); }
[data-band='4'] { background: var(--band-4); color: var(--badge-ink); }

/* ---------- avatar ---------- */

.avatar {
  flex: none; display: grid; place-items: center;
  width: var(--size); height: var(--size);
  border: 2px solid #15171B; border-radius: 50%;
  font-weight: 700; font-size: calc(var(--size) * 0.42); line-height: 1;
}
.avatar--photo { overflow: hidden; background: var(--soft); }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar--0 { background: var(--green); color: var(--on-green); }
.avatar--1 { background: var(--navy); color: var(--on-navy); }
.avatar--2 { background: var(--orange); color: var(--on-orange); }
.avatar--3 { background: var(--lime); color: var(--on-lime); }

/* ---------- review ---------- */

.review { display: flex; flex-direction: column; gap: 10px; }
.review__head { display: flex; align-items: center; gap: 10px; }
.review__who { flex: 1; min-width: 0; }
.review__name { font-weight: 700; }
.review__meta { color: var(--muted); font-size: 13.5px; }
.review__meta a:hover, .review__name:hover { text-decoration: underline; }
.review__text { overflow-wrap: anywhere; white-space: pre-wrap; text-align: start; }
.review__foot { display: flex; gap: 6px; margin: -4px -8px -6px; }

.act {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 44px; min-height: 40px; padding: 0 8px;
  background: none; border: 0; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums;
}
button.act:hover, a.act:hover { background: var(--soft); color: var(--ink); }
.act--like.is-on { color: var(--like); }
.act--like.is-on svg { fill: currentColor; }
.act--more { margin-inline-start: auto; justify-content: center; }
/* the heart, and next to it the number that opens the list of who liked */
.act-pair { display: inline-flex; align-items: center; }
.act-pair .act--like { min-width: 40px; padding-inline-end: 2px; }
.act--count { min-width: 28px; padding-inline: 4px 8px; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.act--count:hover { color: var(--ink); }

.photos { display: grid; gap: 6px; }
.photos--2 { grid-template-columns: 1fr 1fr; }
.photos--3 { grid-template-columns: 1fr 1fr 1fr; }
.photos__item { padding: 0; background: var(--soft); border: 2px solid var(--border); border-radius: 10px; overflow: hidden; }
.photos__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photos--1 .photos__item img { aspect-ratio: 16 / 10; }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, 0.88);
}
.lightbox img { max-height: 90dvh; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 12px; inset-inline-end: 12px;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: #fff; color: #15171B; border: 0; border-radius: 50%;
}

/* ---------- feed ---------- */

.teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
}
.teaser__label { font-size: 12.5px; font-weight: 500; opacity: 0.75; }
.teaser__name { font-size: 20px; font-weight: 900; line-height: 1.2; }

/* ---------- leaderboard ---------- */

.board { display: flex; flex-direction: column; gap: 8px; }
.board__row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 2px solid var(--border); border-radius: 12px;
}
.board__row:hover { box-shadow: var(--shadow); }
.board__rank {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--muted); font-weight: 900; font-variant-numeric: tabular-nums;
}
.board__rank.is-top { background: var(--accent); color: var(--on-accent); border: 2px solid #15171B; }
.board__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.board__name { font-weight: 700; font-size: 17px; line-height: 1.25; }
.board__sub { color: var(--muted); font-size: 13px; }
/* the "want to visit" button on a station page, and the list of them on a profile */
.wish.is-on { background: var(--soft); box-shadow: none; }
.wish.is-on .icon svg { fill: currentColor; }
.wishlist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wishlist__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px; padding-inline-start: 10px;
  background: var(--card); border: 2px solid var(--border); border-radius: 12px;
  font-weight: 700;
}
.wishlist__item:hover { box-shadow: var(--shadow); }
.wishlist__item .icon svg { width: 18px; height: 18px; }

/* "Your score: 70" under a station the signed-in person has rated */
.board__mine { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; }
.board__mine .icon svg { width: 15px; height: 15px; stroke-width: 3; }

/* The row of choices above the leaderboard: overall, or one category. It scrolls sideways on a phone. */
.pills {
  display: flex; gap: 8px;
  margin-inline: -16px; padding: 2px 16px 4px;
  overflow-x: auto; scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 7px 14px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--border); border-radius: 999px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.pill.is-on { background: var(--accent); color: var(--on-accent); }

/* ---------- station ---------- */

.hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hero__text { min-width: 0; }
.hero__name { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.hero__sub { margin-top: 2px; font-weight: 500; }
.hero__rank { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* A station's scores by category: name and count, a bar, and the average. */
.catbars { display: flex; flex-direction: column; padding-block: 4px; }
.catbar {
  display: grid; grid-template-columns: minmax(104px, 36%) 1fr auto;
  align-items: center; gap: 12px;
  padding: 9px 0;
}
.catbar + .catbar { border-top: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); }
.catbar__text { display: flex; flex-direction: column; min-width: 0; }
.catbar__name { font-weight: 700; line-height: 1.25; }
.catbar__count { color: var(--muted); font-size: 12.5px; }
.catbar__track { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.catbar__fill { display: block; height: 100%; min-width: 6px; border-radius: 999px; }
.catbar.is-empty .catbar__name { color: var(--muted); }
/* The category average leads the list, set apart from the categories it is worked out from. */
.catbar--avg .catbar__name { font-weight: 900; }
.catbar--avg .catbar__track { height: 12px; }
.catbars .catbar--avg + .catbar { border-top: 2px solid color-mix(in srgb, var(--muted) 45%, transparent); }

/* The station's overall score, with a small label under it. */
.hero__score { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero__label { color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* One person's scores by category, shown on their review's own page. */
.catchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.catchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px; padding-inline-start: 10px;
  background: var(--soft); border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
}
.catchip--avg { font-weight: 700; box-shadow: inset 0 0 0 2px var(--border); }

/* ---------- rating form ---------- */

.scorepick { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.scorepick .field__label { align-self: flex-start; }
.scorepick__num {
  display: grid; place-items: center;
  min-width: 132px; height: 100px; padding: 0 12px;
  border: 2px solid #15171B; border-radius: 18px; box-shadow: var(--shadow);
  font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1;
  direction: ltr;
}
.scorepick__label { min-height: 1.5em; font-weight: 700; }
.scorepick__row { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; }
.scorepick__range { flex: 1; min-width: 0; height: 44px; accent-color: var(--ink); }

/* The optional scores by category on the rating form: one slider per category.
   A category nobody has touched yet is "not rated": its slider is faded and its score shows a dash. */
.catpick { display: flex; flex-direction: column; gap: 16px; }
.catpick__top { display: flex; flex-direction: column; gap: 4px; }
.catpick__title { display: flex; align-items: center; gap: 8px; }
.tag {
  display: inline-block; padding: 2px 9px;
  background: var(--soft); color: var(--muted);
  border-radius: 999px; font-size: 12px; font-weight: 700;
}
/* "Your category average (3 of 7 scored)" with its badge, or "none scored, and that's fine". */
.catpick__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 8px 12px;
  background: var(--soft); border-radius: 10px;
  font-size: 14px; font-weight: 700;
}
.catpick__summary.is-empty { color: var(--muted); font-weight: 500; }
/* An untouched category: a dashed "Not rated" instead of a score. */
.catpick__unset {
  flex: none; padding: 5px 10px;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 60%, transparent); border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.scorepick__hint { align-self: stretch; margin-top: -4px; text-align: start; }
.catpick__row { display: flex; flex-direction: column; gap: 2px; }
.catpick__head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.catpick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.catpick__name { font-weight: 700; line-height: 1.25; }
.catpick__hint { color: var(--muted); font-size: 13px; }
.catpick__clear {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--muted);
}
.catpick__clear:hover { background: var(--soft); color: var(--ink); }
.catpick__clear svg { width: 18px; height: 18px; }
.catpick__range { width: 100%; height: 40px; accent-color: var(--ink); }
.catpick__row.is-unset .catpick__range { opacity: 0.4; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs__item { position: relative; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; }
.thumbs__item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumbs__remove {
  position: absolute; top: 4px; inset-inline-end: 4px;
  display: grid; place-items: center; width: 32px; height: 32px;
  background: #fff; color: #15171B; border: 2px solid #15171B; border-radius: 50%;
}
.thumbs__remove svg { width: 16px; height: 16px; }
.thumbs__add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1;
  border: 2px dashed var(--border); border-radius: 10px;
  color: var(--muted); font-size: 13px; font-weight: 500; text-align: center; cursor: pointer;
}
.thumbs__add:hover { color: var(--ink); background: var(--soft); }
.thumbs__add:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- comments ---------- */

.comments { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.comment { display: flex; gap: 10px; }
.comment__body { flex: 1; min-width: 0; }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.comment__text { overflow-wrap: anywhere; white-space: pre-wrap; text-align: start; }
.comment__actions { display: flex; gap: 14px; margin-top: 2px; }
/* a comment with its replies: the replies sit indented under it, along a thin line */
.thread { display: flex; flex-direction: column; gap: 10px; }
.thread__replies {
  display: flex; flex-direction: column; gap: 10px;
  margin: 0; margin-inline-start: 15px; padding: 0; padding-inline-start: 14px;
  border-inline-start: 2px solid var(--soft); list-style: none;
}
.thread__reply:not(:empty) { margin-inline-start: 31px; }
.comment-form { display: flex; gap: 8px; }
.comment-form .input { flex: 1; min-width: 0; }

/* ---------- profile ---------- */

.profile { display: flex; flex-direction: column; gap: 14px; }
.profile__top { display: flex; align-items: center; gap: 14px; }
.profile__name { font-size: 24px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.profile__bio { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; text-align: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 0; border-block: 1px solid var(--soft); text-align: center; }
.stat__n { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__label { color: var(--muted); font-size: 12px; }
a.stat:hover .stat__label { color: var(--ink); text-decoration: underline; }

/* ---------- welcome ---------- */

.welcome { padding-top: 24px; text-align: center; }
.welcome__sign {
  align-self: center; display: grid; place-items: center;
  width: 120px; height: 92px;
  background: var(--band-4); color: var(--badge-ink);
  border: 2px solid #15171B; border-radius: 18px; box-shadow: var(--shadow);
  font-size: 52px; font-weight: 900; line-height: 1;
  transform: rotate(-4deg);
}
.welcome__body { color: var(--muted); }
.welcome .input { text-align: center; }

/* ---------- pop-up panels (menus, the report form) ---------- */

dialog.sheet {
  width: min(100%, var(--width)); max-width: none; max-height: 90dvh;
  margin: auto auto 0; overflow: auto;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  background: var(--card); color: var(--ink);
  border: 2px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0;
}
dialog.sheet[open] { display: flex; flex-direction: column; gap: 8px; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.55); }
.sheet__title { font-size: 20px; font-weight: 900; }
.sheet__item {
  min-height: 50px; padding: 10px 14px;
  background: var(--soft); color: var(--ink);
  border: 0; border-radius: 12px;
  font-weight: 700; text-align: start;
}
.sheet__item.is-danger { color: var(--danger); }
.sheet__cancel { background: transparent; color: var(--muted); text-align: center; }

.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; cursor: pointer; }
.choice input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

/* ---------- terms, privacy and other reading pages ---------- */

.legal { gap: 10px; }
.legal p, .legal li { text-align: start; }
.legal__h { margin-top: 10px; font-size: 18px; font-weight: 700; }
.legal__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-inline-start: 22px; }
.legal__link { font-weight: 500; text-decoration: underline; }
/* the plain pages (terms.html and friends): no bottom tabs, and an English half below the Hebrew */
.main--page { padding-bottom: 48px; }
.legal--second { margin-top: 36px; padding-top: 28px; border-top: 2px solid var(--soft); }

/* ---------- account options, blocked people, moderation ---------- */

.options { display: flex; flex-direction: column; margin-top: 8px; padding: 4px 14px; }
.options__row {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; border-bottom: 1px solid var(--soft);
  font-weight: 500;
}
.options__row:last-child { border-bottom: 0; }
.options__row > span:first-child { flex: 1; }
.options__row .icon { color: var(--muted); }
.options__row.is-danger { color: var(--danger); }
.options__count {
  min-width: 26px; padding: 2px 8px;
  background: var(--danger); color: var(--card);
  border-radius: 999px; font-size: 13px; font-weight: 700; text-align: center;
}

.people { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.people__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--card); border: 2px solid var(--border); border-radius: 12px;
}
.people__name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; overflow-wrap: anywhere; }
.people__detail { color: var(--muted); font-size: 13px; font-weight: 400; }

.find-people {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 8px;
  padding: 8px 14px;
  background: var(--soft); border-radius: 999px;
  font-size: 14px; font-weight: 700;
}

/* ---------- notifications ---------- */

.notif {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--card); border: 2px solid var(--border); border-radius: 12px;
}
.notif--alert { border-color: var(--danger); }
.notif__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif__quote { color: var(--muted); overflow-wrap: anywhere; }

/* the blocked-word list: one small tag per word, each with a remove button */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding-block: 2px; padding-inline: 12px 2px;
  background: var(--soft); border-radius: 999px;
  font-weight: 500;
}
.chip__remove {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: none; border: 0; border-radius: 50%; color: var(--muted);
}
.chip__remove:hover { background: var(--card); color: var(--danger); }
.chip__remove svg { width: 16px; height: 16px; }

.report { display: flex; flex-direction: column; gap: 8px; }
.report__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.report__quote {
  margin: 0; padding: 10px 12px;
  background: var(--soft); border-radius: 10px;
  overflow-wrap: anywhere; white-space: pre-wrap; text-align: start;
}

/* ---------- toast ---------- */

.toast {
  position: fixed; bottom: 96px; left: 50%; z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: 12px; font-weight: 500;
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- the home screen's side panel (computers only) ---------- */

.side-board__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.side-board__row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.side-board__row:hover { background: var(--soft); }
.side-board__name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-board .board__rank { width: 28px; height: 28px; font-size: 14px; }
.side-board__more { align-self: flex-start; color: var(--muted); font-size: 13.5px; font-weight: 700; text-decoration: underline; }
.side-board__more:hover { color: var(--ink); }
.side-cta__title { font-size: 17px; font-weight: 900; line-height: 1.3; }

/* ---------- computers ---------- */
/* From 960 pixels wide: the tabs become a bar along the top, the page uses the width, and some
   screens split into two columns. Nothing in here touches phones. Kept last so it wins. */

@media (min-width: 960px) {
  #app { max-width: none; }

  /* the top bar runs edge to edge; its contents line up with the page below */
  .topbar { padding-inline: max(24px, calc((100% - var(--wide)) / 2)); }
  .topnav { display: flex; align-items: center; gap: 6px; margin-inline: 32px auto; }
  .topnav__item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    color: var(--muted); font-weight: 700;
  }
  .topnav__item .icon svg { width: 20px; height: 20px; }
  .topnav__item:hover { background: var(--soft); color: var(--ink); }
  .topnav__item--feed.is-on { background: var(--green); color: var(--on-green); }
  .topnav__item--board.is-on { background: var(--navy); color: var(--on-navy); }
  .topnav__item--profile.is-on { background: var(--lime); color: var(--on-lime); }
  /* Rate is always filled orange, as on the phone: it's the main thing to do */
  .topnav__item--rate, .topnav__item--rate:hover { background: var(--orange); color: var(--on-orange); }
  .topnav__item--rate.is-on { box-shadow: 0 0 0 2px var(--ink); }
  .tabbar { display: none; }

  .main { max-width: calc(var(--wide) + 48px); margin-inline: auto; padding: 28px 24px 64px; }

  /* most screens: a comfortable reading width, in the middle */
  .view { width: 100%; max-width: 680px; margin-inline: auto; }
  .view--wide { max-width: none; }
  .view--board { max-width: 760px; }
  .view.welcome { max-width: 460px; }

  .desk-only { display: block; }
  .phone-only { display: none; }

  /* two columns: the home screen (reviews + side panel) and a station (scores + reviews) */
  .split { display: grid; gap: 28px; align-items: start; }
  .split__main, .split__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .split--feed { grid-template-columns: minmax(0, 680px) 320px; justify-content: center; }
  .split--station { grid-template-columns: 380px minmax(0, 1fr); }
  .split__side--sticky { position: sticky; top: 92px; }
  .side-board, .side-cta { display: flex; flex-direction: column; gap: 10px; }
  .split__side .site-foot { margin-top: 0; }

  /* the rating form: the scores by category get a column of their own */
  .view--rate {
    display: grid; max-width: 1040px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(8, auto) 1fr;
    column-gap: 28px; align-items: start;
  }
  .view--rate > * { grid-column: 1; }
  .view--rate > .title { grid-column: 1 / -1; }
  .view--rate > .catpick { grid-column: 2; grid-row: 2 / -1; }

  /* the leaderboard's choices fit on one or two lines, no sideways scrolling */
  .pills { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }

  /* menus and the report form open in the middle of the screen, not from the bottom */
  dialog.sheet {
    width: min(100% - 32px, 480px); margin: auto;
    padding-bottom: 14px; border-bottom: 2px solid var(--border); border-radius: 18px;
  }
  .toast { bottom: 32px; }
}
