/*
 * Color tokens for the public site. Change the five colors below.
 * Shades, muted text, and surfaces are mixed from these.
 *
 * This file is served with the site stylesheet at /site.css.
 * The portal loads that URL. The dashboard compiles its own copy,
 * because Tailwind needs these tokens when that app is built.
 *
 *   primary   brand fills: buttons, header, links
 *   opposite  color that sits on primary, and light surfaces
 *   secondary supporting brand color
 *   text      default text
 *   extra     accent for focus, highlights, and glows
 *   danger    error text and invalid fields. Not mixed from the brand colors.
 *
 * Tailwind utilities: bg-primary, text-opposite, bg-secondary, text-text,
 * bg-extra, plus -hover / -light / -muted / -faint variants.
 */

:root {
  --theme-primary: #1c369a;
  --theme-opposite: #ffffff;
  --theme-secondary: #6d82b8;
  --theme-text: #1c2434;
  --theme-extra: #2997ff;
  --theme-danger: #e5484d;

  --theme-primary-hover: color-mix(in srgb, var(--theme-primary) 78%, black);
  --theme-primary-light: color-mix(in srgb, var(--theme-primary) 46%, white);
  --theme-primary-dark: color-mix(in srgb, var(--theme-primary) 82%, black);

  --theme-opposite-hover: color-mix(in srgb, var(--theme-opposite) 94%, var(--theme-text));
  --theme-opposite-muted: color-mix(in srgb, var(--theme-opposite) 90%, var(--theme-text));

  --theme-secondary-hover: color-mix(in srgb, var(--theme-secondary) 84%, black);
  --theme-secondary-light: color-mix(in srgb, var(--theme-secondary) 64%, white);
  --theme-secondary-dark: color-mix(in srgb, var(--theme-secondary) 76%, black);

  --theme-text-muted: color-mix(in srgb, var(--theme-text) 70%, var(--theme-opposite));
  --theme-text-faint: color-mix(in srgb, var(--theme-text) 52%, var(--theme-opposite));

  --theme-extra-hover: color-mix(in srgb, var(--theme-extra) 78%, black);

  --color-primary: var(--theme-primary);
  --color-primary-hover: var(--theme-primary-hover);
  --color-primary-light: var(--theme-primary-light);
  --color-primary-dark: var(--theme-primary-dark);

  --color-opposite: var(--theme-opposite);
  --color-opposite-hover: var(--theme-opposite-hover);
  --color-opposite-muted: var(--theme-opposite-muted);

  --color-secondary: var(--theme-secondary);
  --color-secondary-hover: var(--theme-secondary-hover);
  --color-secondary-light: var(--theme-secondary-light);
  --color-secondary-dark: var(--theme-secondary-dark);

  --color-text: var(--theme-text);
  --color-text-muted: var(--theme-text-muted);
  --color-text-faint: var(--theme-text-faint);

  --color-extra: var(--theme-extra);
  --color-extra-hover: var(--theme-extra-hover);
  --color-danger: var(--theme-danger);

  color-scheme: light;
}

@theme inline {
  --color-primary: var(--theme-primary);
  --color-primary-hover: var(--theme-primary-hover);
  --color-primary-light: var(--theme-primary-light);
  --color-primary-dark: var(--theme-primary-dark);

  --color-opposite: var(--theme-opposite);
  --color-opposite-hover: var(--theme-opposite-hover);
  --color-opposite-muted: var(--theme-opposite-muted);

  --color-secondary: var(--theme-secondary);
  --color-secondary-hover: var(--theme-secondary-hover);
  --color-secondary-light: var(--theme-secondary-light);
  --color-secondary-dark: var(--theme-secondary-dark);

  --color-text: var(--theme-text);
  --color-text-muted: var(--theme-text-muted);
  --color-text-faint: var(--theme-text-faint);

  --color-extra: var(--theme-extra);
  --color-extra-hover: var(--theme-extra-hover);
  --color-danger: var(--theme-danger);
}

