:root {
  --bg: #050506;
  --bg-deep: #120507;
  --panel: rgba(17, 17, 21, 0.9);
  --panel-border: rgba(255, 74, 92, 0.19);
  --text: #f3edef;
  --muted: #c8b8bd;
  --accent: #ff334f;
  --accent-strong: #bf1029;
  --accent-soft: rgba(255, 51, 79, 0.12);
  --secondary: #ff9dac;
  --secondary-soft: rgba(255, 138, 154, 0.12);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: #000;
  overflow-x: hidden;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(22px);
  background:
    linear-gradient(180deg, rgba(8, 8, 11, 0.96), rgba(8, 8, 11, 0.88));
  border-bottom: 1px solid rgba(255, 108, 128, 0.74);
  box-shadow:
    0 1px 0 rgba(255, 108, 128, 0.44),
    0 16px 40px rgba(0, 0, 0, 0.24);
}

.top-bar-inner {
  width: calc(100% - 2rem);
  margin: 0 auto;
  padding: 0.54rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

code {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.95em;
}

.shell {
  width: calc(100% - 2rem);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  grid-template-areas:
    "search"
    "results";
}

.brand-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:focus-visible {
  outline: none;
}

.brand-link:focus-visible .brand-mark {
  border-color: rgba(255, 118, 138, 0.52);
  box-shadow: 0 0 0 1px rgba(255, 118, 138, 0.52), 0 10px 28px rgba(0, 0, 0, 0.28);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.4rem 0.82rem;
  border-radius: 10px;
  background: rgba(8, 8, 11, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: clamp(1.08rem, 2.1vw, 1.38rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-mark span {
  color: #ff5f76;
}

.brand-icon {
  width: clamp(1.95rem, 3.5vw, 2.45rem);
  height: auto;
  margin-left: 0.24rem;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.brand-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border: 1px solid rgba(255, 104, 125, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 69, 95, 0.16), rgba(255, 108, 128, 0.08));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  color: #ffd7de;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.top-nav-link {
  color: rgba(255, 226, 231, 0.82);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.top-nav-link + .top-nav-link {
  margin-left: 1.4rem;
}

.top-nav-link:hover,
.top-nav-link:focus-visible {
  color: #fff4f6;
  outline: none;
}

.top-nav-link.is-active {
  color: #ffb9c4;
}

.panel {
  position: relative;
  backdrop-filter: blur(20px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise-in 500ms ease both;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(320deg, rgba(255, 43, 71, 0.05), transparent 45%);
  pointer-events: none;
}

.search-panel {
  grid-area: search;
  padding: 1.8rem 1.8rem 1.2rem;
}

.results-panel {
  grid-area: results;
  padding: 1.55rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8697;
}

h2 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.panel-head p,
.summary,
.status,
.empty-state {
  color: var(--muted);
}

.panel-head {
  margin-bottom: 1.2rem;
}

.panel-head p,
.summary,
.status {
  margin: 0.4rem 0 0;
  font-size: 0.98rem;
  line-height: 1.65;
}

.panel-head p {
  max-width: 42ch;
}

.summary {
  max-width: 48ch;
  text-align: right;
}

.status {
  display: none;
}

.search-form {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.search-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}

.search-platform-field {
  max-width: 22rem;
}

.search-platform-control {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}

.search-platform-control-generic {
  grid-template-columns: minmax(0, 1fr);
}

.platform-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 88, 111, 0.21);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: rgba(11, 11, 15, 0.98);
  transition: border-color 160ms ease, transform 160ms ease;
}

.platform-logo-icon {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
}

.platform-logo-icon-name {
  width: 2.7rem;
  height: 1.5rem;
}

.platform-logo-icon-inverted {
  filter: invert(1);
}

.search-main-column {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  height: 100%;
}

.search-panel-head {
  margin-bottom: 0;
}

.search-top-row {
  display: grid;
  grid-template-columns: minmax(0, 32rem) minmax(0, 1fr);
  column-gap: 1.75rem;
  row-gap: 0.65rem;
  align-items: stretch;
}

.search-side-controls {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-width: 0;
  justify-self: stretch;
  align-self: start;
}

.search-field {
  width: 100%;
}

.search-main-column .search-platform-field {
  margin-top: auto;
}

.search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
}

.mode-picker {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(255, 88, 111, 0.19);
  border-radius: var(--radius-md);
  background: rgba(13, 13, 17, 0.9);
}

.search-filter-panel {
  padding: 0.75rem 1rem;
}

.mode-picker-labels {
  display: grid;
  gap: 0.15rem;
}

.search-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.85rem 1rem;
}

.mode-group {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.mode-group-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8c6cb;
}

.mode-group-items {
  display: grid;
  gap: 0.35rem;
}

.search-option-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #af9ca1;
}

