/* =============================================================================
   chat.ranked.jp — the chat shell.

   Deliberately SEPARATE from styles/global.css: the site sheet is 7k lines of
   listing/card/drawer styling built around a black page and the Darker
   Grotesque display face, and this surface is meant to read like a chat client,
   not like the job board. The two never load together (mainview.js pulls global.css
   in on demand if site markup is ever embedded here), so this file carries its
   own small reset and its own tokens.

   Both themes are defined: prefers-color-scheme is the default and
   <html data-theme="light|dark"> overrides it (functions/chat/theme.js).
   ============================================================================= */

/* ------------------------------------------------------------------- fonts */
/* Darker Grotesque, the SITE's display face. This surface uses it for the
   shared site header and the job views' count above the cards, because those are the site's own type,
   measured off it, and their sizes are spaced for this face rather than for the
   UI stack below.
   It has to be DECLARED here. The blocks live in global.css, which this document
   deliberately does not load, so before this existed every one of those rules
   silently fell through to `var(--font-ui)`: the header read in a different face
   from every other page on the site, and 0.9rem at line-height 1 — spaced for
   Darker Grotesque's small em box — came out oversized with its lines touching.
   (jobsView.js also lifts global.css's copies into the head when it builds the
   card shadow root, since @font-face never registers from inside one. That is
   for the CARDS, it only happens on a job view, and it arrives a fetch late —
   none of which helps a header on /login. Duplicate identical declarations of
   the same family are harmless.)
   Keep in step with the same two blocks at the top of styles/global.css. */
@font-face {
  font-family: 'Darker Grotesque';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/darker-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Darker Grotesque';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/darker-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Nunito — latin */
@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(/assets/fonts/nunito-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Nunito — latin-ext */
@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(/assets/fonts/nunito-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, p, a, ul, ol, li, form, button, input, textarea, article, aside, header, main, nav, section, pre, code, blockquote, hr {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: none;
}
ul, ol { list-style: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Japanese optical sizing — THE SAME ONE LEVER as styles/global.css, which
   carries the full explanation and the alternative values. It is restated here
   because this surface does not load that sheet: the chat and the account pages
   are built on chat.css alone. Keep the two numbers identical, or /ja/ reads at
   one size on a jobs listing and another on Settings — which is the exact
   inconsistency this replaced. */
:root { --ja-optical: 0.416; }
html[lang="ja"] {
  font-size-adjust: var(--ja-optical);
  /* Japanese line breaking, same trio and same reasoning as global.css: strict
     kinsoku everywhere, phrase-based wrapping where the browser supports it, so
     a word is not split across two lines — and `overflow-wrap: anywhere` as the
     emergency valve, because a phrase `auto-phrase` will not break is also this
     element's min-content width, and boxes sized from it grow past the screen
     instead of wrapping. It only ever breaks a word that could not have fitted;
     see the measurements at the global.css copy. */
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

/* Employer controls and prose use the same system UI stack in both locales.
   The display-font correction makes those Japanese labels too small. Keep it
   only on the site's display typography and embedded public content. */
html[lang="ja"].employer-workspace {
  font-size-adjust: none;
}
html[lang="ja"].employer-workspace :is(.header-container, .site-footer, .view-count, .view-count-label, .cards-host) {
  font-size-adjust: var(--ja-optical);
}
/* Company/job previews mix Nunito body text with Darker Grotesque headings.
   Scaling their whole shadow tree to a Japanese display-font metric changes
   even identical English company copy when the workspace language switches. */
html[lang="ja"].employer-workspace .company-page-host {
  font-size-adjust: none;
}

/* ----------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;

  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
             "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --sidebar-w: 16.25rem;      /* 260px */
  --thread-w: 48rem;          /* 768px — the reading column */
  /* The column's side gutter. ONE token, read by the thread and by the
     composer region (and so by the suggestions and the note under it), because
     the two stack on top of each other and a difference between them reads as a
     misalignment. It does NOT shrink on a phone: that is where the gutter is
     the only thing between the conversation and the edge of the screen — and
     where the decoration's sliver sits. */
  --thread-gutter: 1.75rem;   /* 22.4px */
  --radius-btn: 0.5rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  /* Light (default) */
  --bg: #ffffff;
  --bg-sidebar: #f9f9f9;
  --bg-elevated: #ffffff;
  --bg-composer: #ffffff;
  --bg-bubble: #f4f4f4;
  --bg-code: #f4f4f4;
  --text: #0d0d0d;
  --text-2: #5d5d5d;
  --text-3: #8f8f8f;
  --hover: rgba(13, 13, 13, 0.05);
  --active: rgba(13, 13, 13, 0.08);
  --border: rgba(13, 13, 13, 0.1);
  --border-strong: rgba(13, 13, 13, 0.16);
  --accent: #0d0d0d;          /* send button fill */
  --accent-fg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  /* Ranked's brand orange, used only where this surface needs to say "Ranked"
     (the mark, the active rail item's dot) — not as a general accent. */
  --brand: #ff8000;
  /* the profile-completion nudge colour — amber reads as "worth doing", where
     red would read as "something is broken" */
  --warn: #f5a524;
  --danger: #e5484d;
  /* …and the third of that set, for a thing that WORKED. Same family as the two
     above (Radix 9s), so the employer page editor's outcome chip reads as one
     traffic light rather than three unrelated colours. Declared once, like
     them: all three are legible on both themes, which is why neither dark block
     below re-states them. */
  --ok: #30a46c;
  /* …and a fourth, for the one act on the employer surface that reaches the
     public: Publish. Radix blue 9, so it sits in the same family as the three
     above and is legible on both themes for the same reason they are. Blue
     rather than a fourth shade of green because it is a different KIND of act —
     green keeps the employer's own work, blue lets everyone else see it. */
  --info: #0090ff;
}

/* Dark. --bg is BLACK, not the near-black a chat surface would normally use:
   this shell shares a rail with ranked.jp, the rail is #000 there, and every
   view in the centre column (the thread, Resume, Applications, Settings, Liked
   jobs) is showing the site's own content — the job cards literally load
   global.css. A #212121 page put a seam down the middle of one application.
   The raised tokens below carry the depth instead: fields sit on --bg-sidebar,
   bubbles and the composer on --bg-composer, menus on --bg-elevated. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-sidebar: #171717;
    --bg-elevated: #2f2f2f;
    --bg-composer: #303030;
    --bg-bubble: #303030;
    --bg-code: #1e1e1e;
    --text: #ececec;
    --text-2: #b4b4b4;
    --text-3: #8f8f8f;
    --hover: rgba(255, 255, 255, 0.06);
    --active: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    --accent: #ffffff;
    --accent-fg: #0d0d0d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-sidebar: #171717;
  --bg-elevated: #2f2f2f;
  --bg-composer: #303030;
  --bg-bubble: #303030;
  --bg-code: #1e1e1e;
  --text: #ececec;
  --text-2: #b4b4b4;
  --text-3: #8f8f8f;
  --hover: rgba(255, 255, 255, 0.06);
  --active: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --accent: #ffffff;
  --accent-fg: #0d0d0d;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html {
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The conversation surface is deliberately denser than the account pages that
   share this stylesheet: 12.8px is 80% of the original 16px rem basis, so its
   prose, composer, menus, spacing and controls shrink together. The shared rail
   and page header are intentionally unaffected — their own styles are root-
   independent px/em systems. Ranked job/company cards are counter-scaled below.
   Scope this to Chat.jsx so Resume, Settings, Liked, etc. keep their scale. */
html.chat-page { font-size: 12.8px; }

/* Give a wide desktop a little more horizontal breathing room without changing
   the established tablet/phone measure. The thread, composer and their note
   all read this one token, so their edges continue to line up. */
@media (min-width: 80rem) {
  html.chat-page { --thread-w: 54rem; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;               /* the thread scrolls, the page never does */
}

::selection { background: rgba(255, 128, 0, 0.25); }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
::-webkit-scrollbar { width: 0.75rem; height: 0.75rem; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 0.25rem solid transparent;
  background-clip: padding-box;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
  border-radius: var(--radius-btn);
}

/* ----------------------------------------------------------- app skeleton */
/* The one box the whole surface is measured from. `--app-h` / `--app-top` are
   published by functions/chat/viewport.js from `window.visualViewport`, and
   they exist because 100dvh does NOT answer the phone keyboard: it is the
   layout viewport, which the keyboard does not shrink — the browser scrolls the
   VISUAL one instead, and this column's top (its header, and the first
   messages of a new conversation) goes off the top of the screen. Sized and
   offset to the visible band, the column simply IS the screen again.

   `position: fixed` rather than a block in flow, so the offset has something to
   move: `top` on a fixed box is measured from the layout viewport, which is the
   frame the browser's push is measured in too. No transform — that would make
   this the containing block for the rail's own fixed positioning (rail.css).

   Both fallbacks are the behaviour before any of this: full height, no offset.
   They stand on a browser without visualViewport, and before the first sync. */
.chat-app {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  display: flex;
  height: var(--app-h, 100dvh);
  width: 100%;
  overflow: hidden;
}

/* The RAIL used to live here. It is shared with the site now — its markup is
   pages/Rail.jsx and its styles are styles/rail.css, loaded after this sheet.
   What stays below is the chat-only chrome the rail sits beside. */

/* the Log in / Register pages (functions/chat/auth.js). Their .view--narrow
   width modifier is NOT here — it has to be declared after .view, see below. */
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-label { font-size: 0.8125rem; font-weight: 600; }
.auth-input {
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}
.auth-input::placeholder { color: var(--text-3); }
.auth-input:focus { outline: none; border-color: var(--border-strong); }
.auth-consent { display: flex; align-items: flex-start; gap: 0.625rem; cursor: pointer; }
/* The Log in and Connect forms carry the two boxes hidden until the server says
   the address has no account; an author `display` beats the UA's [hidden]. */
.auth-consent[hidden] { display: none; }
.auth-consent-text { font-size: 0.8125rem; line-height: 1.5; color: var(--text-2); }
.auth-consent-text a { text-decoration: underline; text-underline-offset: 0.15em; }
.auth-submit { align-self: flex-start; }
.auth-message--ok { color: var(--text); }
.auth-message--error { color: var(--danger); }
/* ==================================================================== main */
.chat-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  /* The same box as .chat-app above — kept in step with it, not with the
     window, or the keyboard shortens the shell around a column that stays a
     full viewport tall and the composer ends up under the keyboard again. */
  height: var(--app-h, 100dvh);
  position: relative;
}

/* React needs a host element to inject the SVG strings into (pages/Chat.jsx),
   so icons inside labelled controls arrive wrapped. */
.icon-wrap { display: flex; flex: none; }

/* icon buttons — the workhorse control of this UI */
.icon-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-btn);
  color: var(--text-2);
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn--sm { width: 1.75rem; height: 1.75rem; border-radius: 0.375rem; }
.icon-btn.is-on { color: var(--text); background: var(--active); }
.icon-btn[disabled] { opacity: 0.4; cursor: default; }
.icon-btn[disabled]:hover { background: none; color: var(--text-2); }

/* ---- hover label (`data-hint`) ------------------------------------------
   What the native `title` tooltip should have been: it waits about a second
   doing nothing, then paints in the OS's styling at the POINTER rather than at
   the control it names. This is the same string in the surface's own type,
   instantly, anchored above the button.

   CSS only, on purpose — a label that needs a module to appear is a label that
   is missing on the first hover after load, which is the one hover that matters
   for a control the visitor has not met yet.

   The element carrying this must NOT also carry `title`, or the browser's own
   tooltip surfaces a beat later on top of this one; `aria-label` is what names
   the control for assistive tech and for anything without hover at all. Nothing
   between here and .composer-box clips overflow, so it is free to sit above the
   composer's edge. */
[data-hint] { position: relative; }
[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 0.375rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-btn);
  background: var(--bg-bubble);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  /* Hidden state is not display:none — the label must be laid out for the fade
     to have something to fade, and pointer-events:none keeps it from ever
     standing between the pointer and its own button. */
  pointer-events: none;
  transition: opacity 0.12s ease;
}
[data-hint]:hover::after,
[data-hint]:focus-visible::after { opacity: 1; }
/* Coarse pointers have no hover: the label would either never show or stick
   after a tap, and the control is already named for assistive tech. */
@media (hover: none) {
  [data-hint]::after { content: none; }
}

/* ================================================================== thread */
.thread-scroll {
  /* Positioned so it paints above .chat-decor — an in-flow element loses to a
     positioned sibling no matter which comes first in the markup. */
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* `none`, not `contain`: it stops the chaining `contain` stops AND the
     elastic overscroll at the two ends. macOS rubber-band moves the CONTENT
     past the end of the scroll range without moving `scrollTop`, which is
     clamped — so the decoration, which follows scrollTop, cannot follow the
     bounce and snaps back into place when it settles. Nothing can read that
     offset, so the fix is to not have the bounce: content and decoration then
     move as one at every position. The chat is an app surface (the page itself
     never scrolls — see `body` above), so this reads as ordinary. */
  overscroll-behavior: none;
  scrollbar-gutter: stable both-edges;
  /* A column so the thread fills the available scrolling region. Dedicated
     account pages share this sheet and put their footer after .main-view, so
     that view also grows into the spare height on a short page. */
  display: flex;
  flex-direction: column;
}
/* The chat header is the first item in the conversation's scrolling flow, so
   it leaves the viewport exactly like the first messages. Do not let the flex
   column shrink it when a long thread overflows. */
.thread-scroll > .site-header { flex: none; }
/* Chat renders .thread; dedicated account pages render .main-view. */
.thread,
.main-view { flex: 1 0 auto; }

.thread {
  width: 100%;
  max-width: var(--thread-w);
  margin: 0 auto;
  padding: 0.5rem var(--thread-gutter) 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.msg {
  display: flex;
  flex-direction: column;
  /* Keep the breathing room the former action row provided without rendering
     any controls beneath the message. */
  padding-bottom: 0.4rem;
}
.msg--user { align-items: flex-end; }

.msg-body {
  font-size: 1rem;
  line-height: 1.75;
  word-break: break-word;
}

/* A visitor's own message is the one square, white thing on the surface —
   deliberately not a rounded grey bubble, so it reads as their words set into
   the page rather than as another card.
   The pair is LITERAL, not `var(--bg-bubble)`/`var(--text)`: it has to be the
   same white-on-black-text block in either theme, which a token pair that
   inverts cannot be. ⚠️ Restoring the theme picker (FEATURE_THEME_PICKER in
   functions/chat/theme.js) needs a light-mode answer here — `--bg` is #ffffff
   there, so this bubble would be a white block on a white page. */
.msg--user .msg-body {
  max-width: 75%;
  padding: 0.625rem 1.25rem;
  background: #ffffff;
  color: #0d0d0d;
  border-radius: 0;
  white-space: pre-wrap;
}

.msg--assistant .msg-body { max-width: 100%; }
.msg-body.is-error { color: var(--danger); }

/* the streaming caret */
.msg-body.is-streaming .md > *:last-child::after {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 1.05rem;
  margin-left: 0.25rem;
  vertical-align: -0.15rem;
  border-radius: 1px;
  background: currentColor;
  animation: chat-blink 1s steps(2, start) infinite;
}
@keyframes chat-blink { 50% { opacity: 0; } }

/* A message that just arrived rises into place. Only appendMessageNode sets
   `is-new` — a thread restored from storage renders without it, so a returning
   visitor is not shown their whole conversation animating in. */
.msg.is-new { animation: chat-rise 0.18s ease-out both; }
/* Parts that arrive whole (job cards, a note of what was recorded) do the same,
   the first time each is drawn — thread.js drops the class once it has played. */
.part-enter { animation: chat-rise 0.22s ease-out both; }
@keyframes chat-rise {
  from { opacity: 0; transform: translateY(0.375rem); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ waiting for a reply

   A turn spends its first seconds in a tool call — searching the catalogue,
   saving jobs — with nothing to stream yet. This is the line that says so
   (thread.js `setActivity`): "Thinking…", or whatever the server reports it is
   doing. It replaces an empty bubble, which is the one thing a ten-second wait
   must not look like. */
.msg-activity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.75rem;
  font-size: 0.875rem;
}
.msg-activity-dot {
  flex: none;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: var(--radius-pill);
  background: var(--text-3);
  animation: chat-pulse 1.4s ease-in-out infinite;
}
/* The label is the loader as much as the dot is: the light sweeps across the
   words rather than next to them, so one small element carries the whole
   "working" signal. Falls back to flat text wherever background-clip is not
   honoured — the colour below is the fallback, the gradient paints over it. */
.msg-activity-label {
  color: var(--text-3);
  background: linear-gradient(90deg, var(--text-3) 30%, var(--text) 50%, var(--text-3) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chat-sweep 1.6s linear infinite;
}
@keyframes chat-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes chat-sweep { from { background-position: 110% 0; } to { background-position: -110% 0; } }

/* Cards need the site stylesheet fetched into their shadow root before they can
   be drawn (jobsView.js holdCardSpace). This holds their space meanwhile, at the
   grid's own shape: 11.25rem rows and a 0.6rem gap at the SITE's 16px root,
   which is 1.25× this document's — the same ratio the cards themselves are
   zoomed by. */
.cards-skeleton {
  display: grid;
  grid-template-columns: repeat(var(--skeleton-cols, 3), minmax(0, 1fr));
  gap: 0.75rem;
}
.cards-skeleton-card {
  height: 14rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, var(--bg-bubble) 35%, var(--hover) 50%, var(--bg-bubble) 65%);
  background-size: 220% 100%;
  animation: chat-sweep 1.4s linear infinite;
}
/* Message grids stack at this width (jobsView.js columnPatch), so one placeholder
   is what is about to be there. */
@media (max-width: 48rem) {
  .cards-skeleton { grid-template-columns: 1fr; }
  .cards-skeleton-card + .cards-skeleton-card { display: none; }
}

/* job cards inside an answer (functions/chat/jobsView.js jobsPart) */
.msg-jobs { margin-top: 0.75rem; }
.msg-jobs-caption {
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
}
.md + .msg-jobs { margin-top: 1rem; }
.msg-jobs + .md { margin-top: 1rem; }

/* what the assistant recorded about the visitor (functions/chat/profilePart.js).
   A conversation that edits a real profile has to say so where it happens. */
.msg-profile {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-left: 2px solid var(--accent, currentColor);
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
  background: var(--surface-2);
}
/* Anonymous: nothing was stored anywhere but this browser. Dashed, because the
   difference between "saved" and "held for now" is the one thing a visitor
   must not misread here. */
.msg-profile--local { border-left-style: dashed; }
.msg-profile-caption {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
}
/* The signed-out invitation's email box (functions/chat/recruiterOffer.js
   guestOffer): the homepage's white field and orange button, square like every
   Ranked control, at the chat's own text size. 16px text on touch screens, or
   iOS zooms the page when the field is tapped. */
.offer-email { display: grid; gap: 0.5rem; margin-top: 0.625rem; max-width: 28rem; }
.offer-email-row { display: flex; gap: 0.375rem; }
.offer-email-input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  height: 2.75rem;
  margin: 0;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: #111111;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 0;
  outline: 0;
}
.offer-email-input::placeholder { color: #777777; }
.offer-email-input:focus { box-shadow: 0 0 0 2px var(--brand); }
.offer-email-send {
  flex: none;
  height: 2.75rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0;
  white-space: nowrap;
  cursor: pointer;
}
.offer-email-send:hover { filter: brightness(1.1); }
.offer-email-send[disabled] { opacity: 0.6; cursor: progress; }
@media (pointer: coarse) { .offer-email-input { font-size: 16px; } }
@media (max-width: 30rem) {
  .offer-email-row { flex-direction: column; }
  .offer-email-send { width: 100%; }
}
.msg-profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.msg-profile-item {
  font-size: 0.8125rem;
  color: var(--text-2);
}
.msg-profile-item + .msg-profile-item::before {
  content: "·";
  margin-right: 0.5rem;
  color: var(--text-3);
}
.md + .msg-profile { margin-top: 1rem; }
.msg-profile + .md { margin-top: 1rem; }

/* the enquiry the assistant emailed to Ranked Group for the visitor
   (functions/chat/profilePart.js emailPart). Printed in full, because it left
   in their name: they agreed to a draft in the conversation and this is what
   actually went, there to be compared. It reads as a QUOTED DOCUMENT rather
   than as another note — a solid rule and the message body in the reading
   face — since it is the only part here that is a copy of something now sitting
   in someone else's inbox. */
.msg-email {
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-left: 2px solid var(--text-3);
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
  background: var(--surface-2, var(--bg-bubble));
}
.msg-email-subject {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.msg-email-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-2);
  /* The message is sent as plain text, so its line breaks are the ones that
     arrived — collapsing them here would show something the recipient will not
     see. */
  white-space: pre-wrap;
}
.msg-email-reply {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
}

.md + .msg-email { margin-top: 1rem; }
.msg-email + .md { margin-top: 1rem; }

/* markdown inside a message */
.md > * + * { margin-top: 1rem; }
.md h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.md h3 { font-size: 1.0625rem; font-weight: 600; }
.md h4, .md h5 { font-size: 1rem; font-weight: 600; }
.md ul, .md ol { padding-left: 1.5rem; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li + li { margin-top: 0.375rem; }
.md a { color: var(--text); text-decoration: underline; text-underline-offset: 0.15em; }
.md a:hover { color: var(--brand); }
.md strong { font-weight: 600; }
.md em { font-style: italic; }
.md hr { border-top: 1px solid var(--border); }
.md blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--border-strong);
  color: var(--text-2);
}
.md code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.125rem 0.3125rem;
  border-radius: 0.25rem;
  background: var(--bg-code);
}
.md pre.md-code {
  position: relative;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-code);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.md pre.md-code code {
  padding: 0;
  background: none;
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre;
}
.md pre.md-code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-3);
}