:root {
  --bg: var(--color-opposite-muted);
  --bg-card: var(--color-opposite);
  --bg-card-hover: color-mix(in srgb, var(--color-opposite) 86%, var(--color-secondary));
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --faint: var(--color-text-faint);
  --line: color-mix(in srgb, var(--color-text) 12%, transparent);
  --line-strong: color-mix(in srgb, var(--color-text) 36%, transparent);
  --mark: color-mix(in srgb, var(--color-text) 72%, transparent);
  --blue: var(--color-primary);
  --accent: var(--color-extra);
  --fill: var(--color-primary);
  --fill-ink: var(--color-opposite);
  --input-bg: color-mix(in srgb, var(--color-opposite) 96%, var(--color-text));
  --header-bg: color-mix(in srgb, var(--bg) 82%, transparent);
  --danger: var(--color-danger);
  --radius-card: 22px;
  --header-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gap-x: 28px;
  --gap-y: 52px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: inherit;
}


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

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--ink);
}

[id] {
  scroll-margin-top: 72px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 14px;
  border-radius: 980px;
  background: var(--fill);
  color: var(--fill-ink);
  text-decoration: none;
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.bar,
.nav {
  display: flex;
  align-items: center;
}

.bar {
  height: 100%;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav {
  gap: 22px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav a:hover,
.nav a.is-current {
  color: var(--ink);
}

.nav {
  margin-left: auto;
}

.nav-apply {
  min-height: 32px;
  margin-left: 6px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--fill-ink);
}

.nav-apply.is-current {
  color: var(--fill-ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--blue);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--fill);
  color: var(--fill-ink);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

a.nav-apply {
  min-height: 32px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--fill-ink);
}

.btn-text {
  padding: 0 2px;
  min-height: 44px;
}

.btn-text:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  padding: 84px 0 28px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 760px;
}

.hero-mark {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  border-radius: 22px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 500;
}

