/* ==========================================================================================
   Compass Afar -- the iOS layer, part 2: the screens, one section each (part 1 is ios-app.css).
   Layout and styling only. Sizes inside a screen use container units (cqw / cqh of the screen area), never the
   window's vw / vh: the app is a 600px-max column on a tablet and a short strip in landscape.
   ========================================================================================== */

/* ==========================================================================================
   SIGN-IN, VERIFY EMAIL, SIGN-UP STEPS, PROFILE SET-UP
   ========================================================================================== */
#screen-splash{ padding-inline: var(--gutter); }
.divider{ margin: 12px 0; font-size: var(--ios-fs-foot); }
.guest-note{ font-size: var(--ios-fs-sub); line-height: 1.4; margin-top: 12px; }
.forgot-row{ margin: -8px 0 4px; }
.walkthrough-list{ gap: 10px; padding-left: 1.4em; line-height: 1.4; }
.walkthrough-list a{ font-weight: var(--ios-w-regular); color: var(--ios-tint); display: inline-flex; align-items: center; min-height: 44px; }
.password-strength span{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); }
/* sign-up: see SIGN-UP (7A.1) further down -- every step is a classic screen, built from the shared pieces */
.arrival-phase-line{ margin: calc(var(--sp-2) * -1) 0 var(--sp-3); }
.profile-form .sub, .profile-form .form-note{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.profile-saved, .place-status{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); }
.place-status.ok{ color: var(--safe-fg); font-weight: var(--ios-w-regular); }
/* interests: the wheel is untouched; only the page around it */
.interest-caption, #screen-signup-interests .explore-caption{ font-size: var(--ios-fs-body); }

/* ==========================================================================================
   EXPLORE: one screen, no scrolling. Top to bottom: greeting, [set-up pill] | wheel + caption | the dock.
   The greeting sits under the nav bar. Explore has no tab bar (the wheel is the way in): its last row is a dock of
   three -- Today, Go, the chat bubble. The wheel takes what is left between the two and is sized from that height, so
   the screen fits a phone in Safari (toolbars showing) as well as the installed app. On a short screen the greeting tightens first (see the container queries below).
   The look -- shared with the Interests step of sign-up, the other "lens" screen (.screen.lens; the ring is .compass-hero
   on both, mounted by Wheel.heroDial): the city's street map lies behind everything (a static picture, faded out behind
   the greeting), and the compass is a LENS on it: inside the dial the map is at full strength under a faint disc; outside
   it the map pales under a wash of the page colour with a soft vignette at the screen's edges (.explore-lens). The
   dial's rim is a thin frosted band (.compass-hero::after: backdrop blur, a 1px inner highlight on the disc's edge,
   a hairline bezel). The ticks turn with the spokes (.dial-ticks in the dial; wheel.js: heroDial); the rim, the
   hub and the caption never turn. No cardinal letters anywhere. Dark: an ink-navy map, the same pink needle.
   ========================================================================================== */
#screen-explore{
  /* the map runs to the end of the screen; the dock and the credit end above the home indicator */
  overflow-y: auto; padding-bottom: var(--explore-end);
}
/* The dial's look (light), shared by every screen that has a dial: the lens screens (Explore, Interests) and the section dial (Community,
   Insider -- see SECTION DIAL below). The lens screens add the map's own settings just after. */
.screen.lens, .section-dial{
  /* The disc is part of the map, not a plate on it: rose-tinted white at --disc-a (half), a touch more in the centre
     (+.1, where the needle crosses) fading to a touch less at the rim (-.1). The ticks and letters are mauve, not
     black; W/E and the main ticks keep about 3:1 against the disc (checked by the "explore look" journey). */
  --disc-a: .34; --disc-rgb: 255, 246, 250;
  --disc: radial-gradient(circle, rgba(var(--disc-rgb), calc(var(--disc-a) + .1)) 0%, rgba(var(--disc-rgb), var(--disc-a)) 55%, rgba(var(--disc-rgb), calc(var(--disc-a) - .1)) 100%);
  --disc-ring: rgba(var(--accent-rgb), .45);
  --disc-shadow: 0 2px 12px rgba(122, 61, 90, .08);
  --disc-halo: 0; --glow-near: .10; --glow-mid: .035;
  --dial-tick: rgba(138, 90, 111, .38); --dial-strong: rgba(122, 61, 90, .82); --needle-south: rgba(118, 112, 128, .55);
  --rim-fill: rgba(255, 255, 255, .34); --rim-light: rgba(255, 255, 255, .85); --rim-bezel: rgba(var(--accent-rgb), .38);
  --spoke-cool: rgb(92, 100, 118);
}
.screen.lens{
  --explore-end: var(--ios-safe-bottom);
  --page-rgb: 244, 239, 242; /* --ios-bg, for the halos that lift things off the map */
  --lens-wash: .5;
  --pill-ink: rgba(58, 54, 60, .88); /* the first-visit hint: soft dark grey */
}
/* dark: the ink-navy map (assets/citymap/*-dark.webp is drawn onto #0b0f1c), so the screen behind its faded edges is navy too */
html[data-theme="dark"] .screen.lens{
  --page-rgb: 11, 15, 28; background: #0b0f1c;
  --disc-a: .34; --disc-rgb: 22, 28, 48;
  --disc-ring: rgba(240, 103, 159, .4);
  --disc-shadow: 0 2px 12px rgba(0, 0, 0, .3);
  --glow-near: .08; --glow-mid: .03;
  --dial-tick: rgba(196, 204, 230, .42); --dial-strong: rgba(214, 222, 245, .88); --needle-south: rgba(170, 176, 196, .5);
  --rim-fill: rgba(60, 70, 110, .32); --rim-light: rgba(255, 255, 255, .22); --rim-bezel: rgba(240, 103, 159, .4);
  --lens-wash: .55; --spoke-cool: rgb(168, 176, 198);
  --pill-ink: rgba(214, 218, 232, .88);
}
/* The map: assets/citymap/<city>-light|dark[@2x].webp (backend/src/scripts/buildCityMap.js draws them from OpenStreetMap
   data; app.js names the files once it knows the city and the picture has loaded). Always 750 x 1250, whatever the
   screen, so the streets are the same size on every device; the frame is never wider than 600px. One static layer:
   it fades in once (opacity) and is otherwise never repainted. */
.explore-map{
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 500ms ease;
  background: var(--map-light, none) center 44% / 750px 1250px no-repeat;
}
/* The header blends into it. On Explore the header has no hairline and no blur, and its colour runs on for 80px under
   it, fading to nothing: the map comes in gently under the greeting. A gradient only (no backdrop-filter). The header's
   colour is --ios-bar over the page, so the fade is those two layers. At the bottom the map simply runs on behind
   the dock. */
.explore-map::before{ content: ""; position: absolute; left: 0; right: 0; top: 0; height: 80px; background: linear-gradient(to bottom, var(--ios-bar), transparent), linear-gradient(to bottom, var(--ios-bg), transparent); }
.app-frame[data-screen="screen-explore"] .app-header, .app-frame[data-screen="screen-signup-interests"] .app-header{ border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-theme="dark"] .explore-map{ background-image: var(--map-dark, none); }
.explore-map.ready{ opacity: 1; }
/* The lens: over the map, under everything else. Clear inside the disc (--lens-x/y/r: placeLens in app.js), the page
   colour at --lens-wash just outside it, and a soft vignette that deepens towards the screen's edges. A gradient only:
   nothing here is repainted while the dial turns (the map alone moves, by a few px, with the phone's tilt). */
.explore-lens{
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at var(--lens-x, 50%) var(--lens-y, 45%), rgba(var(--page-rgb), 0) calc(var(--lens-r, 120px) + 2px), rgba(var(--page-rgb), var(--lens-wash)) calc(var(--lens-r, 120px) + 34px)),
    radial-gradient(ellipse 80% 72% at 50% 46%, rgba(var(--page-rgb), 0) 58%, rgba(var(--page-rgb), .5) 100%);
}
@media (prefers-reduced-motion: reduce){ .explore-map{ transition: none; } }
/* the map's credit: one small line, bottom left, in the strip under the dock (--go-gap keeps the dock clear of
   it), with a halo like the labels' since the map is at full strength there */
.map-credit{
  position: absolute; left: 26px; bottom: calc(var(--explore-end) + 3px); z-index: 1; margin: 0; pointer-events: none; white-space: nowrap;
  font: var(--ios-w-regular) 9px/1 var(--ios-font); letter-spacing: .01em; color: var(--ink-soft); opacity: .85;
  text-shadow: 0 0 3px rgb(var(--page-rgb)), 0 0 6px rgb(var(--page-rgb));
}
.map-credit[hidden]{ display: none; }
/* The dial's own box is wider than the ring while it turns. Clip at the screen's edge, not at the gutter. */
#screen-explore .explore-wrap{
  flex: 1 0 auto; justify-content: flex-start; gap: 0;
  margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) var(--go-gap); overflow-x: clip;
  position: relative; z-index: 1; /* above the map */
}
/* the greeting: one large line in the brand serif (it shrinks for a long name instead of wrapping), a small one under it */
.explore-hello{ flex: none; width: 100%; padding: 10px 0 6px; text-align: center; }
#screen-explore .hello-line{
  margin: 0; font: 600 clamp(24px, 7.4cqi, 30px)/1.14 var(--o-font-display); letter-spacing: -.01em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#screen-explore .hello-line[data-fit="snug"]{ font-size: clamp(20px, 6.3cqi, 26px); }
#screen-explore .hello-line[data-fit="tight"]{ font-size: clamp(17px, 5.3cqi, 22px); }
.hello-sub{ margin: 4px 0 0; font: var(--ios-w-regular) var(--ios-fs-sub)/1.3 var(--ios-font); color: var(--ink-soft); }
.hello-sub[hidden]{ display: none; }
.setup-card{
  flex: none; min-height: 44px; margin-top: 0; padding: 0 16px; border: solid transparent; border-width: 4px 0; border-radius: 999px;
  background: var(--ios-tint-soft) padding-box; color: var(--ios-tint); box-shadow: none; font-size: var(--ios-fs-sub); max-width: 100%;
}
/* The stage: the flexible middle. A size container, so the wheel can be sized from its HEIGHT (cqh) as well as its
   width. The wheel and its caption sit in it as one group, towards the top: of any spare height, one third goes
   above the wheel and two thirds below the caption (rows 1 and 4; both are empty and shrink to nothing on a short phone). */