/* jump-to-latest, shown when the reader has scrolled up mid-answer */
#scroll-bottom {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: none;
  z-index: 5;
}
#scroll-bottom .chat-icon { transform: rotate(180deg); }
body.show-scroll-bottom #scroll-bottom { display: grid; }

/* ============================================================== decoration */
/* The landing page's clipped card stacks (pages/About.jsx `.about-layer-*`),
   brought to the one surface with more empty space than any other. Same idea,
   same cards, same reason: a column of real, rank-coloured cards running off
   the edge of the screen, so the eye reads texture rather than results.
   Drawn by functions/chat/decor.js — see the note there for why they are the
   site's own card template and not a copy of it.

   NOT CHROME AND NOT CONTENT. The layer is aria-hidden in the markup, takes no
   pointer events (which inherit, so the shadow-rooted cards inside take none
   either) and sits under everything the visitor came for. */
.chat-decor {
  position: absolute;
  inset: 0;
  /* The stacks are positioned mostly outside this box; this is what turns them
     into edges rather than cards. .chat-main is the box, so they are clipped
     where the rail ends and never run under it. THIS box does not move — it is
     the window the moving one is seen through. */
  overflow: hidden;
  pointer-events: none;
  /* Behind the thread and the composer, both of which are positioned. */
  z-index: 0;
}

/* WHAT SCROLLS. The stacks belong to the conversation, not to the chrome, so
   they travel with it: this box is offset by the thread's scroll position, and
   the two move as one.
   It is a transform on a separate box rather than the DOM arrangement that
   would do this for free (the layer inside .thread-scroll, positioned against
   the scrolled content) because of the EMPTY state: that column is
   `flex: 0 1 auto` there and collapses to the height of the page header, so an
   inset layer inside it would be a 5rem band exactly when the chat has nothing
   in it — and a layer given the viewport's height instead would make an empty
   chat scrollable. This keeps the clip the full height of the surface in both
   states and moves only what is drawn inside it. */
.chat-decor-scroll {
  position: absolute;
  inset: 0;
  /* ⚠️ LOAD-BEARING, not a micro-optimisation. This box holds fifteen cards,
     each with a shadow tree of its own, and its offset changes on every scroll
     frame. Un-promoted, each of those frames repaints all of them.
     NOT `contain: paint`, tempting as it looks: that clips descendants to THIS
     box, and this box is the one that moves — the visible region would slide
     off with it. The stationary clip is .chat-decor's, and it has to stay the
     only one. */
  will-change: transform;
}

/* HOW IT MOVES, and why this is not the obvious scroll listener.
   A listener is always LATE. The surface scrolls on the compositor; a `scroll`
   event is then delivered to the main thread, which writes a transform that
   lands on the NEXT frame — so the decoration trails the conversation it is
   supposed to be stuck to, and no amount of tuning the handler closes that gap,
   because the gap is the handoff itself.
   A scroll-driven animation has no handoff: the scroll position IS the
   animation's clock, evaluated where the scrolling happens. The one thing CSS
   cannot work out for itself is how far to travel — the scrollable distance —
   so decor.js publishes that as `--decor-range` whenever the thread RESIZES,
   which is a handful of times a conversation rather than sixty times a second.
   Progress p across the range maps to -p × range, which is scrollTop exactly.
   The timeline is NAMED because the two boxes are cousins, not ancestor and
   descendant: `.thread-scroll` declares it, `.chat-main` widens its scope to
   its own subtree, and this box refers to it from the other branch.
   No fallback is wired in CSS: decor.js keeps the listener for browsers without
   this, and only one of the two is ever active (see followThread). */
@supports (animation-timeline: scroll()) {
  .chat-main { timeline-scope: --thread-scroll; }
  .thread-scroll { scroll-timeline: --thread-scroll block; }
  .chat-decor-scroll {
    animation-name: decor-follow;
    /* No `animation-duration`: its initial `auto` is what stretches a
       progress-based timeline across its whole range. Longhands throughout —
       the `animation` shorthand RESETS animation-timeline, so a later shorthand
       would silently unhook this from the scroller. */
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: --thread-scroll;
  }
}
@keyframes decor-follow {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--decor-range, 0px))); }
}

