/* Jobpista design system — tokens, reset, typography and shared components.
   Used by the public site (site.css), the app (app.css) and the employer/admin pages.
   Fonts are self-hosted (no Google Fonts: no third-party requests, GDPR-friendly). */

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage';
  src: url('/static/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* brand */
  --fox-50: #fff5ed;
  --fox-100: #ffe6d3;
  --fox-200: #ffc8a1;
  --fox-300: #ffa066;
  --fox-400: #ff7a2e;
  --fox-500: #f25f0c;
  --fox-600: #d14d05;
  --fox-700: #a93c06;
  --fox-800: #7f2f0a;
  --fox-900: #5a230b;
  --ink-950: #0c0e13;
  --ink-900: #14171f;
  --ink-800: #1d212b;
  --ink-700: #2a2f3b;
  --ink-600: #454b58;
  --ink-500: #6a707e;
  --ink-400: #9096a2;
  --ink-300: #c1c5cd;
  --ink-200: #e2e4e8;
  --ink-100: #eff0f2;
  --ink-50: #f7f7f8;
  --cream: #fbf7f2;
  --cream-2: #f5efe7;
  --mint-50: #e9f8f1;
  --mint-500: #0f9d63;
  --mint-600: #0b8050;
  --sky-50: #edf4ff;
  --sky-500: #2f7cf6;
  --rose-50: #fdeeee;
  --rose-500: #e5484d;
  --amber-50: #fff7e6;
  --amber-500: #e79a0c;
  --violet-50: #f3efff;
  --violet-500: #7b5cf0;

  /* semantic (light) */
  --bg: var(--cream);
  --bg-2: var(--cream-2);
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --surface-3: #f4f1ec;
  --text: var(--ink-900);
  --text-2: var(--ink-600);
  --text-3: var(--ink-500);
  --border: #e9e4dc;
  --border-2: #ddd6cb;
  --primary: var(--fox-500);
  --primary-hover: var(--fox-600);
  --primary-soft: var(--fox-50);
  --primary-text: var(--fox-700);
  --on-primary: #ffffff;
  --success: var(--mint-500);
  --success-soft: var(--mint-50);
  --danger: var(--rose-500);
  --danger-soft: var(--rose-50);
  --warn: var(--amber-500);
  --warn-soft: var(--amber-50);
  --info: var(--sky-500);
  --info-soft: var(--sky-50);
  --focus: 0 0 0 3px color-mix(in srgb, var(--fox-500) 35%, transparent);
  --overlay: rgb(12 14 19 / 0.45);

  /* shape & depth */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgb(20 23 31 / 0.06);
  --shadow-sm: 0 1px 2px rgb(20 23 31 / 0.05), 0 2px 8px rgb(20 23 31 / 0.05);
  --shadow: 0 2px 4px rgb(20 23 31 / 0.04), 0 8px 24px rgb(20 23 31 / 0.08);
  --shadow-lg: 0 4px 8px rgb(20 23 31 / 0.04), 0 18px 48px rgb(20 23 31 / 0.14);
  --shadow-fox: 0 8px 24px color-mix(in srgb, var(--fox-500) 32%, transparent);

  /* type */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast: 140ms;
  --med: 240ms;
  --slow: 420ms;

  /* layout */
  --maxw: 1180px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

/* dark: follows the system unless the page says otherwise (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e1015;
    --bg-2: #12151b;
    --surface: #171a21;
    --surface-2: #1b1f27;
    --surface-3: #222631;
    --text: #eef0f3;
    --text-2: #b4b9c3;
    --text-3: #8a909c;
    --border: #272b35;
    --border-2: #333845;
    --primary: var(--fox-400);
    --primary-hover: var(--fox-300);
    --primary-soft: color-mix(in srgb, var(--fox-500) 16%, transparent);
    --primary-text: var(--fox-300);
    --on-primary: #1a0d04;
    --success-soft: color-mix(in srgb, var(--mint-500) 16%, transparent);
    --danger-soft: color-mix(in srgb, var(--rose-500) 16%, transparent);
    --warn-soft: color-mix(in srgb, var(--amber-500) 16%, transparent);
    --info-soft: color-mix(in srgb, var(--sky-500) 16%, transparent);
    --overlay: rgb(0 0 0 / 0.6);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 2px 4px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 18px 48px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e1015;
  --bg-2: #12151b;
  --surface: #171a21;
  --surface-2: #1b1f27;
  --surface-3: #222631;
  --text: #eef0f3;
  --text-2: #b4b9c3;
  --text-3: #8a909c;
  --border: #272b35;
  --border-2: #333845;
  --primary: var(--fox-400);
  --primary-hover: var(--fox-300);
  --primary-soft: color-mix(in srgb, var(--fox-500) 16%, transparent);
  --primary-text: var(--fox-300);
  --on-primary: #1a0d04;
  --success-soft: color-mix(in srgb, var(--mint-500) 16%, transparent);
  --danger-soft: color-mix(in srgb, var(--rose-500) 16%, transparent);
  --warn-soft: color-mix(in srgb, var(--amber-500) 16%, transparent);
  --info-soft: color-mix(in srgb, var(--sky-500) 16%, transparent);
  --overlay: rgb(0 0 0 / 0.6);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 2px 4px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 18px 48px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  text-rendering: optimizeLegibility;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--primary-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--primary);
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-xs);
}
::selection {
  background: var(--fox-200);
  color: var(--ink-900);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.1rem, 4.6vw + 0.6rem, 4rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.6rem, 2.4vw + 0.7rem, 2.6rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
small,
.small {
  font-size: 0.875rem;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}
.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;
  vertical-align: -0.2em;
}
.ic-lg {
  width: 1.5em;
  height: 1.5em;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 12px);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 10px);
}
.row.wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-text);
}

/* ---------- buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition:
    background var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}
.btn:active {
  transform: scale(0.97);
}
.btn[disabled],
.btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-fox);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}
.btn-dark {
  background: var(--ink-900);
  color: #fff;
}
.btn-dark:hover {
  background: var(--ink-700);
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
}
.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--text);
}
.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.btn-soft:hover {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-text);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 85%, black);
  color: #fff;
}
.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}
.btn-danger-ghost:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-sm {
  --h: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}
.btn-lg {
  --h: 54px;
  padding: 0 26px;
  font-size: 1.05rem;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  width: var(--h);
  padding: 0;
}
.btn.is-busy::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label,
.label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.hint {
  font-size: 0.8rem;
  color: var(--text-3);
}
.error-text {
  font-size: 0.85rem;
  color: var(--danger);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem; /* 16px: no iOS zoom */
  transition:
    border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
  appearance: none;
}
.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236a707e' 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 12px center;
  padding-right: 40px;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.input[aria-invalid='true'] {
  border-color: var(--danger);
}
.input-icon {
  position: relative;
}
.input-icon > .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.input-icon > .input {
  padding-left: 42px;
}