.explore-stage{
  --cap-h: 52px; --stage-gap: 8px; /* the caption row always has room for a two-line pill (2 x 13px x 1.3 + 16px padding + 2px border), so the wheel doesn't jump as it turns */
  --below: 0px; /* kept free under the caption */
  flex: 1 1 0; width: 100%; min-height: calc(212px + var(--cap-h) + var(--stage-gap) + var(--below) + 16px); padding-block: 8px;
  container-type: size; container-name: stage;
  display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(calc(var(--cap-h) + var(--stage-gap)), auto) minmax(var(--below), 1.5fr); grid-template-columns: minmax(0, 1fr); justify-items: center; /* row 3 keeps two lines' room: the pill is tight to its text, the wheel never jumps */
}
/* The wheel: on a phone its box is a little wider than the screen (stage + 40px = screen + 8px). The points' boxes
   are wider than their words, so the widest label at the widest point of a turn still ends about 5px inside the
   screen's edge on an iPhone SE (the wrap clips at the screen's edge, and nothing scrolls sideways). Never over 460px
   (an iPad), and no taller than the stage leaves once the caption has its two lines. Nothing sits in the bottom 8% of its box
   (the lowest labels stop short of it), so the caption moves up into that. Under 230px (landscape) the screen scrolls. */
/* the glow: rose at the needle, gone by the edge of the destination ring */
.compass-hero{
  background: radial-gradient(circle closest-side, rgba(var(--accent-rgb), var(--glow-near)) 0%, rgba(var(--accent-rgb), var(--glow-mid)) 55%, rgba(var(--accent-rgb), 0) 100%);
}
/* the disc: under the dial's ticks (0.90 of the hub: the ticks end at 0.89), faint (a third opaque: the map is at full
   strength inside the lens), with the rim's 1px inner highlight on its edge, a faint shadow, and (--disc-halo 0, a knob)
   no halo. It lies under the points, which stay outside it where they were. */
.compass-hero::before{
  content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--hub) * .90); height: calc(var(--hub) * .90);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: var(--disc);
  box-shadow: inset 0 0 0 1px var(--rim-light), 0 0 0 .5px var(--disc-ring), var(--disc-shadow), 0 0 calc(var(--hub) * .22) calc(var(--hub) * .10) rgba(var(--page-rgb), var(--disc-halo));
}
/* the rim: a 6px frosted band just outside the disc's edge (backdrop blur under a thin white wash), a hairline bezel at
   its outer edge. It never turns: it is the ring's own pseudo-element, under the dial (z-index 1 against the dial's 2) so
   the labels pass over it, and the map alone is what it blurs. */
.compass-hero::after{
  content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--hub) * .90 + 12px); height: calc(var(--hub) * .90 + 12px);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 1; box-sizing: border-box;
  background: var(--rim-fill); border: .5px solid var(--rim-bezel);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 6.5px), #000 calc(100% - 5.5px)); -webkit-mask-size: 100% 100%; -webkit-mask-repeat: no-repeat;
  mask: radial-gradient(circle closest-side, transparent calc(100% - 6.5px), #000 calc(100% - 5.5px)); mask-size: 100% 100%; mask-repeat: no-repeat;
}
.compass-hero .compass-dial{ z-index: 2; }
/* the ticks turn with the dial: faint minors, a longer brighter tick at each spoke, the active spoke's in the accent */
.compass-hero .dial-ticks{ position: absolute; left: 50%; top: 50%; width: var(--hub); height: var(--hub); transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
.compass-hero .dial-ticks .dt-minor{ stroke: var(--dial-tick); stroke-width: 1.1; }
.compass-hero .dial-ticks .dt-spoke{ stroke: var(--dial-strong); stroke-width: 2; transition: stroke 220ms ease; }
.compass-hero .dial-ticks .dt-spoke.is-active{ stroke: var(--accent); stroke-width: 2.6; }
/* the needle with weight: the pink half casts a soft shadow, the tail is translucent grey, and the hub is a raised white
   disc in a hairline ring (the pivot sits outside the needle group: it never turns). At rest the needle drifts +-1.5 deg
   over 7 s (c-needle-body, under the spring's own angle on c-needle); no drift under reduced motion. */
.compass-hero .c-hero .c-needle-n{ fill: var(--accent); filter: drop-shadow(0 1.5px 1.5px rgba(var(--ink-rgb), .32)); }
.compass-hero .c-hero .c-needle-s{ fill: var(--needle-south); opacity: 1; }
.compass-hero .c-hero .c-pivot{ fill: #fff; stroke: rgba(var(--ink-rgb), .28); stroke-width: .6; filter: drop-shadow(0 1px 1.5px rgba(var(--ink-rgb), .35)); }
.compass-hero .c-hero .c-needle-body{ transform-origin: 50px 50px; animation: needle-drift 7s ease-in-out infinite alternate; will-change: transform; }
@keyframes needle-drift{ from{ transform: rotate(-1.5deg); } to{ transform: rotate(1.5deg); } }
/* the spokes: the active one in the accent at full strength with a faint glow behind its icon; the others at 55% in a
   cool grey with the thinnest icon weight. --bloom (0..1, app.js) eases one into the other as the ring turns. */
.compass-hero .compass-point{
  color: var(--spoke-cool); color: color-mix(in srgb, var(--accent-deep) calc(var(--bloom) * 100%), var(--spoke-cool));
  opacity: calc(.55 + .45 * var(--bloom));
}
.compass-hero .compass-point .pt-icon .icon svg{ stroke-width: calc(1.2 + .6 * var(--bloom)); }
.compass-hero .pt-icon::after{
  content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: 50%; opacity: var(--bloom);
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .30), rgba(var(--accent-rgb), 0));
}
/* reduced motion: a tap turns the dial behind a quick fade instead of a spring (app.js: bringToNorth); no drift, no stroke fades */
@media (prefers-reduced-motion: reduce){
  .compass-hero .compass-dial{ transition: opacity 120ms ease; }
  .compass-hero .compass-dial.rm-swap{ opacity: 0; }
  .compass-hero .c-hero .c-needle-body{ animation: none; }
  .compass-hero .dial-ticks .dt-spoke{ transition: none; }
}
/* the destinations: a soft halo in the page colour, so the words stay readable over the streets */
.compass-hero .pt-label{ text-shadow: 0 0 2px rgb(var(--page-rgb)), 0 0 5px rgb(var(--page-rgb)), 0 0 9px rgb(var(--page-rgb)), 0 0 14px rgb(var(--page-rgb)); }
.compass-hero .pt-icon::before{
  content: ""; position: absolute; inset: -9px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--page-rgb), .9) 45%, rgba(var(--page-rgb), 0) 100%);
}
/* the needle is moved frame by frame by its own spring (app.js: needleTo), so no CSS transition on top of that */
.compass-hero .c-hero .c-needle{ transition: none; }
/* a newly selected destination: its label gives one quick pulse */
.compass-hero .pt-label.sel-pulse{ animation: pt-select 240ms var(--ease-out); }
@keyframes pt-select{ 40%{ transform: scale(1.16); } }
@media (prefers-reduced-motion: reduce){ .compass-hero .pt-label.sel-pulse{ animation: none; } }
/* Eight spokes put one exactly south, its label hanging inside the bottom of the dial's box: the first-visit hint cannot move up
   8% into the box as it did with seven (nothing was south then), or it touches that label. It moves up 5% instead (the label ends
   about 6% above the box's bottom), and the ring's height formula gives that 3% back. */
.explore-stage .compass-ring{ grid-row: 2; --ring: min(460px, 100cqw + 40px, max(230px, (100cqh - var(--cap-h) - var(--stage-gap) - var(--below)) / .95)); margin-bottom: calc(var(--ring) * -.05); }
/* The section at north is already named on the wheel, large and in the accent, and Go says what happens next: there is
   no caption on every view. The caption block is the FIRST-VISIT HINT (app.js: showExploreHint): the spoke's one line as
   plain small text, no box, centred directly under the dial, fading in the first time the needle lands on a spoke and
   out 4 s later (or at the next tap). Its row keeps two lines' room whether or not a hint is showing, so nothing below
   the dial ever moves. (The name stays in the block, hidden, for screen readers, which don't see the wheel turn.) */
#screen-explore .explore-caption{
  grid-row: 3; position: relative; width: 100%; max-width: 360px; min-height: 0; margin-top: var(--stage-gap); padding: 0 8px; pointer-events: none; /* min-height 0: styles.css gives the shared caption 2.9em */
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; align-self: start;
  background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
#screen-explore .explore-caption .cap-desc{ opacity: 0; }
#screen-explore .explore-caption.show .cap-desc{ opacity: 1; }
#screen-explore .explore-caption .cap-name{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#screen-explore .explore-caption .cap-desc{ margin: 0; font-size: var(--ios-fs-foot); line-height: 1.3; text-wrap: pretty; }
.hello-sub{ text-shadow: 0 0 3px rgb(var(--page-rgb)), 0 0 8px rgb(var(--page-rgb)), 0 0 14px rgb(var(--page-rgb)); } /* readable where the map is still fading */
/* the description is on the pill, which does the quietening: no halo, the label colour at full strength */
#screen-explore .explore-caption .cap-desc{ color: var(--pill-ink); text-shadow: 0 0 2px rgb(var(--page-rgb)), 0 0 6px rgb(var(--page-rgb)); transition: opacity 260ms ease; } /* the hint's fade in / out (.show); a faint page-colour halo keeps it readable on the streets */
@media (prefers-reduced-motion: reduce){ #screen-explore .explore-caption .cap-desc{ transition: none; } }
.explore-caption .cap-name{ font-family: var(--ios-font); font-size: var(--ios-fs-title-s); font-weight: var(--ios-w-semibold); }
.explore-caption .cap-desc{ font-size: var(--ios-fs-sub); line-height: 1.35; }
/* The dock: Today | Go | chat, on one line. Explore has no tab bar, so the three sit where it would be; the columns
   at the two ends are as wide as the chat bubble, so Go is in the middle of the screen. The chat bubble is the app's
   one floating button (app-frame level): here it sits over the third column. Nothing overlaps: Go ends 12px short
   of both. */
.app-frame[data-screen="screen-explore"]{ --tabbar-space: 0px; }
.app-frame[data-screen="screen-explore"] .tabbar-host{ display: none; }
.app-frame{ --go-gap: 14px; } /* under the dock: room for the map's credit */
@media (min-height: 621px){ .app-frame{ --go-gap: 16px; } }
.explore-dock{ flex: none; width: 100%; display: grid; grid-template-columns: var(--fab-size) minmax(0, 1fr) var(--fab-size); align-items: center; column-gap: 12px; }
.explore-go{ justify-self: center; width: min(260px, 100%); min-width: 0; min-height: var(--fab-size); padding: 0 20px; }
.app-frame[data-screen="screen-explore"] .chat-fab{ bottom: calc(var(--ios-safe-bottom) + var(--go-gap)); }
/* Today: the chat bubble's quiet sibling -- 48px, a card-coloured disc with the tint only in its icon */
.today-btn{
  all: unset; box-sizing: border-box; justify-self: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
  background: var(--ios-card); color: var(--ios-tint);
  box-shadow: 0 8px 20px -10px rgba(var(--ink-rgb), .45), 0 0 0 .5px var(--ios-separator);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) ease;
}
html[data-theme="dark"] .today-btn{ box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .8), 0 0 0 .5px var(--ios-separator); }
.today-btn .icon{ width: 22px; height: 22px; }
.today-btn:active{ transform: scale(.95); }
.today-btn:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.today-btn[aria-expanded="true"]{ background: linear-gradient(var(--ios-tint-soft), var(--ios-tint-soft)), var(--ios-card); }
/* The card: above the dock, growing out of the Today button (its transform origin is the button's centre). Closed it
   is not there at all: hidden, inert, untouchable. */
