/*
 * Just Works components — the canonical definitions for every shared piece of
 * UI. The live site and the /design viewer load this exact file, so a change
 * here shows up in both. Nothing in this file may hardcode a color, radius,
 * or duration: read component tokens from tokens.css instead.
 *
 * Contents: layout · brand · typography · buttons · chips · cards · forms ·
 * status · theme toggle.
 */

/*
 * Geist Variable carries the headings. One variable file covers weights
 * 100-900, self-hosted, OFL. Latin and Latin Extended are split so the
 * browser only fetches the second file if the page needs those glyphs.
 */
/* Syne carries the display voice while the type lab review runs. */
@font-face {
  font-family: "Syne Variable";
  src: url("/fonts/syne-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Variable";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist Variable";
  src: url("/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* Links carry colour and weight, never underlines: this reset lives in the
   design system so every page that loads components.css gets it, not just
   the app shell. */
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------ */

.shell {
  width: var(--jw-container);
  margin: 0 auto;
}

.stack {
  display: grid;
  gap: var(--jw-space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--jw-space-3);
}

/* ---------------------------------------------------------------------------
 * Brand
 * ------------------------------------------------------------------------ */

/* Fixed to the viewport, with no band, rule, or blur: just the logo and the
   controls floating over the page. Padding matches the shell gutter so the
   mark stays in line with the content below it. */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--jw-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--jw-space-4);
  padding-inline: calc((100% - var(--jw-container)) / 2);
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: var(--jw-z-sticky);
  /* The bar spans the full width but is mostly empty and see-through. Without
     this it swallows clicks on everything that scrolls underneath it. Its own
     controls opt back in below. */
  pointer-events: none;
  transition:
    background var(--jw-duration-slow) var(--jw-ease-out),
    border-color var(--jw-duration-slow) var(--jw-ease-out),
    box-shadow var(--jw-duration-slow) var(--jw-ease-out);
}

/* Once the page has scrolled, the bar earns a translucent ground and a blur
   so content passing underneath stays legible. Toggled by /js/ds/nav.js. */
.topbar.is-scrolled {
  pointer-events: auto;
  background: var(--jw-topbar-scrolled-bg);
  border-bottom-color: var(--jw-topbar-scrolled-border);
  box-shadow: var(--jw-topbar-scrolled-shadow);
  -webkit-backdrop-filter: blur(var(--jw-topbar-blur));
  backdrop-filter: blur(var(--jw-topbar-blur));
}

/* The bar no longer occupies flow, so the page reserves its height. Views
   that hide the bar (the public nsite and legacy target pages) opt out. */
body:not(.mode-nsite):not(.mode-target) main.shell { padding-top: var(--jw-topbar-height); }

.brand,
.nav {
  display: flex;
  /* Wordmark optically centred against the icon. */
  align-items: center;
  gap: var(--jw-space-3);
  /* Opt back in: the bar itself is click-through. */
  pointer-events: auto;
}

.brand > span:last-child { line-height: 1; }

.brand {
  color: var(--jw-text-primary);
  font-size: 1.05rem;
  font-weight: var(--jw-weight-black);
}

/* The mark is a conic sweep of the four brand hues, punched out by an inset
   ring in the page ground so it reads as a monogram in either theme. */
.brand-mark {
  width: var(--jw-mark-size);
  height: var(--jw-mark-size);
  flex: none;
  border: 1px solid var(--jw-line);
  border-radius: var(--jw-mark-radius);
  background: var(--jw-mark-sweep);
  box-shadow:
    inset 0 0 0 var(--jw-mark-ring) var(--jw-mark-inset),
    0 1px 10px var(--jw-shadow-color);
}

.brand-mark.lg {
  --jw-mark-size: 64px;
  --jw-mark-ring: 12px;
  --jw-mark-radius: var(--jw-radius-xl);
}

.brand-mark.sm {
  --jw-mark-size: 20px;
  --jw-mark-ring: 4px;
  --jw-mark-radius: var(--jw-radius-xs);
}

/* ---------------------------------------------------------------------------
 * Typography
 * ------------------------------------------------------------------------ */

h1, h2, h3, p { margin: 0; }

/* Syne draws below its em box; Android clips what desktop engines let
   overflow. Every display-face element carries real headroom, pulled back
   so layout spacing is unchanged. */
h1, h2, h3, .jw-display {
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  font-synthesis: none;
}

h1 {
  max-width: 20ch;
  color: var(--jw-text-primary);
  font-family: var(--jw-font-display);
  font-weight: var(--jw-weight-semibold);
  font-size: var(--jw-text-display);
  line-height: var(--jw-leading-tight);
  letter-spacing: var(--jw-tracking-tight);
  overflow-wrap: break-word;
}

h2 {
  color: var(--jw-text-primary);
  font-family: var(--jw-font-display);
  font-weight: var(--jw-weight-semibold);
  font-size: var(--jw-text-title);
  line-height: var(--jw-leading-snug);
}

h3 {
  color: var(--jw-text-primary);
  font-family: var(--jw-font-display);
  font-weight: var(--jw-weight-semibold);
  font-size: var(--jw-text-lg);
  line-height: var(--jw-leading-snug);
}

/*
 * SplitText line masks clip with `overflow: clip`, which cuts descenders off
 * headings set at poster line-heights. The wrapper gets a little room below
 * each line and pulls it back with a negative margin, so descenders survive
 * without changing where the text sits.
 */
.jw-split-line-mask {
  padding-bottom: 0.3em;
  margin-bottom: -0.3em;
}

.eyebrow {
  margin: 0 0 var(--jw-space-3);
  color: var(--jw-text-muted);
  font-size: var(--jw-text-xs);
  font-weight: var(--jw-weight-bold);
  letter-spacing: var(--jw-tracking-eyebrow);
  text-transform: uppercase;
}

.eyebrow.accent { color: var(--jw-accent-strong); }

.lead {
  max-width: 54ch;
  margin-top: var(--jw-space-4);
  color: var(--jw-text-body);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: var(--jw-weight-normal);
  line-height: var(--jw-leading-normal);
}

.card-kicker {
  color: var(--jw-text-muted);
  font-size: var(--jw-text-sm);
  font-weight: var(--jw-weight-medium);
  line-height: var(--jw-leading-normal);
}

/* ---------------------------------------------------------------------------
 * Buttons
 *
 * Keep `transform` out of the transition list: motion.js hands hover/press
 * transforms to GSAP, and a CSS transition on the same property fights it.
 * ------------------------------------------------------------------------ */

/*
 * Two buttons, one shape.
 *
 * The rim is a masked ring: a ::before inset over the whole button, filled
 * with a diagonal gradient that is bright at the two corners and drops out
 * entirely across the middle, then masked so only the outer band survives.
 *
 * The FILL is a separate ::after, inset by the rim width, so the gap in the
 * ring is genuinely transparent and the page shows through it. Painting the
 * fill on the button itself would sit behind the ring and the gap would just
 * show the fill again.
 *
 * Variants: `.button` is secondary, `.button.primary` is primary, which
 * inverts the page (black on light, white on dark). `.sun` is kept as an
 * alias of primary because the app markup already uses it.
 */
.button {
  position: relative;
  isolation: isolate;
  min-height: var(--jw-button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--jw-space-2);
  border: 0;
  border-radius: var(--jw-button-radius);
  background: transparent;
  color: var(--jw-button-secondary-text);
  font-weight: var(--jw-button-weight);
  padding: var(--jw-button-padding);
  cursor: pointer;
  transition: color var(--jw-duration-base) var(--jw-ease-out);
}

/* The ring. */
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: var(--jw-button-rim-width);
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    var(--jw-button-rim-bright) 0%,
    transparent var(--jw-button-rim-gap-start),
    transparent var(--jw-button-rim-gap-end),
    var(--jw-button-rim-bright) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* The fill, sitting inside the ring. */
.button::after {
  content: "";
  position: absolute;
  inset: var(--jw-button-rim-width);
  z-index: -2;
  border-radius: calc(var(--jw-button-radius) - var(--jw-button-rim-width));
  background: var(--jw-button-secondary-fill);
  transition: background var(--jw-duration-base) var(--jw-ease-out);
}

.button.primary,
.button.sun { color: var(--jw-button-primary-text); }

.button.primary::after,
.button.sun::after { background: var(--jw-button-primary-fill); }

/* Hover is deliberately quiet: the fill steps once. The rim does not move. */
.button:hover:not(:disabled):not(.locked)::after {
  background: var(--jw-button-secondary-fill-hover);
}

.button.primary:hover:not(:disabled):not(.locked)::after,
.button.sun:hover:not(:disabled):not(.locked)::after {
  background: var(--jw-button-primary-fill-hover);
}

/*
 * Ghost: the ring treatment stretched to a text button. A FULL gradient rim
 * runs the whole border - bright at the diagonal corners, a visible hairline
 * through the mid-edges, so the stroke never breaks on wide buttons - over a
 * transparent ground that takes the quiet fill on hover. The rim tokens are
 * the app icon's, so it reads as one family with the menu and close rings
 * in both themes.
 */
.button.ghost { color: var(--jw-text-primary); }

.button.ghost::before {
  padding: var(--jw-app-icon-rim-width);
  background: linear-gradient(
    135deg,
    var(--jw-app-icon-rim-bright) 0%,
    var(--jw-line-strong) 34%,
    var(--jw-line-strong) 66%,
    var(--jw-app-icon-rim-bright) 100%
  );
}

.button.ghost::after {
  inset: var(--jw-app-icon-rim-width);
  border-radius: var(--jw-button-radius);
  background: transparent;
}

.button.ghost:hover:not(:disabled):not(.locked)::after {
  background: var(--jw-button-secondary-fill-hover);
}

.button.locked {
  color: var(--jw-text-subtle);
  cursor: not-allowed;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button:focus-visible,
.nav a:focus-visible,
.text-button:focus-visible {
  outline: 2px solid var(--jw-field-border-focus);
  outline-offset: 2px;
}

/*
 * Ring icon button — the consolidated circular icon action. The page ground
 * as its fill (white on light, black on dark) inside the same 1px diagonal
 * gradient rim as the brand icon container. Used by the dialog close, the
 * help control, and any future icon action; size and rim all come from
 * tokens, so it is tuned in one place.
 */
.button.icon.ring {
  width: var(--jw-ring-button-size);
  min-width: var(--jw-ring-button-size);
  height: var(--jw-ring-button-size);
  min-height: var(--jw-ring-button-size);
  padding: 0;
  border-radius: var(--jw-radius-pill);
  color: var(--jw-text-primary);
}

.button.icon.ring::before {
  padding: var(--jw-app-icon-rim-width);
  background: linear-gradient(
    135deg,
    var(--jw-app-icon-rim-bright) 0%,
    var(--jw-app-icon-rim-fade) 32%,
    var(--jw-app-icon-rim-fade) 68%,
    var(--jw-app-icon-rim-bright) 100%
  );
}

.button.icon.ring::after {
  inset: var(--jw-app-icon-rim-width);
  border-radius: var(--jw-radius-pill);
  background: var(--jw-bg);
}

.button.icon.ring:hover:not(:disabled)::after {
  background: var(--jw-button-secondary-fill-hover);
}

/* Nav links are plain text, not buttons. */
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--jw-button-height);
  color: var(--jw-text-body);
  font-size: var(--jw-text-sm);
  font-weight: var(--jw-weight-bold);
  transition: color var(--jw-duration-base) var(--jw-ease-out);
}

