/* ==========================================================================
  Interview Orbit - Warm Paper & Coral Design System
   ========================================================================== */

:root {
  --ink: #20242a;
  --navy: #1a2530;
  --muted: #6b6459;
  --paper: #f5f1e8;
  --cream: #fcfaf5;
  --line: #d9d4ca;
  --coral: #e8603c;
  --coral-hover: #c94f30;
  --teal: #4c9490;
  --yellow: #f2b94a;
  --shadow: 0 16px 36px rgba(32, 36, 42, 0.07);
  --hand-font: 'IBM Plex Sans Hebrew', sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--hand-font);
  line-height: 1.6;
}

.app-shell {
  min-height: 100vh;
  max-width: 1440px;
  margin: auto;
  padding: 0 4.2vw;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 4px;
  background: var(--coral);
}

/* Topbar */
.topbar {
  height: 88px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-decoration: none;
}

.brand b {
  color: var(--coral);
  font-weight: 800;
}

.brand-mark {
  width: 29px;
  height: 29px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  justify-content: center;
  padding: 5px;
}

.brand-mark span {
  width: 3px;
  background: var(--coral);
  display: block;
}

.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 15px; background: var(--teal); }
.brand-mark span:nth-child(3) { height: 11px; background: var(--yellow); }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 11px 'Rubik', sans-serif;
  color: var(--muted);
  letter-spacing: 1px;
}

.live-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(76, 148, 144, 0.14);
}

.divider {
  width: 1px;
  height: 13px;
  background: var(--line);
}

.icon-button {
  border: 1px solid var(--line);
  background: transparent;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 19px;
  color: var(--ink);
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: var(--ink);
  color: var(--cream);
}

/* Main & Hero */
main {
  flex: 1;
  padding: 62px 0 42px;
}

.intro {
  position: relative;
  margin-bottom: 61px;
}

.eyebrow {
  color: var(--coral);
  font: 11px 'DM Mono', monospace;
  letter-spacing: 1.1px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.eyebrow span {
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.intro h1 {
  font-family: 'Rubik', sans-serif;
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 1.16;
  letter-spacing: 0;
  margin: 21px 0 14px;
  font-weight: 700;
}

.intro h1 em,
.board-empty h2 em {
  font-style: normal;
  color: var(--coral);
}

.intro p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  max-width: 590px;
}

/* Form Section Labels & Inputs */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 24px;
  font: 11px 'DM Mono', monospace;
  letter-spacing: 0.8px;
  margin-bottom: 25px;
}

.label-number {
  color: var(--coral);
  font-weight: 500;
}

.label-line {
  height: 1px;
  background: var(--line);
  flex: 1;
  margin: 0 5px;
}