.today-card{
  position: absolute; z-index: 3; left: 16px; bottom: calc(var(--explore-end) + var(--go-gap) + var(--fab-size) + 10px);
  box-sizing: border-box; width: min(340px, 100% - 32px); padding: 4px 0; border-radius: 20px; overflow: hidden;
  background: var(--ios-card); color: var(--ios-label); font-family: var(--ios-font); touch-action: none;
  box-shadow: 0 18px 40px -16px rgba(var(--ink-rgb), .5), 0 0 0 .5px var(--ios-separator);
  transform-origin: 26px calc(100% + 36px); transform: scale(.14); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 250ms var(--ease-out), opacity 200ms ease, visibility 0s linear 250ms;
}
html[data-theme="dark"] .today-card{ box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .85), 0 0 0 .5px var(--ios-separator); }
.today-card.open{ transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform 250ms var(--ease-out), opacity 200ms ease, visibility 0s; }
.today-card.dragging{ transition: none; }
.today-row{
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; position: relative;
}
button.today-row{ cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.today-row:active{ background: var(--ios-fill); }
button.today-row:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: -2px; border-radius: 16px; }
.today-row + .today-row::before{ content: ""; position: absolute; left: 60px; right: 0; top: 0; border-top: .5px solid var(--ios-separator); }
.today-ico{ flex: none; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--ios-tint-soft); color: var(--ios-tint); }
.today-ico .icon{ width: 18px; height: 18px; }
.today-main{ flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.today-title{ font-size: var(--ios-fs-body); line-height: 1.25; color: var(--ios-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-sub{ font-size: var(--ios-fs-foot); line-height: 1.3; color: var(--ios-label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-link{
  all: unset; box-sizing: border-box; flex: none; min-height: 44px; display: flex; align-items: center; padding: 0 4px; cursor: pointer;
  font-size: var(--ios-fs-sub); font-weight: var(--ios-w-semibold); color: var(--ios-tint); -webkit-tap-highlight-color: transparent;
}
.today-link:active{ opacity: .6; }
.today-link:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 0; border-radius: 8px; }
@media (prefers-reduced-motion: reduce){ .today-card, .today-card.open, .today-btn{ transition: none; } }
/* narrow phones: the caption in the footnote size, so it still fits two lines */
@container screens (max-width: 350px){
  #screen-explore .explore-caption .cap-desc{ font-size: var(--ios-fs-foot); }
}
/* Not a tall screen (an iPhone SE; any phone in Safari with its toolbars showing): the greeting tightens before the wheel gives way. */
@container screens (max-height: 640px){
  .explore-hello{ padding: 4px 0 4px; }
  #screen-explore .hello-line{ font-size: clamp(20px, 6.2cqi, 24px); }
  #screen-explore .hello-line[data-fit="snug"]{ font-size: clamp(18px, 5.6cqi, 22px); }
  #screen-explore .hello-line[data-fit="tight"]{ font-size: clamp(16px, 5cqi, 19px); }
  .hello-sub{ margin-top: 2px; font-size: var(--ios-fs-foot); }
}
/* A short screen (iPhone SE in Safari): tighter still -- a footnote-size caption and less padding. */
@container screens (max-height: 500px){
  .explore-hello{ padding: 0 0 2px; }
  #screen-explore .hello-line{ font-size: 19px; }
  #screen-explore .hello-line[data-fit="snug"]{ font-size: 17px; }
  #screen-explore .hello-line[data-fit="tight"]{ font-size: 15px; }
  .hello-sub{ margin-top: 0; font-size: 12px; }
  #screen-explore .explore-wrap{ padding-top: 0; }
  .explore-stage{ --stage-gap: 4px; padding-block: 6px 4px; }
  #screen-explore .explore-caption .cap-desc{ font-size: var(--ios-fs-foot); }
}
/* ---- the Interests step: the same lens screen and the same hero dial as Explore (above), sized by the same stage. Only
   what is this step's is here: the page round the wheel, the caption with the focused interest's name over the count,
   and the SELECTED tile (a pick), which is not the FOCUSED glow (where the needle points). ---- */
#screen-signup-interests > :not(.explore-map):not(.explore-lens):not(.map-credit){ position: relative; z-index: 1; } /* above the map */
#screen-signup-interests .interest-wrap{
  gap: 0; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; overflow-x: clip; /* the turning dial's box is wider than the ring: clip at the screen's edge, not the gutter */
}
/* (the same for Interests: eight spokes, one exactly south -- see .explore-stage .compass-ring above) */
#screen-signup-interests .explore-caption{
  grid-row: 3; align-self: start; margin-top: var(--stage-gap); min-height: 0; padding: 0 8px; pointer-events: none;
  text-shadow: 0 0 2px rgb(var(--page-rgb)), 0 0 6px rgb(var(--page-rgb)), 0 0 12px rgb(var(--page-rgb)); /* readable over the streets, like the spokes */
}
#screen-signup-interests .explore-caption .cap-desc{ color: var(--pill-ink); }
#screen-signup-interests .map-credit{ left: var(--gutter); bottom: 6px; }
/* the icon's tile: the icon's own box, padded out to 44px behind it (the negative margin keeps the icon exactly where Explore puts
   it); clear until the interest is picked, then a pink wash in a pink hairline. The page halo and the focus glow (::before / ::after)
   are drawn from the tile's edge, so they come out the size they are on Explore. */
.compass-hero.is-static .compass-point .pt-icon{ padding: 8px; margin: -8px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px transparent; transition: background var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.compass-hero.is-static .compass-point .pt-icon::before{ inset: -1px; }
.compass-hero.is-static .compass-point .pt-icon::after{ inset: -6px; }
.compass-hero.is-static .compass-point.selected{ opacity: 1; color: var(--accent-deep); }
.compass-hero.is-static .compass-point.selected .pt-icon{ background: rgba(var(--accent-rgb), .16); box-shadow: inset 0 0 0 1.5px var(--accent); }
.compass-hero.is-static .compass-point.selected .pt-icon .icon svg{ stroke-width: 1.8; }
html[data-theme="dark"] .compass-hero.is-static .compass-point.selected .pt-icon{ background: rgba(var(--accent-rgb), .22); }
.compass-hero.is-static .compass-point:focus-visible .pt-icon{ box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 2px var(--accent-deep); }
@media (prefers-reduced-motion: reduce){ .compass-hero.is-static .compass-point .pt-icon{ transition: none; } }

/* ==========================================================================================
   EVENTS (and the event-style cards used by Essentials and My Calendar)
   ========================================================================================== */
.screen.quiet .event-card{ border-bottom: .5px solid var(--ios-separator); }
.screen.quiet .event-summary-row{ padding: 14px 0; gap: 12px; }
.event-summary-row{ padding: 14px var(--ios-margin); gap: 12px; }
.event-card{ border: 0; }
.event-name{ font-size: var(--ios-fs-body); font-weight: var(--ios-w-semibold); line-height: 1.25; }
.event-meta{ font-size: var(--ios-fs-sub); line-height: 1.35; color: var(--ink-soft); }
.screen.quiet .event-date{ width: 44px; }
.screen.quiet .event-date .d, .event-date .d{ font-family: var(--ios-font); font-size: 26px; font-weight: var(--ios-w-semibold); color: var(--ios-tint); }
.screen.quiet .event-date .m, .event-date .m{ font-size: 12px; letter-spacing: .04em; }
.event-cat, .screen.quiet .event-cat{ font-size: var(--ios-fs-foot); letter-spacing: 0; text-transform: none; }
.event-actions{ gap: 0; margin: -6px -8px 0 0; }
.event-expand, .screen.quiet .event-expand{ padding: 12px 0 8px; border-top: .5px solid var(--ios-separator); }
.event-card:not(.screen.quiet *) > .event-expand{ padding: 12px var(--ios-margin) 14px; }
.event-dropdown-actions{ flex-wrap: wrap; gap: 8px; }
.event-dropdown-actions .btn{ flex: 1 1 160px; }
.commute-chip:where(:not(.classic *)){ font-size: var(--ios-fs-foot); }
.route-state:where(:not(.classic *)), .no-home-prompt:where(:not(.classic *)){ font-size: var(--ios-fs-sub); line-height: 1.4; }
.route-state .btn-link:where(:not(.classic *)), .no-home-prompt .btn-link:where(:not(.classic *)){ font-weight: var(--ios-w-regular); }
/* the "door to door" total: the big figure and its caption wrap under each other on a narrow screen instead of overlapping */
.directions-total:where(:not(.classic *)), .commute-stat:where(:not(.classic *)), .police-activity .pa-total:where(:not(.classic *)){ flex-wrap: wrap; gap: 2px 10px; }
.directions-total .big:where(:not(.classic *)), .commute-stat .big:where(:not(.classic *)), .police-activity .pa-total .big:where(:not(.classic *)){ font-family: var(--ios-font); font-weight: var(--ios-w-bold); font-size: clamp(26px, 8cqw, 34px); line-height: 1.1; flex: none; }
.directions-total .lbl:where(:not(.classic *)){ flex: 1 1 150px; min-width: 0; font-size: var(--ios-fs-foot); line-height: 1.35; }
.directions-total:where(:not(.classic *)){ border-bottom: .5px solid var(--ios-separator); }
/* calendar grid (Events "All" and My Calendar) */
.cal-nav{ margin-bottom: 4px; }
.cal-nav button, .screen.quiet .cal-nav button{ width: 44px; height: 44px; border: 0; background: transparent; color: var(--ios-tint); font-size: 26px; }
.cal-month-label{ font-family: var(--ios-font); font-size: var(--ios-fs-body); font-weight: var(--ios-w-semibold); }
.cal-weekdays{ font-size: 12px; letter-spacing: .02em; color: var(--ink-soft); }
.cal-grid, .screen.quiet .cal-grid{ gap: 2px; border-bottom: .5px solid var(--ios-separator); }
.cal-day, .screen.quiet .cal-day{ min-height: 44px; aspect-ratio: auto; border-radius: 12px; font-size: var(--ios-fs-body); }
.cal-day.today, .screen.quiet .cal-day.today{ color: var(--ios-tint); font-weight: var(--ios-w-bold); box-shadow: none; }
.cal-day.selected, .cal-day.today.selected, .screen.quiet .cal-day.today.selected{ background: var(--ios-tint-fill); color: var(--ios-on-tint); }
.cal-day.selected .dot, .cal-day.selected .dots .dot{ background: var(--ios-on-tint); }
/* a 320px phone: seven 44px days need 308px, so the grid reaches 8px into the side margins */
@container screens (max-width: 340px){
  .cal-grid, .screen.quiet .cal-grid, .cal-weekdays{ gap: 0; margin-inline: calc(6px - var(--gutter)); width: auto; }
}
/* on a wide column (tablet) the grid stops growing: 7 x 44..64px */
.cal-weekdays, .cal-grid, .cal-nav{ max-width: 460px; margin-inline: auto; width: 100%; }
.cal-cat-select, .screen.quiet .cal-cat-select{ min-height: 44px; padding: 0 30px 0 12px; border-radius: 10px; font-size: 16px; font-weight: var(--ios-w-regular); max-width: 100%; }
.cat-tag{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); }

/* ==========================================================================================
   HOUSING: tools as one grouped list, a segmented List / Swipe switch, plain filter chips, clean listing cards
   ========================================================================================== */
.housing-nudge:where(:not(.classic *)){ font-size: var(--ios-fs-sub); margin: -6px 0 8px; }
.housing-nudge .btn-link:where(:not(.classic *)){ font-size: var(--ios-fs-sub); }
#housing-example-note:where(:not(.classic *)), .screen-head .sub.warn:where(:not(.classic *)){ font-weight: var(--ios-w-regular); }
.room-price-banner:where(:not(.classic *)){ background: var(--ios-card); border: 0; border-radius: var(--ios-radius-card); padding: 12px var(--ios-margin); gap: 8px 12px; }
.room-price-banner p:where(:not(.classic *)){ font-weight: var(--ios-w-semibold); font-size: var(--ios-fs-body); flex: 1 1 180px; }
.room-price-banner.reported:where(:not(.classic *)){ background: var(--ios-card); }
.room-price-banner .btn:where(:not(.classic *)){ width: auto; }
.room-price-banner .btn-link:where(:not(.classic *)){ font-weight: var(--ios-w-regular); min-height: 44px; display: inline-flex; align-items: center; white-space: normal; }
.rp-agg-line:where(:not(.classic *)){ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); color: var(--ink-soft); }
/* listing cards */
.housing-card:where(:not(.classic *)){ border: 0; border-radius: var(--ios-radius-card); margin-bottom: 12px; }
.housing-summary:where(:not(.classic *)){ padding: 14px var(--ios-margin); min-height: 60px; }
.h-title:where(:not(.classic *)){ font-size: var(--ios-fs-body); font-weight: var(--ios-w-semibold); line-height: 1.25; }
.h-meta:where(:not(.classic *)){ font-size: var(--ios-fs-sub); }
.attr-chips:where(:not(.classic *)), .sc-chips:where(:not(.classic *)), .vibe-chips:where(:not(.classic *)){ gap: 6px; }
.attr-chip:where(:not(.classic *)){ font-size: var(--ios-fs-foot); padding: 3px 9px; border: 0; background: var(--ios-fill); color: var(--ink-soft); }
.example-tag:where(:not(.classic *)), .src-tag:where(:not(.classic *)){ font-family: var(--ios-font); letter-spacing: .02em; }
.housing-expand:where(:not(.classic *)){ padding: 0 var(--ios-margin) 16px; border-top: .5px solid var(--ios-separator); }
.pc-note:where(:not(.classic *)), .verify-note:where(:not(.classic *)), .stat-pending:where(:not(.classic *)), .out-of-scope-note:where(:not(.classic *)), .commute-address-prompt:where(:not(.classic *)){ font-size: var(--ios-fs-sub); line-height: 1.4; }
.source-line:where(:not(.classic *)), .granularity-line:where(:not(.classic *)), .citywide-source:where(:not(.classic *)), .map-attrib-note:where(:not(.classic *)){ font-size: var(--ios-fs-foot); line-height: 1.4; }
.card-actions:where(:not(.classic *)){ flex-wrap: wrap; gap: 8px; align-items: center; }
.card-actions .btn:where(:not(.classic *)){ flex: 1 1 150px; width: auto; }
.listing-mini-map:where(:not(.classic *)), .housing-expand .leaflet-map:where(:not(.classic *)){ border: 0; border-radius: 10px; }
/* swipe */
.swipe-stage:where(:not(.classic *)){ min-height: clamp(260px, 52cqh, 460px); }
.swipe-card:where(:not(.classic *)){ border: 0; border-radius: var(--ios-radius-sheet); padding: 20px var(--ios-margin); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .35); }
.swipe-card .sc-price:where(:not(.classic *)){ font-family: var(--ios-font); font-weight: var(--ios-w-bold); }
.swipe-card .sc-title:where(:not(.classic *)){ font-weight: var(--ios-w-semibold); }
.swipe-card .sc-meta:where(:not(.classic *)){ font-size: var(--ios-fs-sub); }
.swipe-card .sc-stamp:where(:not(.classic *)){ font-family: var(--ios-font); }
.swipe-actions:where(:not(.classic *)){ gap: 28px; margin-bottom: 4px; }
.swipe-btn:where(:not(.classic *)){ width: 60px; height: 60px; border: 0; background: var(--ios-card); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .3); }

