/* Starboi public UI. Opt in with <html class="starboi-ui">.
 * Visual settings live here; see docs/shared-ui.md. No workbench selectors. */

.starboi-ui {
  box-sizing: border-box;
  color-scheme: dark;
  --page-background: #7160ee;
  --page-width: 1120px;
  --hero-size: clamp(4rem, 10.8vw, 9rem);
  --hero-mobile-size: clamp(3rem, 14.5vw, 5rem);
  --hero-fill: rgba(255, 255, 255, 0.03);
  --hero-stroke: 1.8px rgba(255, 255, 255, 0.82);
  --hero-copy-margin: 24px 0 0;
  --card-border: 1px solid rgba(255, 255, 255, 0.54);
  --card-radius: var(--radius-xl);
  --card-background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%), var(--glass);
  --card-filter: blur(1px);
  --panel-background: rgba(45, 31, 109, 0.32);
  --control-height: 54px;
  --control-compact-height: 50px;
  --control-padding: 0 16px;
  --control-font-size: 1rem;
  --control-background: rgba(46, 31, 113, 0.48);
  --control-focus-background: rgba(43, 28, 108, 0.78);
  --control-focus-shadow: 0 0 0 4px rgba(255, 255, 255, 0.13);
  --field-label-size: .84rem;
  --placeholder: rgba(255, 255, 255, 0.52);
  --option-text: #fff;
  --option-background: #4934a9;
  --button-background: rgba(157, 207, 255, 0.24);
  --button-border: rgba(255, 255, 255, 0.58);
  --button-shadow: 0 13px 34px rgba(69, 43, 174, 0.18);
  --button-hover-background: rgba(174, 218, 255, 0.34);
  --button-hover-scale: 1.045;
  --popover-background: rgba(52, 36, 124, 0.88);
  --popover-filter: blur(3px);
  --focus-color: var(--mint);

  --font-display: "silicone", sans-serif;
  --font-body: "bouba-round-variable", sans-serif;
  --night: #2d216d;
  --night-deep: #39268f;
  --blue: #78a9e8;
  --violet: #765cf3;
  --lavender: #e0dcff;
  --pink: #f5c5ff;
  --mint: #d7fff7;
  --cream: #fff;
  --white: #fff;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.88);
  --dim: rgba(244, 240, 255, 0.72);
  --line: rgba(255, 255, 255, 0.34);
  --line-bright: rgba(255, 255, 255, 0.68);
  --glass: rgba(78, 56, 166, 0.27);
  --glass-deep: rgba(47, 34, 116, 0.68);
  --success: #d5fff0;
  --error: #ffd3dc;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --shadow: 0 32px 90px rgba(47, 28, 130, 0.25);
}

:where(.starboi-ui) * {
  box-sizing: border-box;
}

:where(.starboi-ui) [hidden] {
  display: none !important;
}

.starboi-ui {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--page-background);
}

:where(.starboi-ui) body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 400;
}

:where(.starboi-ui) .star-field,
:where(.starboi-ui) .star-field::before,
:where(.starboi-ui) .star-field::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-repeat: no-repeat;
}

:where(.starboi-ui) .star-field {
  opacity: 1;
  background-image:
  linear-gradient(180deg, rgba(103, 77, 238, 0.035), rgba(94, 70, 218, 0.025)),
  url("/live-chart/star-field.png");
  background-position: center top;
  background-size: cover;
}

:where(.starboi-ui) .star-field::before {
  opacity: 1;
  background:
  radial-gradient(circle at 50% 33%, rgba(255, 255, 255, 0.04), transparent 34rem),
  linear-gradient(180deg, rgba(84, 61, 211, 0.02), rgba(64, 42, 167, 0.06));
}

:where(.starboi-ui) .star-field::after {
  opacity: 0.10;
  background: linear-gradient(180deg, transparent 72%, #563cc8 100%);
}

:where(.starboi-ui) h1,
:where(.starboi-ui) h2,
:where(.starboi-ui) h3 {
  font-family: var(--font-display);
  font-style: normal;
}

:where(.starboi-ui) p {
  font-weight: 400;
  font-variation-settings: "wght" 400;
}

:where(.starboi-ui) button,
:where(.starboi-ui) input,
:where(.starboi-ui) select,
:where(.starboi-ui) textarea {
  font: inherit;
}

:where(.starboi-ui) button,
:where(.starboi-ui) a,
:where(.starboi-ui) summary {
  -webkit-tap-highlight-color: transparent;
}

:where(.starboi-ui) button {
  border: 0;
}

:where(.starboi-ui) a {
  color: inherit;
}

:where(.starboi-ui) .site-header,
:where(.starboi-ui) main,
:where(.starboi-ui) footer {
  width: min(var(--page-width), calc(100% - 36px));
  margin-inline: auto;
}

:where(.starboi-ui) .site-header {
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Navigation shared by the public tools; wraps below the wordmark on phones. */
:where(.starboi-ui) .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-left: auto;
  font-size: .9rem;
}
:where(.starboi-ui) .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 5px;
}