.nav a:hover { color: var(--jw-text-primary); }

/* Square, icon-only. Same rim and states as any other button. */
.button.icon {
  width: var(--jw-button-height);
  min-width: var(--jw-button-height);
  padding: 0;
}

.button.icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.text-button {
  border: 0;
  background: none;
  color: var(--jw-accent-strong);
  font-size: var(--jw-text-sm);
  font-weight: var(--jw-weight-bold);
  padding: var(--jw-space-1) 0;
  cursor: pointer;
  text-align: left;
}

.text-button:hover { color: var(--jw-text-primary); }

/* ---------------------------------------------------------------------------
 * Chips
 * ------------------------------------------------------------------------ */

.proof-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: var(--jw-space-2);
  border: 1px solid var(--jw-chip-border);
  border-radius: var(--jw-radius-md);
  background: var(--jw-chip-bg);
  color: var(--jw-chip-text);
  padding: 0 var(--jw-space-3);
  font-size: var(--jw-text-sm);
  font-weight: var(--jw-weight-bold);
  box-shadow: var(--jw-shadow-sm);
}

.proof-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--jw-radius-pill);
  background: var(--jw-chip-dot);
  box-shadow: 0 0 0 4px var(--jw-accent-ring);
}

.proof-chip.sun { --jw-chip-dot: var(--jw-highlight); }
.proof-chip.info { --jw-chip-dot: var(--jw-info); }
.proof-chip.danger { --jw-chip-dot: var(--jw-danger); }