/* ---------- Scam Check, Lease Explainer, Compare my room ---------- */
.tool-form .field{ margin-bottom: 16px; }
.field-label{ font: var(--ios-w-regular) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); color: var(--ink-soft); }
.field-hint{ font-size: var(--ios-fs-foot); }
.tool-form textarea{ padding: 12px 14px; line-height: 1.38; }
/* "Quick facts": one grouped list of tappable rows, the checkbox at the right like an iOS checkmark row */
.fact-row{ gap: 0; border-radius: var(--ios-radius-card); overflow: hidden; background: var(--ios-card); }
.fact, .field label.fact{ display: flex; margin: 0; color: var(--ios-label); font: var(--ios-w-regular) var(--ios-fs-body)/1.3 var(--ios-font); }
.fact{ position: relative; min-height: 44px; padding: 8px var(--ios-margin); gap: 12px; border: 0; border-radius: 0; background: transparent; font-size: var(--ios-fs-body); font-weight: var(--ios-w-regular); flex-direction: row-reverse; justify-content: space-between; text-align: left; }
.fact + .fact::before{ content: ""; position: absolute; top: 0; left: var(--ios-margin); right: 0; border-top: .5px solid var(--ios-separator); }
.fact:has(input:checked){ background: transparent; }
.fact input{ width: 22px; height: 22px; accent-color: var(--ios-tint-fill); }
.privacy-note, .caveat-note, .known-gap, .disclaimer, .route-note{ font-size: var(--ios-fs-foot); line-height: 1.4; border-radius: 10px; }
.tool-quota, .lease-meta{ font-size: var(--ios-fs-foot); }
.upload-drop{ min-height: 64px; padding: 12px var(--ios-margin); border: 1px dashed var(--ios-label-3); border-radius: var(--ios-radius-card); background: var(--ios-card); }
.upload-icon{ width: 36px; height: 36px; background: var(--ios-tint-soft); color: var(--ios-tint); }
.upload-chosen{ border: 0; background: var(--ios-tint-soft); min-height: 44px; border-radius: 10px; }
.or-divider{ font-size: var(--ios-fs-foot); letter-spacing: .04em; }
.result-head h3{ font-family: var(--ios-font); font-size: var(--ios-fs-title-s); font-weight: var(--ios-w-semibold); }
.rating-card{ border-radius: var(--ios-radius-card); padding: 16px var(--ios-margin); gap: 12px; }
.rating-label{ font-family: var(--ios-font); font-weight: var(--ios-w-bold); font-size: clamp(22px, 6.4cqw, 28px); }
.rating-sub{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.rating-ai, .steps-title, .tips-title, .clause-original-label{ font: var(--ios-w-regular) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); letter-spacing: 0; text-transform: uppercase; }
.flag, .tip, .clause, .q-list li{ border: 0; border-radius: var(--ios-radius-card); }
.flag-title, .tip-title, .clause-heading{ font-weight: var(--ios-w-semibold); }
.flag-why, .tip-body, .clause-summary{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.clause-btn{ min-height: 44px; }
.step-list li::before{ font-family: var(--ios-font); }
.tool-actions .btn{ flex: 1 1 150px; }
.cmp-block{ border: 0; border-radius: var(--ios-radius-card); }

/* ==========================================================================================
   BUDGET: the ring and the category bars keep their data; flat white card, grouped rows, plain buttons
   ========================================================================================== */
.bud-card{ border: 0; border-radius: var(--ios-radius-card); padding: 14px var(--ios-margin) 16px; }
.bud-head{ flex-wrap: wrap; gap: 0 8px; margin-bottom: 4px; }
.bud-title{ font-size: var(--ios-fs-title-s); font-weight: var(--ios-w-bold); }
.bud-nav{ gap: 0; margin-right: -10px; }
.bud-nav-btn{ width: 44px; height: 44px; font-size: 24px; color: var(--ios-tint); }
.bud-period{ font-size: var(--ios-fs-sub); font-weight: var(--ios-w-regular); white-space: normal; text-align: center; }
.bud-badge, .bud-tag{ font-family: var(--ios-font); letter-spacing: .02em; font-weight: var(--ios-w-semibold); }
.bud-gauge{ max-width: min(320px, 100%); }
.bud-total{ font-size: clamp(26px, 8cqw, 34px); font-weight: var(--ios-w-bold); }
.bud-summary{ font-size: var(--ios-fs-foot); gap: 2px 14px; }
.bud-summary b{ font-weight: var(--ios-w-semibold); }
.bud-list{ gap: 0; margin-inline: calc(-1 * var(--ios-margin)); }
.bud-row{ position: relative; min-height: 60px; padding: 10px var(--ios-margin); gap: 12px; border-radius: 0; }
.bud-row + .bud-row::before{ content: ""; position: absolute; top: 0; right: 0; left: calc(var(--ios-margin) + 22px); border-top: .5px solid var(--ios-separator); }
.bud-row:hover, .bud-row.is-on{ background: var(--ios-highlight); }
.bud-swatch{ width: 10px; }
.bud-name{ font-weight: var(--ios-w-semibold); }
.bud-pct{ font-weight: var(--ios-w-semibold); }
.bud-amt{ font-size: var(--ios-fs-sub); color: var(--ink-soft); }
.bud-cap2{ font-size: var(--ios-fs-foot); color: var(--ink-soft); }
.bud-actions{ gap: 8px; margin-top: 12px; }
.bud-linkrow{ min-height: 56px; padding: 8px var(--ios-margin); border: 0; border-radius: var(--ios-radius-card); background: var(--ios-card); font-weight: var(--ios-w-regular); }
.bud-linkrow .sub{ font-size: var(--ios-fs-sub); }
.bud-linkrow .icon{ color: var(--ios-tint); }
.bud-banner{ border: 0; background: var(--ios-tint-soft); border-radius: var(--ios-radius-card); padding: 12px var(--ios-margin); font-size: var(--ios-fs-sub); }
.bud-back{ min-height: 44px; margin-bottom: 4px; font-weight: var(--ios-w-regular); color: var(--ios-tint); }
.bud-cat-head h2{ font-family: var(--ios-font); font-weight: var(--ios-w-bold); }
.bud-item, .bud-hist{ border: 0; border-radius: var(--ios-radius-card); padding: 12px var(--ios-margin); }
.bud-hist.current{ background: var(--ios-card); box-shadow: inset 0 0 0 2px var(--ios-tint); }
.bud-hist.upcoming{ border: 0; opacity: .85; }
.bud-hist-name, .bud-item-name, .bud-item-cost{ font-weight: var(--ios-w-semibold); }
.bud-item-date{ width: 48px; background: var(--ios-tint-soft); }
.bud-item-date .m{ font-family: var(--ios-font); letter-spacing: .02em; }
.bud-item-actions{ gap: 0 16px; margin-top: 0; }
.bud-item-actions .btn-link{ min-height: 44px; display: inline-flex; align-items: center; font-size: var(--ios-fs-sub); }
.bud-hist-group{ font: var(--ios-w-regular) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); letter-spacing: 0; color: var(--ink-soft); margin: 20px 0 6px; }
/* the schedule form (sign-up step 3 and Settings) */
.split-box{ border: 0; border-radius: var(--ios-radius-card); padding: 8px var(--ios-margin); }
.split-head{ flex-wrap: wrap; gap: 0 12px; font-weight: var(--ios-w-regular); font-size: var(--ios-fs-sub); margin-bottom: 0; }
.split-row{ min-height: 52px; padding: 4px 0; gap: 10px; }
.split-row .split-name{ font-weight: var(--ios-w-regular); }
.split-row .split-eur{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); color: var(--ink-soft); }
.split-row input{ width: 68px; min-height: 44px; padding: 8px 10px; text-align: right; background-color: var(--ios-fill); box-shadow: none; }
.split-total{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-regular); }
.fin-row{ min-height: 44px; border-bottom: .5px solid var(--ios-separator); }
.fin-row .fin-name{ font-weight: var(--ios-w-regular); }
.cat-choices{ gap: 0; border-radius: var(--ios-radius-card); overflow: hidden; background: var(--ios-fill); }
.cat-choice{ min-height: 48px; padding: 8px var(--ios-margin); border: 0; border-radius: 0; font-weight: var(--ios-w-regular); width: 100%; }
.cat-choice + .cat-choice{ box-shadow: inset 0 .5px 0 var(--ios-separator); }