.chat-decor-stack {
  position: absolute;
  /* THE LANDING PAGE'S SCALE, on a page that does not share its root.
     Everything about these stacks — the card size, the sliver that reaches the
     viewport, how far down the edge they start — is rem on ranked.jp, so the
     site's root-font LADDER is what shrinks and repositions them as a phone
     narrows. This document pins its root at 12.8px (html.chat-page, above) and
     cannot follow: `rem` reads the DOCUMENT root, even inside the cards' shadow
     tree. `zoom` is the lever that can. It multiplies the used value of every
     length on the element and its descendants — the offsets below AND the rem
     lengths inside the shadow root — so one factor per step reproduces the
     ladder exactly. Same trick, and the same 12.8→16 ratio, that
     `.msg-jobs ranked-cards` already uses for an answer's cards.
     KEEP THE STEPS IN SYNC WITH styles/global.css: 16 / 14 / 13 /
     min(12px, 2.353vw) at 915 / 755 / 600px. Each factor is that root ÷ 12.8. */
  zoom: 1.25;
}
/* One card wide each — jobCardGrid draws a single column, so the width is the
   card's own (17rem for a job, 15rem for a company). The negative offset is the
   peek, and BOTH EDGES SHOW THE SAME 0.78rem — the landing page's job sliver,
   measured to the card edge (its stacks wrap each card in a 0.5rem margin the
   grid does not). Its own company stack reaches further in; matching the two
   here keeps this surface symmetrical and keeps the right-hand sliver off the
   composer note, which runs the full width on a phone. The vertical starts are
   not the landing page's either: they clear this surface's page header, whose
   burger is pinned to the corner the company stack would otherwise open in. */
/* The stack is a single column of card-height blocks, at the SITE's own card
   metrics — 11.25rem row (global.css .container grid-auto-rows) and its 0.6rem
   gap — because `zoom` above converts this document's 12.8px root back to the
   site's 16px one, so the same numbers land on the same pixels.

   These are the cards, as far as anything visible goes: the stacks are offset
   so only 0.78rem of the leading edge clears the clip, and that sliver is
   border and background. Rendered server-side in pages/Chat.jsx — see the note
   there for what this replaced. */
.chat-decor-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.6rem;
}
.chat-decor-card {
  flex: none;
  height: 11.25rem;
  /* .card in styles/global.css: its fill, its square corner, its 0.125rem rule.
     The colour rides on the element, from the rank score. */
  background: #151419;
  border: 0.125rem solid;
  border-radius: 0;
}

.chat-decor-stack--jobs {
  top: 5.5rem;
  left: -16.22rem;
  width: 17rem;
}
.chat-decor-stack--companies {
  top: 10.5rem;
  right: -14.22rem;
  width: 15rem;
}

@media (max-width: 915px) {
  .chat-decor-stack { zoom: 1.09375; }   /* 14px ÷ 12.8 */
}
@media (max-width: 755px) {
  .chat-decor-stack { zoom: 1.015625; }  /* 13px ÷ 12.8 */
}
@media (max-width: 600px) {
  /* Below the cap the site scales its root WITH the viewport, so every phone is
     a proportionally-shrunk copy of one layout rather than a stepped one, and
     these stacks shrink with it. The plain number is the capped 12px step and
     stands on its own: dividing by a length is newer CSS than the rest of this
     sheet assumes, and a browser without it holds the cap instead of dropping
     the declaration on the floor. */
  .chat-decor-stack {
    zoom: 0.9375;
    zoom: min(0.9375, 2.353vw / 12.8px);
  }
}

/* ================================================================ composer */
.composer-region {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  /* Bottom spacing (and the phone's safe-area inset) belongs to .composer-note
     below, which is now the last thing in the column — keeping it here too
     would inset the screen edge twice. */
  padding: 0 var(--thread-gutter) 0.5rem;
  background: var(--bg);
}

/* Content scrolls under the composer; fade it out instead of cutting it. */
.composer-region::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2rem;
  height: 2rem;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
body.is-empty-thread:not(.view-open) .composer-region::before { display: none; }
/* …and for the same reason the band itself is transparent there. Its fill only
   exists to hide the thread scrolling under it; with no thread it is an opaque
   sheet across the whole column, which is exactly where .chat-decor is. Page
   and band are the same colour, so nothing else changes. */
body.is-empty-thread:not(.view-open) .composer-region { background: transparent; }

/* Empty state: the greeting + composer sit centred in the space the thread
   would have used, exactly like a fresh ChatGPT tab. So this column shrink-
   wraps what it holds, which with no messages is the page header and an empty
   .thread — about 86px.
   ⚠️ THAT MAKES IT A ~86px SCROLL CONTAINER WRAPPED AROUND THE PAGE HEADER,
   and both of the things that went wrong here follow from it:
     • Anything the header hangs BELOW itself — the section dropdown, the
       description popover (styles/header.css, both absolutely positioned
       against .header-container) — was clipped at the column's bottom edge.
       The section menu showed one item of six, cut off across a black band
       that is simply where this box ends and .composer-region begins.
     • What was clipped still counts as scrollable overflow, so the box could
       be flicked: the header slid a few px under a middle that did not move,
       because the middle is a SEPARATE scroller (.composer-region below).
   Two declarations fix both, and neither costs the state anything:
     • `overflow: visible` — there is nothing here to hide. The flex basis IS
       the content's height, so this box never had anything to scroll; the
       overflow was only ever the menus, which are meant to be seen.
     • `flex: 0 0 auto` — do not shrink below that content either. At `0 1
       auto` a short window (landscape, or the keyboard up) squeezed the box to
       29px around a 54px header, and the header went under the greeting.
       .composer-region is `flex: 1 1 auto` with its own scroller and `safe
       center`, so it is the right thing to absorb a short window.
   Scoped to the chat's empty thread: the account pages are `view-open`, and
   the moment a message lands `flex: 1 1 auto` (below) makes this a real
   scroller again, where clipping is exactly what is wanted. */
body.is-empty-thread .thread-scroll { flex: 0 0 auto; }
body.is-empty-thread:not(.view-open) .thread-scroll { overflow: visible; }
/* `safe center`, not `center`: a centred flex container whose content outgrows
   it overflows in BOTH directions, and the top becomes unreachable — a
   scrollbar cannot travel above its container's start edge. `safe` falls back
   to flex-start exactly when that would happen, which on a short window is the
   difference between a reachable greeting and one clipped off the top. */
body.is-empty-thread .composer-region {
  flex: 1 1 auto;
  justify-content: safe center;
  overflow-y: auto;
  padding-bottom: 4rem;
}
/* That 4rem lifts the centred stack off the bottom edge of a full window. With
   the keyboard up the visible window is barely taller than the stack itself
   (viewport.js sets `is-keyboard`), and the padding becomes the difference
   between the suggestion chips sitting under the composer and being pushed off
   the bottom of what is left. */
body.is-empty-thread.is-keyboard .composer-region { padding-bottom: 0.5rem; }
body.is-empty-thread .suggestions { display: flex; }

.greeting {
  display: none;
  margin-bottom: 1.5rem;
  color: var(--text);
}
body.is-empty-thread .greeting { display: block; }

.greeting h1 {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: center;
}
/* inline with the heading text, so a wrap keeps them together */
.greeting .icon-wrap {
  display: inline-flex;
  vertical-align: -0.15em;
  margin-right: 0.5rem;
}
.greeting .chat-icon { color: var(--brand); }

.composer {
  width: 100%;
  max-width: var(--thread-w);
}

/* EMPTY STATE: a narrower prompt than the reply box.
   With a conversation running the composer is the foot of the thread and has to
   line up with it, so it keeps the full --thread-w measure. With nothing said
   yet it is the one thing on the screen — a box the width of a full reading
   column reads as a form to fill in rather than a question to ask, and the
   greeting above it is short. Narrowing it also pulls the suggestion chips into
   the same column, so the whole centred stack shares one edge.

   The phone gets the same treatment through the side inset instead of a max
   width: at 380px there is no room for a 34rem box, and what makes it feel
   roomy there is margin at the edges of the screen. */
body.is-empty-thread .composer,
body.is-empty-thread .suggestions { max-width: 40rem; }

@media (max-width: 30rem) {
  body.is-empty-thread .composer,
  body.is-empty-thread .suggestions { max-width: calc(100% - 2.5rem); }
}

.composer-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.75rem 0.5rem;
  background: var(--bg-composer);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease;
}
.composer-box:focus-within { border-color: var(--border-strong); }
/* THE WHITE COMPOSER (owner, 2026-10-29, option "F"): a white rounded pill with
   dark text and an orange round send button, in BOTH themes — the grey #303030
   box read as "grey is a black colour". Its own palette is scoped here so the
   chips, counter and icons inside read dark-on-white while the page keeps its
   dark-theme variables. */
.composer-box {
  --text: #111111;
  --text-2: #444444;
  --text-3: #777777;
  --border: #d4d4da;
  --border-strong: #b4b4bc;
  --hover: rgba(0, 0, 0, 0.05);
  --active: rgba(0, 0, 0, 0.08);
  /* The light theme's values: without them the Personalize chip's ON fill
     (--bg-bubble) was the dark theme's #303030 and its count badge (--accent)
     white on white. */
  --bg-bubble: #f4f4f4;
  --accent: #0d0d0d;
  --accent-fg: #ffffff;
  background: #ffffff;
  border-color: #ffffff;
  color: var(--text);
  box-shadow: none;
}
/* No focus ring (owner, 2026-10-29): the caret is the cue. */
.composer-box:focus-within { border-color: #ffffff; box-shadow: none; }
.composer-box .send-btn { background: var(--brand); color: #ffffff; }

.composer-input {
  width: 100%;
  max-height: 13.5rem;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  overflow-y: hidden;
}
.composer-input::placeholder { color: var(--text-3); }

/* ⚠️ iOS Safari ZOOMS THE PAGE when a field it focuses has text under 16px, and
   it does not zoom back out afterwards. `html.chat-page` above puts this
   document on a 12.8px basis, so the composer's own `font-size: 1rem` computes
   to 12.8px — and tapping the composer, the one control this page is built
   around, left the whole conversation scaled up and clipped with no way back.
   16px IS the threshold, so it is the value: anything larger only makes the
   field bigger for no reason.

   Scoped to coarse pointers so the dense scale is untouched everywhere it was
   not a problem — desktop keeps 12.8px, and so do the thread, menus, chips and
   notes on a phone. Only the two things you can actually type into move.

   Deliberately NOT fixed with `maximum-scale=1` / `user-scalable=no` on the
   viewport: that stops the zoom by taking pinch-zoom away from everyone, which
   is a worse page for anyone who needs to magnify it.

   ⚠️ This block must stay AFTER `.auth-input` and `.composer-input`. A media
   query adds no specificity, so an equal-specificity rule declared later would
   silently win and the zoom would come back. */
@media (pointer: coarse) {
  .composer-input,
  .auth-input {
    font-size: 16px;
  }
}

/* attached resume, above the composer's controls (functions/chat/resume.js) */
.composer-attachments:empty { display: none; }
.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.5rem;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.375rem 0.375rem 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  font-size: 0.8125rem;
}
.attachment-icon { display: flex; color: var(--text-3); }
.attachment-text { min-width: 0; }
.attachment-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-link {
  display: block;
  font-size: 0.6875rem;
  color: var(--accent);
  text-decoration: underline;
}
.attachment-note { display: block; font-size: 0.6875rem; color: var(--text-3); }
.attachment--parsing .attachment-note { color: var(--text-2); }
.attachment--error { border-color: rgba(229, 72, 77, 0.4); }
.attachment--error .attachment-note { color: var(--danger); }

.composer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.composer-row .spacer { flex: 1 1 auto; }
.composer-submit {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

/* The character budget, beside the status and immediately left of the send
   button. Always on — the limit is worth knowing before you are near it — and
   quiet enough at --text-3 to be ignored until its colour changes. */
/* THE CHARACTER BUDGET, on both composers on this stylesheet — the employer
   page editor's (#page-chat-chars) and the chat's own (#composer-chars, added
   2026-09-15). ONE set of rules rather than a second copy under a second name:
   they are the same control in the same slot of the same row, and the only
   thing that differs is which cap the markup states. Both are painted from the
   textarea's `maxlength`, so neither can print a number the box is not keeping
   to. */
.page-chat-chars,
.composer-chars {
  flex: 0 0 auto;
  /* The row's own 0.25rem gap is not enough beside a round 2.25rem button —
     the number ends up looking stuck to it. */
  padding: 0 0.5rem;
  color: var(--text-3);
  font-size: 0.75rem;
  line-height: 2rem;
  /* Tabular figures, so the count does not shuffle its own width as it climbs
     — the send button beside it would step left and right on every keystroke. */
  font-variant-numeric: tabular-nums;
}
.page-chat-chars.is-warn,
.composer-chars.is-warn { color: var(--warn); }
.page-chat-chars.is-error,
.composer-chars.is-error { color: var(--danger); }
.composer-chip {
  display: flex;
  flex: 0 0 auto;
  white-space: nowrap;
  align-items: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-2);
}
.composer-chip:hover { background: var(--hover); color: var(--text); }

/* Known is always this conversation's, so the chip is dashed by default — the
   same "not stored" language msg-profile--local speaks above. It goes solid
   when Personalize is on, i.e. when a saved profile is also in play. */
/* Known is always this conversation's, so its chip is dashed — the same "not
   stored" language msg-profile--local speaks above. */
.composer-chip#memories-button { border-style: dashed; }

/* Personalize reads as a switch: filled and solid when the saved profile is in
   play, outlined and dimmed when the conversation is running on its own. The
   .is-empty treatment above already dims it; this is the ON state. */
.composer-chip#personalize-button.is-on {
  border-color: var(--text);
  background: var(--bg-bubble);
  color: var(--text);
}