/* checkbox / radio */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  cursor: pointer;
}
.check input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: all var(--fast) var(--ease);
}
.check input[type='radio'] {
  border-radius: 50%;
}
.check input:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.check input:checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border: 2px solid var(--on-primary);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input[type='radio']:checked::after {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--on-primary);
  transform: none;
}

/* switch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.switch input {
  appearance: none;
  width: 44px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--ink-300);
  position: relative;
  transition: background var(--med) var(--ease);
  flex: none;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--med) var(--spring);
}
.switch input:checked {
  background: var(--primary);
}
.switch input:checked::after {
  transform: translateX(18px);
}

/* range */
input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
}

/* ---------- chips, badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--fast) var(--ease);
}
button.chip:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.chip[aria-pressed='true'],
.chip.is-on {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}
:root[data-theme='dark'] .chip[aria-pressed='true'],
:root[data-theme='dark'] .chip.is-on {
  background: var(--fox-400);
  border-color: var(--fox-400);
  color: var(--on-primary);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .chip[aria-pressed='true'],
  :root:not([data-theme='light']) .chip.is-on {
    background: var(--fox-400);
    border-color: var(--fox-400);
    color: var(--on-primary);
  }
}
.chip .x {
  margin-right: -4px;
  opacity: 0.6;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge .ic {
  width: 13px;
  height: 13px;
}
.badge-fox {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.badge-green {
  background: var(--success-soft);
  color: var(--mint-600);
}
.badge-blue {
  background: var(--info-soft);
  color: var(--sky-500);
}
.badge-red {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-amber {
  background: var(--warn-soft);
  color: #a86b00;
}
.badge-violet {
  background: var(--violet-50);
  color: var(--violet-500);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: clamp(18px, 3vw, 28px);
}
.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 16px 0;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--text-2);
}

/* match score ring: style="--p: 82" */
.score {
  --p: 0;
  --size: 48px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%),
    conic-gradient(var(--score-color, var(--primary)) calc(var(--p) * 1%), var(--surface-3) 0);
  font-weight: 750;
  font-size: calc(var(--size) * 0.3);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.score.is-high {
  --score-color: var(--mint-500);
}
.score.is-mid {
  --score-color: var(--fox-500);
}
.score.is-low {
  --score-color: var(--ink-400);
}