/* ==========================================================================================
   MY CALENDAR
   ========================================================================================== */
#screen-calendar .event-card{ padding-block: 4px; }
.cal-entry-actions, #mycal-day-panel .event-actions{ flex-direction: row; gap: 0; }
#mycal-day-panel .btn-ghost, #cal-day-panel .btn-ghost{ width: 100%; margin-top: 8px; }
#mycal-day-panel .event-summary-row, #cal-day-panel .event-summary-row{ flex-wrap: wrap; }
#mycal-day-panel .event-body, #cal-day-panel .event-body{ flex: 1 1 150px; }

/* ==========================================================================================
   COMMUNITY: the section dial (School · General · Friends), then the shared Housing cards -- a hero for the main campus and a grid of
   campus or topic cards -- and the full-screen chat a card opens: bubbles (yours on the right), date separators, a composer docked at the
   bottom. Every size, space, radius and colour in this block is a token (the test in test/sectionDial.test.js fails on a literal one),
   apart from the thin strokes (borders and focus outlines).
   ========================================================================================== */
#screen-community{ overflow-y: auto; }
.comm-loading{ padding: var(--sp-6) 0; text-align: center; color: var(--ios-label-2); }
.comm-grid{ margin-top: var(--sp-3); }
.comm-section{ margin: var(--sp-5) 0 var(--sp-2); padding: 0 var(--sp-1); font: var(--ios-w-semibold) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); text-transform: uppercase; letter-spacing: .02em; color: var(--ios-label-2); }
.comm-hero + .comm-section{ margin-top: var(--sp-4); }
.comm-note{ margin: 0 0 var(--sp-3); padding: 0 var(--sp-1); font-size: var(--ios-fs-sub); line-height: var(--ios-lh-sub); color: var(--ios-label-2); }
.comm-contact{ margin: 0 0 var(--sp-3); font-size: var(--ios-fs-body); overflow-wrap: anywhere; }
#community-body .ios-list{ margin-bottom: var(--sp-3); }

/* the chat: the screen is a column -- bar, messages (the only part that scrolls), docked composer */
.screen.cc-screen{ display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.app-frame[data-chrome="bare"] .screen.cc-screen{ padding-bottom: 0; }
.cc-bar{ flex: none; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--ios-row-h); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--gutter); border-bottom: .5px solid var(--ios-separator); background: var(--ios-card); }
.cc-bar-text{ flex: 1; min-width: 0; }
.screen h2.cc-bar-title{ margin: 0; font-size: var(--ios-fs-body); line-height: var(--ios-lh-body); font-weight: var(--ios-w-semibold); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-bar-sub{ margin: 0; font-size: var(--ios-fs-foot); line-height: var(--ios-lh-foot); color: var(--ios-label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-menu-btn{ all: unset; box-sizing: border-box; flex: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: var(--ios-row-h); height: var(--ios-row-h); border-radius: 50%; color: var(--ios-tint); }
.cc-menu-btn .icon{ width: var(--sp-5); height: var(--sp-5); }
.cc-menu-btn:active{ background: var(--ios-highlight); }
.cc-menu-btn:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: -2px; }
.cc-report-banner{ flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--gutter); background: var(--ios-tint-soft); color: var(--ink); font-size: var(--ios-fs-sub); }
.cc-report-banner[hidden]{ display: none; }
.cc-report-banner .btn-link{ min-height: var(--ios-row-h); display: inline-flex; align-items: center; }
.cc-body{ position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cc-scroll{ flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: var(--sp-3) var(--gutter); scroll-padding-bottom: var(--sp-3); }
.cc-messages{ display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.cc-empty{ margin: auto; padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--ios-label-2); font-size: var(--ios-fs-body); }
.cc-messages > .empty-note, .cc-messages > .comm-loading{ margin: auto; }
.cc-day{ display: flex; justify-content: center; margin: var(--sp-3) 0 var(--sp-2); }
.cc-day span{ padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: var(--ios-fill); color: var(--ios-label-2); font: var(--ios-w-semibold) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); }
.cc-msg{ display: flex; flex-direction: column; max-width: 82%; margin-top: var(--sp-1); }
.cc-msg.is-first{ margin-top: var(--sp-3); }
.cc-msg.is-mine{ align-self: flex-end; align-items: flex-end; }
.cc-msg.is-theirs{ align-self: flex-start; align-items: flex-start; }
.cc-head{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin: 0 var(--sp-2) var(--sp-1); }
.cc-who{ font: var(--ios-w-semibold) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); color: var(--ios-label-2); overflow-wrap: anywhere; }
.cc-verified{ display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-2); border-radius: var(--radius-pill); background: var(--ios-tint-soft); color: var(--ios-tint); font: var(--ios-w-semibold) var(--ios-fs-foot)/var(--ios-lh-foot) var(--ios-font); white-space: nowrap; }
.cc-verified .icon{ width: 1em; height: 1em; }
/* a bubble is a button: a tap opens what you can do with the message */
.cc-bubble{ all: unset; box-sizing: border-box; cursor: pointer; max-width: 100%; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-m); background: var(--ios-card); box-shadow: inset 0 0 0 .5px var(--ios-separator); color: var(--ink); font: var(--ios-w-regular) var(--ios-fs-body)/1.32 var(--ios-font); overflow-wrap: anywhere; white-space: pre-wrap; text-align: left; -webkit-tap-highlight-color: transparent; }
.cc-msg.is-mine .cc-bubble{ background: var(--ios-tint-fill); box-shadow: none; color: var(--ios-on-tint); }
.cc-bubble:active{ opacity: .75; }
.cc-bubble:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.cc-time{ margin: var(--sp-1) var(--sp-2) 0; font-size: var(--ios-fs-foot); line-height: 1; color: var(--ios-label-2); }
.cc-tag{ margin: var(--sp-1) var(--sp-2) 0; font-size: var(--ios-fs-foot); color: var(--ios-label-2); }
/* report mode: other people's messages are the thing to tap */
.cc-screen.is-reporting .cc-msg.is-theirs .cc-bubble{ outline: 2px solid var(--ios-tint); }
.cc-screen.is-reporting .cc-msg.is-mine .cc-bubble{ opacity: .45; cursor: default; }
/* "New messages": a small pill over the end of the messages while I have scrolled up */
.cc-new-pill{ all: unset; box-sizing: border-box; cursor: pointer; position: absolute; left: 50%; bottom: var(--sp-3); z-index: 5; translate: -50% 0; display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--ios-row-h); padding: 0 var(--sp-4); border-radius: var(--radius-pill); background: var(--ios-tint-fill); color: var(--ios-on-tint); font: var(--ios-w-semibold) var(--ios-fs-sub)/1 var(--ios-font); box-shadow: var(--shadow-card); }
.cc-new-pill[hidden]{ display: none; }
.cc-new-pill .icon{ width: 1.15em; height: 1.15em; }
.cc-new-pill:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
/* the composer is docked: a flex child under the messages, above the home indicator, so it moves up with the keyboard */
.cc-dock{ flex: none; padding: var(--sp-2) var(--gutter) calc(var(--sp-2) + var(--ios-safe-bottom)); border-top: .5px solid var(--ios-separator); background: var(--ios-card); }
html.kb-open .cc-dock{ padding-bottom: var(--sp-2); }
.cc-form{ display: flex; align-items: flex-end; gap: var(--sp-2); }
.cc-form[hidden], .cc-gate[hidden]{ display: none; }
.cc-form textarea{ flex: 1; min-width: 0; box-sizing: border-box; min-height: var(--ios-row-h); max-height: calc(var(--ios-lh-body) * 5 + var(--sp-4)); padding: calc((var(--ios-row-h) - var(--ios-lh-body)) / 2) var(--sp-4); border: 0; border-radius: calc(var(--ios-row-h) / 2); background: var(--ios-bg); color: var(--ink); font: var(--ios-w-regular) var(--ios-fs-body)/var(--ios-lh-body) var(--ios-font); resize: none; box-shadow: inset 0 0 0 .5px var(--ios-separator); }
.cc-form textarea:focus{ outline: 2px solid var(--ios-tint); outline-offset: -2px; }
.cc-send{ all: unset; box-sizing: border-box; flex: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: var(--ios-row-h); height: var(--ios-row-h); border-radius: 50%; background: var(--ios-tint-fill); color: var(--ios-on-tint); }
.cc-send .icon{ width: var(--sp-5); height: var(--sp-5); }
.cc-send:active{ opacity: .7; }
.cc-send:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
/* the one row that stands in for the composer when this person may not post here yet */
.cc-gate{ all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); width: 100%; min-height: var(--ios-row-h); padding: var(--sp-2) var(--sp-4); border-radius: calc(var(--ios-row-h) / 2); background: var(--ios-bg); box-shadow: inset 0 0 0 .5px var(--ios-separator); color: var(--ios-tint); font: var(--ios-w-semibold) var(--ios-fs-body)/1.3 var(--ios-font); }
.cc-gate::after{ content: "\203A"; color: var(--ios-label-2); font-size: var(--sp-5); line-height: 1; }
.cc-gate:disabled{ cursor: default; color: var(--ios-label-2); }
.cc-gate:disabled::after{ content: none; }
.cc-gate:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.cc-dock .field-error{ margin: var(--sp-1) 0 0; padding: 0 var(--sp-2); font-size: var(--ios-fs-foot); line-height: var(--ios-lh-foot); }
.cc-dock .field-error:empty{ display: none; }

