:root {
  --bg: #07131d;
  --panel: rgba(8, 23, 35, 0.82);
  --panel-strong: rgba(10, 30, 46, 0.96);
  --line: rgba(178, 216, 247, 0.16);
  --text: #f3fbff;
  --muted: #9dbacc;
  --gold: #f7c65b;
  --mint: #71edc2;
  --danger: #ff7b84;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: linear-gradient(155deg, #061018 0%, #0d2231 48%, #06121b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero,
.dashboard {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: 1.2fr 0.8fr;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.card {
  padding: 28px;
}

.eyebrow,
.panel-label,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
}

.hero h1 {
  font-size: clamp(2.6rem, 4.8vw, 5rem);
  line-height: 0.95;
  max-width: 9ch;
}

.hero-text,
.rule-list,
.source-box p,
.source-box a,
.hint-box,
.message.system .bubble,
.message.bot .bubble {
  color: var(--muted);
}

.hero-text {
  max-width: 60ch;
  line-height: 1.7;
  font-size: 1.04rem;
  margin: 18px 0 0;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.dashboard {
  grid-template-columns: 0.82fr 1.15fr 0.82fr;
  align-items: start;
}

.two-column-dashboard {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.subject-list {
  display: grid;
  gap: 12px;
}

.stage-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.chooser-block + .chooser-block {
  margin-top: 10px;
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.auth-panel .chooser-title {
  margin-bottom: 0;
}

.auth-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.auth-panel-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.auth-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(113, 237, 194, 0.22);
  background: rgba(113, 237, 194, 0.1);
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-copy {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.chooser-title {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.email-box {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.age-picker {
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.age-picker.hidden {
  display: none;
}

.age-picker-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.age-picker-head strong {
  font-size: 0.95rem;
}

.age-picker-head span,
.age-extra-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.age-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.age-option-button,
.age-more-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.age-option-button.active,
.age-more-button.active {
  color: #07131d;
  background: linear-gradient(135deg, var(--gold), #ffe49a);
  border-color: transparent;
}

.age-option-button:hover,
.age-more-button:hover {
  transform: translateY(-2px);
}

.age-more-button {
  margin-top: 12px;
}

.age-selected-tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(113, 237, 194, 0.12);
  border: 1px solid rgba(113, 237, 194, 0.2);
  color: var(--mint);
  font-size: 0.92rem;
}

.age-extra-panel {
  margin-top: 12px;
}

.age-extra-panel.hidden {
  display: none;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.auth-actions.compact {
  margin-top: 0;
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(113, 237, 194, 0.24);
  background: rgba(113, 237, 194, 0.1);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 24, 34, 0.96);
}

.account-mode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.account-mode-button.active {
  border-color: rgba(255, 205, 86, 0.36);
  background: rgba(255, 205, 86, 0.12);
}

.hidden-link {
  display: none;
}

.hidden-control {
  display: none !important;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(247, 198, 91, 0.16), rgba(113, 237, 194, 0.14));
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
}

.auth-link-button {
  text-decoration: none;
  text-align: center;
}

.auth-button.secondary {
  background: rgba(255, 255, 255, 0.05);
}

.auth-button.tertiary {
  display: none;
  background: rgba(255, 255, 255, 0.03);
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
  color: #1f1f1f;
  font: 500 14px/1 "Space Grotesk", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.google-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  line-height: 1.5;
}

.account-status.compact {
  margin-top: 0;
  font-size: 0.9rem;
}

.profile-details {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.profile-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 700;
}

.profile-details summary::-webkit-details-marker {
  display: none;
}

.profile-details summary::after {
  content: "+";
  float: right;
  color: var(--gold);
}

.profile-details[open] summary::after {
  content: "-";
}

.profile-details .profile-grid,
.profile-details .age-picker {
  margin: 0 14px 14px;
}

.email-box input,
.email-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
}

.request-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  outline: none;
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-field select option {
  background: #07131d;
  color: var(--text);
}

.email-box textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

.email-box input::placeholder,
.email-box textarea::placeholder {
  color: #83a2b5;
}

.account-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.subject-button,
.stage-button,
.primary-button,
.input-box button {
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.subject-button,
.stage-button {
  width: 100%;
  padding: 15px 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
}

.subject-button strong,
.subject-button span,
.stage-button strong,
.stage-button span {
  display: block;
}

.subject-button strong,
.stage-button strong {
  margin-bottom: 5px;
}

.subject-button span,
.stage-button span {
  color: var(--muted);
  font-size: 0.92rem;
}

.subject-button.active,
.stage-button.active {
  background: linear-gradient(135deg, rgba(247, 198, 91, 0.18), rgba(113, 237, 194, 0.16));
  border-color: rgba(247, 198, 91, 0.3);
}

.primary-button,
.input-box button {
  padding: 14px 18px;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  color: #07131d;
  background: linear-gradient(135deg, var(--gold), #ffe49a);
}

.primary-button:hover,
.subject-button:hover,
.stage-button:hover,
.input-box button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled,
.input-box button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.source-box,
.hint-box,
.badge-box,
.report-box,
.metric-card,
.chat,
.input-box {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.source-box {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.source-box strong,
.keyword-head strong,
.metric-card strong,
.report-box strong {
  display: block;
}

.source-box p {
  line-height: 1.55;
}

.source-box a {
  text-decoration: none;
}

.arena-card {
  background: var(--panel-strong);
}

.company-banner {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(247, 198, 91, 0.12), rgba(113, 237, 194, 0.1));
  border: 1px solid rgba(247, 198, 91, 0.22);
}

.company-banner.hidden {
  display: none;
}

.company-banner.has-company-media {
  grid-template-columns: 1fr;
}

.company-logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 8px;
  background: rgba(5, 16, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.company-logo.hidden {
  display: none;
}

.company-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.company-copy strong {
  display: block;
  font-size: 1.25rem;
}

.company-copy strong a {
  color: inherit;
  text-decoration: none;
}

.company-copy strong a:hover {
  text-decoration: underline;
}

.company-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.work-bridge {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.company-author {
  font-size: 0.86rem;
  color: var(--gold);
  font-weight: 700;
}

.company-author.hidden {
  display: none;
}

.company-media {
  grid-column: 1 / -1;
}

.company-media.hidden {
  display: none;
}

.instagram-preview {
  position: relative;
  max-width: 520px;
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 16, 24, 0.72);
}

.instagram-photo-link {
  position: relative;
  display: block;
  color: #ffffff;
  text-decoration: none;
  aspect-ratio: 1 / 1;
}

.instagram-photo-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: rgba(0, 0, 0, 0.54);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.instagram-preview:hover .instagram-overlay,
.instagram-preview:focus-within .instagram-overlay,
.instagram-preview:focus .instagram-overlay {
  opacity: 1;
}

.instagram-metric {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1.42rem;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.instagram-metric svg {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.instagram-metric strong {
  font-weight: 800;
}

.status-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.status-chip.live {
  color: #efffd7;
  border-color: rgba(113, 237, 194, 0.3);
}

.status-chip.done {
  color: #0b1720;
  background: linear-gradient(135deg, var(--gold), #ffe49a);
  border-color: transparent;
}

.chat {
  min-height: 460px;
  max-height: 620px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message .bubble {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message.user .bubble {
  background: linear-gradient(135deg, #84ffd3, #c6ffed);
  color: #041018;
}

.message.bot .bubble {
  background: rgba(255, 255, 255, 0.05);
}

.message.system .bubble {
  background: rgba(247, 198, 91, 0.08);
  border: 1px solid rgba(247, 198, 91, 0.18);
}

.input-box {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.input-box input,
.input-box textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.input-box textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.45;
}

.input-box input::placeholder,
.input-box textarea::placeholder {
  color: #83a2b5;
}

.input-box button {
  color: #08151f;
  background: linear-gradient(135deg, var(--mint), #c9ffee);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.company-card {
  grid-column: 1 / -1;
}

.metric-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-card span,
.keyword-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-card strong {
  margin-top: 8px;
  font-size: 1.06rem;
}

.keyword-block {
  margin-bottom: 18px;
}

.keyword-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-pill {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.keyword-pill.found {
  color: #07131d;
  background: linear-gradient(135deg, var(--gold), #ffe49a);
  border-color: transparent;
}

.hint-box {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.55;
}

.badge-box {
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.badge-box.locked {
  opacity: 0.86;
}

.badge-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.badge-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.badge-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.report-box {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.report-box p,
.report-box li {
  color: var(--muted);
  line-height: 1.55;
}

.report-stats {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.report-stats span,
.report-list {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(7, 19, 29, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.report-list + .report-list {
  margin-top: 12px;
}

.report-list ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.report-card {
  display: grid;
  gap: 16px;
}

@media (max-width: 1050px) {
  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 22px;
    border-radius: 8px;
  }

  .metric-grid,
  .section-head,
  .input-box,
  .keyword-head {
    display: grid;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .message .bubble {
    max-width: 100%;
  }
}