.search-option-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.login-shell {
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 1rem 3rem;
}

.about-shell {
  width: calc(100% - 2rem);
  max-width: 88rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0 3rem;
}

.contact-shell {
  width: calc(100% - 2rem);
  max-width: 88rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0 3rem;
}

.about-panel {
  padding: clamp(2rem, 3.5vw, 3rem);
}

.contact-panel {
  padding: clamp(1.8rem, 3vw, 2.4rem);
}

.about-panel-head p:last-child {
  max-width: none;
}

.contact-panel-head p:last-child {
  max-width: none;
}

.about-panel-head h2,
.contact-panel-head h2 {
  color: #ff8697;
}

.about-panel-head {
  max-width: 56rem;
  margin-bottom: 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field.contact-message-field textarea {
  min-height: 20rem;
  resize: none;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact-status {
  margin: 1rem 0 0;
  color: var(--muted);
}

.contact-status.is-success {
  color: #ffb9c4;
}

.contact-status.is-error {
  color: #ff7a8d;
}

.about-card {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(255, 88, 111, 0.16);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(18, 18, 24, 0.96), rgba(11, 11, 15, 0.9));
}

.about-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  line-height: 1.3;
  color: #fff1f4;
}

.about-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.about-card-head h3 {
  margin: 0;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

.about-card a {
  color: #ff9dac;
}

.about-card a:hover,
.about-card a:focus-visible {
  color: #ffd7de;
}

.about-replay-section {
  margin-top: 1.4rem;
  padding: clamp(1.35rem, 2.5vw, 1.8rem);
  border: 1px solid rgba(255, 88, 111, 0.2);
  border-radius: calc(var(--radius-md) + 2px);
  background:
    linear-gradient(140deg, rgba(24, 12, 17, 0.94), rgba(12, 12, 17, 0.92));
}

.about-section-head {
  display: grid;
  gap: 0.45rem;
}

.about-section-head .eyebrow {
  margin-bottom: 0.1rem;
}

.about-section-head h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff0f3;
}

.about-section-head p:last-child {
  margin: 0;
  max-width: 52ch;
}

.about-section-head-wide p:last-child {
  max-width: none;
}

.about-replay-grid {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.about-step {
  padding: 1.1rem 1.1rem 1.05rem;
  border: 1px solid rgba(255, 106, 127, 0.14);
  border-radius: calc(var(--radius-md) - 2px);
  background: rgba(10, 10, 14, 0.74);
}

.about-step-highlight {
  border-color: rgba(255, 129, 146, 0.38);
  background:
    linear-gradient(160deg, rgba(255, 64, 95, 0.14), rgba(10, 10, 14, 0.82));
  box-shadow: 0 0 0 1px rgba(255, 120, 140, 0.08);
}

.about-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  padding: 0.26rem 0.56rem;
  border: 1px solid rgba(255, 118, 138, 0.28);
  border-radius: 999px;
  background: rgba(255, 73, 97, 0.08);
  color: #ff9bab;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.about-step h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.3;
  color: #fff1f4;
}

.about-step-highlight h4 {
  color: #ffd8df;
  font-size: 1.08rem;
}