/* ==========================================================================================
   SAFETY: the picker as a row; the index and the stats keep their data, drawn flat
   ========================================================================================== */
.gauge-card, .screen.quiet .gauge-card{ min-height: 44px; border-bottom: .5px solid var(--ios-separator); }
.gauge-number{ font-family: var(--ios-font); font-weight: var(--ios-w-bold); }
.gauge-sub{ font-family: var(--ios-font); letter-spacing: .02em; }
.gauge-title{ font-weight: var(--ios-w-semibold); }
.gauge-hint, .gauge-factor-row .gf-head{ font-size: var(--ios-fs-foot); }
.gauge-factor-row .gf-value{ font-weight: var(--ios-w-semibold); }
.district-card h3, .screen.quiet .district-card h3{ font-size: var(--ios-fs-title-s); font-weight: var(--ios-w-semibold); }
.vibe-chip, .screen.quiet .vibe-chip{ font-size: var(--ios-fs-sub); }
.screen.quiet .pa-breakdown{ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: .5px solid var(--ios-separator); }
.screen.quiet .pa-stat{ min-height: 44px; align-items: center; border-bottom: .5px solid var(--ios-separator); }
.screen.quiet .pa-stat:nth-child(even){ border-left: 0; padding-left: 0; }
.screen.quiet .pa-stat:nth-child(odd){ padding-right: 12px; }
.screen.quiet .pa-stat .l{ font-size: var(--ios-fs-sub); }
.pa-stat .n{ font-weight: var(--ios-w-semibold); }
.police-activity .pa-total .lbl{ flex: 1 1 160px; font-size: var(--ios-fs-sub); line-height: 1.35; }
.cw-row, .screen.quiet .cw-row{ min-height: 44px; flex-wrap: wrap; gap: 0 10px; border-top: .5px solid var(--ios-separator); font-size: var(--ios-fs-sub); }
.cw-row .cw-count{ font-weight: var(--ios-w-semibold); }
.screen.quiet .caveat-note, .screen.quiet .known-gap, .screen.quiet .out-of-scope-note, .screen.quiet .stat-pending{ font-size: var(--ios-fs-foot); line-height: 1.4; }
.methodology-modal p{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.methodology-modal .formula-box{ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-x: auto; }

/* ==========================================================================================
   MY CAMPUS (the old Campus Map): a classic screen like Housing -- the shared page header, a map, the campus switcher (answer cards), the hero,
   the resources (feature cards in two columns) and what students say (Insider's own cards). Only the map's frame, its controls and pins, and
   the little sheet a resource opens are styled here; all of it is tokens (backend/test/myCampusScreens.test.js fails on a literal colour or size).
   ========================================================================================== */
.mc-map{ margin: 0 0 var(--sp-3); }
.mc-map .leaflet-map{ height: var(--map-h); margin: 0; border-radius: var(--radius-m); }
.mc-map .map-loading{ border-radius: var(--radius-m); }
.map-mini-controls{ right: var(--sp-3); bottom: var(--sp-3); gap: var(--sp-2); }
.map-mini-controls button{ width: var(--tap); height: var(--tap); border: 0; border-radius: var(--radius-s); background: var(--surface); color: var(--accent-deep); font-size: var(--fs-title); font-weight: var(--ios-w-regular); box-shadow: var(--shadow-card); }
.campus-pin.resource-pin .pin-dot{ background: var(--surface); border: var(--stroke-strong) solid var(--accent-deep); }
.mc-switcher{ margin-bottom: var(--sp-3); }
#mc-hero{ margin-bottom: var(--sp-4); }
.mc-route{ margin: 0 0 var(--sp-4); }
.mc-route:empty{ display: none; }
#mc-body .section-title{ margin: var(--sp-5) 0 var(--sp-2); }
.mc-loading{ display: flex; justify-content: center; padding: var(--sp-4) 0; }
.mc-see-all{ min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--sp-1); }
.mc-see-all .icon{ width: var(--icon-s); height: var(--icon-s); }
.mc-sheet-desc{ margin: 0 0 var(--sp-3); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); }
.mc-fact{ margin: 0 0 var(--sp-2); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); }
.mc-fact-k{ margin-right: var(--sp-2); font-weight: 700; color: var(--ink-soft); }
.mc-stale{ margin: 0 0 var(--sp-3); }
.mc-sheet-actions{ display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-3); }
.mc-sheet-actions .btn{ width: 100%; justify-content: center; text-align: center; text-decoration: none; }
.mc-source{ margin: 0; font-size: var(--fs-caption); line-height: var(--lh-body); color: var(--ink-soft); }
.mc-source a{ color: var(--accent-deep); }
/* ---- end of MY CAMPUS ---- */
/* ==========================================================================================
   GET HELP (Safety's second tab, the offline page get-help.html, the card in the chat): the shared hero and feature cards, and one thing of its own --
   a LARGE tap-to-call button for the emergency numbers. Tokens only (backend/test/getHelp.test.js fails on a literal colour or size).
   ========================================================================================== */
.help-section{ margin-bottom: var(--sp-5); }
.help-section .section-title{ margin: var(--sp-4) 0 var(--sp-2); }
.help-emergency{ margin-bottom: var(--sp-4); }
.hero-card-action.help-call, .pill-btn.help-call{ align-self: stretch; width: 100%; min-height: var(--call-h); font-size: var(--fs-title); text-decoration: none; }
.help-source{ margin: var(--sp-2) 0 0; font-size: var(--fs-caption); line-height: var(--lh-body); color: var(--ink-soft); }
.help-source a{ color: var(--accent-deep); }
.help-saved{ margin: 0 0 var(--sp-4); }
.help-fallback-line{ margin: 0 0 var(--sp-2); }
.help-open-app{ margin: var(--sp-5) 0 var(--sp-4); text-align: center; }
.help-open-app a{ color: var(--accent-deep); }
.chat-crisis-card .help-call-btn{ width: 100%; justify-content: center; min-height: var(--tap); text-decoration: none; text-align: center; }
.chat-crisis-card .cpc-hint{ margin-top: var(--sp-2); }
/* ---- end of GET HELP ---- */

.leaflet-container{ font-family: var(--ios-font); }
.leaflet-container .leaflet-control-attribution{ font-size: 10px; }

/* ==========================================================================================
   ESSENTIALS
   ========================================================================================== */
.essentials-note{ font-size: var(--ios-fs-foot); line-height: 1.4; }
#screen-essentials .event-card{ border-radius: var(--ios-radius-card); margin-bottom: 8px; }

/* ==========================================================================================
   SOS / EMERGENCY CARD: the big 112 button stays; everything else is a flat list
   ========================================================================================== */
.em-call{ min-height: 96px; border-radius: var(--ios-radius-card); box-shadow: none; }
.em-call .num{ font-family: var(--ios-font); font-weight: var(--ios-w-bold); }
.em-call .lbl{ font-family: var(--ios-font); letter-spacing: .04em; }
.em-note, .em-sub{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.em-section{ border-top: .5px solid var(--ios-separator); padding: 12px 0 14px; }
.em-section .section-title{ margin: 0 0 6px; }
.em-name{ font-weight: var(--ios-w-semibold); }
.em-tel{ min-height: 44px; margin-top: 6px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ios-tint-soft); color: var(--ios-tint); font-family: var(--ios-font); font-weight: var(--ios-w-semibold); max-width: 100%; box-sizing: border-box; }
.em-link{ display: inline-flex; align-items: center; min-height: 44px; }
.em-medical{ grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; }
.em-medical .k{ color: var(--ink-soft); font-size: var(--ios-fs-sub); }
.em-medical .v{ font-weight: var(--ios-w-semibold); min-width: 0; overflow-wrap: anywhere; }
.em-offline .toggle-row{ padding: 4px var(--ios-margin); }
.em-stale{ font-size: var(--ios-fs-foot); }
.sos-nudge{ font-size: var(--ios-fs-sub); line-height: 1.4; }
.sos-edit-body .field{ margin-bottom: 14px; }
.sos-form-intro{ font-size: var(--ios-fs-sub); line-height: 1.4; }

/* ==========================================================================================
   PROFILE (Account): grouped cards, badges, saved items, Log out
   ========================================================================================== */