.hero h1 {
  max-width: 11em;
  font-size: clamp(44px, 6.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.lede {
  max-width: 38em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.38;
  letter-spacing: -0.018em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 28px;
}

.section {
  padding: 88px 0;
}

.section h2 {
  max-width: 16em;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.section > .wrap > .lede,
.section-intro {
  margin-top: 16px;
  margin-bottom: 36px;
}

.section-follow {
  padding-top: 0;
}

.section-process {
  padding-top: 12px;
}

.standards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.standard {
  min-height: 230px;
  padding: 28px 26px 24px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
}

.standard .code {
  color: var(--faint);
  font-size: 13px;
}

.standard h3 {
  margin: 8px 0 12px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.standard p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.standard .focus {
  margin-top: 16px;
  color: var(--faint);
  font-size: 14px;
}

.ease {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}

.ease article h3 {
  margin-bottom: 8px;
  font-size: 21px;
  letter-spacing: -0.022em;
}

.ease article p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.pipe-wrap {
  position: relative;
}

.pipe {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap-x);
  row-gap: var(--gap-y);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipe li {
  position: relative;
  min-height: 196px;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
}

.index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 980px;
  background: var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.pipe h3 {
  margin-bottom: 8px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.pipe p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.pipe li.is-issue {
  background: var(--bg-card-hover);
}

.pipe li.is-issue .index {
  background: var(--fill);
  color: var(--fill-ink);
}

.pipe li.is-cycle {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.pipe li.is-cycle .index {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--color-primary);
}

.join {
  position: absolute;
  background: var(--line-strong);
}

.join::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: var(--mark);
}

.pipe li:nth-child(-n + 3) .join {
  top: 50%;
  left: 100%;
  width: var(--gap-x);
  height: 1.5px;
}

.pipe li:nth-child(-n + 3) .join::after {
  top: 50%;
  right: 0;
  border-top: 1.5px solid var(--mark);
  border-right: 1.5px solid var(--mark);
  transform: translateY(-50%) rotate(45deg);
}

.pipe li:nth-child(4) .join {
  top: 100%;
  left: 50%;
  width: 1.5px;
  height: var(--gap-y);
  transform: translateX(-50%);
}

.pipe li:nth-child(4) .join::after {
  bottom: 0;
  left: 50%;
  border-right: 1.5px solid var(--mark);
  border-bottom: 1.5px solid var(--mark);
  transform: translate(-50%, 2px) rotate(45deg);
}

.pipe li:nth-child(5) .join,
.pipe li:nth-child(6) .join,
.pipe li:nth-child(7) .join {
  top: 50%;
  right: 100%;
  width: var(--gap-x);
  height: 1.5px;
}

.pipe li:nth-child(5) .join::after,
.pipe li:nth-child(6) .join::after,
.pipe li:nth-child(7) .join::after {
  top: 50%;
  left: 0;
  border-bottom: 1.5px solid var(--mark);
  border-left: 1.5px solid var(--mark);
  transform: translate(-2px, -50%) rotate(45deg);
}

.pipe li:nth-child(8) .join {
  top: 100%;
  left: 50%;
  width: 1.5px;
  height: 12px;
  background: var(--accent);
  transform: translateX(-50%);
}

.pipe li:nth-child(8) .join::after {
  display: none;
}

.pipe li:nth-child(1) { grid-area: 1 / 1; }
.pipe li:nth-child(2) { grid-area: 1 / 2; }
.pipe li:nth-child(3) { grid-area: 1 / 3; }
.pipe li:nth-child(4) { grid-area: 1 / 4; }
.pipe li:nth-child(5) { grid-area: 2 / 4; }
.pipe li:nth-child(6) { grid-area: 2 / 3; }
.pipe li:nth-child(7) { grid-area: 2 / 2; }
.pipe li:nth-child(8) { grid-area: 2 / 1; }

.cycle {
  position: relative;
  height: 78px;
  margin-top: 2px;
}

.cycle-arc {
  position: absolute;
  top: 0;
  left: calc((100% - 3 * var(--gap-x)) / 8);
  width: calc((100% + var(--gap-x)) / 2);
  height: 34px;
  border: 1.5px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-sizing: border-box;
}

.cycle-arc::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

.cycle p {
  position: absolute;
  top: 42px;
  left: calc((100% - 3 * var(--gap-x)) / 8);
  width: calc((100% + var(--gap-x)) / 2);
  color: var(--blue);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}

.posts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.posts a {
  display: grid;
  grid-template-columns: 148px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.posts li:last-child a {
  border-bottom: 1px solid var(--line);
}

.posts a:hover h3 {
  color: var(--blue);
}

.posts time,
.post-standard {
  color: var(--faint);
  font-size: 14px;
}

.posts h3 {
  margin-bottom: 6px;
  font-size: 22px;
  letter-spacing: -0.024em;
  transition: color 0.2s ease;
}

.posts p {
  color: var(--muted);
  font-size: 16px;
}

.posts .chevron {
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
}

.cta {
  padding-bottom: 104px;
}

.cta-panel {
  padding: 48px 40px;
  border-radius: 28px;
  background: var(--bg-card);
}

.cta-panel h2 {
  max-width: 14em;
}

.cta-panel p {
  max-width: 36em;
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 19px;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px 32px;
}

.footer-brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.footer-note {
  max-width: 360px;
  margin-top: 8px;
  line-height: 1.45;
}

.footer-legal {
  max-width: 360px;
  margin-top: 8px;
  line-height: 1.45;
}

.footer-mail {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  text-decoration: none;
}

.footer-mail:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-content: flex-start;
  justify-content: flex-end;
  max-width: 460px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.page-head {
  padding: 72px 0 12px;
}

.page-head h1 {
  max-width: 14em;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.036em;
}

.page-head .lede {
  font-size: 19px;
}

.apply-page {
  padding-bottom: 72px;
}

.apply-head {
  padding: 72px 0 8px;
}

.apply-head h1 {
  max-width: 12em;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.036em;
}

.stack {
  padding-bottom: 96px;
}

.article {
  width: min(680px, 100%);
}

.article-head {
  padding-top: 72px;
}

.article-kicker {
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 14px;
}

.article-kicker a {
  color: var(--muted);
  text-decoration: none;
}

.article-kicker a:hover {
  color: var(--ink);
}

.article h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.article .meta {
  margin: 14px 0 28px;
  color: var(--faint);
  font-size: 14px;
}

.article .meta a,
.facts a {
  color: var(--muted);
  text-decoration: none;
}

.article .meta a:hover,
.facts a:hover {
  color: var(--ink);
}

.reviewed {
  margin-top: 14px;
  color: var(--faint);
  font-size: 14px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 14px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
}

.faq {
  display: grid;
  gap: 28px;
}

.faq h3 {
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: -0.024em;
}

.faq p {
  max-width: 42em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.facts {
  max-width: 720px;
  margin: 0 0 28px;
}

.facts div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.facts div:last-child {
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--faint);
  font-size: 14px;
}

.facts dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.prose {
  padding-bottom: 12px;
}

.prose p,
.prose li {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.58;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose h2 {
  margin: 1.7em 0 0.45em;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.024em;
}

.prose h2 a {
  color: inherit;
  text-decoration: none;
}

.prose ul {
  margin: 0 0 1.15em;
  padding-left: 1.2em;
}

.prose li {
  margin: 0.35em 0;
}

.prose a {
  color: var(--blue);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose h2 a:hover {
  color: inherit;
  text-decoration: none;
}

.prose table {
  width: 100%;
  margin: 0 0 1.3em;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}

.more {
  width: min(680px, 100%);
  margin-top: 12px;
  padding-top: 8px;
}

.more h2 {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
}

.more a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.016em;
  text-decoration: none;
}

.more a:hover {
  color: var(--blue);
}

.form {
  display: grid;
  gap: 22px;
  width: min(640px, 100%);
  padding-bottom: 96px;
}

.form-wide {
  width: min(760px, 100%);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.field-hint {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.form legend {
  color: var(--muted);
  font-size: 14px;
}

.field .req {
  margin-left: 2px;
  color: var(--danger);
}

.form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
}

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

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}

.ui-input {
  display: grid;
  gap: 8px;
}

.ui-input.is-invalid input,
.ui-input.is-invalid textarea {
  border-color: var(--danger);
}

.ui-input.is-invalid input:focus,
.ui-input.is-invalid textarea:focus {
  border-color: var(--danger);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 28%, transparent);
}

.ui-input-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.ui-select {
  position: relative;
}

.ui-select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 53px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ui-select-trigger:focus,
.ui-select-trigger:focus-visible,
.ui-select.is-open .ui-select-trigger {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}

.ui-select.is-invalid .ui-select-trigger {
  border-color: var(--danger);
}

.ui-select.is-disabled .ui-select-trigger {
  color: var(--muted);
  cursor: default;
}

.ui-select-value,
.ui-select-chips {
  flex: 1;
  min-width: 0;
}

.ui-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-placeholder,
.ui-select-value.is-placeholder {
  color: var(--faint);
}

.ui-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ui-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 4px 3px 10px;
  border-radius: 980px;
  background: var(--line);
  font-size: 14px;
  line-height: 1.3;
}

.ui-select-chip-x {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ui-select-chip-x svg,
.ui-select-chevron,
.ui-select-check,
.icon-btn svg,
.add-row svg {
  width: 16px;
  height: 16px;
}

.ui-select-chevron {
  flex: none;
  margin-left: auto;
  color: var(--faint);
}

.ui-select.is-open .ui-select-chevron {
  transform: rotate(180deg);
}

.ui-select-panel {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.ui-select-search {
  margin-bottom: 6px;
  padding: 10px 12px;
}

.ui-select-list {
  max-height: 240px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.ui-select-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.ui-select-list li.is-active {
  background: var(--line);
}

.ui-select-list li.is-selected {
  color: var(--blue);
}

.ui-select-check {
  flex: none;
  margin-left: auto;
}

.ui-select-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--faint);
  font-size: 15px;
}

.standard-list {
  display: grid;
  gap: 18px;
}

.form fieldset.standard-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.standard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.standard-card-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.location-list {
  display: grid;
  gap: 12px;
}

.location-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.icon-btn,
.add-row {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}

.icon-btn:hover,
.add-row:hover {
  color: var(--blue);
}

.add-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-height: 44px;
  padding: 0 2px;
  font: inherit;
  color: var(--blue);
}

input[readonly] {
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.track-scroll {
  margin: 8px 0 28px;
  overflow-x: auto;
  padding: 16px 10px 8px;
}

.track {
  display: flex;
  min-width: 920px;
  margin: 0;
  padding-top: 12px;
  list-style: none;
}

.track li {
  position: relative;
  flex: 1;
  padding: 22px 8px 0;
  text-align: center;
}

.track li::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--line);
}

.track li:first-child::before {
  left: 50%;
}

.track li:last-child::before {
  right: 50%;
}

.track-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-card-hover);
  transform: translateX(-50%);
}

.track li.is-current .track-dot {
  border-color: var(--accent);
  background: var(--blue);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent),
    0 0 14px 3px color-mix(in srgb, var(--accent) 72%, transparent);
  animation: track-glow 2.4s ease-in-out infinite;
}