/* ---------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------ */

.panel {
  border: 1px solid var(--jw-card-border);
  border-radius: var(--jw-card-radius);
  background: var(--jw-card-bg);
  box-shadow: var(--jw-card-shadow);
  overflow: hidden;
}

.card {
  display: grid;
  gap: var(--jw-space-3);
  padding: var(--jw-card-padding);
  border: 1px solid var(--jw-card-border);
  border-radius: var(--jw-card-radius);
  background: var(--jw-card-bg);
  box-shadow: var(--jw-shadow-md);
}

.card.quiet {
  background: var(--jw-surface-veil);
  box-shadow: var(--jw-shadow-sm);
}

/* ---------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------ */

.form {
  display: grid;
  gap: var(--jw-space-4);
  padding: var(--jw-space-5);
  border-radius: var(--jw-radius-md);
  background: var(--jw-surface-veil);
}

label {
  display: grid;
  gap: var(--jw-space-2);
  color: var(--jw-field-label);
  font-size: var(--jw-text-xs);
  font-weight: var(--jw-weight-bold);
  letter-spacing: var(--jw-tracking-eyebrow);
  text-transform: uppercase;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--jw-space-3);
}

/* The field shell owns the border, focus ring, and gradient edge; the input
   inside it is transparent and borderless. */
