/* CiteRadar — Apple Design Theory System */
/* Strict standard: Zero icons, pure typographic elegance, refined micro-details */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Calibri, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --apple-black: #000000;
  --apple-canvas: #0a0a0c;
  --apple-card: #141416;
  --apple-card-elevated: #1c1c1e;
  --apple-card-subtle: rgba(28, 28, 30, 0.6);

  --hairline-border: rgba(255, 255, 255, 0.08);
  --hairline-border-hover: rgba(255, 255, 255, 0.16);

  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;

  --apple-blue: #2997ff;
  --apple-blue-hover: #0077ed;
  --apple-red: #ff453a;
  --apple-green: #30d158;
  --apple-amber: #ffd60a;

  --radius-card: 18px;
  --radius-pill: 980px;
  --radius-inner: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--apple-black);
  color: var(--text-primary);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Apple Navigation Bar */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline-border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.nav-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--hairline-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
}

/* Page Container */
.page-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  flex: 1;
  width: 100%;
}

/* Hero Block */
.hero-block {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 52px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--apple-blue);
  margin-bottom: 12px;
}

.hero-heading {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08349;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-description {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-description code {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Apple-Style Input Card */
.input-card {
  background: var(--apple-card);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input {
  flex: 1;
  height: 48px;
  padding: 0 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--apple-black);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-form input:focus {
  border-color: var(--apple-blue);
}

.submit-action {
  height: 48px;
  padding: 0 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.submit-action:hover {
  opacity: 0.92;
  transform: scale(0.99);
}

.submit-action:active {
  transform: scale(0.97);
}

/* Apple Segmented Control */
.segmented-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-border);
}

.segment-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.segment-track {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 4px;
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.segment-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Scan State Indicator */
.scan-state {
  background: var(--apple-card);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 32px;
}

.scan-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}

.scan-bar-fill {
  width: 20%;
  height: 100%;
  background: var(--apple-blue);
  transition: width 0.35s ease;
}

.scan-status-line {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Dashboard Block */
.dashboard-block {
  animation: appleFadeIn 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes appleFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Meta Strip */
.meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--apple-card);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
}

.domain-headline {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.category-tag {
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-hash {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-right: 6px;
}

.pill-btn {
  height: 34px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.pill-btn.primary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border: 1px solid var(--hairline-border);
}

.pill-btn.primary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pill-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--hairline-border);
}

.pill-btn.secondary:hover {
  color: var(--text-primary);
  border-color: var(--hairline-border-hover);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--apple-card);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-card);
  padding: 20px;
}

.metric-card.emphasis {
  background: linear-gradient(180deg, rgba(41, 151, 255, 0.08) 0%, var(--apple-card) 100%);
  border-color: rgba(41, 151, 255, 0.2);
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.metric-number {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.metric-suffix {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.metric-number.accent {
  color: var(--apple-green);
}

.metric-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.metric-tag.critical {
  background: rgba(255, 69, 58, 0.15);
  color: var(--apple-red);
}

.metric-subtext {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.apple-card {
  background: var(--apple-card);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.apple-card.full-span {
  margin-bottom: 16px;
}

.card-top {
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-heading {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.card-explainer {
  font-size: 13px;
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.status-alert {
  background: rgba(255, 69, 58, 0.15);
  color: var(--apple-red);
}

.status-neutral {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.status-accent {
  background: rgba(41, 151, 255, 0.15);
  color: var(--apple-blue);
}

.card-content {
  padding: 20px 24px;
}

/* Hallucination Items */
.hallucination-item {
  background: var(--apple-canvas);
  border: 1px solid rgba(255, 69, 58, 0.2);
  border-radius: var(--radius-inner);
  padding: 16px;
  margin-bottom: 12px;
}

.hallucination-item:last-child {
  margin-bottom: 0;
}

.hal-header {
  margin-bottom: 6px;
}

.hal-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--apple-red);
  letter-spacing: 0.04em;
}

.hal-claim {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hal-reality {
  font-size: 13px;
  color: var(--apple-green);
  margin-bottom: 8px;
}

.hal-remediation {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 6px;
}

/* Prompts List */
.prompt-item {
  background: var(--apple-canvas);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-inner);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.prompt-item:last-child {
  margin-bottom: 0;
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.prompt-query {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.prompt-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.prompt-badge.cited {
  background: rgba(48, 209, 88, 0.15);
  color: var(--apple-green);
}

.prompt-badge.not-cited {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
}

.prompt-engines {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Minimal Table */
.minimal-table {
  width: 100%;
  border-collapse: collapse;
}

.minimal-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline-border);
}

.minimal-table td {
  padding: 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bot-tag {
  font-family: var(--font-mono);
  font-size: 12px;
}

.status-badge-allowed {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(48, 209, 88, 0.15);
  color: var(--apple-green);
  border-radius: var(--radius-pill);
}

.status-badge-blocked {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(255, 69, 58, 0.15);
  color: var(--apple-red);
  border-radius: var(--radius-pill);
}

/* Competitor Share of Voice */
.competitor-row {
  margin-bottom: 14px;
}

.competitor-row:last-child {
  margin-bottom: 0;
}

.competitor-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.competitor-name {
  font-weight: 500;
  color: var(--text-primary);
}

.competitor-share {
  color: var(--text-secondary);
}

.competitor-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.competitor-fill {
  height: 100%;
  background: var(--text-secondary);
  border-radius: var(--radius-pill);
}

/* Manifest Code Block */
.manifest-block {
  background: var(--apple-canvas);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-inner);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #d1d1d6;
  line-height: 1.6;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Roadmap List */
.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: var(--apple-canvas);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-inner);
  margin-bottom: 8px;
}

.roadmap-item:last-child {
  margin-bottom: 0;
}

.roadmap-day {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.roadmap-content {
  flex: 1;
}

.roadmap-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.roadmap-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline-border);
  padding: 24px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

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

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

.sep {
  margin: 0 6px;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .two-column-layout {
    grid-template-columns: 1fr;
  }
  .hero-heading {
    font-size: 36px;
  }
  .search-form {
    flex-direction: column;
  }
}
/* Apple Authentication Modal & Nav Controls */

.auth-nav-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hairline-border);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

.nav-user-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.link-action {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease;
}

.link-action:hover {
  color: var(--apple-red);
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: appleFadeIn 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.apple-modal-card {
  width: 100%;
  max-width: 420px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: applePop 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative;
  z-index: 1001;
}

@keyframes applePop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.close-text-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease;
}

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

/* Modal Segmented Control */
.modal-segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-border);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  height: 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Auth Error Alert */
.auth-error-box {
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: var(--apple-red);
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Form Groups & Inputs */
.auth-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.apple-input {
  height: 44px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: #2c2c2e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.apple-input:focus {
  border-color: var(--apple-blue);
}

.apple-primary-btn {
  height: 44px;
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.apple-primary-btn:hover {
  opacity: 0.92;
  transform: scale(0.99);
}

.auth-modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-border);
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.4;
}