.about-step p {
  margin: 0;
  color: var(--muted);
}

.about-replay-section a {
  color: #ffb3bf;
  text-decoration-color: rgba(255, 179, 191, 0.5);
  text-underline-offset: 0.16em;
}

.about-replay-section a:hover,
.about-replay-section a:focus-visible {
  color: #ffe0e6;
  text-decoration-color: currentColor;
}

.about-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.login-panel {
  padding: clamp(1.6rem, 3vw, 2.3rem);
}

.login-panel-head p:last-child {
  max-width: 40ch;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.login-status {
  margin-top: 1rem;
}

.login-note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-access {
  position: relative;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 0.7rem;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid rgba(255, 88, 111, 0.21);
  border-radius: 999px;
  background: rgba(14, 14, 18, 0.84);
  color: var(--text);
  font: inherit;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.admin-toggle:hover,
.admin-toggle:focus-visible {
  border-color: rgba(255, 118, 138, 0.52);
  outline: none;
}

.admin-toggle.is-authenticated {
  justify-content: flex-start;
  width: auto;
  height: auto;
  padding: 0.5rem 0.82rem;
}

.admin-toggle-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.28rem;
  height: 1.28rem;
  color: #f1dfe4;
}

.admin-toggle-avatar-icon {
  width: 100%;
  height: 100%;
}

.admin-toggle-dot {
  display: none;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #ff7a8d;
  box-shadow: 0 0 0 5px rgba(255, 90, 115, 0.12);
}

.admin-toggle-label {
  display: none;
}

.admin-toggle.is-authenticated .admin-toggle-avatar {
  display: none;
}

.admin-toggle.is-authenticated .admin-toggle-dot,
.admin-toggle.is-authenticated .admin-toggle-label {
  display: inline-flex;
}

.admin-toggle.is-authenticated .admin-toggle-dot {
  background: #ffb1bd;
  box-shadow: 0 0 0 5px rgba(255, 177, 189, 0.12);
}

.admin-panel {
  width: min(360px, calc(100vw - 2.5rem));
  display: none;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 88, 111, 0.17);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 13, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
}

.admin-access.is-open .admin-panel {
  display: grid;
}

.admin-panel-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8fa0;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
}

.admin-field input {
  min-width: 0;
}

.admin-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  grid-column: 1 / -1;
}

.admin-status {
  margin: 0;
  color: var(--muted);
}

.admin-status-inline {
  margin-top: 0.8rem;
}

.admin-insight-model {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(236, 214, 219, 0.82);
}

.admin-status.is-authenticated {
  color: #ffb1bd;
}

.admin-status.is-error {
  color: #ff7a8d;
}

@media (max-width: 640px) {
  .brand-status {
    padding: 0.24rem 0.52rem;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  .login-shell {
    padding-inline: 0.75rem;
  }

  .about-shell {
    width: calc(100% - 1.5rem);
  }

  .contact-shell {
    width: calc(100% - 1.5rem);
  }

  .about-panel {
    padding-inline: 1.2rem;
  }

  .about-replay-section {
    padding: 1.1rem;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    width: min(320px, calc(100vw - 1.5rem));
  }

  .admin-controls {
    grid-template-columns: 1fr;
  }

  .admin-buttons {
    width: 100%;
  }
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field > span,
.field-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d8c6cb;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 88, 111, 0.22);
  border-radius: var(--radius-md);
  background: rgba(15, 15, 18, 0.96);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, transform 160ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(201, 170, 177, 0.6);
}

.field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3.15rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23f3edef' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M1 1.25 6 6.25 11 1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 0.78rem 0.52rem;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(255, 73, 97, 0.52);
}

.field input.input-hover-suppressed:hover {
  border-color: rgba(255, 88, 111, 0.22);
}

.search-platform-control select {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: 0;
  min-width: 0;
}

.search-platform-control-generic select {
  border-radius: var(--radius-md);
  border-left: 1px solid rgba(255, 88, 111, 0.22);
}

