/* Global components. Pages only compose these; new variants go here, not in page CSS */

/* Liquid glass surface: fill + blur + gradient hairline (::after) + pointer specular (::before) */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), var(--shadow-2);
  border-radius: var(--r-l);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -20%), rgb(255 255 255 / 0.10), transparent 42%);
  opacity: 0; transition: opacity var(--t-mid) var(--ease);
}
.glass:hover::before { opacity: 1; }
.glass-strong { background: var(--glass-fill-strong); }
.glass-hot::after { background: var(--grad-edge-hot); padding: 1.5px; }

/* Buttons: one height per size, one min width, every variant shares the shape */
.btn {
  --h: var(--h-control);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); min-width: var(--btn-min); padding: 0 26px;
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 650 15px/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease), background-color var(--t-mid) var(--ease), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn-s { --h: var(--h-control-s); min-width: var(--btn-min-s); padding: 0 18px; font-size: 14px; }
.btn .icon { width: 18px; height: 18px; flex: none; transition: transform var(--t-mid) var(--ease-spring); }
.btn:hover .icon-arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 900ms var(--ease);
}
.btn:hover::before { transform: translateX(120%); }

.btn-primary { color: var(--ink-on-signal); background: var(--grad-signal); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 -2px 0 rgb(0 0 0 / 0.12), var(--glow-lime); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 -2px 0 rgb(0 0 0 / 0.12), 0 18px 48px -12px rgb(210 255 77 / 0.7); }

.btn-glass {
  color: var(--ink);
  background: linear-gradient(150deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.04));
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), inset 0 0 0 1px rgb(255 255 255 / 0.12), var(--shadow-1);
}
.btn-glass::before { background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.18) 50%, transparent 70%); }
.btn-glass:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.24), var(--glow-uv); }

.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.5; transform: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); background: rgb(255 255 255 / 0.05); color: var(--ink-3); }
.btn[disabled]::before, .btn[aria-disabled="true"]::before { display: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn-label { opacity: 0; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; }
.btn.skip-link:focus { top: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-row.center { justify-content: center; }

/* Text link with arrow */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); }
.link-arrow .icon { width: 16px; height: 16px; transition: transform var(--t-mid) var(--ease-spring); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { color: var(--lime); }

/* Eyebrow, chips, status dots */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 var(--fs-micro)/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--grad-aurora); }
.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 16px 0 12px;
  border-radius: var(--r-pill); font: 550 13px/1 var(--font-body); color: var(--ink);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgb(210 255 77 / 0.16), 0 0 14px var(--lime); flex: none; }
.dot-uv { background: var(--uv); box-shadow: 0 0 0 4px rgb(139 92 255 / 0.2), 0 0 14px var(--uv); }
.dot-coral { background: var(--coral); box-shadow: 0 0 0 4px rgb(255 138 107 / 0.18), 0 0 14px var(--coral); }
.dot.pulse { animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(210 255 77 / 0.05), 0 0 22px var(--lime); } }

/* Cards */
.card { padding: clamp(26px, 2.6vw, 36px); border-radius: var(--r-l); transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--glass-shine), var(--shadow-3); }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 15.5px; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }

.icon-tile {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 16px;
  background: linear-gradient(150deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.03));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 12px 30px -12px rgb(139 92 255 / 0.7);
  transition: transform var(--t-mid) var(--ease-spring), box-shadow var(--t-mid) var(--ease);
}
.icon-tile svg { width: 24px; height: 24px; stroke: url(#g-aurora); }
.card:hover .icon-tile { transform: translateY(-3px) rotate(-6deg); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.18), 0 18px 40px -12px rgb(255 79 216 / 0.7); }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Media frame: image inside glass with inner glow */
.media { padding: 10px; border-radius: var(--r-xl); }
.media img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-xl) - 10px); }
.media-wrap { position: relative; }
.media-wrap .float { position: absolute; z-index: 2; }

/* Metric tiles */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-l); overflow: hidden; }
.metric { padding: 30px 30px 28px; display: grid; gap: 8px; position: relative; }
.metric + .metric::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: linear-gradient(transparent, rgb(255 255 255 / 0.16), transparent); }
.metric-value { font: 560 clamp(28px, 2.8vw, 40px)/1 var(--font-display); letter-spacing: -0.03em; }
.metric-label { font-size: var(--fs-small); color: var(--ink-3); }

/* Form controls */
.form { display: grid; gap: 20px; }
.form-row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 9px; min-width: 0; }
.field-label { font: 600 13px/1 var(--font-body); color: var(--ink-2); letter-spacing: 0.02em; }
.field-hint { font-size: 13px; color: var(--ink-3); }
.field-error { font-size: 13px; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }
.control {
  width: 100%; height: var(--h-control); padding: 0 18px; border: 0; border-radius: var(--r-s);
  background: linear-gradient(150deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.03));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.12);
  color: var(--ink); font-size: 15.5px; outline: none;
  transition: box-shadow var(--t-mid) var(--ease), background var(--t-mid) var(--ease);
}
textarea.control { height: auto; min-height: 140px; padding: 15px 18px; resize: vertical; line-height: 1.55; }
.control::placeholder { color: var(--ink-4); }
.control:hover { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22), inset 0 1px 0 rgb(255 255 255 / 0.14); }
.control:focus, .control:focus-visible, .select.is-open .control {
  outline: none; background: linear-gradient(150deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.04));
  box-shadow: inset 0 0 0 1px rgb(210 255 77 / 0.75), 0 0 0 4px rgb(210 255 77 / 0.12), 0 10px 30px -14px rgb(210 255 77 / 0.5);
}
.field.is-invalid .control { box-shadow: inset 0 0 0 1px rgb(255 107 125 / 0.8), 0 0 0 4px rgb(255 107 125 / 0.12); }