.label-status {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.label-status.accent {
  color: var(--teal);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

/* Dictation Voice Button */
.dictate-btn {
  background: rgba(76, 148, 144, 0.08);
  border: 1px solid var(--teal);
  color: var(--teal);
  font: 700 11px 'Heebo', sans-serif;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dictate-btn:hover {
  background: var(--teal);
  color: white;
}

.dictate-btn.recording {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
  animation: pulseRecording 1s infinite alternate;
}

@keyframes pulseRecording {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

input[type="text"],
input[type="password"],
textarea {
  border: 1px solid var(--line);
  background: var(--cream);
  outline: 0;
  color: var(--ink);
  font: 13px 'Manrope', 'Heebo', sans-serif;
  width: 100%;
  padding: 14px 16px;
  line-height: 1.7;
  margin-bottom: 22px;
  border-radius: 4px;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
}

/* Upload Zone */
.upload-zone {
  height: 139px;
  border: 1px dashed #a8aaa2;
  background: rgba(251, 250, 246, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: 20px;
}

.upload-zone:hover,
.upload-zone.has-file {
  background: rgba(76, 148, 144, 0.07);
  border-color: var(--teal);
}

.upload-zone input {
  display: none;
}

.upload-orbit {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  color: var(--teal);
  font-size: 19px;
  margin-bottom: 7px;
}

.upload-zone strong {
  font-size: 12px;
}

.upload-zone > span:last-of-type {
  font: 10px 'DM Mono', monospace;
  color: var(--muted);
  margin-top: 4px;
}

/* Buttons */
.analyze-button {
  width: 100%;
  height: 56px;
  border: 0;
  background: var(--coral);
  color: white;
  font: 700 12px 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 21px;
  cursor: pointer;
  transition: 0.2s;
}

.analyze-button:hover {
  background: var(--coral-hover);
}

.button-arrow {
  font-size: 21px;
  font-weight: 400;
}

/* Insight Board / Results Container */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.82fr) minmax(430px, 1.18fr);
  gap: 7.8vw;
}

.insight-board {
  min-height: 584px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.insight-board::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 1px solid rgba(76, 148, 144, 0.17);
}

.board-empty {
  height: 100%;
  min-height: 584px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 55px 20px;
}

.empty-kicker {
  font: 10px 'DM Mono', monospace;
  color: var(--teal);
  letter-spacing: 1.5px;
  margin: 0 0 14px;
}

.board-empty h2 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 14px;
}

.empty-copy {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* Radar Sweep */
.radar {
  width: 170px;
  height: 170px;
  position: relative;
  margin: 4px 0 29px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 28px, rgba(76, 148, 144, 0.16) 29px 30px),
              linear-gradient(90deg, transparent 49.5%, rgba(76, 148, 144, 0.18) 50%, transparent 50.5%),
              linear-gradient(0deg, transparent 49.5%, rgba(76, 148, 144, 0.18) 50%, transparent 50.5%);
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(76, 148, 144, 0.2);
  border-radius: 50%;
  inset: 29px;
}

.ring-two { inset: 58px; }

.radar-sweep {
  position: absolute;
  width: 50%;
  height: 1px;
  background: var(--teal);
  top: 50%;
  left: 50%;
  transform-origin: left center;
  animation: sweep 4s linear infinite;
  box-shadow: 0 0 9px var(--teal);
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.radar-core {
  position: absolute;
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(232, 104, 74, 0.15);
}

/* Loading State */
.loading-state {
  min-height: 584px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
}

.loading-pulse {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(76, 148, 144, 0.25);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state p {
  font-size: 13px;
  margin: 0;
}

.loading-state span {
  font: 9px 'DM Mono', monospace;
  color: var(--teal);
  letter-spacing: 1px;
}

/* Results Display */
.results {
  padding: 29px;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.score-caption {
  font: 10px 'DM Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.8px;
}

.score-caption strong {
  display: block;
  color: var(--ink);
  font: 800 24px 'Manrope', sans-serif;
  margin-top: 7px;
}

.score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--coral) var(--score), #e8e5dd 0);
  position: relative;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--cream);
}

.score-ring b {
  position: relative;
  z-index: 1;
  font-size: 22px;
  color: var(--ink);
}

.result-headline {
  font-size: 18px;
  margin: 0 0 8px;
}

.result-summary {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}

.result-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 26px 0;
}

.mini-panel {
  border-top: 2px solid var(--teal);
  padding-top: 11px;
}

.mini-panel.warning {
  border-color: var(--yellow);
}

.mini-panel h3 {
  font: 10px 'DM Mono', monospace;
  margin: 0 0 11px;
}

.mini-panel ul {
  margin: 0;
  padding: 0 16px 0 0;
  font-size: 11px;
  line-height: 2;
}

.question-block {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.question-block .question-meta {
  font: 9px 'DM Mono', monospace;
  color: var(--coral);
  letter-spacing: 0.7px;
  margin-bottom: 9px;
}

.question-block h3 {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 7px;
}

.question-block p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.tips-block {
  background: #edf4f1;
  padding: 16px;
  margin-top: 5px;
}

.tips-block h3 {
  font: 10px 'DM Mono', monospace;
  margin: 0 0 8px;
  color: var(--teal);
}

.tips-block p {
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  color: #9a9d95;
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.5px;
  margin-top: auto;
}

.hidden { display: none !important; }

/* ==========================================================================
   Israeli Standard Accessibility Widget & Modes (ת"י 5568 / WCAG 2.1)
   ========================================================================== */
.a11y-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Heebo', sans-serif;
}

.a11y-toggle-btn {
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--coral);
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.a11y-toggle-btn:hover,
.a11y-toggle-btn:focus {
  background: var(--coral);
  color: white;
  transform: scale(1.05);
}

.a11y-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 310px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 10000;
}