/* The count on the "Known" chip (functions/chat/memoriesPanel.js) — the thing that
   tells a visitor anything is being remembered at all. */
.composer-chip-count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  margin-right: -0.25rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  /* --accent-fg, NOT --accent-contrast: the latter does not exist, so it fell
     back to #fff — and --accent is #ffffff in this theme, which rendered the
     badge as a white circle with white text in it. */
  color: var(--accent-fg);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Nothing recorded: the chip recedes, but it KEEPS its count. A "0" says
   nothing is stored; an absent badge is indistinguishable from a broken one. */
.composer-chip.is-empty { color: var(--text-3); }
.composer-chip.is-empty .composer-chip-count {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
}
/* An author `display` beats the UA sheet's [hidden] rule whatever the
   specificity — the third place in this sheet that has to say so (see
   .view-page and .view-stat). EVERY chip ships `hidden` and is revealed by its
   own runtime, so without this a page whose JS never ran showed a dead control
   that opens nothing. */
.composer-chip[hidden] { display: none; }

/* THE PAGE EDITOR'S OUTCOME CHIP (pages/EmployerPage.jsx PageChat) — the same
   pill as Personalize and Memories, in the same slot, reporting the one thing
   this chat has to report: what became of the last instruction. Pressing it
   opens the detail in the shared menu (functions/employer/pageChat.js).
   THE COLOUR IS THE STATE, so each one restates border and text and lets the
   dot and the count follow via currentColor. A chip you have to read to know
   whether it went well would not be worth colouring at all. */
/* AT REST: dashed and grey, saying nothing has been changed. Dashed is the same
   word #memories-button speaks two rules above — nothing is being held — and
   the grey is .composer-chip.is-empty's, for a chip whose count is genuinely
   zero rather than unknown. */
.page-chat-chip.is-idle {
  border-style: dashed;
  color: var(--text-3);
}
/* AMBER IS THE WAIT, not a warning. This chip's amber says "in progress"
   because it sits between grey and green on the one path this editor has; a
   half-finished edit that needs the employer to answer something is RED with
   the failures, since both mean the same thing to the person reading them —
   the change they asked for is not on the page. */
.page-chat-chip.is-loading { color: var(--warn); border-color: var(--warn); }
.page-chat-chip.is-ok { color: var(--ok); border-color: var(--ok); }
.page-chat-chip.is-error { color: var(--danger); border-color: var(--danger); }
/* ⚠️ AMBER, AND NOT is-loading's amber. The editor replied — an answer, or one
   question back — so there is something to read and nothing has gone wrong.
   It borrows --warn rather than reusing the `is-loading` class because that one
   animates its dot (below), and a chip that pulses forever after a completed
   answer reads as a request that never finished.
   Employer surface only: nothing on ranked.jp renders .page-chat-chip. */
.page-chat-chip.is-reply { color: var(--warn); border-color: var(--warn); }

/* ── THE EDITOR'S OWN WORDS ────────────────────────────────────────────────
   Attached to the composer, above it, always visible. It exists because a reply
   used to live only inside the panel behind the chip, so an employer who asked
   a question got a correct answer and saw nothing but a small coloured pill.
   ⚠️ CLAMPED, and that is the load-bearing part. The composer is docked at the
   foot of the window; an unbounded answer would push it up the screen and move
   the control the employer is about to press. Four lines, then it scrolls
   inside itself. Employer surface only — nothing on ranked.jp renders this. */
.page-chat-reply {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--warn);
  border-radius: 0.75rem;
  background: rgba(245, 165, 36, 0.06);
}
.page-chat-reply-text {
  flex: 1;
  margin: 0;
  max-height: 6.2em;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.page-chat-reply-dismiss {
  flex: 0 0 auto;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  line-height: 1.55;
  cursor: pointer;
}
.page-chat-reply-dismiss:hover { color: var(--text); }
.page-chat-chip.is-acting.is-reply,
.page-chat-chip.is-acting.is-reply:hover { color: var(--warn); border-color: var(--warn); }
.page-chat-chip.is-acting.is-reply:hover { background: rgba(245, 165, 36, 0.12); }
/* The dot is the only thing that moves while waiting — the same pulse the
   chat's own activity line uses, so "working" looks the same on both surfaces. */
.page-chat-chip.is-loading .page-chat-chip-dot {
  animation: chat-pulse 1.1s ease-in-out infinite;
}
/* UNDO, beside the outcome it undoes. Not coloured: it is an action, and the
   colour on this row belongs to the state next to it — two coloured pills side
   by side and neither reads as the status. */
.page-chat-revert,
.page-chat-save { color: var(--text-2); }
.page-chat-revert:hover,
.page-chat-save:hover { color: var(--text); }
/* ⚠️ .page-chat-save IS GONE FROM THE MARKUP and its rules are kept: the chip
   absorbed it (pages/EmployerPage.jsx), and these still describe the shape the
   `is-acting` chip above borrows. Delete them only with that. */
/* Inert until there is something to put back — or, on Save, to write — and
   SHOWN that way rather than hidden, because before the first edit these
   buttons' job is to be seen, not pressed: someone about to let an assistant
   rewrite their page should be able to see the way back before they take the
   step, and someone typing on the page should know where the writing goes
   before they start. Dashed and grey so they read as a pair with the resting
   chip beside them ("No changes · ← Revert · ✓ Save changes") rather than as
   controls that have failed. */
.page-chat-revert[disabled],
.page-chat-save[disabled] {
  border-style: dashed;
  color: var(--text-3);
  cursor: default;
}
/* .composer-chip:hover would otherwise light them up like live controls. */
.page-chat-revert[disabled]:hover,
.page-chat-save[disabled]:hover { background: none; color: var(--text-3); }

/* ⚠️ THE CHIP IS ALSO THE SAVE BUTTON (2026-08-28), and `is-acting` is the
   state where it stops reporting and starts offering. It wears the same green
   as a completed save, deliberately: the two are one colour and two LABELS
   ("Save changes" against "Changes saved"), because they are the same subject
   at two moments, and a third colour on this row would be one more thing to
   learn for no more meaning. Solid, where the resting chip is dashed — that is
   the part that reads as pressable across the room.
   The count is the number of unsaved fields, painted by pageChat.js. */
.page-chat-chip.is-acting {
  border-style: solid;
  border-color: var(--ok);
  color: var(--ok);
}
.page-chat-chip.is-acting:hover {
  background: rgba(48, 164, 108, 0.12);
  color: var(--ok);
}

/* ⚠️ …UNLESS THE LAST ATTEMPT FAILED (2026-09-01). A failed save leaves the
   work UNSAVED, so `is-acting` is still true and the chip is still the button —
   correct, because pressing it is the retry. But the green above then painted
   over the error tone, and the only difference between "nothing has happened
   yet" and "your save was rejected" was a popover behind a press that saves
   instead of opening it. The pill said the same word in the same colour either
   way, so the surface's answer to a dead endpoint was silence.
   The LABEL stays the action's; only the colour carries the last attempt. The
   tint is --danger's own rgb, the way .view-btn--danger:hover carries --ok's. */
.page-chat-chip.is-acting.is-error,
.page-chat-chip.is-acting.is-error:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.page-chat-chip.is-acting.is-error:hover { background: rgba(229, 72, 77, 0.12); }

/* ⚠️ NO PUBLISH IN THIS ROW. It was here for a day, blue beside the green
   Save. The job page already had a Publish button beside Apply, and the two
   said the same word about different nouns — the listing against the edits —
   so there is one now, on the page, with both reasons to be live
   (functions/employer/jobControls.js JOB_CONTROLS_CSS, which is where its blue
   lives). --info stays declared above: it is that blue, and this sheet is where
   the surface's colours are named. */

/* …AND SAVE GOES GREEN THE MOMENT THERE IS SOMETHING TO SAVE. Enabled IS that
   condition and needs no class of its own: the button is live only while the
   page holds hand edits the server has not been told about (pageChat.js
   paintSave), so `:not([disabled])` already means "unsaved changes", and it
   goes grey again on the redraw that follows the write.

   ⚠️ It is the one coloured control on this row that is not the status chip,
   which the note above this pair deliberately avoided. The argument that
   changed: this green is not a second report of how the last edit WENT — it
   says something of yours is not stored YET, which is the page's state and not
   the server's. Grey said that so quietly that a page you had typed on looked
   exactly like one you had not.

   --ok is the outcome chip's own green, so pressing it hands the colour along
   to the chip beside it rather than introducing a second one. */
.page-chat-save:not([disabled]) {
  border-color: var(--ok);
  color: var(--ok);
}
/* Hover deepens the ground rather than the text — .composer-chip:hover paints
   --text over the label, which would drop the green exactly as it is pressed.
   The tint is --ok's own rgb, the way .view-btn--danger:hover carries
   --danger's. */
.page-chat-save:not([disabled]):hover {
  background: rgba(48, 164, 108, 0.12);
  color: var(--ok);
}

/* REVERT WEARS THE SAME LOGIC IN AMBER. Live means there is a step back to
   take; amber is what this surface already says for "in progress, not
   finished" (the loading chip, a draft's dot in the rail), which is exactly
   what an edit you can still take back is. Green beside amber also keeps the
   pair readable as one sentence — go forward, or go back — rather than as two
   alerts. */
.page-chat-revert:not([disabled]) {
  border-color: var(--warn);
  color: var(--warn);
}
.page-chat-revert:not([disabled]):hover {
  background: rgba(245, 165, 36, 0.12);
  color: var(--warn);
}

/* A DOT rather than a glyph in the icon slot. The two chips this copies use an
   icon to say what they are ABOUT; this one is always about the same thing, and
   what changes is how it went — which is a status light, not a subject. Same
   slot, same gap, so the pill's geometry is unchanged. */
.page-chat-chip-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
/* The badge takes the state's colour too — stated per state rather than as
   `currentColor`, which resolves to the BADGE's own colour (the base rule sets
   it to --accent-fg) and painted a near-black disc on a near-black chip. Its
   text keeps that inherited --accent-fg: white on light, near-black on dark,
   and legible on all three fills. */
.page-chat-chip.is-ok .composer-chip-count { background: var(--ok); }
/* It carries a TICK and nothing else (see functions/employer/pageChat.js — the
   Save state's count of unsaved fields went in 2026-09-01), so it wants a hair
   more size than the tabular digits the badge was built for. */
.page-chat-chip .composer-chip-count { font-size: 0.75rem; }
/* Nothing to confirm on the states that did not write. Left empty rather than
   removed so the element is always there to fill. */
.page-chat-chip .composer-chip-count:empty,
/* …and Publish's, for the same reason: an empty badge is a white disc, not an
   absent one (see the note on the base rule's colour above). It carries the
   number of unpublished fields and there is nothing to show when there are
   none. */
.page-chat-publish .composer-chip-count:empty { display: none; }

/* A removal row reads as an action on the fact, not a choice between facts, so
   its icon sits muted until hover rather than looking like a selected state. */
.menu-item .menu-icon { opacity: 0.55; }
.menu-item:hover .menu-icon { opacity: 1; }

.send-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-fg);
  transition: opacity 0.12s ease;
}
.send-btn:hover { opacity: 0.85; }
.send-btn[disabled] { opacity: 0.25; cursor: default; }
/* while streaming the same button stops generation */
.send-btn .icon-stop { display: none; }
body.is-streaming .send-btn .icon-stop { display: block; }
body.is-streaming .send-btn .icon-send { display: none; }

/* The standing disclaimer, at the foot of the column in BOTH states — under a
   running conversation's composer, and at the bottom of the screen on a first
   view. It is a sibling of .composer-region, not a child (see pages/Chat.jsx). */
.composer-note {
  flex: none;
  width: 100%;
  /* Positioned for the same reason .thread-scroll and .composer-region are: an
     IN-FLOW element loses to a positioned sibling whatever the markup order,
     so .chat-decor (absolute, z-index 0) painted straight over this strip —
     including over the fill below, which is why giving it a background alone
     changed nothing. z-index stays auto: DOM order then puts it after the
     decoration, which is all this needs. */
  position: relative;
  padding: 0 var(--thread-gutter) calc(0.5rem + env(safe-area-inset-bottom));
  /* Background per STATE, not one answer for both — the two views want
     opposite things from this strip and it used to carry the empty state's
     answer in both:
       • EMPTY: none. .composer-region is transparent there on purpose so
         .chat-decor shows through (see the note on that rule), and a fill here
         would lay an opaque band back across the bottom of exactly that view.
       • RUNNING: the page fill, below. .composer-region is opaque once there
         is a conversation, and this strip sits under it — so with no fill the
         black stopped at the composer's bottom edge and the decoration
         reappeared in the band behind this text, at every width. The fill
         carries the composer's own background down to the bottom of the
         screen, safe-area inset included (it is in this element's padding). */
  font-size: 0.75rem;
  color: var(--text-3);
  text-align: center;
}
body:not(.is-empty-thread) .composer-note { background: var(--bg); }