/* avatar / company logo placeholder */
.logo-tile {
  --size: 44px;
  width: var(--size);
  height: var(--size);
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 750;
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.42);
  color: #fff;
  background: var(--tile, var(--ink-700));
  letter-spacing: -0.02em;
}

/* ---------- feedback ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom) + var(--toast-offset, 0px));
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px 12px 16px;
  border-radius: var(--r);
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  animation: toast-in var(--med) var(--spring);
}
.toast.is-leaving {
  animation: toast-out var(--fast) var(--ease) forwards;
}
.toast .btn {
  --h: 32px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  padding: 0 12px;
}
.toast-error {
  background: var(--rose-500);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--info-soft);
  color: var(--text);
  font-size: 0.92rem;
}
.alert .ic {
  color: var(--info);
  margin-top: 2px;
}
.alert-warn {
  background: var(--warn-soft);
}
.alert-warn .ic {
  color: var(--warn);
}
.alert-ok {
  background: var(--success-soft);
}
.alert-ok .ic {
  color: var(--success);
}
.alert-error {
  background: var(--danger-soft);
}
.alert-error .ic {
  color: var(--danger);
}

/* skeleton loading */
.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: var(--r-sm);
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ---------- overlays: modal + sheet ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 900;
  animation: fade-in var(--med) var(--ease);
  backdrop-filter: blur(2px);
}
.overlay.is-leaving {
  animation: fade-out var(--med) var(--ease) forwards;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
.modal {
  position: fixed;
  z-index: 901;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 520px);
  max-height: 88dvh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  animation: modal-in var(--med) var(--spring);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
}
/* bottom sheet on phones, side panel on desktop */
.sheet {
  position: fixed;
  z-index: 901;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 760px) {
  .sheet {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92dvh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    animation: sheet-up var(--slow) var(--ease);
    padding-bottom: var(--safe-bottom);
  }
  .sheet.is-leaving {
    animation: sheet-down var(--med) var(--ease) forwards;
  }
  .sheet::before {
    content: '';
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: var(--border-2);
    margin: 8px auto 0;
    flex: none;
  }
}
@media (min-width: 761px) {
  .sheet {
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(560px, 46vw);
    border-radius: var(--r-xl);
    animation: sheet-left var(--slow) var(--ease);
  }
  .sheet.is-leaving {
    animation: sheet-right var(--med) var(--ease) forwards;
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}
@keyframes sheet-down {
  to {
    transform: translateY(100%);
  }
}
@keyframes sheet-left {
  from {
    transform: translateX(105%);
  }
}
@keyframes sheet-right {
  to {
    transform: translateX(105%);
  }
}

/* segmented control / tabs */
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
}
.segmented button {
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--fast) var(--ease);
}
.segmented button[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.7rem;
  font-weight: 750;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

/* progress bar */
.progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width var(--slow) var(--ease);
}

/* brand mark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}
.brand img,
.brand svg {
  width: 34px;
  height: 34px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