.field .search-platform-control select:hover {
  border-color: rgba(255, 88, 111, 0.22);
  transform: none;
}

.search-platform-control:hover .platform-logo-chip,
.search-platform-control.is-hovered .platform-logo-chip,
.field .search-platform-control:hover select,
.field .search-platform-control.is-hovered select {
  border-color: rgba(255, 73, 97, 0.52);
}

.field .search-platform-control select:focus-visible {
  border-color: rgba(255, 88, 111, 0.22);
  transform: none;
}

.field .search-platform-control:hover select:focus-visible,
.field .search-platform-control.is-hovered select:focus-visible {
  border-color: rgba(255, 73, 97, 0.52);
  transform: translateY(-1px);
}

.field .search-platform-control.is-focus-visible .platform-logo-chip,
.field .search-platform-control.is-focus-visible select,
.field .search-platform-control.is-focus-visible select:focus-visible {
  border-color: rgba(255, 73, 97, 0.78);
}

.search-platform-control.is-focus-visible .platform-logo-chip,
.search-platform-control.is-focus-visible select,
.search-platform-control.is-focus-visible select:focus-visible {
  transform: translateY(-1px);
}

.search-platform-control:has(select:open) .platform-logo-chip,
.field .search-platform-control select:open {
  border-color: rgba(255, 73, 97, 0.78);
  transform: translateY(-1px);
}

.search-platform-control.search-platform-hover-suppressed .platform-logo-chip,
.search-platform-control.search-platform-hover-suppressed:hover .platform-logo-chip,
.search-platform-control.search-platform-hover-suppressed.is-hovered .platform-logo-chip {
  border-color: rgba(255, 88, 111, 0.21);
  transform: none;
}

.field .search-platform-control.search-platform-hover-suppressed select,
.field .search-platform-control.search-platform-hover-suppressed:hover select,
.field .search-platform-control.search-platform-hover-suppressed.is-hovered select,
.field .search-platform-control.search-platform-hover-suppressed select:hover,
.field .search-platform-control.search-platform-hover-suppressed select:focus-visible {
  border-color: rgba(255, 88, 111, 0.22);
  transform: none;
}

.search-platform-control:hover .platform-logo-chip,
.search-platform-control.is-hovered .platform-logo-chip {
  transform: translateY(-1px);
}

.field .search-platform-control:hover select,
.field .search-platform-control.is-hovered select {
  transform: translateY(-1px);
}

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

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: rgba(255, 73, 97, 0.78);
  box-shadow: none;
  transform: translateY(-1px);
}

.field-small {
  max-width: 9rem;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  padding: 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: default;
  pointer-events: none;
}

.mode-group-items .checkbox-field {
  gap: 0.55rem;
  padding: 0.1rem 0;
  font-size: 0.9rem;
}

.mode-group-items .checkbox-field input {
  width: 1rem;
  height: 1rem;
}

.checkbox-field input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid rgba(255, 244, 246, 0.88);
  border-radius: 4px;
  background: rgba(255, 244, 246, 0.98);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.72rem 0.72rem;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.checkbox-field input:checked {
  border-color: rgba(255, 113, 133, 0.88);
  background-color: rgba(255, 51, 79, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.2 6.5 11.4 12.8 4.8' fill='none' stroke='%23fff4f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
}

.checkbox-field input:hover,
.checkbox-field input:focus-visible {
  border-color: rgba(255, 96, 119, 0.82);
  background-color: rgba(255, 206, 214, 0.98);
}

.checkbox-field input:focus-visible {
  outline: none;
}

.checkbox-field input:checked:hover,
.checkbox-field input:checked:focus-visible {
  border-color: rgba(255, 113, 133, 0.88);
  background-color: rgba(255, 51, 79, 0.92);
}

@media (max-width: 720px) {
  .search-top-row {
    grid-template-columns: 1fr;
  }

  .search-meta-row {
    align-items: stretch;
  }

  .search-platform-field {
    max-width: none;
  }

  .search-input-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .search-filter-row {
    align-items: start;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .search-option-items {
    gap: 0.85rem 1rem;
  }
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.95rem 1.4rem;
  border: 1px solid rgba(255, 102, 123, 0.3);
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3e58, #8f081d 82%);
  color: #fff4f6;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

#submit-button {
  padding: 0.82rem 1.2rem;
  font-size: 0.95rem;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 150, 163, 0.54);
  box-shadow: none;
  outline: none;
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  background: rgba(255, 51, 79, 0.1);
  border: 1px solid rgba(255, 94, 118, 0.3);
  color: #ffd8df;
  box-shadow: none;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 51, 79, 0.1);
  border-color: rgba(255, 130, 147, 0.44);
  box-shadow: none;
  outline: none;
}