.account-card{ border: 0; border-radius: var(--ios-radius-card); padding: 12px var(--ios-margin); gap: 12px; align-items: center; }
.account-avatar{ width: 52px; height: 52px; font-family: var(--ios-font); font-weight: var(--ios-w-semibold); background: var(--ios-tint-fill); color: var(--ios-on-tint); }
.account-card > :not(.account-avatar){ flex: 1 1 0; min-width: 0; }
.account-name, .account-email{ font-weight: var(--ios-w-semibold); overflow-wrap: anywhere; }
.account-email{ font-weight: var(--ios-w-regular); font-size: var(--ios-fs-sub); color: var(--ink-soft); }
.account-sub{ font-size: var(--ios-fs-sub); }
.badge-grid{ grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.badge-tile{ border: 0; border-radius: var(--ios-radius-card); padding: 12px 6px; }
.badge-tile .name{ font-size: 12px; font-weight: var(--ios-w-semibold); overflow-wrap: anywhere; }
.badge-tile .icon{ color: var(--ios-tint); }
#logout-btn{ color: var(--ios-destructive); margin-top: 20px !important; }

/* ==========================================================================================
   TABLET AND LANDSCAPE: nothing special, just nothing broken
   ========================================================================================== */
@container screens (max-height: 330px){
  .screen-head:where(:not(.classic *)){ margin-bottom: 10px; }
}

/* "Need help?" on the Arrival, Budget and SOS sign-up steps: a small link under the heading that opens the chat with a
   question about that step already typed. Only for someone signed in (app.js keeps it [hidden] otherwise). */
.onb-help{ display: inline-flex; align-items: center; min-height: 44px; font-size: var(--ios-fs-sub); }
.onb-help[hidden]{ display: none; }

/* ==========================================================================================
   INSIDER: real student experiences. The section dial (Schools · Living), then the shared Housing cards: a hero (the city or the
   school), category cards in a two-column grid, campuses as cards, other campuses and schools as plain rows. A category opens its
   entries as white cards, with a quiet "Add your experience" at the top. Official resources are cards with a quiet "Official" tag
   and a link, never a byline. Nothing here is a spinner for longer than the load (10 s), then an error.
   Every size, space, radius and colour in this block is a token (the test in test/sectionDial.test.js fails on a literal one), apart from
   the thin strokes (borders and focus outlines).
   ========================================================================================== */
#screen-insider{ overflow-y: auto; padding-bottom: var(--fab-clear, var(--ios-sp-3)); }
.ins-lead{ margin: var(--sp-1) 0 var(--sp-3); font-size: var(--ios-fs-sub); line-height: 1.4; color: var(--ios-label-2); }
.ins-crumbs{ margin: calc(var(--sp-1) * -1) 0 var(--sp-1); }
.ins-back{ all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--ios-row-h); padding-right: var(--sp-3); color: var(--ios-tint); font-size: var(--ios-fs-body); }
.ins-back .icon{ width: 1.25em; height: 1.25em; margin-left: -.3em; }
.ins-back:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; border-radius: var(--radius-s); }
/* a page's title, in the serif the hero headlines use */
.screen h3.ins-title{ margin: 0 0 var(--sp-3); font-family: var(--o-font-display); font-size: var(--ios-fs-title); font-weight: var(--ios-w-semibold); line-height: var(--ios-lh-title); color: var(--ink); }
.ins-loading{ padding: var(--sp-6) 0; text-align: center; color: var(--ios-label-2); }
.ins-tools{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: var(--sp-1) 0 var(--sp-3); }
.ins-filters{ display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
/* the quiet button: a white pill with a thin rose outline, not a filled bar */
.ins-add{ all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--ios-row-h); padding: 0 var(--sp-4); border: 1px solid var(--ios-tint-soft); border-radius: var(--radius-pill); background: var(--ios-card); color: var(--ios-tint); font: var(--ios-w-semibold) var(--ios-fs-sub)/1 var(--ios-font); }
.ins-add .icon{ width: 1.15em; height: 1.15em; }
.ins-add:hover{ border-color: var(--ios-tint); }
.ins-add:active{ opacity: .6; }
.ins-add:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.ins-select{ box-sizing: border-box; min-height: var(--ios-row-h); max-width: 100%; padding: 0 var(--sp-4) 0 var(--sp-3); border: 1px solid var(--ios-separator); border-radius: var(--radius-pill); background: var(--ios-card); color: var(--ink); font: var(--ios-w-regular) var(--ios-fs-sub)/1 var(--ios-font); }
.ins-select:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.ins-empty{ text-align: center; padding-bottom: var(--sp-2); }
.ins-empty .ins-add{ margin-top: var(--sp-1); }
.ins-more{ text-align: center; margin: var(--sp-1) 0 var(--sp-3); }
.ins-more .btn-link, .ins-card + .btn-link{ min-height: var(--ios-row-h); display: inline-flex; align-items: center; }

.ins-card{ padding: var(--sp-3) var(--ios-margin) var(--sp-1); margin-bottom: var(--sp-2); border-radius: var(--ios-radius-card); background: var(--ios-card); box-shadow: inset 0 0 0 .5px var(--ios-separator); }
.ins-card.is-official{ background: var(--ios-tint-soft); box-shadow: none; }
.ins-card.is-hidden{ opacity: .72; border: 1px dashed var(--ios-separator); }
.ins-top{ display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-1); }
.ins-cat{ font-size: var(--ios-fs-foot); font-weight: var(--ios-w-semibold); color: var(--ios-tint); letter-spacing: .01em; }
.ins-badge{ display: inline-flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-s); font-size: var(--ios-fs-foot); font-weight: var(--ios-w-semibold); white-space: nowrap; }
.ins-badge .icon{ width: 1em; height: 1em; }
.ins-badge.verified{ color: var(--safe-fg); background: color-mix(in srgb, var(--safe-fg) 14%, transparent); }
.ins-badge.official{ color: var(--ios-tint); background: var(--ios-card); }
.ins-body{ margin: 0 0 var(--sp-2); font-size: var(--ios-fs-body); line-height: 1.38; overflow-wrap: anywhere; white-space: pre-line; }
.ins-diff{ display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); font-size: var(--ios-fs-foot); color: var(--ios-label-2); }
.ins-dots{ display: inline-flex; gap: var(--sp-1); }
.ins-dots i{ display: block; width: var(--sp-2); height: var(--sp-2); border-radius: 50%; background: var(--ios-fill); }
.ins-dots i.on{ background: var(--ios-tint); }
.ins-by, .ins-src{ margin: 0; font-size: var(--ios-fs-foot); color: var(--ios-label-2); }
.ins-src a{ color: var(--ios-tint); font-weight: var(--ios-w-semibold); }
.ins-note{ margin: var(--sp-2) 0 0; font-size: var(--ios-fs-foot); color: var(--ios-label-2); }
.ins-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-4); margin-top: var(--sp-1); }
.ins-actions .quiet{ all: unset; box-sizing: border-box; cursor: pointer; min-height: var(--ios-row-h); min-width: var(--ios-row-h); display: inline-flex; align-items: center; font-size: var(--ios-fs-sub); color: var(--ios-tint); }
.ins-actions .quiet:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; border-radius: var(--ios-radius-tile); }
.ins-actions .tag{ min-height: var(--ios-row-h); display: inline-flex; align-items: center; font-size: var(--ios-fs-foot); color: var(--ios-label-2); }

/* the city sheet: the cities as rows; a coming-soon one asks "Want it next?" */
.ins-soon-title{ margin: 0 0 var(--sp-3); font-family: var(--o-font-display); font-size: var(--ios-fs-title-s); font-weight: var(--ios-w-semibold); line-height: var(--ios-lh-title-s); color: var(--ink); }
.ins-soon-actions{ display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-4); margin-top: var(--sp-3); }
.ins-soon-actions .btn-link{ min-height: var(--ios-row-h); }

/* the form (a sheet) */
.ins-sheet .field label, .ins-label{ font-size: var(--ios-fs-sub); }
.ins-sheet textarea{ width: 100%; box-sizing: border-box; min-height: calc(var(--ios-row-h) * 2.5); padding: var(--sp-3) var(--sp-4); border: 0; border-radius: var(--ios-radius-card); background: var(--ios-fill); font: var(--ios-w-regular) var(--ios-fs-body)/1.35 var(--ios-font); color: var(--ink); resize: vertical; }
.ins-sheet textarea:focus{ outline: 2px solid var(--ios-tint); }
.ins-count{ margin: var(--sp-1) 0 0; text-align: right; font-size: var(--ios-fs-foot); color: var(--ios-label-2); }
.ins-diff-pick{ display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
/* the 1-5 difficulty scale: five numbered circles (a rating, not a filter) */
.ins-rate-btn{ all: unset; box-sizing: border-box; cursor: pointer; min-width: var(--ios-row-h); min-height: var(--ios-row-h); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ios-separator); border-radius: 50%; background: var(--ios-card); color: var(--ink); font: var(--ios-w-semibold) var(--ios-fs-sub)/1 var(--ios-font); }
.ins-rate-btn[aria-pressed="true"]{ background: var(--ios-tint-fill); border-color: var(--ios-tint-fill); color: var(--ios-on-tint); }
.ins-rate-btn:focus-visible{ outline: 2px solid var(--ios-tint); outline-offset: 2px; }
.ins-label small{ color: var(--ios-label-2); }
.ins-posting-to{ margin: 0 0 var(--sp-3); font-size: var(--ios-fs-sub); font-weight: var(--ios-w-semibold); color: var(--ios-label-2); }
/* "Show my home school": one row, a real checkbox and a sentence -- the sheet's generic label/input rules (uppercase caption, full-width box) would make it a column */
.ios-sheet .field label.ins-check, .ins-check{ display: flex; align-items: center; gap: var(--sp-3); min-height: var(--ios-row-h); margin: 0; padding: 0 var(--ios-margin); cursor: pointer; text-transform: none; font: var(--ios-w-regular) var(--ios-fs-body)/1.3 var(--ios-font); color: var(--ink); }
.ios-sheet .field .ins-check input[type="checkbox"], .ins-check input[type="checkbox"]{ width: calc(var(--ios-row-h) / 2); min-width: calc(var(--ios-row-h) / 2); height: calc(var(--ios-row-h) / 2); min-height: 0; flex: none; margin: 0; padding: 0; border-radius: var(--ios-radius-tile); accent-color: var(--ios-tint); }
.ins-home-field input[type="text"]{ margin-top: var(--sp-1); }
.ins-home-field input[hidden]{ display: none; }
.ins-byline{ margin: calc(var(--sp-1) * -1) 0 var(--sp-2); }
/* the line that stands in for "Add your experience" on a campus page this person may not post on */
.ins-locked{ margin: var(--sp-2) 0 var(--sp-3); font-size: var(--ios-fs-sub); }

/* the community guidelines sheet */
.guidelines{ margin: 0 0 var(--sp-3); padding-left: var(--ios-sp-3); line-height: 1.5; font-size: var(--ios-fs-body); }
.guidelines li{ margin: 0 0 var(--sp-2); }

/* ============ IDENTITY: real name + username, campuses, school verification ============ */
/* SIGN-UP (7A.1). Every sign-up step is a `classic` screen like Housing: its white page, 22px side margins, header (the rose "Step X of N"
   eyebrow, the thin progress bar under it, the serif title, one helper line) and type scale come from the classic layer; its answers are the
   shared feature cards, its main button the shared pill (ios-app.css, SHARED). This block is only what sign-up adds, and it is tokens all the
   way: backend/test/onboardingScreens.test.js fails on a literal colour, size or space here. Only thin strokes (borders, outlines) are literal. */