.suggestions {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: var(--thread-w);
  margin-top: 1rem;
}
.suggestion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  color: var(--text-2);
  transition: background 0.12s ease, color 0.12s ease;
}
.suggestion:hover { background: var(--hover); color: var(--text); }
.suggestion .chat-icon { color: var(--text-3); }

/* The two LINKS under the suggestions (Browse jobs / Hiring data). Same chip as
   a suggestion because they sit in the same stack and a second shape there
   would read as a second kind of thing — but they are <a>s, and what they do is
   leave the chat rather than fill the composer. The accent border is the tell:
   a suggestion is a question, these are destinations. Shown in the empty state
   only, like the suggestions above them. */
.suggestion-links {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
body.is-empty-thread .suggestion-links { display: flex; }

/* The careers-page field on employer Settings (functions/employer/settings.js).
   `.auth-input` is width-less by design — it is a stretched flex child inside
   `.auth-form` — and this one is not in a form, so it states its own. Capped
   rather than full-bleed: it holds a URL, and a field the width of a settings
   card reads as a textarea. */
.employer-source-input {
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
}
/* FILLED, where a suggestion is outlined. The chips above are all one quiet
   shape on purpose — they are prompts, and prompts should not compete with the
   composer — so an outline with a coloured icon was not enough to say that
   these two do something else entirely. Brand orange, the same accent the rail
   wears, and the icon rides the fill rather than carrying the colour alone. */
.suggestion--link {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-weight: 500;
  /* Square, against the pill every other chip on this surface wears — the site
     proper is built out of sharp-cornered cards, so this is the listing pages'
     shape appearing on the chat, on exactly the two controls that lead there. */
  border-radius: 0;
}
.suggestion--link:hover {
  /* Darkened rather than tinted: --brand on --hover's translucent white would
     shift hue against the black page. */
  background: #e57400;
  border-color: #e57400;
  color: #ffffff;
}
.suggestion--link .chat-icon { color: currentColor; }

/* =================================================================== menus */
.menu {
  position: fixed;
  z-index: 60;
  min-width: 15rem;
  max-width: min(22rem, calc(100vw - 1rem));
  padding: 0.375rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* The Known panel lists one row per recorded fact, so a full profile makes
     this taller than the window. menu.js caps the height to the room the chosen
     side actually has; this is what makes the overflow scrollable rather than
     unreachable. `contain` keeps the thread behind from scrolling once the menu
     hits its end. */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu-label {
  padding: 0.5rem 0.625rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
}
.menu-sep { height: 1px; margin: 0.25rem 0.25rem; background: var(--border); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  text-align: left;
}
.menu-item:hover:not(.is-disabled) { background: var(--hover); }
.menu-item.is-disabled { color: var(--text-3); cursor: default; }
.menu-icon { flex: none; color: var(--text-2); }
.menu-text { flex: 1 1 auto; min-width: 0; }
.menu-title { display: block; }
.menu-desc { display: block; font-size: 0.75rem; color: var(--text-3); }
.menu-check { color: var(--text-2); }

/* =============================================================== main view */
/* A view (Profile, Applications, Settings — later job listings, companies)
   takes over the CENTRE column, in place of the thread, with the composer
   still pinned below it. There is no second sidebar: the composer is meant to
   act on whatever the view is showing. See functions/chat/mainview.js. */
.main-view { display: none; }

body.view-open .thread { display: none; }
body.view-open .main-view { display: block; }
/* The composer belongs to the CHAT, not to the pages: a page is a page, and a
   message box under Settings only invites questions nothing can answer yet. */
body.view-open .thread-scroll { flex: 1 1 auto; }
body.view-open .composer-region { display: none; }
/* …with ONE page that earns one, and it earns it by answering about ITSELF:
   the employer Company page, where the composer edits the page above it
   (pages/EmployerPage.jsx PageChat → functions/employer/pageChat.js). The rule
   above is still right for Settings and the rest — this is not "pages get a
   composer back", it is one page whose composer is a control on its content.

   THREE classes on purpose, and each is load-bearing:
     • `view-open`  — outranks the `display: none` directly above it. Anything
                      less specific loses to it and the band never appears.
     • `has-page-chat` — added by pageChat.js only once /get-admin-company has
                      confirmed this account administers the company. A visitor
                      seeing the claim block is never shown an editor that would
                      403, and the markup ships on the page either way.
     • the modifier — so this can never reach the chat's own composer. */
body.view-open.has-page-chat .composer-region--page {
  display: flex;
  /* The chat's bottom spacing (and the phone's safe-area inset) lives in
     .composer-note, the strip BELOW its composer. This one has no note under
     it — there is no standing disclaimer to make about editing your own page —
     so it carries the inset itself, or a phone's home indicator sits on the
     send button. */
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
body.view-open .greeting,
body.view-open .suggestions { display: none; }
/* the jump-to-latest control belongs to the thread, not to a view */
body.view-open #scroll-bottom { display: none; }

/* top bar: the view's title replaces the model picker */
.view-heading {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.view-heading-title { font-weight: 600; padding-right: 0.5rem; }
/* The top-bar heading stays hidden even with a view open: every view now opens
   with the site's own header, which carries the wordmark and names the page an
   inch below, so the bar would only say it twice. The close button goes with it
   — the rail's Chat item and Escape both still leave a view
   (functions/chat/mainview.js), and its listener is bound to an element that is
   hidden rather than absent, so nothing breaks if this is lifted later. */
body.view-open #rail-open { display: none; }

/* profile-completion prompts on a page (functions/chat/views.js nudgeCards) */
.nudges:empty { display: none; }
.nudges { display: flex; flex-direction: column; gap: 0.5rem; }
/* the editor's live copy sits inside the card, so it needs its own spacing */
.view-row > .nudge { margin: 0.625rem 0 0; }
.nudge[hidden] { display: none; }
.nudge {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--warn);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.nudge-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  margin-top: 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--warn);
  flex: none;
}
.nudge--urgent { border-left-color: var(--danger); }
.nudge--urgent .nudge-dot { background: var(--danger); }
.nudge-title { font-size: 0.875rem; font-weight: 600; }
.nudge-body { margin-top: 0.125rem; font-size: 0.8125rem; line-height: 1.5; color: var(--text-2); }

/* --- the views themselves (functions/chat/views.js) */
/* Same reading column as the thread, so switching between a conversation and a
   view doesn't shift the page. */
.view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--thread-w);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* Both width modifiers must be declared AFTER .view: same specificity, so
   source order is the only thing that makes them win. (--narrow used to sit up
   with the rest of the auth styles, where .view silently overrode it and the
   sign-in form rendered at the full 48rem reading width.)
   A grid of job cards needs more room than that column; an auth form needs far
   less. */
.view--wide { max-width: 82rem; }
.view--narrow { max-width: 26rem; }
/* ⚠️ NO CAP AT ALL, for the views that ARE a detail page — the employer job and
   company pages, which draw the site's own two-column markup (a reading column
   beside a 20rem panel). On ranked.jp that layout is `.detail-page { width:
   100% }`: it takes whatever the rail gives back, deliberately, because a
   fixed-width panel in a 72rem box leaves the space beside it empty. Capped at
   82rem here it did exactly that — the same page, narrower, on the surface
   whose whole claim is "this job as candidates see it".
   The gutter comes from .view's own padding, which stays. */
/* ⚠️ AND NO PADDING OF ITS OWN. The content inside is the site's detail page,
   which carries its own gutter (`.hosted-job { padding: 1.5rem 1.5rem 2rem }`
   in global.css). The employer views used to zero THAT and keep this box's
   1rem instead, so the same page sat in a 16px gutter here and a 24px one on
   ranked.jp — the site's own measurement, overridden by the surface that
   exists to show the page as candidates see it. Now the site's padding is the
   only one, which is also one fewer number to keep in step. */
.view--full { max-width: none; padding: 0; }

/* The heading above a job grid (Jobs, Liked jobs), matching how the SITE's
   listing pages lead: an oversized rank-orange count over a muted title —
   global.css .results-count (3.8rem/0.9, bold) and .sidebar-title (1.1rem,
   muted). Those two views show the site's own cards, so they get the site's own
   heading grammar rather than a line of chat body text.
   Darker Grotesque is the face the CARDS below are set in, and it is available
   in this document: jobsView.js lifts the site sheet's @font-face blocks into
   the head (declaring a family styles nothing on its own, so the rest of the
   chat is untouched). The chat's own stack is the fallback, which is what shows
   for the moment before the site sheet arrives. */
/* The top of a job view: the site's listing-page header, then its counts. */
.view-lede { display: flex; flex-direction: column; gap: 1.5rem; }

/* Account and in-chat views use the site's real header.css component. */
.view-page { display: flex; flex-direction: column; }
/* An author `display` beats the UA sheet's [hidden] rule whatever the
   specificity — the same reason .view-stat[hidden] below has to say this. What
   needs it here is a server-rendered column that starts hidden: the employer
   Company page's claim block (pages/EmployerPage.jsx). */
.view-page[hidden] { display: none; }
.view-page > .view { padding-top: 1.25rem; }
/* …except a detail view, which takes none: the site's own page padding is
   inside it (see .view--full above). ⚠️ It has to sit AFTER the rule above —
   the two have identical specificity, so source order is the whole of what
   decides this, and declared alongside .view--full it lost. */
.view-page > .view--full { padding-top: 0; }
.view-head { --brand: orange; }
.view-head .account-header-nav :is(.location-toggle, .section-toggle) {
  cursor: default;
  pointer-events: none;
}
/* The counts sit side by side — the set, then whatever qualifies it. They wrap
   rather than squeeze on a narrow screen. `align-items: flex-start` keeps the
   two numbers on a shared top edge when one label wraps to two lines and the
   other does not. */
.view-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 2.5rem;
  row-gap: 0.75rem;
}
.view-stat { display: flex; flex-direction: column; }
/* An author `display` beats the UA sheet's [hidden] rule whatever the
   specificity, so hiding the second column needs saying here or it stays on
   screen as an empty gap. */
.view-stat[hidden] { display: none; }
/* The qualifying count keeps the shape but drops the brand colour, so the
   number the page is actually about stays the one thing that is orange. */
.view-stat--muted .view-count { color: var(--text-2); }
.view-count {
  font-family: "Darker Grotesque", var(--font-ui);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 0.9;
  /* The SITE's orange (global.css --brand is the `orange` keyword, #ffa500),
     not the chat's slightly redder #ff8000: this number sits directly above
     cards painted in the site's orange, and two shades touching read as a
     mistake. The chat's own --brand is left alone for the rest of the surface. */
  color: orange;
  /* Holds the line's height while the count is still blank, so the title below
     doesn't jump up and back down when the number arrives. */
  min-height: 3.42rem;
}
/* 1.1rem/500 at line-height 1 — .sidebar-title's exact figures. global.css sets
   `body { line-height: 1 }`, which this surface does not, so it is restated. */
.view-count-label {
  font-family: "Darker Grotesque", var(--font-ui);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-3);
}
/* Darker Grotesque carries no CJK, so Japanese copy falls back to a face that
   fills far more of its em box — at line-height 1 the glyphs sit against the
   edges, and a wrapped paragraph collides outright. global.css makes exactly
   these corrections in the site's own header, and this is that whole ladder,
   figure for figure: .header-info-desc 0.81rem/1.45, .location-toggle 1.55rem,
   .section-toggle 0.95rem. */
/* …and the FACE has to change with it, which is the part that was missing.
   Darker Grotesque carries no CJK, so a Japanese sentence set in it was drawn
   in TWO fonts at once: the kana and kanji fell back glyph-by-glyph to the UI
   stack while any Latin word inside them — "Ranked", a company name — stayed in
   Darker Grotesque. Two faces in one sentence never matched, and --ja-optical
   made it obvious: font-size-adjust normalises each font SEPARATELY, so the
   fallback JP face and Darker Grotesque got different scale factors and the
   Latin word came out visibly smaller than the Japanese around it.
   One face per sentence fixes both. This is what the site's own header does
   (styles/header.css) and what global.css does for the listing pages. */
html[lang="ja"] :is(.view-count, .view-count-label) {
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
}
html[lang="ja"] .view-count-label {
  line-height: 1.35;
}
/* The note is chat body text, not part of the site's heading: it carries state
   the listing pages have no equivalent for (a load error, "Loading…"). The
   negative margin pulls it up out of .view-lede's 1.5rem gap — that gap is the
   space between the header and the counts, not between the counts and a line
   that belongs to them. */
.view-count-note {
  margin-top: -1rem;
  font-size: 0.8125rem;
  color: var(--text-3);
}
/* Host of the shadow root that carries the site's card styles — see
   functions/chat/jobsView.js. Deliberately a custom element name, and
   deliberately styled with NOTHING but layout: anything declared here would
   beat the site's own page rules inside the shadow tree. */
ranked-cards { display: block; }
/* Keep the job/company card boxes at their original footprint while the rest
   of chat uses its 80% rem basis. Their readable CONTENT is enlarged inside
   the shadow tree by MESSAGE_CONTENT_PATCH in jobsView.js; scaling it there
   avoids making the card boxes themselves larger. */