.danger-button {
  background: rgba(255, 74, 92, 0.08);
  border: 1px solid rgba(255, 103, 121, 0.34);
  color: #ffd4db;
  box-shadow: none;
}

.danger-button:hover,
.danger-button:focus-visible {
  background: rgba(255, 74, 92, 0.08);
  border-color: rgba(255, 142, 156, 0.46);
  box-shadow: none;
  outline: none;
}

.status.is-error {
  color: #ff7a8d;
}

.status.is-loading {
  color: #ff98a6;
}

.loading-sweep-text {
  display: inline-block;
  color: rgba(255, 255, 255, 0.28);
  background-image: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.22) 34%,
    rgba(255, 255, 255, 0.98) 48%,
    rgba(255, 255, 255, 0.22) 62%,
    rgba(255, 255, 255, 0.22) 100%
  );
  background-size: 220% 100%;
  background-position: 140% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: status-sweep 1.8s linear infinite;
}

@keyframes status-sweep {
  from {
    background-position: 140% 50%;
  }

  to {
    background-position: -40% 50%;
  }
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.results-actions {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.empty-state {
  display: grid;
  gap: 0.85rem;
  padding: 1.4rem;
  border: 1px dashed rgba(255, 84, 107, 0.28);
  border-radius: var(--radius-md);
  background: rgba(12, 12, 15, 0.78);
  line-height: 1.65;
}

.empty-state-link {
  color: inherit;
  font-weight: inherit;
}

.empty-state-link-anchor {
  color: #ff9dac;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.16em;
}

.empty-state-link-anchor:hover,
.empty-state-link-anchor:focus-visible {
  color: #ff7a8d;
}

.results-detail-grid {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.results-detail-grid.has-profile,
.results-detail-grid.has-insights {
  grid-template-columns: minmax(0, 1fr);
}

.results-detail-grid.has-both {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: stretch;
}

.profile-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid rgba(255, 84, 107, 0.20);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(255, 73, 97, 0.18), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(255, 122, 137, 0.08), transparent 30%),
    linear-gradient(
      180deg,
      rgba(255, 87, 110, 0.07) 0%,
      rgba(255, 87, 110, 0.03) 34%,
      rgba(255, 255, 255, 0.012) 68%,
      rgba(255, 104, 124, 0.045) 100%
    ),
    rgba(13, 13, 17, 0.92);
}

.profile-pro-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.3rem;
  padding: 0.22rem 0.48rem 0.18rem;
  border: 1px solid rgba(31, 229, 213, 0.88);
  border-radius: 0.42rem;
  background: rgba(8, 15, 16, 0.94);
  color: #1fe5d5;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(31, 229, 213, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.profile-panel.has-pro-indicator .profile-head {
  padding-right: 4.7rem;
}

.profile-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.profile-head h3 {
  margin: 0;
  font-family: inherit;
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.profile-summary {
  margin: 0;
  color: var(--muted);
  text-align: right;
  max-width: 32rem;
}

.profile-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.profile-category-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 96, 118, 0.16);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 13, 0.78);
}

.profile-category-label,
.profile-category-value,
.profile-metric-title,
.profile-metric-meta {
  margin: 0;
}