@keyframes track-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent),
      0 0 10px 2px color-mix(in srgb, var(--accent) 40%, transparent);
  }

  50% {
    box-shadow:
      0 0 0 7px color-mix(in srgb, var(--accent) 16%, transparent),
      0 0 20px 5px color-mix(in srgb, var(--accent) 85%, transparent);
  }
}

.track-index {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.track-title {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.3;
}

.track li.is-current .track-index,
.track li.is-current .track-title {
  color: var(--ink);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent);
}

.track-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.account-application {
  padding-bottom: 12px;
}

.account-application h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.admin-label {
  margin: 18px 0 8px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}

.admin-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.admin-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.admin-application {
  padding: 8px 0 16px;
  border-top: 1px solid var(--line);
}

.admin-application h3 {
  margin-bottom: 4px;
  font-size: 20px;
}

.admin-application p {
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  border-color: transparent;
  background: var(--fill);
  color: var(--fill-ink);
}

.field-error {
  color: var(--danger);
  font-size: 13px;
}

.form-note,
.sent {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.form-note a,
.sent a:not(.btn) {
  color: var(--blue);
  text-decoration: none;
}

.sent a:not(.btn):hover {
  text-decoration: underline;
}

.error-page {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 100vh;
  width: min(680px, calc(100% - 48px));
  margin-inline: auto;
}

.error-page h1 {
  font-size: clamp(40px, 6vw, 56px);
  letter-spacing: -0.034em;
  line-height: 1.05;
}

.error-page p {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 19px;
}

@media (max-width: 980px) {
  .pipe {
    grid-template-columns: 1fr;
    row-gap: var(--gap-y);
  }

  .pipe li:nth-child(n) {
    grid-area: auto;
    min-height: 0;
  }

  .pipe li:nth-child(n) .join {
    top: 100%;
    right: auto;
    bottom: auto;
    left: 31px;
    width: 1.5px;
    height: var(--gap-y);
    transform: none;
    background: var(--line-strong);
  }

  .pipe li:nth-child(n) .join::after {
    display: block;
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    border: 0;
    border-right: 1.5px solid var(--mark);
    border-bottom: 1.5px solid var(--mark);
    transform: translate(-50%, 2px) rotate(45deg);
  }

  .pipe li:last-child .join {
    display: none;
  }

  .cycle {
    height: auto;
    margin-top: 16px;
  }

  .cycle-arc {
    display: none;
  }

  .cycle p {
    position: static;
    width: auto;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 18px;
    text-align: left;
  }
}

@media (max-width: 800px) {
  .standards,
  .ease {
    grid-template-columns: 1fr;
  }

  .posts a {
    grid-template-columns: 1fr auto;
  }

  .posts time {
    grid-column: 1 / -1;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .field-row,
  .field-row-3,
  .location-row {
    grid-template-columns: 1fr;
  }

  .location-row .icon-btn {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1120px, calc(100% - 32px));
  }

  .site-header {
    height: auto;
  }

  .bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand apply"
      "nav nav";
    height: auto;
    min-height: var(--header-h);
    align-items: center;
    row-gap: 8px;
    padding: 10px 0 12px;
  }

  .brand {
    grid-area: brand;
  }

  .nav {
    grid-area: nav;
    width: auto;
    margin: 0;
    justify-content: flex-start;
    gap: 18px;
  }

  .nav-apply {
    grid-area: apply;
    margin: 0;
  }

  .hero {
    padding-top: 48px;
  }

  .section {
    padding: 64px 0;
  }

  .cta-panel {
    padding: 28px 22px;
  }

  .lede {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:active {
    transform: none;
  }

  .track li.is-current .track-dot {
    animation: none;
  }
}