.a11y-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.a11y-header strong {
  font-size: 16px;
  color: var(--ink);
}

.a11y-close-btn {
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.a11y-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 8px;
  font: 700 12px 'Heebo', sans-serif;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.a11y-btn:hover,
.a11y-btn.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.a11y-btn.a11y-reset-btn {
  grid-column: span 2;
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.a11y-btn.a11y-reset-btn:hover {
  background: var(--coral-hover);
}

.a11y-footer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  text-align: center;
}

.a11y-link-btn {
  background: transparent;
  border: 0;
  color: var(--teal);
  font: 700 12px 'Heebo', sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

/* Accessibility Statement Modal */
.a11y-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.a11y-modal-content {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px;
  max-width: 550px;
  width: 100%;
  padding: 30px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.a11y-modal-content h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--coral);
}

.a11y-modal-content h4 {
  font-size: 15px;
  margin: 16px 0 8px;
}

.a11y-modal-content ul {
  padding-right: 20px;
  line-height: 1.8;
  font-size: 14px;
}

/* Accessibility Applied State Classes */
body.a11y-font-lg { font-size: 118% !important; }
body.a11y-font-xl { font-size: 135% !important; }
body.a11y-font-sm { font-size: 88% !important; }

body.a11y-high-contrast {
  background: #000 !important;
  color: #fff !important;
}
body.a11y-high-contrast .app-shell,
body.a11y-high-contrast .insight-board,
body.a11y-high-contrast .portal-card,
body.a11y-high-contrast .auth-panel {
  background: #111 !important;
  color: #fff !important;
  border-color: #ffff00 !important;
}
body.a11y-high-contrast a,
body.a11y-high-contrast button {
  color: #ffff00 !important;
}

body.a11y-grayscale {
  filter: grayscale(100%) !important;
}

body.a11y-invert {
  filter: invert(100%) hue-rotate(180deg) !important;
}

body.a11y-links a,
body.a11y-links button {
  text-decoration: underline !important;
  font-weight: 800 !important;
}

body.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
}

body.a11y-focus-outline *:focus {
  outline: 4px solid #ff0055 !important;
  outline-offset: 3px !important;
}

/* Smartphone & Touch Optimization */
@media (max-width: 850px) {
  .app-shell { padding: 0 20px; }
  .topbar-meta { display: none; }
  .topbar { height: 78px; }
  .intro { margin-bottom: 44px; }
  .intro h1 { letter-spacing: -1.5px; }
  .workspace-grid { grid-template-columns: 1fr; gap: 40px; }
  .insight-board, .board-empty, .loading-state { min-height: 450px; }
  .result-columns { grid-template-columns: 1fr; }
  footer { display: block; line-height: 2; }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 0 16px;
  }
  .topbar {
    height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  .intro h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-card {
    min-height: auto;
    padding: 20px;
  }
  .auth-panel {
    padding: 24px;
  }
  .a11y-widget {
    bottom: 16px;
    right: 16px;
  }
  .a11y-menu {
    right: -10px;
    width: 290px;
  }
}

/* Full-page recruiter analysis report */
.report-page .report-shell {
  max-width: 1600px;
  width: 100%;
}

body,
button,
input,
textarea,
select {
  font-family: var(--hand-font) !important;
}

.report-page {
  background: var(--paper);
  font-family: 'Times New Roman', Times, serif !important;
}

.report-page button,
.report-page input,
.report-page textarea,
.report-page select {
  font-family: 'Times New Roman', Times, serif !important;
}

.report-page .report-shell,
.report-page .report-content {
  background-image: none;
}