.profile-category-label {
  display: block;
  max-width: calc(100% - 2.5rem);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-category-value {
  margin-top: 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.profile-metrics {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.profile-metric-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 96, 118, 0.16);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 13, 0.78);
}

.profile-card-head,
.profile-metric-head,
.profile-metric-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-card-head {
  position: relative;
}

.profile-category-card .profile-card-head {
  min-height: 2.35rem;
  align-items: flex-start;
}

.profile-metric-title {
  font-weight: 650;
}

.profile-info-button {
  position: relative;
  flex: 0 0 auto;
  width: 1.32rem;
  height: 1.32rem;
  padding: 0;
  border: 1px solid rgba(255, 126, 145, 0.22);
  border-radius: 999px;
  background: rgba(255, 90, 113, 0.08);
  color: #ff97a8;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: default;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.profile-info-button:hover,
.profile-info-button:focus-visible,
.profile-info-button.is-open {
  background: rgba(255, 102, 123, 0.16);
  border-color: rgba(255, 138, 154, 0.36);
  color: #ffd3da;
  outline: none;
}

.profile-info-button::before,
.profile-info-button::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  transform: translate(-50%, -4px);
  z-index: 8;
}

.profile-info-button::before {
  content: "";
  top: calc(100% + 0.18rem);
  margin-left: 0;
  border-left: 0.38rem solid transparent;
  border-right: 0.38rem solid transparent;
  border-bottom: 0.44rem solid rgba(22, 12, 16, 0.98);
}

.profile-info-button::after {
  content: attr(data-tooltip);
  top: calc(100% + 0.55rem);
  width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 116, 136, 0.20);
  border-radius: 0.8rem;
  background: rgba(22, 12, 16, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  color: #ffd5dc;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
}

.profile-info-button.profile-info-button-align-left::before,
.profile-info-button.profile-info-button-align-left::after {
  left: 0;
  transform: translateY(-4px);
}

.profile-info-button.profile-info-button-align-right::before,
.profile-info-button.profile-info-button-align-right::after {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.profile-info-button.is-open::before,
.profile-info-button.is-open::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile-info-button.profile-info-button-align-left.is-open::before,
.profile-info-button.profile-info-button-align-left.is-open::after,
.profile-info-button.profile-info-button-align-right.is-open::before,
.profile-info-button.profile-info-button-align-right.is-open::after {
  transform: translateY(0);
}

.profile-metric-bar {
  height: 0.72rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.profile-metric-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff455f, #ff9bab);
  box-shadow: 0 0 20px rgba(255, 85, 109, 0.25);
}

.profile-metric-meta {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.entry-download-link {
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 51, 79, 0.12);
  border: 1px solid rgba(255, 83, 110, 0.22);
  color: #ff8a9a;
  text-decoration: none;
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.entry-download-link:hover {
  background: rgba(255, 51, 79, 0.2);
  border-color: rgba(255, 103, 127, 0.38);
  transform: translateY(-1px);
  text-decoration: none;
}

.insights-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.3rem;
  border: 1px solid rgba(255, 72, 98, 0.22);
  border-radius: var(--radius-md);
  background: rgba(14, 14, 18, 0.9);
}

.insights-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.insights-head h3 {
  margin: 0;
  font-family: inherit;
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.insights-model,
.insights-summary,
.insights-empty,
.insight-takeaway,
.insight-metrics,
.insight-tip {
  color: var(--muted);
}

.insights-model,
.insights-summary,
.insights-empty {
  margin: 0;
}

.insights-summary,
.insights-empty {
  max-width: 70ch;
  line-height: 1.7;
}

.insights-summary {
  max-width: none;
  width: 100%;
}

#insights-summary-secondary {
  margin-top: 0.9rem;
}

.insights-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.insight-group {
  display: grid;
  gap: 0.75rem;
}

.insight-group-title {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-group-positive .insight-group-title {
  color: #69c592;
}

.insight-group-critical .insight-group-title {
  color: #ff5d74;
}

.insight-group-list {
  display: grid;
  gap: 0.9rem;
}

.insight-name-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.7rem;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.5;
}

.insight-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 87, 110, 0.14);
  border-radius: var(--radius-md);
  background: rgba(11, 11, 14, 0.9);
}