[id^="screen-signup-"] .screen-head .eyebrow{ color: var(--accent-deep); }
/* the quiet rows under the main button ("Not sure yet", "Skip for now", "I don't have a place yet", "Skip for later"): a row of their own, 44px tall */
[id^="screen-signup-"] > .btn-link, [id^="screen-signup-"] .sos-skip{
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: var(--tap); margin-top: var(--sp-1);
  color: var(--ink-soft); font-weight: 600; font-size: var(--fs-body); text-align: center;
}
[id^="screen-signup-"] .field-error{ margin-top: var(--sp-1); }
[id^="screen-signup-"] .field-error:empty{ min-height: 0; margin: 0; }
.field-hint-left{ text-align: left; }
/* the line a form explains itself with (the SOS step's), and the budget step's split box: a bordered card on the white page, like the cards above it */
[id^="screen-signup-"] .profile-form .sub{ margin: 0 0 var(--sp-3); font-size: var(--fs-caption); line-height: 1.4; color: var(--ink-soft); }
[id^="screen-signup-"] .split-box{ margin: var(--sp-1) 0 var(--sp-4); padding: var(--sp-3) var(--sp-4); border: var(--stroke) solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
[id^="screen-signup-"] .split-head{ font-size: var(--fs-body); font-weight: 600; }
[id^="screen-signup-"] .split-head .btn-link{ font-size: var(--fs-caption); }
/* a field drawn as one box around an input (the "@" before a username, the school's ending after an email): the look of every other field */
.username-input, .suffix-input{
  display: flex; align-items: center; gap: var(--sp-1); box-sizing: border-box; min-height: var(--tap); padding: 0 var(--field-pad);
  border-radius: var(--radius-s); background: var(--ios-card); box-shadow: inset 0 0 0 .5px var(--ios-separator);
}
.username-input:focus-within, .suffix-input:focus-within{ box-shadow: inset 0 0 0 var(--stroke-strong) var(--ios-tint); }
.username-input > span{ color: var(--ink-faint); font-weight: 600; }
.field .username-input > input, .sheet-body .username-input > input{ flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; padding-left: var(--sp-1); }
/* the line under a field: neutral by default, green when a name is free, red when it is not */
[id^="screen-signup-"] .field-hint{ margin-top: var(--sp-1); text-align: left; font-family: var(--font-sans); color: var(--ink-soft); }
.field-hint[data-kind="ok"]{ color: var(--safe-fg); }
.field-hint[data-kind="bad"]{ color: var(--risk-fg); }
/* a question on its own (campuses): a serif heading with its helper line under it, then its cards */
.campus-q{ margin: var(--sp-5) 0 0; font-size: var(--fs-title); font-weight: 700; line-height: 1.3; }
.campus-q:first-child{ margin-top: 0; }
.help-text + .feature-grid{ margin-top: var(--sp-3); }
.campus-note{ color: var(--accent-deep); font-weight: 600; }
.campus-note:empty{ display: none; }
.school-cards.invalid .feature-card{ border-color: var(--risk-fg); }
/* the explaining line above a form in the verify step and its sheet breathes before the field */
#signup-verify-body .sub, #verify-sheet-body .sub{ margin: 0 0 var(--sp-4); color: var(--ink-soft); font-size: var(--fs-body); line-height: var(--lh-body); }

/* verify the school email: the ending of the address is drawn inside the field (fixed, or a small picker when the school has several), so only the
   part before the @ is typed; the code is six boxes over ONE real input; and every action is a row of its own, at least 44px tall. */
#signup-verify-body{ flex: 1; display: flex; flex-direction: column; min-height: 0; }
.verify-form{ flex: 1; display: flex; flex-direction: column; }
.verify-spacer{ flex: 1; min-height: var(--sp-3); }
.field .suffix-input > input{ flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; padding-left: 0; padding-right: var(--sp-1); }
.suffix-input .email-suffix{ flex: none; max-width: 62%; color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .suffix-input > select.email-suffix{ border: 0 !important; background: transparent !important; box-shadow: none !important; padding: var(--sp-3) 0 var(--sp-3) var(--sp-1); min-height: var(--tap); color: var(--ink-soft); }
.otp{ position: relative; margin: var(--sp-1) 0 var(--sp-2); }
.otp-cells{ display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2); pointer-events: none; }
.otp-cell{
  height: var(--code-h); display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: var(--radius-s);
  background: var(--ios-card); box-shadow: inset 0 0 0 .5px var(--ios-separator);
  font: 600 var(--code-fs)/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink);
}
.otp-cell.on{ box-shadow: inset 0 0 0 var(--stroke-strong) var(--ios-tint); }
.otp.bad .otp-cell{ box-shadow: inset 0 0 0 var(--stroke-strong) var(--risk-fg); }
/* the real input lies over the boxes: invisible text and caret, so typing, paste and the keyboard's code suggestion all land in it */
.field .otp > input.otp-input{ position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: transparent; caret-color: transparent; -webkit-text-fill-color: transparent; text-align: center; z-index: 1; }
.verify-note{ margin: var(--sp-2) 0 0; text-align: center; font-size: var(--fs-caption); line-height: 1.4; color: var(--ink-soft); }
.verify-note:empty{ display: none; }
.verify-actions{ display: flex; flex-direction: column; align-items: stretch; margin-top: var(--sp-1); }
.verify-action, .verify-later{
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: var(--tap); padding: 0 var(--sp-2); border: 0; background: none; cursor: pointer; text-align: center;
  font: 600 var(--fs-body)/1.25 var(--font-sans); color: var(--accent-deep); -webkit-tap-highlight-color: transparent;
}
.verify-action:active, .verify-later:active{ opacity: .5; }
.verify-action:disabled{ color: var(--ink-faint); cursor: default; opacity: 1; }
.verify-action:focus-visible, .verify-later:focus-visible{ outline: 2px solid var(--accent-deep); outline-offset: -2px; border-radius: var(--radius-s); }
/* "Do this later": quieter than the actions above it, and a row of its own at the bottom of the screen */
.verify-later{ margin-top: var(--sp-2); color: var(--ink-soft); }

/* ==========================================================================================
   SECTION DIAL (frontend/section-dial.js): the Explore compass as a top-half dial that switches a screen's sections. Community: School ·
   General · Friends. Insider: Schools · Living. The ring is the Explore ring (.compass-ring.compass-hero, Wheel.heroDial: ticks, needle on
   its spring, disc, rim, the grow-and-colour of the chosen spoke); here only its TOP HALF shows (the stage clips it), so the whole dial is
   about 160px tall, and nothing spins. No map behind it: --page-rgb, the colour of the halos round the labels, is the page's own.
   ========================================================================================== */
.section-dial{ --page-rgb: 244, 239, 242; /* --ios-bg */ position: relative; flex: none; width: 100%; margin-bottom: 8px; }
html[data-theme="dark"] .section-dial{
  --page-rgb: 14, 10, 12; /* --ios-bg */
  --disc-a: .34; --disc-rgb: 40, 26, 33; --disc-ring: rgba(240, 103, 159, .4); --disc-shadow: 0 2px 12px rgba(0, 0, 0, .3);
  --glow-near: .08; --glow-mid: .03;
  --dial-tick: rgba(222, 202, 214, .42); --dial-strong: rgba(238, 220, 230, .88); --needle-south: rgba(176, 168, 174, .5);
  --rim-fill: rgba(72, 46, 58, .32); --rim-light: rgba(255, 255, 255, .2); --rim-bezel: rgba(240, 103, 159, .4); --spoke-cool: rgb(176, 168, 174);
}
.section-dial-stage{ position: relative; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; }
.section-dial-ring{ flex: none; height: var(--ring); touch-action: pan-y; } /* square: a flex item would otherwise stretch to the stage's height */ /* the Explore ring blocks every touch (it spins); this one lets the page scroll under a finger on it */
.section-dial .compass-dial{ cursor: default; }
.section-dial .compass-point{ min-height: 44px; opacity: 1; }
/* Explore dims a spoke that is not chosen by fading the whole button; here only its icon and its words fade, so a badge beside them stays crisp */
.section-dial .compass-point .pt-icon, .section-dial .dial-label-text{ opacity: calc(.55 + .45 * var(--bloom)); }
.section-dial.is-reduced .compass-point{ transition: none !important; }
/* the count on a section's label ("Friends 2"): hangs off the label's right end, so the label itself stays centred under its icon */
.section-dial .pt-label, .dial-bar-label{ position: relative; }
.dial-badge{
  position: absolute; left: 100%; top: -6px; margin-left: 3px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
  background: var(--accent-deep); color: var(--on-accent); font: 700 10px/16px var(--font-sans); text-align: center; text-shadow: none;
}
/* the slim bar: takes the dial's place once it has scrolled out of sight. It sits in the screen's own scroll area (position: sticky), takes no
   room of its own (the negative margin), and is only there for a finger: the dial above stays the one the screen reader gets. */
.section-dial-bar{
  position: sticky; top: 0; z-index: 6; flex: none; height: 44px; margin: 0 calc(-1 * var(--gutter)) -44px; padding: 0 var(--gutter); display: flex; align-items: stretch;
  background: var(--ios-bar); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); border-bottom: .5px solid var(--ios-separator);
  opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity 160ms ease, transform 160ms ease;
}
.section-dial-bar.is-on{ opacity: 1; pointer-events: auto; transform: none; }
.dial-bar-item{
  all: unset; box-sizing: border-box; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; cursor: pointer;
  font: 600 13px/1 var(--font-sans); color: var(--ink-soft); -webkit-tap-highlight-color: transparent;
}
.dial-bar-item.is-active{ color: var(--accent-deep); }
.dial-bar-item .icon{ width: 18px; height: 18px; }
.dial-bar-item:focus-visible{ outline: 2px solid var(--accent-deep); outline-offset: -2px; }
.dial-bar-mark{
  position: absolute; left: 0; bottom: 0; width: 0; height: 0; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--accent-deep);
  transform: translateX(calc(var(--mark-x, 50%) - 5px)); transition: transform 300ms var(--ease-spring);
}
@media (prefers-reduced-motion: reduce){ .section-dial-bar, .dial-bar-mark{ transition: none; } }
/* a page title in the Housing manner: the brand serif (the Explore greeting and Housing's title are serif too), not the iOS bold sans */
.screen-head.is-brand{ margin: 0 0 4px; padding-top: 4px; }
.screen-head.is-brand h2{ margin: 0; font-family: var(--font-display); font-size: var(--fs-display); font-weight: 600; letter-spacing: normal; line-height: 1.15; }