.field-shell {
  position: relative;
  border: 1px solid var(--jw-field-border);
  border-radius: var(--jw-field-radius);
  background: var(--jw-field-bg);
  box-shadow: var(--jw-field-shadow);
  transition: box-shadow var(--jw-duration-base) var(--jw-ease-out);
}

/*
 * Active state in the house language: the diagonal rim, bright at the two
 * corners in the accent pair and dropping out across the middle — the same
 * masked-ring construction the buttons use. Fades in over the resting border.
 */
.field-shell::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: var(--jw-field-radius);
  background: linear-gradient(
    135deg,
    var(--jw-accent) 0%,
    transparent var(--jw-button-rim-gap-start),
    transparent var(--jw-button-rim-gap-end),
    var(--jw-highlight) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--jw-duration-base) var(--jw-ease-out);
}

.field-shell:focus-within { box-shadow: var(--jw-shadow-md); }

.field-shell:focus-within::after { opacity: 1; }

.optional {
  color: var(--jw-text-muted);
  font-size: var(--jw-text-2xs);
  font-weight: var(--jw-weight-semibold);
  letter-spacing: 0;
  text-transform: none;
}

input, textarea, select {
  width: 100%;
  border: 0;
  border-radius: var(--jw-field-radius);
  background: transparent;
  color: var(--jw-field-text);
  outline: none;
  font-weight: var(--jw-weight-semibold);
}