.report-page .report-content {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.report-score-low .report-shell,
.report-score-low .report-content {
  background-color: rgba(232, 82, 82, 0.126);
}

.report-score-medium .report-shell,
.report-score-medium .report-content {
  background-color: rgba(246, 200, 95, 0.126);
}

.report-score-good .report-shell,
.report-score-good .report-content {
  background-color: rgba(111, 190, 224, 0.126);
}

.report-score-high .report-shell,
.report-score-high .report-content {
  background-color: rgba(103, 190, 119, 0.126);
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1px;
}

.report-print {
  border: 1px solid var(--coral);
  background: transparent;
  color: var(--coral);
  padding: 10px 16px;
  font: 700 14px 'Heebo', sans-serif;
  cursor: pointer;
}

.report-print:hover {
  background: var(--coral);
  color: white;
}

.report-heading {
  border-bottom: 1px solid var(--line);
  padding: 38px 0 28px;
}

.report-heading span {
  color: var(--coral);
  font: 12px 'DM Mono', monospace;
  letter-spacing: 1px;
}

.report-heading h1 {
  font-size: 34px;
  margin-top: 8px;
}

.report-content {
  width: 100%;
  margin: 32px 0 48px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.report-content .results {
  padding: 40px 5.5vw;
}

.report-content .score-caption {
  font-size: 12px;
}

.report-content .score-caption strong {
  font-size: 26px;
}

.report-content .result-summary {
  font-size: 14px;
}

.report-content .mini-panel h3,
.report-content .tips-block h3 {
  font-size: 12px;
}

.report-content .mini-panel ul,
.report-content .tips-block p {
  font-size: 13px;
}

.report-content .question-block .question-meta {
  font-size: 11px;
}

.report-content .question-block h3 {
  font-size: 15px;
}

.report-content .question-block p {
  font-size: 13px;
}

.report-content .tips-block {
  padding: 18px;
}

.report-page .brand,
.report-page .topbar-meta,
.report-page footer,
.report-page .report-actions {
  font-size: 14px !important;
}

.report-page .report-actions,
.report-page .score-caption,
.report-page .result-summary,
.report-page .chat-title,
.report-page .chat-messages,
.report-page .mic-status {
  font-weight: 700 !important;
}

.report-page .report-actions,
.report-page .score-caption,
.report-page .result-summary,
.report-page .chat-title,
.report-page .chat-messages,
.report-page .mic-status,
.report-page .report-heading span {
  color: #3f4a4d !important;
  font-weight: 800 !important;
}

.report-page .report-heading h1,
.report-page .score-caption strong,
.report-page .score-ring b,
.report-page .mini-panel h3,
.report-page .mini-panel li,
.report-page .tips-block h3,
.report-page .tips-block p,
.report-page .focus-block h3,
.report-page .focus-block li,
.report-page .question-block h3,
.report-page .question-block p,
.report-page .chat-form input {
  color: #101719 !important;
  font-weight: 800 !important;
}

.report-page .report-print {
  font-size: 18px !important;
}

.report-page .report-heading span,
.report-page .score-caption,
.report-page .mini-panel h3,
.report-page .tips-block h3,
.report-page .focus-block h3 {
  font-size: 16px !important;
}

.report-page .report-heading h1 {
  font-size: 38px !important;
}

.report-page .score-caption strong {
  font-size: 30px !important;
}

.report-page .score-ring b {
  font-size: 26px !important;
}

.report-page .result-summary,
.report-page .mini-panel ul,
.report-page .tips-block p,
.report-page .focus-block ul,
.report-page .chat-messages,
.report-page .chat-form input {
  font-size: 18px !important;
}

.report-page .question-block .question-meta {
  font-size: 15px !important;
}

.report-page .question-block h3 {
  font-size: 19px !important;
}

.report-page .question-block p {
  font-size: 17px !important;
}

.report-page .chat-title {
  font-size: 15px !important;
}

.report-page .chat-title span:last-child {
  font-size: 13px !important;
}

.report-page .mic-status {
  font-size: 14px !important;
}

@media print {
  .report-page .topbar,
  .report-page footer,
  .report-page .report-actions,
  .report-page .chat-panel {
    display: none !important;
  }

  .report-page,
  .report-page .app-shell { background: inherit !important; }

  .report-page .app-shell {
    max-width: none;
    padding: 0;
  }

  .report-heading {
    padding-top: 0;
  }

  .report-content {
    margin: 20px 0 0;
    box-shadow: none;
  }
}