:where(.starboi-ui) .brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

:where(.starboi-ui) .brand:hover {
  transform: scale(1.04);
}

:where(.starboi-ui) .brand img {
  width: clamp(280px, 34vw, 440px);
  max-width: 78vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 5px 16px rgba(61, 41, 158, 0.22));
}

:where(.starboi-ui) main {
  padding: 36px 0 100px;
}

:where(.starboi-ui) .hero {
  max-width: 1120px;
  margin: 0 0 42px;
  text-align: center;
}

:where(.starboi-ui) .eyebrow,
:where(.starboi-ui) .overline {
  margin: 0;
  color: var(--pink);
  font-size: 0.7rem;
  font-weight: 600;
  font-variation-settings: "wght" 650;
  text-transform: uppercase;
  letter-spacing: 0.19em;
}

:where(.starboi-ui) .hero h1 {
  max-width: none;
  margin: 0;
  color: var(--hero-fill);
  -webkit-text-fill-color: var(--hero-fill);
  -webkit-text-stroke: var(--hero-stroke);
  font-size: var(--hero-size);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: none;
  filter:
  drop-shadow(0 0 4px rgba(255, 255, 255, 0.42))
  drop-shadow(0 0 14px rgba(224, 216, 255, 0.16));
  transform-origin: center;
  transition:
  transform 650ms cubic-bezier(0.2, 0.75, 0.25, 1),
  filter 650ms ease;
}

:where(.starboi-ui) .hero h1:hover {
  transform: scale(1.025);
  filter:
  drop-shadow(0 0 5px rgba(255, 255, 255, 0.50))
  drop-shadow(0 0 18px rgba(224, 216, 255, 0.22));
}

:where(.starboi-ui) .hero-copy {
  max-width: 700px;
  margin: var(--hero-copy-margin);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

:where(.starboi-ui) .ui-card {
  border: var(--card-border);
  border-radius: var(--card-radius);
  background:
  var(--card-background);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--card-filter);
  backdrop-filter: var(--card-filter);
}

:where(.starboi-ui) .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
}

:where(.starboi-ui) .section-heading h2,
:where(.starboi-ui) .results-header h2,
:where(.starboi-ui) .mini-heading h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.025em;
}

:where(.starboi-ui) .section-heading h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

:where(.starboi-ui) .info-disclosure {
  position: relative;
  flex: 0 0 auto;
}

:where(.starboi-ui) .info-disclosure > summary,
:where(.starboi-ui) .field-option > summary {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  font-style: italic;
  list-style: none;
}

:where(.starboi-ui) .info-disclosure > summary::-webkit-details-marker,
:where(.starboi-ui) .field-option > summary::-webkit-details-marker {
  display: none;
}

:where(.starboi-ui) .info-disclosure[open] > summary,
:where(.starboi-ui) .field-option[open] > summary {
  background: rgba(255, 255, 255, 0.18);
}

:where(.starboi-ui) .info-disclosure > div {
  width: min(340px, calc(100vw - 58px));
  padding: 15px 17px;
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  background: var(--popover-background);
  -webkit-backdrop-filter: var(--popover-filter);
  backdrop-filter: var(--popover-filter);
  box-shadow: 0 18px 44px rgba(46, 27, 125, 0.30);
}

:where(.starboi-ui) .info-disclosure p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

:where(.starboi-ui) .info-disclosure p + p {
  margin-top: 10px;
}

:where(.starboi-ui) .field-option {
  position: relative;
  flex: 0 0 auto;
}

:where(.starboi-ui) .field-option > summary {
  width: 26px;
  height: 26px;
  font-size: 0.78rem;
  font-style: normal;
}

:where(.starboi-ui) .field-option-popover {
  width: max-content;
  min-width: 210px;
  padding: 14px;
  position: absolute;
  z-index: 22;
  top: calc(100% + 9px);
  right: 0;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  background: var(--popover-background);
  -webkit-backdrop-filter: var(--popover-filter);
  backdrop-filter: var(--popover-filter);
  box-shadow: 0 18px 44px rgba(46, 27, 125, 0.32);
}

:where(.starboi-ui) .field {
  min-width: 0;
  display: grid;
  gap: 9px;
}