html.chat-page .msg-jobs ranked-cards { zoom: 1.25; }
.view-more-row { display: flex; justify-content: center; padding: 1rem 0 0.5rem; }

.view-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 2.25rem 1rem 1.5rem;
  text-align: center;
}
.view-empty-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  background: var(--hover);
  color: var(--text-2);
}
.view-empty-title { font-weight: 600; }
.view-empty-body { font-size: 0.875rem; line-height: 1.6; color: var(--text-2); max-width: 26rem; }

.view-row {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.view-row--tight { padding: 0.75rem 1rem; }
.view-row-title { font-weight: 600; font-size: 0.9375rem; }
/* A row whose TITLE is the way into it (the employer Your jobs list → that
   job's own page). `a { color: inherit; text-decoration: none }` at the top of
   this sheet means it would otherwise be indistinguishable from the text it
   replaced, so the affordance is on hover and focus — a list of a hundred
   underlined titles is noise, and the row already reads as one unit. */
.view-row-link:hover,
.view-row-link:focus-visible { text-decoration: underline; }
.employer-source-link { overflow-wrap: anywhere; }
.view-row-title:has(.view-row-icon) { display: flex; align-items: center; gap: 0.5rem; }
.view-row-icon { display: flex; flex: none; color: var(--text-3); }
.view-row-body { margin-top: 0.75rem; }
.view-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* The connect page's permission groups (functions/chat/connectView.js): the
   switches for one consent, then that consent's exact sentence under them. */
.connect-group { display: grid; gap: 0.25rem; margin: 0.5rem 0 1rem; }
.connect-group > .switch-consent { display: block; margin-top: 0.25rem; }

/* "Earlier permissions" — the one section of Settings that is a DISCLOSURE, and
   the one only an EXISTING account is shown (functions/chat/views.js: it is
   drawn only when a legacy permission is actually on). It wears
   `.view-row-title` so it matches the four headings around it; what is left
   here is the disclosure itself — the UA marker off, ours on, and a pointer,
   since it is the only heading on the page that does anything when pressed. */
.view-summary { cursor: pointer; list-style: none; }
.view-summary::-webkit-details-marker { display: none; }
.view-summary::marker { content: ''; }
.view-summary-caret {
  display: flex;
  flex: none;
  /* Pushed to the far edge, where the switches are: the row reads
     heading … control, exactly like every switch row under it. */
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.15s ease;
}
details[open] > .view-summary .view-summary-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .view-summary-caret { transition: none; } }
.view-error { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--danger); }

/* Settings follows the profile: square black sections, fine borders and
   compact orange display headings. Scoped so chat and employer forms retain
   their own layout. Consent text remains visible beside each control. */
.view.settings-view {
  --brand: orange;
  max-width: 58rem;
  padding: 1rem 1.25rem 2rem;
  gap: 0.625rem;
  font-family: "Nunito", var(--font-ui);
}
.settings-view > .view-row {
  padding: 0.875rem 1rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: #000;
}
.settings-view .view-row-title {
  font-family: "Darker Grotesque", var(--font-ui);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--brand);
}
.settings-view .view-row-icon { display: none; }
.settings-view .view-row-desc,
.settings-view .switch-consent,
.settings-view .permission-details,
.settings-view .view-note {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-2);
}
.settings-view .view-row-desc { margin-top: 0.25rem; }
.settings-view .switch-title,
.settings-field-title { font-size: 0.875rem; font-weight: 600; line-height: 1.5; }
.settings-view .switch-row { gap: 1rem; padding: 0.625rem 0; }
.settings-view .switch-consent { margin-top: 0.25rem; max-width: 48rem; }
.settings-view .view-select,
.settings-view .view-btn {
  font-family: inherit;
  font-size: 0.8125rem;
  border-radius: 0;
  min-height: 2.25rem;
  padding: 0.375rem 0.625rem;
  max-width: 100%;
}
.settings-view .view-select {
  width: min(100%, 26rem);
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23969696' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.375rem center;
}
.settings-view .view-btn:focus-visible,
.settings-view .view-select:focus-visible,
.settings-view summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.settings-account { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1rem; }
.settings-account > .view-row-title { grid-column: 1 / -1; }
.settings-email { display: flex; align-items: center; gap: 0.5rem; min-width: 0; grid-column: 1; align-self: center; overflow-wrap: anywhere; font-size: 0.875rem; }
.settings-email-icon { position: relative; display: grid; place-items: center; flex: none; width: 24px; height: 24px; overflow: hidden; color: var(--text-2); }
.settings-email-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.settings-account > .view-row-body { grid-column: 2; grid-row: 2; margin: 0; }
.settings-field { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 0.625rem; margin-top: 0.25rem; }
.settings-public-profile { border-top: 1px solid var(--border); margin-top: 0.625rem; }
.settings-recruiter-detail { border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
.settings-view .view-row-body { margin-top: 0.5rem; }
.settings-account > .view-row-body { margin-top: 0; }
.settings-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; }
.settings-field > .view-row-desc { grid-column: 1; }
.settings-field > .view-row-body { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
.settings-view .permission-details { margin-bottom: 0.5rem; }
.settings-deletion { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 0.625rem; margin-top: 0.25rem; }
.settings-deletion-link { display: inline-block; margin-top: 0.5rem; color: var(--brand); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 0.2em; }
.settings-deletion-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.settings-view > [hidden] { display: none; }
.settings-view .nudges:empty { display: none; }
html[lang="ja"] .settings-view,
html[lang="ja"] .settings-view .view-row-title {
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
@media (max-width: 600px) {
  .view.settings-view { padding: 1rem 0.75rem 2rem; }
  .settings-view > .view-row { padding: 0.75rem; }
  .settings-field { display: block; }
  .settings-field > .view-row-body { margin-top: 0.5rem; }
  .settings-view .switch-row { gap: 0.75rem; }
  .settings-account { column-gap: 0.75rem; }
}

/* The placeholder a page whose content IS the account shows while the session
   lookup is out (viewSkeleton in functions/chat/views.js). Resume and Settings
   are the two, and they used to render their SIGNED-OUT state first and correct
   it a round-trip later — so the way into your own profile opened by telling you
   to create one.

   It borrows .view-row's exact box, because that is what lands in its place: the
   rows arrive into the shape already on screen instead of pushing a differently
   sized block out of the way. Nothing is shimmering across the content here —
   the rows ARE the content's outline, pulsing in place, the same treatment the
   rail's footer skeleton uses (styles/rail.css). */
.view-skeleton { display: flex; flex-direction: column; gap: 0.75rem; }
.view-skeleton-row {
  height: 5.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--hover);
  animation: view-skeleton 1.2s ease-in-out infinite;
}
/* Staggered, so the column reads as one object settling rather than four boxes
   blinking in lockstep. */
.view-skeleton-row:nth-child(2) { animation-delay: 0.12s; }
.view-skeleton-row:nth-child(3) { animation-delay: 0.24s; }
.view-skeleton-row:nth-child(4) { animation-delay: 0.36s; }
.settings-view .view-skeleton { gap: 0.625rem; }
.settings-view .view-skeleton-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  height: auto;
  padding: 0.875rem 1rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: #000;
}
.settings-skeleton-line { display: block; height: 0.75rem; width: 85%; background: var(--hover); border-radius: 0; }
.settings-skeleton-line:first-child { width: 8rem; height: 1.125rem; margin-bottom: 0.25rem; }
.settings-skeleton-line:last-child { width: 55%; }
.settings-skeleton-permissions .settings-skeleton-line:nth-child(4),
.settings-skeleton-account .settings-skeleton-line:nth-child(4) { margin-top: 1rem; }
@media (max-width: 600px) {
  .settings-view .view-skeleton-row { padding: 0.75rem; }
}
@keyframes view-skeleton { 50% { opacity: 0.45; } }

/* chips: Looking for / Offering, and the matching profile's values */
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.chip {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-2);
}
.vector-group + .vector-group { margin-top: 0.75rem; }
.vector-group-label { font-size: 0.75rem; font-weight: 600; color: var(--text-3); }

/* the editable matching profile (Resume → Matching profile).
   ONE scrollbar: the list runs at full length and the PAGE scrolls it. No inner
   scroll region — the default view is the ~20 active rows, and the long list
   only appears when you deliberately ask for it (search, or "only show active"
   off). What keeps it navigable is the sticky group headers and a save row that
   sticks to the bottom of the viewport. */
.vector-summary { margin-top: 0.5rem; font-variant-numeric: tabular-nums; }
.vector-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0.625rem;
}
.vector-filter {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 18rem;
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}
.vector-filter::placeholder { color: var(--text-3); }
.vector-filter:focus { outline: none; border-color: var(--border-strong); }
.vector-active-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}

.vector-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sidebar);
  /* NOT overflow:hidden — that would make this a scroll container and the
     sticky headings below would stick to it (i.e. never move) instead of to
     the page. The rows round their own corners instead. */
}
.vector-rows > .vector-group:first-child .vector-group-label {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.vector-rows > .vector-group:last-child .vector-row:last-child {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}
.vector-empty { padding: 1.25rem 0.875rem; font-size: 0.8125rem; color: var(--text-3); text-align: center; }

/* group headings ride along the top of the scroll so the list never loses its
   place while you are 200 rows deep */
.vector-group-label {
  position: sticky;
  /* below .vector-head, which is sticky at the top of the same scroll */
  top: 2.25rem;
  z-index: 1;
  padding: 0.5rem 0.875rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-sidebar);
}

.vector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-top: 1px solid var(--border);
}
/* no rule above a group's first row — the heading is the divider there */
.vector-group-label + .vector-row { border-top: 0; }
.vector-row:hover { background: var(--hover); }
.vector-row-label { min-width: 0; }
.vector-group[hidden], .vector-row[hidden] { display: none; }

/* Title + Save, stuck to the top of the page scroll. */
.vector-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.125rem 0 0.375rem;
  background: var(--bg);
}
.vector-head .view-btn { flex: none; }

/* (.switch--sm lived here — moved down to sit AFTER .switch, see the note
   there. It is the same source-order trap .view--narrow hit.) */

.view-select {
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}

/* consent switches (Settings → Emails & sharing) */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
}
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-text { flex: 1 1 auto; min-width: 0; }
.switch-title { display: block; font-size: 0.875rem; font-weight: 600; }
/* THE STATUS OF A PERMISSION WHOSE GRANT NO LONGER MEANS WHAT IT SAYS —
   "Retired", and only that today. Three rows carried a state inside their own
   TITLE ("— future", "— retired"), which made a label do a badge's job and read
   as an afterthought; the two future ones stopped claiming a state at all (they
   ask for the permission and say nothing about when it is used), and this is
   what the third needed all along (functions/chat/views.js permissionToggle).
   Sized BELOW the consent text rather than between it and the title: it is the
   least important thing on the row, and a badge that competes with the label it
   qualifies is a second heading. `vertical-align: middle` because it sits
   inside the title's own line box, so it centres on the text rather than
   sitting on its baseline. */
.switch-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.0625rem 0.375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  vertical-align: middle;
}
.switch-consent { display: block; margin-top: 0.125rem; font-size: 0.75rem; line-height: 1.5; color: var(--text-3); }
.switch-note { display: block; margin-top: 0.25rem; font-size: 0.75rem; color: var(--text-2); }
.permission-details { margin: 0 0 1rem; font-size: 0.8125rem; line-height: 1.6; }
.permission-details summary { width: fit-content; padding: 0.25rem 0; cursor: pointer; color: var(--text-2); }
.permission-details-body { margin-top: 0.5rem; color: var(--text-3); }
.permission-details-body p + p { margin-top: 0.75rem; }
.permission-actions { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; column-gap: 1rem; }
.permission-actions > .permission-details { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; grid-row: 1 / 3; min-width: 0; }
.permission-actions > .permission-details > summary { grid-column: 1; grid-row: 1; }
.permission-actions .permission-details-body { grid-column: 1 / -1; grid-row: 2; }
.permission-actions > .permission-details::details-content { grid-column: 1 / -1; grid-row: 2; }
.permission-actions > .permission-preview { grid-column: 2; grid-row: 1; justify-self: start; }
/* Match the Profile page's .talent-zone-link. */
.permission-preview { flex: none; padding: 0.25rem 0; font-family: 'Nunito', sans-serif; font-size: 0.78rem; font-weight: 400; line-height: 1.5; color: var(--brand); text-decoration: none; }
.permission-preview:hover { text-decoration: underline; }
.permission-preview:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.switch { position: relative; flex: none; width: 2.25rem; height: 1.25rem; margin-top: 0.125rem; }
.switch-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background 0.15s ease;
  pointer-events: none;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  transition: transform 0.15s ease;
}
.switch-input:checked + .switch-track { background: var(--brand); }
.switch-input:checked + .switch-track::after { transform: translateX(1rem); }
.switch-input:disabled + .switch-track { opacity: 0.5; }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--border-strong); outline-offset: 2px; }

/* The SMALL switch — "Only show active" on the Resume page's matching profile
   (functions/chat/views.js) and the consent rows in auth.js.
   It MUST be declared after .switch, same trap .view--narrow hit above: the
   modifier and the base are both one class, so source order is the only thing
   that decides. Sitting further up the file it lost the TRACK to .switch and
   rendered at the full 2.25×1.25rem — while its knob rules, being two classes,
   still won. A 0.625rem knob travelling 0.75rem inside a 2.25rem track is what
   that looked like: a small dot stopping well short of the right-hand end. */