.insight-card-positive {
  border-color: rgba(72, 164, 109, 0.2);
  background: rgba(9, 18, 13, 0.92);
}

.insight-card-critical {
  border-color: rgba(255, 66, 91, 0.24);
  background: rgba(23, 10, 13, 0.93);
}

.insight-card h4 {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.35;
}

.insight-takeaway {
  margin: 0.55rem 0 0;
  line-height: 1.72;
}

.insight-metrics {
  margin: 0.8rem 0 0;
  line-height: 1.5;
  font-size: 0.94rem;
}

.insight-tip {
  margin: 0.8rem 0 0;
  font-weight: 600;
  line-height: 1.68;
}

.vector-panel {
  padding: 1.8rem;
}

.vector-method {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.72;
}

.vector-stage {
  position: relative;
  margin-top: 1.15rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 84, 107, 0.22);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(255, 89, 112, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(10, 10, 13, 0.96), rgba(6, 6, 8, 0.96));
}

.vector-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-md) - 4px);
}

.vector-map-bg {
  fill: rgba(10, 10, 13, 0.92);
}

.vector-grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.vector-axis-line {
  stroke: rgba(255, 89, 112, 0.24);
  stroke-width: 1.25;
}

.vector-axis-label {
  fill: #d4c0c6;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.vector-dot {
  fill: #ff7388;
  stroke: rgba(10, 10, 13, 0.88);
  stroke-width: 2.5;
  opacity: 0.92;
}

.vector-dot-active {
  fill: #fff4f6;
  stroke: #ff3f5a;
  stroke-width: 3;
}

.vector-point-label {
  fill: #f8f0f2;
  font-size: 12px;
  font-weight: 650;
  paint-order: stroke;
  stroke: rgba(8, 8, 11, 0.92);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.vector-point-label-active {
  fill: #ffffff;
}

.vector-tooltip {
  position: absolute;
  z-index: 5;
  max-width: min(22rem, calc(100% - 1rem));
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 92, 115, 0.32);
  border-radius: 14px;
  background: rgba(7, 7, 9, 0.94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  color: #fff1f4;
  font-size: 0.9rem;
  line-height: 1.45;
  pointer-events: none;
  white-space: nowrap;
}

.hidden {
  display: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .top-bar-inner {
    width: calc(100% - 1.5rem);
    padding: 0.58rem 0;
    flex-wrap: wrap;
  }

  .shell {
    width: calc(100% - 1.5rem);
  }

  .search-panel,
  .results-panel,
  .vector-panel {
    padding: 1.4rem;
  }

  .results-panel {
    padding: 1.2rem;
  }

  .search-panel {
    padding-bottom: 1rem;
  }

  .results-head {
    flex-direction: column;
    align-items: start;
  }

  .results-actions {
    justify-items: start;
  }

  .summary {
    text-align: left;
  }

  .results-detail-grid.has-profile,
  .results-detail-grid.has-both {
    grid-template-columns: 1fr;
  }

  .insights-head {
    flex-direction: column;
    align-items: start;
  }

  .profile-head,
  .profile-metric-head,
  .profile-metric-meta {
    flex-direction: column;
    align-items: start;
  }

  .profile-panel.has-pro-indicator .profile-head {
    padding-right: 3.9rem;
  }

  .profile-pro-indicator {
    top: 0.9rem;
    right: 0.9rem;
    min-width: 3rem;
    padding: 0.2rem 0.42rem 0.16rem;
    border-radius: 0.38rem;
    font-size: 0.78rem;
  }

  .profile-summary {
    text-align: left;
  }

  .vector-stage {
    padding: 0.6rem;
  }
}