:where(.starboi-ui) .field-heading {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

:where(.starboi-ui) .field-wide {
  grid-column: 1 / -1;
}

:where(.starboi-ui) .field-heading > label,
:where(.starboi-ui) .field-label,
:where(.starboi-ui) .field > span {
  color: var(--cream);
  font-size: var(--field-label-size);
  font-weight: 600;
  font-variation-settings: "wght" 600;
}

:where(.starboi-ui) .field > span small {
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 500;
}

:where(.starboi-ui) input[type="text"],
:where(.starboi-ui) input[type="search"],
:where(.starboi-ui) input[type="date"],
:where(.starboi-ui) input[type="time"],
:where(.starboi-ui) input[type="number"],
:where(.starboi-ui) select,
:where(.starboi-ui) input:not([type]),
:where(.starboi-ui) input[type="email"],
:where(.starboi-ui) input[type="password"],
:where(.starboi-ui) textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--text);
  background: var(--control-background);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  min-width: 0;
  max-width: 100%;
  font-size: var(--control-font-size);
}

:where(.starboi-ui) select {
  appearance: none;
  -webkit-appearance: none;
  text-align-last: center;
}

:where(.starboi-ui) select:invalid {
  color: var(--placeholder);
}

:where(.starboi-ui) select option {
  color: var(--option-text);
  background: var(--option-background);
}

:where(.starboi-ui) input::placeholder,
:where(.starboi-ui) textarea::placeholder {
  color: var(--placeholder);
}

:where(.starboi-ui) input:focus {
  border-color: var(--lavender);
  background: var(--control-focus-background);
  box-shadow: var(--control-focus-shadow);
}

:where(.starboi-ui) select:focus,
:where(.starboi-ui) textarea:focus {
  border-color: var(--lavender);
  outline: none;
  background: var(--control-focus-background);
  box-shadow: var(--control-focus-shadow);
}

:where(.starboi-ui) .form-status.success,
:where(.starboi-ui) .copy-status.success {
  color: var(--success);
}

:where(.starboi-ui) .form-status.error,
:where(.starboi-ui) .copy-status.error {
  color: var(--error);
}

:where(.starboi-ui) .place-attribution {
  color: var(--dim);
  font-size: 0.73rem;
  line-height: 1.45;
}

:where(.starboi-ui) .place-attribution a {
  color: var(--muted);
  text-underline-offset: 2px;
}

:where(.starboi-ui) .privacy-note {
  margin-top: 30px;
  padding: 15px 17px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(188, 235, 221, 0.18);
  border-radius: var(--radius-md);
  color: var(--mint);
  background: rgba(188, 235, 221, 0.045);
}

:where(.starboi-ui) .privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

:where(.starboi-ui) .form-footer {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

:where(.starboi-ui) .form-status {
  flex: 1;
}

:where(.starboi-ui) .form-status:empty {
  display: none;
}

:where(.starboi-ui) .form-status,
:where(.starboi-ui) .copy-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
}

:where(.starboi-ui) .primary-button,
:where(.starboi-ui) .secondary-link,
:where(.starboi-ui) .copy-button,
:where(.starboi-ui) .text-button,
:where(.starboi-ui) .segmented-control button,
:where(.starboi-ui) .info-disclosure > summary,
:where(.starboi-ui) .field-option > summary {
  cursor: pointer;
  transition:
  transform 360ms cubic-bezier(0.2, 0.75, 0.25, 1),
  border-color 300ms ease,
  background 300ms ease,
  box-shadow 300ms ease;
}

:where(.starboi-ui) .primary-button {
  min-height: 54px;
  min-width: 230px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--button-border);
  color: var(--white);
  background: var(--button-background);
  box-shadow: var(--button-shadow);
  backdrop-filter: blur(14px);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:where(.starboi-ui) .primary-button:hover {
  transform: scale(var(--button-hover-scale));
  border-color: rgba(255, 255, 255, 0.76);
  background: var(--button-hover-background);
  box-shadow: 0 17px 40px rgba(69, 43, 174, 0.24);
}

:where(.starboi-ui) .secondary-link:hover,
:where(.starboi-ui) .copy-button:hover {
  transform: scale(1.035);
}

:where(.starboi-ui) .primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

:where(.starboi-ui) .text-button {
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

:where(.starboi-ui) .text-button:hover {
  color: var(--white);
}

:where(.starboi-ui) .mini-heading h3 {
  font-size: 1.45rem;
}

:where(.starboi-ui) .ui-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-background);
}

:where(.starboi-ui) .segmented-control button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(203, 184, 255, 0.08);
  color: var(--cream);
  cursor: pointer;
  font-size: 0.8rem;
}

:where(.starboi-ui) .segmented-control button[aria-pressed="true"] {
  border-color: var(--line-bright);
  background: rgba(203, 184, 255, 0.27);
}


:where(.starboi-ui) .copy-button {
  min-width: 110px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: var(--lavender);
  background: rgba(203, 184, 255, 0.07);
  font-size: 0.75rem;
  font-weight: 700;
}

:where(.starboi-ui) .copy-button:active {
  transform: scale(0.96);
}