.switch--sm { width: 1.75rem; height: 1rem; }
.switch--sm .switch-track::after { width: 0.625rem; height: 0.625rem; top: 0.1875rem; left: 0.1875rem; }
.switch--sm .switch-input:checked + .switch-track::after { transform: translateX(0.75rem); }
.view-row-desc { margin-top: 0.125rem; font-size: 0.8125rem; line-height: 1.5; color: var(--text-3); }
.consent-review { display: flex; flex-direction: column; gap: 0.75rem; }
.consent-review .view-row-desc { margin: 0; }
.consent-review-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.8125rem; }
.consent-review-links a { text-decoration: underline; text-underline-offset: 0.2em; }
.consent-review-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
}
.consent-review-choice input { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; margin-top: 0.0625rem; accent-color: var(--brand); }
.consent-review-choice span { min-width: 0; overflow-wrap: anywhere; }
.consent-review-choice:has(input:focus-visible) { outline: 2px solid var(--border-strong); outline-offset: 2px; }
.consent-review .view-btn { align-self: flex-start; white-space: normal; }
.consent-review-status { font-size: 0.875rem; color: var(--text-2); }
.view-row.consent-review > :last-child { margin-top: 0; }
.view-row > :last-child { margin-top: 0.75rem; }

.view-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.view-fact-label { color: var(--text-3); flex: none; }
.view-fact-value { text-align: right; }

.view-note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-3);
}

.view-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  transition: background 0.12s ease;
}
.view-link:hover { background: var(--hover); }
.view-link-icon { color: var(--text-3); }

.view-btn {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text);
}
.view-btn:hover { background: var(--hover); }
.view-btn[disabled] { opacity: 0.5; cursor: default; }
/* Save, once there IS something to save: filled, with a soft ring that draws
   the eye without moving anything. */
.view-btn--attention {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 55%, transparent);
}
.view-btn--attention:hover { opacity: 0.9; background: var(--accent); }

.view-btn--primary[disabled] {
  background: none;
  color: var(--text-3);
  border-color: var(--border);
  opacity: 1;
}
.view-btn--primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.view-btn--primary:hover { opacity: 0.85; background: var(--accent); }
.view-btn--danger { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }
.view-btn--danger:hover { background: rgba(229, 72, 77, 0.1); }

/* ── APPLICANT CARDS (functions/employer/applicants.js) ────────────────────
   The one place on this surface that draws a card the site has no renderer
   for. An application is not a `jobs` row, so it cannot go through
   jobCardGrid() and the site's own sheet — but it is READ the way a listing
   is: a wall of small cards an employer scans, picks one out of, and acts on.
   So it borrows the listing grid's geometry (the two numbers below are
   `.container`'s own, from styles/global.css — same column, same gutter, so
   the two pages read as one product) and this surface's own `.view-row` box
   for the card itself, rather than inventing a third look.

   It was one FULL-WIDTH row per application, every answer a `.view-fact` —
   complete, and unreadable past three of them: a posting with a dozen
   applicants was a page you scrolled rather than a page you scanned. What the
   card keeps is everything that row held; what changed is that the vocabulary
   answers are chips (the job card's own tag row) instead of a stack of
   label/value lines. */
.applicant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5375rem, 1fr));
  gap: 0.6rem;
}
/* ⚠️ NO `grid-auto-rows` — the floor is on the CARD instead. The listing sets
   the row height because every cell in it is a card; this grid also holds the
   per-job headings below, and a row height would make each of those a 180px
   band of empty space. */
.applicant-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 11.25rem;
  /* Even on all four sides, so the space above the verified mark reads as the
     same gap as the space to the left of it. */
  padding: 0.875rem;
  min-width: 0;
  /* ONE definition of "receded", used by the three things on the card that are
     not what an employer came to read: the contact line, the applied date, and
     the headings over the answers. `--text-3` is already the dimmest token this
     sheet has and all three sit below it, so this mixes toward the page —
     which, unlike a hard-coded grey, still means "recedes further" in the
     light theme. Declared here rather than three times because three greys
     that drift apart are three different answers to one question. */
  --applicant-quiet: color-mix(in srgb, var(--text-3) 72%, var(--bg));
}
/* `.view-row > :last-child { margin-top: 0.75rem }` is written for a stack of
   <p>s; this box spaces itself with `gap`, and the two together put a stray
   12px under the last card in every column. */
.applicant-card > * { margin: 0; }

/* The heading over one job's applications on the All page, and the job's own
   name on a single-job page: a cell of the SAME grid rather than a band above
   it, so a posting and the people who answered it stay one block.
   `1 / -1` and not `span N`, for the reason .company-hiring-fact--list gives
   in styles/global.css: a span against a grid auto-fill has resolved to one
   track invents a second one, and the row then runs past the page. */
.applicant-group-head { grid-column: 1 / -1; }

/* THE HEAD: the verified mark, and beside it the name over the address. This
   is the site's own job card header — a logo to the left of a stacked title and
   company — rather than three stacked rows, so the name and the address share a
   left edge and the mark reads as being about the person rather than about
   either line.
   ⚠️ TWO BOXES, ANSWERING TWO QUESTIONS. `.applicant-head` is "how tall is
   this block on every card" — a line of name over two lines of contact, the
   same type scales those elements declare for themselves — which is what keeps
   the facts grid below level whatever an applicant actually gave.
   `.applicant-head-row` is "what is the corner control level with", and it hugs
   the text.

   They were ONE box, and a one-line address then split the box's slack ABOVE
   and below the text — pushing the name down the card for no reason. Split in
   two, the row sits at the top and all the slack falls underneath it, where
   nothing is looking.

   `flex-start`, so the resume control's first line sits on the NAME's line
   rather than floating down beside the address. */
.applicant-head {
  min-width: 0;
  min-height: calc(0.875rem * 1.4 + 2 * 0.6875rem * 1.4);
  /* A hairline between who this is and what they answered. Fainter than
     `--border` — mixed most of the way out — because it is separating two parts
     of one card, not two cards: at full strength it reads as a rule and the
     card starts to look like a table. It hangs off the HEAD's bottom rather
     than the facts' top so it lands below the reserved height, in the slack,
     instead of tight against the JAPANESE label. */
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.applicant-head-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}
.applicant-head-text { flex: 0 1 auto; min-width: 0; }
/* A long name is cut rather than wrapped to three lines — the card's other
   five regions are what the employer is here to compare. */
.applicant-name-text {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.applicant-sub { font-size: 0.75rem; line-height: 1.4; color: var(--text-3); }

/* ── THE TWO QUIET LINES ──────────────────────────────────────────────────
   How to reach them (under the name) and when it arrived (under the answers).
   One rule, because they are one decision: both are things an employer reads
   AFTER picking somebody out, and neither should compete with the name above
   or the facts grid between them.

   Smaller than everything around them and mixed toward the page, because
   `--text-3` is already the dimmest token this sheet has and these have to sit
   below it. Mixing toward `--bg` rather than hard-coding a grey is what keeps
   "recedes further" true in the light theme as well as the dark one. */
.applicant-contact,
.applicant-applied {
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--applicant-quiet);
}
/* Right-aligned, so the card's last line sits under the resume icon in the
   corner rather than under the status control. The two things on that side are
   both about the APPLICATION — the file it arrived with, and when it arrived —
   while the left side is the employer's own decision about it. */
.applicant-applied { text-align: right; }
/* ⚠️ AT MOST TWO LINES. This block sits ABOVE the facts grid, so its height
   helps decide where JAPANESE starts; left to its content it is one line for
   `sam@example.com` and three for an address plus a phone plus a ward plus a
   GitHub link, and the columns the grid exists to line up stopped lining up
   within a row. The matching FLOOR is on `.applicant-head` rather than here —
   see the note there for why the difference matters.

   The ceiling costs something real: the fourth item on a very full line is
   clipped. That is why the whole line is repeated in the <p>'s own `title`
   (functions/employer/applicants.js contactLine) — and why the clamp is
   VISUAL only. The parts are still in the DOM with their own accessible names,
   so nothing is hidden from a screen reader.

   `anywhere` because an address or a portfolio URL is routinely wider than a
   248px column, and a card that overflows its track breaks the grid. */
.applicant-contact {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.applicant-contact a:hover { color: var(--brand); }

/* ── WHERE THE APPLICATION IS IN THE PROCESS ──────────────────────────────
   The status was only ever the value of a dropdown at the foot of the card, so
   "which of these have I dealt with" meant reading every one of them. The left
   edge answers it for a whole page at once — the site's own job card is
   colour-edged by rankScore for exactly this reason.

   BRAND for a new one, because the count the rail prints beside Applicants
   counts precisely those, and an employer who followed that number here should
   find it in the colour they followed. Green for shortlisted — this surface's
   "kept" colour. Nothing for rejected: it recedes instead, because a decision
   already taken is not a warning and `--danger` red under a person's name
   would read as one. */
/* ⚠️ SQUARE, which is the site job card's own `border-radius: 0` (`.card` in
   styles/global.css) and not a softened version of it. This grid is the
   listing's geometry — same column, same gutter — and a rounded cell in it read
   as a chat row that happened to be card-shaped. The heading squares with them:
   it is a cell of this grid, so a rounded one would be the only curve left in
   the block.

   It is the one place on this surface that leaves `--radius-lg` behind, and
   deliberately: everything else here is a chat control, while these are
   listings. */
.applicant-card,
.applicant-group-head { border-radius: 0; }
.applicant-card { border-left-width: 2px; }
.applicant-card[data-status="new"] { border-left-color: var(--brand); }
.applicant-card[data-status="shortlisted"] { border-left-color: var(--ok); }
/* Brightens on hover, the same "dimmed is not hidden" rule the employer ghosts
   follow (functions/employer/ghostCss.js) — a rejected application is still a
   record, and reading one must not mean undoing the decision first. */
.applicant-card[data-status="rejected"] { opacity: 0.55; transition: opacity 0.12s ease; }
.applicant-card[data-status="rejected"]:hover,
.applicant-card[data-status="rejected"]:focus-within { opacity: 1; }

/* WHEN that decision was taken — `statusAt`, which the row has always carried
   and nothing has ever shown. Empty on a `new` card, where nobody has decided
   anything yet, and an empty line must take no room. */
.applicant-status-line {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-3);
  text-align: right;
}
.applicant-status-line:empty { display: none; }
.applicant-card[data-status="shortlisted"] .applicant-status-line { color: var(--ok); }

/* The same three colours on the group heading's breakdown, which is what makes
   the edges above readable as a code rather than as decoration. Outlined and
   tinted, never filled: this is a count, not a control. */
.applicant-tally[data-tone] {
  color: var(--tone);
  border-color: color-mix(in srgb, var(--tone) 45%, transparent);
}

/* ── THE ANSWERS, AS HEADINGS OVER VALUES ─────────────────────────────────
   Japanese, English and work authorization. This is the site's own job card
   tag row (`.tag` / `.tag-text` in styles/global.css — plain text laid out in a
   grid, no pill) rather than anything new.

   ⚠️ FIXED COLUMNS ARE THE WHOLE POINT. These were chips, and three pills of
   one size and colour make three different questions look like one kind of
   thing: the only way to tell them apart is to read them, and the words move
   from card to card because a pill is as wide as its contents. A grid puts
   Japanese in the top-left cell of every card on the page, so comparing eight
   applicants is running an eye down a column.

   TWO columns, not the listing's three: a 248px card leaves ~110px a column
   here, and at a third of that the honest short forms of these answers
   ("Sponsorship needed") wrap to three lines. */
.applicant-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.75rem;
  /* ⚠️ THE BLOCK IS SPACED EVENLY, WHICH TAKES TWO DIFFERENT NUMBERS. Above it
     is the head, whose reserved height leaves ~15px of slack under a one-line
     address on top of the card's own 6px gap; below it is a plain 6px gap. So
     the top eats part of that gap back and the bottom adds to it, and the block
     ends up sitting in about 17px of air on both sides.
     They are NOT symmetric values because the space they are correcting is not
     symmetric — the alternative was shrinking the head's reserve, which is the
     one thing keeping this grid's rows level across a row of cards. */
  /* The line sits the height of one contact line above this (that slack is what
     the head reserves and does not use), so the same distance goes below it and
     the hairline ends up centred between the address and the labels. Minus the
     card's own 0.4rem gap, which is already there. */
  margin-top: calc(0.6875rem * 1.4 - 0.4rem);
  margin-bottom: 0.65rem;
}
.applicant-fact { min-width: 0; }
/* The work authorization answers are derived from first-person sentences and
   their shortest honest form is still three words, so they take the row. Set
   per FIELD and never per value — deciding it from the text would make the
   grid change shape depending on who applied. */
.applicant-fact--wide { grid-column: 1 / -1; }
/* ⚠️ THE HEADING IS NOT THE FACT. It exists to say which question the value
   below it answers, and once an employer has read a card or two it has done
   that job — so it goes as small and as quiet as it can while staying legible:
   0.5rem is the site's own job card tag label (`.tag` in styles/global.css) at
   a comparable grey, which is the precedent for this exact size. The weight and
   the letter-spacing stay — at 8px, uppercase without either is a smudge.
   The VALUE keeps its own size and full-strength colour: that is the thing
   being compared down the column. */