input, select {
  min-height: var(--jw-field-height);
  padding: 0 var(--jw-space-4);
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px var(--jw-space-4);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

input:focus, textarea:focus, select:focus { box-shadow: none; }

input::placeholder, textarea::placeholder { color: var(--jw-field-placeholder); }

/* Native controls follow the theme rather than rendering as light chrome. */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  min-height: 0;
  accent-color: var(--jw-accent);
}

/* ---------------------------------------------------------------------------
 * Status
 * ------------------------------------------------------------------------ */

.status {
  min-height: 22px;
  color: var(--jw-success);
  font-size: var(--jw-text-sm);
  font-weight: var(--jw-weight-bold);
}

.status.error, .error { color: var(--jw-danger); }
.status.warning { color: var(--jw-warning); }

/* ---------------------------------------------------------------------------
 * Theme toggle
 *
 * Three states: system, light, dark. The knob slides to the active third;
 * `aria-checked` is not used because this is a three-way control, so the
 * pressed state lives on each option button.
 * ------------------------------------------------------------------------ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--jw-line);
  border-radius: var(--jw-radius-pill);
  background: var(--jw-surface-sunken);
}

.theme-toggle button {
  width: 32px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: var(--jw-radius-pill);
  background: transparent;
  color: var(--jw-text-muted);
  cursor: pointer;
  transition:
    background var(--jw-duration-base) var(--jw-ease-out),
    color var(--jw-duration-base) var(--jw-ease-out);
}

.theme-toggle button:hover { color: var(--jw-text-primary); }

.theme-toggle button[aria-pressed="true"] {
  background: var(--jw-surface);
  color: var(--jw-text-primary);
  box-shadow: var(--jw-shadow-xs);
}

.theme-toggle button:focus-visible {
  outline: 2px solid var(--jw-field-border-focus);
  outline-offset: 1px;
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------------------
 * Brand mark
 *
 * One continuous line with no beginning and no end. The path is swapped by
 * /js/ds/logo.js; everything visual is here so the mark follows the theme.
 * Sized from the font-size of its lockup, so it scales with the wordmark.
 * ------------------------------------------------------------------------ */

.jw-mark {
  width: var(--jw-mark-width, 2.1em);
  height: auto;
  flex: none;
  display: block;
  overflow: visible;
}

/* The portal is portrait: size from height so lockups stay balanced. */
.jw-mark-portal {
  width: auto;
  height: var(--jw-mark-height, 1.35em);
}

/* Frame at maximum contrast; the lit interior ramps from the mid tone at the
   head to its faintest at the floor. A whisper of depth from the themed
   glow token keeps it from sitting flat on either ground. */
.jw-mark-portal { filter: var(--jw-portal-depth); }

.jw-portal-frame { fill: var(--jw-text-primary); }
.jw-portal-head { stop-color: var(--jw-text-subtle); }
.jw-portal-floor { stop-color: transparent; }

.jw-mark-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jw-mark-stop-a { stop-color: var(--jw-accent); }
.jw-mark-stop-b { stop-color: var(--jw-highlight); }

/* The lockup: mark and wordmark on one baseline. */
.brand .jw-mark { margin-right: -0.15em; }

/* ---------------------------------------------------------------------------
 * App icon
 *
 * The mark in a container, after the studio system's floating menu control: a
 * dark translucent ground behind a blur, with a diagonal rim painted onto the
 * BORDER only. The rim is a masked ring rather than a gradient background, so
 * the fill and the blur behind it stay untouched.
 *
 * Fixed dark in both themes on purpose. See the note in tokens.css.
 * ------------------------------------------------------------------------ */