:where(.starboi-ui) .copy-button.is-copied {
  color: #4934a9;
  background: #e2eaff;
  border-color: #e2eaff;
  animation: starboi-copy-confirm 420ms ease-out;
}

@keyframes starboi-copy-confirm {
0%, 100% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

:where(.starboi-ui) .copy-status {
  margin-top: 15px;
  line-height: 1.4;
}

:where(.starboi-ui) .secondary-link {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  color: var(--cream);
  background: rgba(203, 184, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

:where(.starboi-ui) footer {
  padding: 30px 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--dim);
  text-align: center;
}

@media (max-width: 660px) {
  :where(.starboi-ui) .site-header,
  :where(.starboi-ui) main,
  :where(.starboi-ui) footer {
  width: min(100% - 24px, var(--page-width));
  }

  :where(.starboi-ui) .site-header {
  padding-top: max(18px, env(safe-area-inset-top));
  }

  :where(.starboi-ui) .brand img {
  width: min(76vw, 340px);
  }

  :where(.starboi-ui) main {
  padding-top: 38px;
  }

  :where(.starboi-ui) .hero {
  margin-bottom: 34px;
  }

  :where(.starboi-ui) .hero h1 {
  font-size: var(--hero-mobile-size);
  }

  :where(.starboi-ui) .field-wide {
  grid-column: auto;
  }

  :where(.starboi-ui) .form-footer {
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  }

  :where(.starboi-ui) .primary-button {
  width: 100%;
  }

  :where(.starboi-ui) .text-button {
  align-self: flex-start;
  }

  :where(.starboi-ui) .secondary-link {
  justify-content: center;
  }
}

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

  :where(.starboi-ui) *,
  :where(.starboi-ui) *::before,
  :where(.starboi-ui) *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  scroll-behavior: auto !important;
  }
}

@media (hover: hover) {
  :where(.starboi-ui) .segmented-control button:hover,
  :where(.starboi-ui) .info-disclosure > summary:hover,
  :where(.starboi-ui) .field-option > summary:hover {
  transform: scale(1.08);
  border-color: var(--white);
  background: rgba(174, 218, 255, 0.34);
  }
}

:where(.starboi-ui) .segmented-control button:active,
:where(.starboi-ui) .info-disclosure > summary:active,
:where(.starboi-ui) .field-option > summary:active {
  transform: scale(0.96);
}


/* Companion controls; one treatment for both static and generated fields. */
:where(.starboi-ui) textarea {
  padding: 12px 15px;
  resize: vertical;
  line-height: 1.45;
}
:where(.starboi-ui) .field small { color: var(--dim); font-weight: 400; }
:where(.starboi-ui) .outline-button,
:where(.starboi-ui) .import-label {
  min-height: 49px;
  padding: 11px 18px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  color: var(--text);
  background: rgba(255,255,255,.06);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  text-align: center;
}
:where(.starboi-ui) .outline-button:hover,
:where(.starboi-ui) .import-label:hover { background: rgba(255,255,255,.17); }
:where(.starboi-ui) .choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(46,31,113,.32);
  cursor: pointer;
  font-size: .88rem;
  line-height: 1.42;
}
:where(.starboi-ui) .choice:has(input:checked) {
  border-color: var(--mint);
  background: rgba(174,218,255,.22);
}
/* Native choice controls need a light unselected surface even when the page
 * requests dark browser chrome. Keep native radio/checkbox behavior and accent. */
:where(.starboi-ui) .choice input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--lavender); color-scheme: light; }
:where(.starboi-ui) .ui-error,
:where(.starboi-ui) .field .ui-error { color: var(--error); font-size: .9rem; line-height: 1.5; }
:where(.starboi-ui) [aria-invalid="true"] { border-color: var(--error); }
:where(.starboi-ui) .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Focus rules are last so input resets never remove the keyboard indicator. */
:where(.starboi-ui) :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
:where(.starboi-ui) .import-label:focus-within {
  outline: 2px solid var(--focus-color);
  outline-offset: 4px;
}
:where(.starboi-ui) button:disabled { cursor: default; }
:where(.starboi-ui) .info-disclosure[open],
:where(.starboi-ui) .field-option[open] { z-index: 30; }
@media (max-width: 660px) {
  /* 16px prevents Safari's automatic input zoom without disabling user zoom. */
  :where(.starboi-ui) :is(input:not([type]), input[type="text"], input[type="search"], input[type="date"], input[type="time"], input[type="email"], input[type="password"], input[type="number"], select, textarea) {
    font-size: max(16px, var(--control-font-size));
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(.starboi-ui) :is(.brand, .hero h1, .primary-button, .secondary-link, .copy-button, .text-button, summary):is(:hover, :active),
  :where(.starboi-ui) .segmented-control button:is(:hover, :active) { transform: none !important; }
}