.applicant-fact-label {
  display: block;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--applicant-quiet);
}
.applicant-fact-value {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text);
}

/* ── THE STATUS DOT, in all three places a status appears ─────────────────
   The card's control, the rows of the menu it opens, and the group heading's
   tally. One rule set, because they are one vocabulary: a colour that means
   "shortlisted" in the menu and something else on the card would be worse than
   no colour at all.

   `--tone` is resolved from the value and then used by whatever needs it, so
   each status is named once. Rejected is RED here and only here: in a list of
   three choices the third needs to be as legible as the other two, whereas on
   the card itself a decision already taken is not an alarm and recedes instead
   (see .applicant-card[data-status="rejected"] above). */
[data-tone="new"] { --tone: var(--brand); }
[data-tone="shortlisted"] { --tone: var(--ok); }
[data-tone="rejected"] { --tone: var(--danger); }

.applicant-dot,
.menu-item[data-tone]::before {
  content: '';
  flex: none;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: var(--radius-pill);
  background: var(--tone, var(--text-3));
}
/* The menu's own rows already have an icon slot; a tone row has no icon, so
   the dot takes that column and lines up with the titles beside it. */
.menu-item[data-tone] { padding-left: 0.75rem; }

/* The trigger: the dot, the status, and a chevron saying it opens. Sized to
   sit beside the Download button rather than to fill the row — the button
   takes the space this leaves (see .applicant-foot .view-btn--sm above). */
.applicant-status-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  /* Square, like the card it sits in — `view-btn`'s pill is the chat surface's
     shape and this control is furniture on a listing. The MENU it opens keeps
     its own radius: that is the shared popover (functions/chat/menu.js), which
     the model picker and the account menu also open, and it is not part of the
     card. */
  border-radius: 0;
  /* Matched to the resume icon's box, so the two controls share a baseline
     across the row instead of one floating against the other. */
  min-height: 2rem;
}
.applicant-status-text { white-space: nowrap; }
.applicant-status-caret { display: flex; color: var(--text-3); }

/* The group heading's breakdown keeps the pill, because a count beside a label
   IS a chip-shaped thing — it is a legend, not an answer. */
.applicant-tally-row { margin: 0; gap: 0.3rem; }
.applicant-tally-row .chip {
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.5;
  white-space: nowrap;
}


/* ⚠️ CLAMPED, WITH THE WHOLE OF IT IN THE TITLE. There is no detail page for
   an application to open — the card is the record — so the text must not be
   truncated with no way back to it. Four lines is what the site's own card
   description clamps to (styles/global.css .job-description). */
/* Ruled like a quotation, because that is what it is — the one region on the
   card that is the applicant's own prose rather than a field they picked from
   a list. Unruled it was a third paragraph of grey text under two others. */
.applicant-message {
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-3);
  white-space: pre-wrap;
}

/* The two controls, pinned to the bottom edge whatever the card above them
   holds — the job card's footer rule, and the reason cards in a row stretch to
   the tallest instead of each ending where its content does. */
/* ONE ROW, pinned to the card's floor: the status control, and a right-hand
   COLUMN holding the two dates. `flex-end`, so the pill's bottom edge lands on
   the same line as the applied date's — the row then has one baseline at the
   bottom instead of one at the top and a ragged tail below it.
   (`.applicant-foot-wrap` used to sit around this holding the status date above
   the row; the date moved into the column, so the wrapper had nothing left to
   do and its `margin-top: auto` came here.) */
.applicant-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.25rem;
}
.applicant-foot-end {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 0;
}
.view-select--sm { padding: 0.25rem 0.4375rem; font-size: 0.75rem; }
.view-btn--sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
/* THE RESUME, as one glyph and nothing else — no pill, no outline. It is the
   card's only affordance that is a plain link-like act (fetch a file), while
   the status control beside it is the one that CHANGES something, so the two
   should not wear the same button. Brand-coloured, which is what marks it as
   pressable now that the border is gone.

   Greyed and inert when there is no file: the same "one mark, two strengths"
   treatment the verified tick uses, and for the same reason — an absent control
   cannot be told from a broken one. */
/* Brand-coloured, which is what marks it as pressable now that neither a border
   nor a word is doing it. */
.applicant-resume {
  flex: none;
  /* Pushed to the head row's far end — the card's top-right corner. */
  margin-left: auto;
  display: grid;
  place-items: center;
  /* ⚠️ THE TWO CORNER MARKS TRADED SIZES with their corners. This is the
     control an employer reaches for, so it is the bigger of the two — 28px, the
     footprint the verified tick used to have beside the name. */
  height: 1.75rem;
  padding: 0;
  color: var(--brand);
  transition: opacity 0.12s ease;
}

.applicant-resume:hover { opacity: 0.7; }
/* No border to fade, so the disabled state is the glyph's own strength — the
   button disables itself for the moment the signed URL is being minted. */
.applicant-resume[disabled] { opacity: 0.4; cursor: default; }
.applicant-resume--none { color: var(--applicant-quiet); cursor: default; }
/* The error line is present from the first frame — the status control and the
   resume button both write into it — so it must take no room until it says
   something, or every card carries a blank row under its footer. */
.applicant-card .view-error { font-size: 0.75rem; }
.applicant-card .view-error:empty { display: none; }

.segmented {
  display: inline-flex;
  padding: 0.1875rem;
  border-radius: var(--radius-pill);
  background: var(--hover);
}
.segment {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-2);
}
.segment.is-on { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-sm); }

/* ============================================================== responsive */
@media (max-width: 62rem) {
  /* The rail turns into an overlay drawer at this width — that behaviour is
     shared with the site and lives in styles/rail.css. */

  /* Touch targets: 34px rows are fine for a cursor, not for a thumb. */
  .icon-btn { width: 2.75rem; height: 2.75rem; }

  /* The THREAD is deliberately absent: its gutter is --thread-gutter at every
     width. It used to drop to 0.75rem here — narrowing the one margin a phone
     actually has, and only on the thread, so it stopped lining up with the
     composer below it. */
  .view { padding-left: 0.75rem; padding-right: 0.75rem; }
  .msg--user .msg-body { max-width: 85%; }
  /* Mirror the visitor's mobile measure: their message sits against the right
     edge, the answer sits against the left, and both stop at the same width.
     Job/company parts live inside .msg-body, so the same cap keeps their cards
     from spanning the whole conversation column too. Desktop answers retain
     the full reading measure above. */
  .msg--assistant { align-items: flex-start; }
  .msg--assistant .msg-body { width: 85%; max-width: 85%; }
  .greeting h1 { font-size: 1.375rem; }
  .composer-region { padding-bottom: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  /* The blanket rule above only makes an INFINITE animation run infinitely fast,
     which is worse than none — so the ones that loop are turned off outright and
     given the resting appearance they animate around. (The paced text reveal is
     JS and checks the same preference itself; see thread.js.) */
  .msg-body.is-streaming .md > *:last-child::after,
  .msg-activity-dot,
  .msg-activity-label,
  .view-skeleton-row,
  .cards-skeleton-card { animation: none !important; }
  /* The chip's dot pulses while a request is in flight; without the loop it
     simply stays lit, which still reads as "in progress" beside the word. */
  .page-chat-chip.is-loading .page-chat-chip-dot { animation: none !important; opacity: 1; }
  .msg-activity-label {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-2);
  }
  .cards-skeleton-card { background: var(--bg-bubble); }
}

/* Employer connected careers pages. */
.employer-company-settings { min-width: 0; }
.employer-sources, .employer-source-request { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border, #383838); }
.employer-sources-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.employer-sources-heading .view-row-title { margin: 0; }
.employer-source-count { padding: .1rem .45rem; border-radius: .4rem; background: rgba(150,150,150,.12); font-size: .75rem; }
.employer-source-list { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .5rem; }
.employer-source-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.employer-source-link { min-width: 0; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.5; text-decoration: underline; text-underline-offset: .2em; }
.employer-source-badge { display: inline-block; flex-shrink: 0; padding: .2rem .5rem; border-radius: .4rem; background: rgba(48,164,108,.12); color: #72d9a4; font-size: .72rem; line-height: 1.5; }
.employer-source-badge.is-paused { background: rgba(150,150,150,.12); color: inherit; }
.employer-source-badge.is-pending { background: rgba(245,165,36,.12); color: #f5c36e; margin: .5rem 0; }
.employer-source-empty { margin: .75rem 0 0; font-size: .85rem; line-height: 1.5; opacity: .8; }
.employer-source-url { overflow-wrap: anywhere; font-size: .85rem; line-height: 1.5; margin: .35rem 0; }
.employer-source-label { display: grid; gap: .4rem; margin-top: .85rem; font-size: .8rem; }
.employer-source-label .employer-source-input { max-width: none; }
.employer-source-actions { margin-top: .75rem; }
@media (max-width: 600px) {
  .employer-source-item { flex-direction: column; gap: .5rem; }
  .employer-source-actions .view-btn { width: 100%; }
}

/* The signed-out account pages (functions/signedOut.js) — identical in
   global.css and chat.css. Owner's option "A", 2026-10-29. */
.signed-out { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.25rem; box-sizing: border-box; }
/* SIZED LIKE THE HOMEPAGE HERO (owner, 2026-10-29), in px because the
   pages carrying this block set different root sizes: the headline (84px,
   0.9; ~14vw on a phone), the lead, and the email box — 352px, the field
   ABOVE a full-width button, the same paddings. Phone values below follow
   home.css's own <=36rem block. */
.signed-out-title { margin: 0 0 24px; font-family: 'Darker Grotesque', sans-serif; font-weight: 700; font-size: min(84px, 14vw); line-height: 0.9; color: #fff; text-wrap: balance; }
.signed-out-lead { margin: 0 auto; max-width: 480px; font-family: 'Nunito', 'Hiragino Sans', sans-serif; font-size: 17.6px; line-height: 1.5; color: #c4c4cc; }
.signed-out-slot { width: 100%; max-width: 352px; margin: 32px auto 0; }
.signed-out-form { display: grid; gap: 8px; text-align: left; }
.signed-out-row { display: flex; flex-direction: column; gap: 8px; }
/* The homepage's email box: a white field (16px text, so iOS does not zoom)
   and the orange button, square like every Ranked control. */
.signed-out .signed-out-input { flex: none; width: 100%; min-width: 0; box-sizing: border-box; margin: 0; padding: 10.4px 14.4px; font: 16px/1.2 'Nunito', 'Hiragino Sans', sans-serif; color: #111; background: #fff; border: 1px solid #fff; border-radius: 0; outline: 0; }
.signed-out .signed-out-input:hover, .signed-out .signed-out-input:focus, .signed-out .signed-out-input:not(:placeholder-shown) { background: #fff; color: #111; border-color: #fff; }
.signed-out .signed-out-input::placeholder { color: #777; }
.signed-out-submit { flex: none; width: 100%; padding: 11.2px 17.6px; font: 700 15.2px/1.2 'Nunito', 'Hiragino Sans', sans-serif; color: #fff; background: #ff8000; border: 1px solid #ff8000; border-radius: 0; cursor: pointer; white-space: nowrap; }
.signed-out-submit:hover { filter: brightness(1.1); }
.signed-out-submit:disabled { opacity: 0.6; cursor: default; }
.signed-out .auth-consent { display: flex; gap: 0.5rem; align-items: flex-start; font: 0.85rem/1.45 'Nunito', 'Hiragino Sans', sans-serif; color: #c4c4cc; }
.signed-out .auth-consent a { color: #fff; }
.signed-out .auth-message { margin: 0; font: 0.9rem/1.45 'Nunito', 'Hiragino Sans', sans-serif; color: #c4c4cc; }
.signed-out .auth-message--error { color: #ff8a80; }
.signed-out-fine { max-width: 352px; margin: 8px auto 0; font-family: 'Nunito', 'Hiragino Sans', sans-serif; font-size: 13.12px; line-height: 1.5; color: #8f8f8f; }
/* Japanese: the face and line height only — its size comes from the
   --ja-optical lever like every Japanese element on this sheet. */
html[lang="ja"] .signed-out-title { font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif; line-height: 1.15; }
/* Phones, as home.css <=36rem (its root is 13px there): the box at 82% of
   the column, the field's 16px text DRAWN at 80% (iOS zooms on anything
   smaller), the smaller button and small print. */
@media (max-width: 576px) {
  html[lang="ja"] .signed-out-title { line-height: 1.3; }
  .signed-out-lead { font-size: 12.6px; max-width: 82%; }
  .signed-out-slot { width: 82%; margin-top: 20.8px; }
  .signed-out-row { gap: 6.5px; }
  .signed-out .signed-out-input { width: 125%; height: 44px; padding: 0 12.35px; transform: scale(0.8); transform-origin: 0 0; margin-bottom: -8.8px; }
  .signed-out-submit { font-size: 11.44px; padding: 9.1px 13px; }
  .signed-out-fine { font-size: 10.4px; max-width: 82%; }
}