.jw-app-icon {
  position: relative;
  width: var(--jw-app-icon-size);
  height: var(--jw-app-icon-size);
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--jw-app-icon-radius);
  background: var(--jw-app-icon-bg);
  -webkit-backdrop-filter: blur(var(--jw-app-icon-blur));
  backdrop-filter: blur(var(--jw-app-icon-blur));
}

.jw-app-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: var(--jw-app-icon-rim-width);
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    var(--jw-app-icon-rim-bright) 0%,
    var(--jw-app-icon-rim-fade) 32%,
    var(--jw-app-icon-rim-fade) 68%,
    var(--jw-app-icon-rim-bright) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Sized from the container token, not a percentage: the icon's grid track is
   auto-sized, so a percentage height resolves to auto and the SVG falls back
   to its default sizing. */
.jw-app-icon .jw-mark.jw-mark-portal,
.jw-app-icon .jw-mark.jw-mark-line {
  width: auto;
  height: calc(var(--jw-app-icon-size) * 0.52);
  /* The artwork touches its viewBox floor but not its ceiling; nudge up so
     it sits optically centred. */
  transform: translateY(calc(var(--jw-app-icon-size) * -0.025));
}

/* The container's ground follows the theme, so the frame keeps its default
   maximum-contrast fill — black on light, white on dark. */

/* The icon replaces the bare mark inside a lockup. */
.brand .jw-app-icon { margin-right: var(--jw-space-1); }

.jw-app-icon.lg { --jw-app-icon-size: 76px; --jw-app-icon-rim-width: 1.5px; }
.jw-app-icon.sm { --jw-app-icon-size: 26px; }

/* A stack of link fields under one label, grown by the Add link ghost. */
.link-fields {
  display: grid;
  gap: var(--jw-space-2);
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--jw-space-2);
  align-items: center;
}

/* With one row left there is nothing to delete. */
.link-row:only-child .link-remove { display: none; }

.link-fields + .button.ghost { justify-self: start; }

/* ---------------------------------------------------------------------------
 * Dropdown
 *
 * Enhancement over a native <select> (see /js/ds/dropdown.js). The native
 * control stays operable underneath; the trigger and listbox carry the brand.
 * ------------------------------------------------------------------------ */

.jw-dropdown { position: relative; }

.jw-dropdown-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.jw-dropdown-trigger {
  width: 100%;
  min-height: var(--jw-field-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--jw-space-3);
  border: 0;
  border-radius: var(--jw-field-radius);
  background: transparent;
  color: var(--jw-field-text);
  font-weight: var(--jw-weight-semibold);
  font-size: var(--jw-text-base);
  padding: 0 var(--jw-space-4);
  cursor: pointer;
  text-align: left;
}

.jw-dropdown-trigger svg {
  width: 12px;
  flex: none;
  color: var(--jw-text-muted);
  transition: transform var(--jw-duration-base) var(--jw-ease-out);
}

.jw-dropdown.open .jw-dropdown-trigger svg { transform: rotate(180deg); }

.jw-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jw-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--jw-space-2));
  left: 0;
  right: 0;
  z-index: var(--jw-z-overlay);
  max-height: 300px;
  margin: 0;
  padding: var(--jw-space-2);
  list-style: none;
  border: 1px solid var(--jw-line);
  border-radius: var(--jw-radius-lg);
  background: var(--jw-modal-bg);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow: var(--jw-shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
}

.jw-dropdown.open .jw-dropdown-menu { display: block; }

.jw-dropdown-option {
  border-radius: var(--jw-radius-sm);
  color: var(--jw-text-body);
  font-size: var(--jw-text-base);
  font-weight: var(--jw-weight-medium);
  padding: var(--jw-space-3) var(--jw-space-3);
  cursor: pointer;
}

.jw-dropdown-option:hover {
  background: var(--jw-surface-sunken);
  color: var(--jw-text-primary);
}

/* The chosen option carries the accent, not a checkmark row. */
.jw-dropdown-option[aria-selected="true"] {
  color: var(--jw-accent);
  font-weight: var(--jw-weight-bold);
}