/* Custom select (no native select anywhere) */
.select { position: relative; }
.select.is-open { z-index: 40; }
.select-menu.glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
.select .control { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; }
.select-value[data-empty] { color: var(--ink-4); }
.select-chevron { width: 18px; height: 18px; color: var(--ink-3); transition: transform var(--t-mid) var(--ease-spring); }
.select.is-open .select-chevron { transform: rotate(180deg); color: var(--lime); }
.select-menu {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none;
  border-radius: var(--r-m); background: linear-gradient(150deg, rgb(34 25 58 / 0.98), rgb(18 13 32 / 0.98)); max-height: 300px; overflow: auto;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 0 0 1px rgb(255 255 255 / 0.10), var(--shadow-3);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top; pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-mid) var(--ease-spring);
}
.select.is-open .select-menu { opacity: 1; transform: none; pointer-events: auto; }
.select-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 14px; border-radius: 12px; cursor: pointer; color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.select-option:hover, .select-option.is-active { background: rgb(255 255 255 / 0.08); color: var(--ink); }
.select-option[aria-selected="true"] { color: var(--ink); }
.select-option[aria-selected="true"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

/* Segmented control (liquid thumb) */
.segmented { display: inline-flex; position: relative; padding: 5px; border-radius: var(--r-pill); }
.segmented-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: var(--r-pill); z-index: 0;
  background: linear-gradient(150deg, rgb(255 255 255 / 0.22), rgb(255 255 255 / 0.08));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 8px 24px -10px rgb(139 92 255 / 0.9);
  transition: transform var(--t-mid) var(--ease-spring), width var(--t-mid) var(--ease-spring);
}
.segmented-option {
  position: relative; z-index: 1; height: var(--h-control-s); min-width: var(--btn-min-s); padding: 0 20px;
  border: 0; background: none; border-radius: var(--r-pill); cursor: pointer;
  font: 650 14px/1 var(--font-body); color: var(--ink-3); transition: color var(--t-fast);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.segmented-option:hover { color: var(--ink-2); }
.segmented-option[aria-selected="true"] { color: var(--ink); }
.segmented-option .tag { font: 700 10.5px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--ink-on-signal); background: var(--lime); border-radius: var(--r-pill); padding: 4px 7px; }
.segmented:not(.is-ready) .segmented-option[aria-selected="true"] { background: linear-gradient(150deg, rgb(255 255 255 / 0.22), rgb(255 255 255 / 0.08)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 8px 24px -10px rgb(139 92 255 / 0.9); }

/* Disclosure (FAQ) */
.disclosure-list { display: grid; gap: 12px; }
.disclosure { border-radius: var(--r-m); }
.disclosure summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 72px; padding: 0 26px; font: 600 17px/1.35 var(--font-body); color: var(--ink);
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure .plus { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); transition: transform var(--t-mid) var(--ease-spring), background var(--t-mid); }
.disclosure .plus::before, .disclosure .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); }
.disclosure .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.disclosure[open] .plus { transform: rotate(45deg); background: var(--lime); color: var(--ink-on-signal); box-shadow: none; }
.disclosure summary:hover .plus { box-shadow: inset 0 0 0 1px var(--lime); }
.disclosure-body { padding: 0 26px 24px; max-width: 76ch; }

/* Data table */
.table-wrap { border-radius: var(--r-l); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 18px 26px; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
.table tr:last-child td { border-bottom: 0; }
.table thead th { font: 600 var(--fs-micro)/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); background: rgb(255 255 255 / 0.03); }
.table tbody th { font-weight: 650; color: var(--ink); width: 26%; }
.table td { color: var(--ink-2); }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: rgb(255 255 255 / 0.035); }
.table .yes { color: var(--lime); font-weight: 650; }
.table .no { color: var(--ink-4); }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-s); font-size: 14.5px; }
.alert[hidden] { display: none; }
.alert-error { background: rgb(255 107 125 / 0.10); box-shadow: inset 0 0 0 1px rgb(255 107 125 / 0.35); color: #ffd2d8; }
.alert-ok { background: rgb(210 255 77 / 0.08); box-shadow: inset 0 0 0 1px rgb(210 255 77 / 0.35); color: #efffc4; }

/* Long-form text (legal) */
.prose { max-width: 76ch; }
.prose h2 { font-size: clamp(22px, 2vw, 28px); margin: 56px 0 16px; letter-spacing: -0.02em; scroll-margin-top: 120px; }
.prose h3 { font-size: 18px; margin: 32px 0 10px; font-family: var(--font-body); font-weight: 700; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.75; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 16px 0; }
.prose li { position: relative; padding-left: 26px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 8px; height: 8px; border-radius: 3px; background: var(--grad-aurora); transform: rotate(45deg); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: rgb(210 255 77 / 0.6); text-underline-offset: 3px; }
.prose a:hover { color: var(--lime); }
.prose strong { color: var(--ink); }

/* Check list */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; color: var(--ink-2); }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: rgb(210 255 77 / 0.12) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d2ff4d' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center / 14px no-repeat; box-shadow: inset 0 0 0 1px rgb(210 255 77 / 0.35); }
.checks strong { color: var(--ink); font-weight: 650; }

@media (max-width: 560px) {
  .btn-row > .btn { flex: 1 1 100%; }
}
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tbody tr { padding: 18px 20px; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table tbody th, .table tbody td { padding: 0; border: 0; width: 100%; }
  .table tbody th { font-size: 16px; margin-bottom: 10px; }
  .table td + td, .table th + td { margin-top: 10px; }
  .table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 600 11px/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
}
@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3)::before { display: none; }
  .table th, .table td { padding: 14px 16px; }
}
