:root {
  --bg: #f3f6fb;
  --ink: #151922;
  --muted: #5d6677;
  --soft: #e7ebf3;
  --panel: #ffffff;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16a34a;
  --orange: #ea580c;
  --purple: #7c3aed;
  --pink: #db2777;
  --teal: #0f766e;
  --shadow: 0 22px 56px rgba(32, 45, 76, 0.1);
  --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0 20%, transparent 20% 100%),
    linear-gradient(225deg, rgba(15, 118, 110, 0.12) 0 18%, transparent 18% 100%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 58%, #eef3f9 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

body.is-modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 0 14px;
  background: rgba(243, 246, 251, 0.72);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f172a, #1e40af);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(125, 137, 163, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.topnav a {
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.topnav a:hover {
  background: #eef3ff;
  color: var(--blue);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 18px;
}

.intro-panel,
.analyzer,
.score-panel,
.result-card,
.roadmap {
  border: 1px solid rgba(126, 139, 167, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  min-height: 360px;
  align-items: center;
  padding: 44px;
  position: relative;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88)),
    linear-gradient(120deg, rgba(37, 99, 235, 0.1), rgba(15, 118, 110, 0.08));
  box-shadow: var(--shadow-strong);
}

.intro-panel::before,
.intro-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.intro-panel::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 76%);
}

.intro-panel::after {
  right: 34px;
  bottom: 26px;
  width: 340px;
  height: 170px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  transform: rotate(-14deg);
}

.intro-copy-block {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 16ch;
  margin-bottom: 18px;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 45rem;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 620px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.quick-stats span {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  min-height: 84px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(184, 197, 220, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 13px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.quick-stats svg {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.quick-stats strong {
  display: block;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

.quick-stats em {
  font-style: normal;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(184, 197, 220, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.92)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.06));
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.visual-header {
  display: flex;
  gap: 7px;
}

.visual-header span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.visual-header span:nth-child(1) {
  background: #ef4444;
}

.visual-header span:nth-child(2) {
  background: #f59e0b;
}

.visual-header span:nth-child(3) {
  background: #22c55e;
}

.visual-list {
  display: grid;
  gap: 10px;
}

.visual-list p {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.visual-list svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.visual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.analyzer {
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.form-head h2,
.score-copy h2,
.roadmap h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ghost-button {
  padding: 0 14px;
  background: #edf4ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.primary-button {
  min-width: 172px;
  padding: 0 20px;
  background: linear-gradient(135deg, #111827, #1d4ed8);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  color: #303746;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d6deec;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 300px;
  resize: vertical;
  padding: 14px;
  line-height: 1.65;
}

textarea::placeholder {
  color: #667085;
}

textarea.is-recognizing,
textarea.is-typing {
  border-color: rgba(37, 99, 235, 0.54);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.08), rgba(37, 99, 235, 0.08)),
    #f8fbff;
  background-size: 220% 100%;
  color: #1d4ed8;
  animation: recognitionSweep 1.4s ease-in-out infinite;
}

textarea.is-recognizing {
  cursor: progress;
}

textarea.is-typing {
  color: var(--ink);
  animation-duration: 2s;
}

@keyframes recognitionSweep {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

.upload-zone {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 14px;
  border: 1px dashed #adc0de;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fbfdff, #f5f9ff);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-zone.is-dragging,
.upload-zone:hover {
  border-color: rgba(37, 99, 235, 0.78);
  background: #eef5ff;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e8f1ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.upload-zone strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.upload-zone > *:not(input) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.upload-zone .small-button {
  pointer-events: auto;
}

.upload-zone p,
.file-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.file-status {
  min-height: 24px;
  padding: 0 2px;
}

.file-status.is-working {
  color: var(--blue);
}

.file-status.is-success {
  color: var(--green);
}

.file-status.is-error {
  color: #dc2626;
}

input:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.74);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.dashboard {
  padding-top: 22px;
}

.score-panel {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
    linear-gradient(120deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.06));
}

.score-ring {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 50%;
  --score-deg: 0deg;
  --score-color: var(--blue);
  background:
    radial-gradient(circle, #fff 55%, transparent 56%),
    conic-gradient(var(--score-color) var(--score-deg), var(--soft) 0deg);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1), 0 18px 34px rgba(37, 99, 235, 0.14);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.score-ring.is-empty {
  --score-color: #94a3b8;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22), 0 18px 34px rgba(100, 116, 139, 0.08);
}

.score-ring.is-animating {
  transform: scale(1.025);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12), 0 24px 44px rgba(37, 99, 235, 0.18);
}

.score-ring span,
.score-ring small {
  grid-area: 1 / 1;
}

.score-ring span {
  font-size: 42px;
  font-weight: 800;
}

.score-ring small {
  margin-top: 62px;
  color: var(--muted);
  font-size: 13px;
}

.score-copy p:last-of-type {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.result-card {
  min-height: 278px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--card-accent, var(--blue));
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(26, 38, 67, 0.13);
}

.result-card.is-linked {
  animation: linkedCardPulse 1.35s ease;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card-title-with-action {
  align-items: flex-start;
  justify-content: space-between;
}

.card-title-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.insight-chat-button {
  min-width: 76px;
  white-space: nowrap;
}

.card-title svg {
  width: 22px;
  height: 22px;
}

.card-title h3 {
  margin: 0;
  font-size: 18px;
}

.result-card ul,
.result-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.76;
}

.result-card li + li {
  margin-top: 9px;
}

.empty-preview-list {
  padding-left: 0 !important;
  list-style: none;
}

.empty-preview {
  display: grid;
  gap: 14px;
}

.empty-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3f8;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.empty-tag-row.compact span {
  min-height: 24px;
  font-size: 11px;
}

.skeleton-stack,
.strategy-preview,
.review-preview {
  display: grid;
  gap: 10px;
}

.skeleton-stack i,
.strategy-preview i,
.qa-preview i {
  display: block;
  width: var(--w, 78%);
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e7edf5, #f5f7fb, #e7edf5);
  background-size: 200% 100%;
  animation: skeletonPulse 1.8s ease-in-out infinite;
}

.skeleton-stack.tight {
  gap: 8px;
}

.empty-hint {
  margin: 0;
  color: #8792a3;
  font-size: 13px;
  line-height: 1.65;
}

.meter-preview {
  display: grid;
  gap: 7px;
}

.meter-preview label {
  color: #6b7484;
  font-size: 12px;
  font-weight: 700;
}

.meter-preview span {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.meter-preview b {
  display: block;
  width: var(--p, 68%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.28), rgba(8, 145, 178, 0.24));
}

.radar-preview {
  position: relative;
  width: 128px;
  aspect-ratio: 1;
  margin: 2px auto 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 30%, rgba(148, 163, 184, 0.18) 31% 32%, transparent 33%),
    radial-gradient(circle, transparent 58%, rgba(148, 163, 184, 0.18) 59% 60%, transparent 61%),
    conic-gradient(from 20deg, rgba(234, 88, 12, 0.1), rgba(37, 99, 235, 0.12), rgba(22, 163, 74, 0.1), rgba(234, 88, 12, 0.1));
}

.radar-preview span {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.34);
}

.radar-preview span:nth-child(2) {
  inset: 34px;
}

.radar-preview span:nth-child(3) {
  inset: 54px;
}

.radar-preview b {
  position: absolute;
  inset: 30px 20px 24px 34px;
  clip-path: polygon(50% 0, 92% 34%, 78% 92%, 24% 80%, 0 32%);
  background: rgba(234, 88, 12, 0.2);
}

.strategy-preview span {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
}

.strategy-preview strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #eef2ff;
  color: #64748b;
  font-size: 12px;
}

.qa-preview {
  display: grid;
  gap: 10px;
}

.qa-preview p {
  margin: 0;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 8px;
  color: #6b7484;
  font-size: 13px;
}

.qa-preview .is-question {
  background: #f1f5f9;
}

.qa-preview .is-question.soft {
  opacity: 0.72;
}

.qa-preview .is-answer {
  justify-self: end;
  display: grid;
  width: 82%;
  gap: 8px;
  background: #f8fbff;
}

.review-preview span {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  color: #6b7484;
  font-size: 13px;
}

.review-preview b {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #dbe6ee;
}

@keyframes skeletonPulse {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.accent-blue svg {
  color: var(--blue);
}

.accent-blue {
  --card-accent: var(--blue);
}

.accent-green svg {
  color: var(--green);
}

.accent-green {
  --card-accent: var(--green);
}

.accent-orange svg {
  color: var(--orange);
}

.accent-orange {
  --card-accent: var(--orange);
}

.accent-purple svg {
  color: var(--purple);
}

.accent-purple {
  --card-accent: var(--purple);
}

.accent-pink svg {
  color: var(--pink);
}

.accent-pink {
  --card-accent: var(--pink);
}

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

.accent-teal {
  --card-accent: var(--teal);
}

.roadmap {
  margin-top: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.timeline-item {
  position: relative;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.timeline-item:hover,
.timeline-item.is-expanded {
  border-color: rgba(37, 99, 235, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.timeline-item.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background:
    linear-gradient(180deg, #ffffff, #f7fbff),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.08));
}

.timeline-item.is-done {
  border-color: rgba(22, 163, 74, 0.32);
  background: linear-gradient(180deg, #fbfffd, #f5fbf7);
}

.timeline-item.is-done p {
  color: #6a7786;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-item strong {
  color: var(--blue);
  font-size: 14px;
}

.timeline-item.is-done strong {
  color: var(--green);
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.timeline-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #d8e1ef;
  border-radius: 50%;
  background: #fff;
  color: #8a96a8;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.timeline-check:hover {
  transform: scale(1.05);
  border-color: rgba(37, 99, 235, 0.5);
  color: var(--blue);
}

.timeline-item.is-done .timeline-check {
  border-color: rgba(22, 163, 74, 0.55);
  background: #dcfce7;
  color: var(--green);
}

.timeline-check svg {
  width: 17px;
  height: 17px;
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin-top: 12px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.timeline-link svg {
  width: 14px;
  height: 14px;
}

.timeline-tip {
  position: absolute;
  right: 14px;
  bottom: calc(100% - 8px);
  z-index: 4;
  width: min(280px, calc(100vw - 40px));
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  color: #4b5563;
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.timeline-item:hover .timeline-tip,
.timeline-item.is-expanded .timeline-tip {
  opacity: 1;
  transform: translateY(0);
}

@keyframes linkedCardPulse {
  0% {
    box-shadow: var(--shadow);
  }
  35% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 26px 60px rgba(37, 99, 235, 0.16);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d8deea;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  border-color: rgba(37, 99, 235, 0.48);
  color: var(--blue);
}

.interview-modal[hidden] {
  display: none;
}

.image-review-modal[hidden] {
  display: none;
}

.review-modal[hidden] {
  display: none;
}

.insight-chat-modal[hidden] {
  display: none;
}

.interview-modal,
.image-review-modal,
.review-modal,
.insight-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.interview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.interview-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(160px, 1fr) auto;
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid rgba(126, 139, 167, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.image-review-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, 100%);
  max-height: min(800px, calc(100vh - 48px));
  border: 1px solid rgba(126, 139, 167, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.review-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1080px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  border: 1px solid rgba(126, 139, 167, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.insight-chat-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid rgba(126, 139, 167, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.interview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--soft);
}

.interview-header h2 {
  margin: 0;
  font-size: 24px;
}

.interview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--soft);
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 20px 22px;
  overflow-y: auto;
  background: #fbfcff;
}

.insight-chat-window {
  min-height: 260px;
}

.custom-question-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 22px;
  border-bottom: 1px solid var(--soft);
  background: #fff;
}

.custom-question-panel textarea {
  min-height: 52px;
  max-height: 86px;
  padding: 10px 12px;
}

.chat-message {
  display: grid;
  gap: 6px;
  max-width: 84%;
}

.chat-message.is-user {
  align-self: flex-end;
  justify-items: end;
}

.chat-message.is-coach {
  align-self: flex-start;
}

.chat-sender {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble {
  padding: 12px 14px;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background: #fff;
  color: #303746;
  line-height: 1.7;
  white-space: pre-wrap;
}

.chat-message.is-user .chat-bubble {
  border-color: rgba(37, 99, 235, 0.34);
  background: #eef3ff;
  color: #17306f;
}

.chat-bubble strong {
  color: var(--ink);
}

.interview-compose {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--soft);
  background: #fff;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.06);
}

.interview-compose textarea {
  min-height: 84px;
  max-height: 150px;
}

.interview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.interview-actions .primary-button {
  min-width: 138px;
}

#submitAnswerButton,
#sendInsightChatButton {
  min-width: 138px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}

#submitAnswerButton {
  min-height: 44px;
  font-size: 15px;
}

#submitAnswerButton:disabled {
  box-shadow: none;
}

.insight-compose textarea {
  min-height: 92px;
}

.image-review-body {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.06fr);
  gap: 16px;
  min-height: 360px;
  padding: 18px 22px;
  overflow: auto;
  background: #fbfcff;
}

.image-preview-frame {
  display: grid;
  min-height: 340px;
  place-items: center;
  margin: 0;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.image-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.image-review-field textarea {
  min-height: 340px;
}

.image-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--soft);
  background: #fff;
}

.image-review-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.image-review-actions > div {
  display: flex;
  gap: 10px;
}

.review-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
  min-height: 520px;
  padding: 18px 22px;
  overflow: auto;
  background: #fbfcff;
}

.review-input-panel,
.review-output-panel {
  min-width: 0;
}

.review-input-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.review-input-panel .field,
.review-input-panel textarea {
  min-height: 0;
}

.review-input-panel textarea {
  height: 100%;
  min-height: 420px;
}

.review-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-output-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.review-score-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #f6fbff),
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.06));
}

.review-score {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: #e8f6f4;
  color: var(--teal);
  font-size: 30px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.review-score-band h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.review-score-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.review-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-output-block {
  min-height: 150px;
  padding: 14px;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background: #fff;
}

.review-output-block h4 {
  margin: 0 0 10px;
  color: #303746;
  font-size: 15px;
}

.review-output-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.68;
}

.review-output-block li + li {
  margin-top: 7px;
}

.review-output-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

svg {
  flex: 0 0 auto;
}

@media (max-width: 1060px) {
  .intro-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    max-width: 620px;
  }

  h1 {
    max-width: 18ch;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-bottom: 32px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    position: static;
  }

  .topnav {
    width: 100%;
  }

  .topnav a {
    flex: 1;
    min-width: 0;
  }

  .intro-panel,
  .analyzer,
  .score-panel,
  .result-card,
  .roadmap {
    padding: 18px;
  }

  .quick-stats,
  .input-grid,
  .score-panel,
  .result-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline-tip {
    position: static;
    width: 100%;
    margin-top: 12px;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }

  .intro-panel {
    gap: 16px;
  }

  h1 {
    max-width: 12ch;
    margin-bottom: 14px;
    font-size: 36px;
    line-height: 1.08;
  }

  .intro-copy {
    font-size: 16px;
    line-height: 1.62;
  }

  .quick-stats {
    max-width: none;
    margin-top: 16px;
    gap: 8px;
  }

  .quick-stats span {
    grid-template-columns: 28px minmax(44px, auto) minmax(0, 1fr);
    min-height: 58px;
    padding: 12px;
  }

  .quick-stats svg {
    grid-row: auto;
  }

  .quick-stats strong {
    font-size: 24px;
  }

  .hero-visual {
    gap: 12px;
    padding: 12px;
  }

  .visual-header,
  .visual-tags {
    display: none;
  }

  .visual-list {
    gap: 8px;
  }

  .visual-list p {
    min-height: 32px;
    font-size: 13px;
  }

  .score-ring {
    width: 142px;
    height: 142px;
  }

  .form-head,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions p {
    text-align: left;
  }

  textarea {
    min-height: 240px;
  }

  .upload-zone {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .upload-zone .small-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .card-title-with-action {
    align-items: stretch;
    flex-direction: column;
  }

  .card-title-with-action .small-button {
    width: 100%;
  }

  .interview-modal,
  .image-review-modal,
  .review-modal,
  .insight-chat-modal {
    padding: 10px;
  }

  .interview-panel,
  .image-review-panel,
  .review-panel,
  .insight-chat-panel {
    max-height: calc(100vh - 20px);
  }

  .interview-header,
  .interview-meta,
  .custom-question-panel,
  .chat-window,
  .interview-compose,
  .insight-compose,
  .image-review-body,
  .image-review-actions,
  .review-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .interview-meta,
  .interview-actions,
  .custom-question-panel,
  .review-form-actions,
  .image-review-actions,
  .image-review-actions > div {
    align-items: stretch;
    flex-direction: column;
  }

  .interview-panel {
    grid-template-rows: auto auto auto minmax(120px, 1fr) auto;
  }

  .custom-question-panel textarea {
    min-height: 48px;
    max-height: 72px;
  }

  .interview-compose textarea {
    min-height: 72px;
    max-height: 110px;
  }

  #submitAnswerButton {
    width: 100%;
  }

  .chat-message {
    max-width: 100%;
  }

  .image-review-body {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .review-body,
  .review-output-grid {
    grid-template-columns: 1fr;
  }

  .review-body {
    min-height: auto;
  }

  .review-input-panel textarea {
    min-height: 260px;
  }

  .image-preview-frame {
    min-height: 220px;
  }

  .image-review-field textarea {
    min-height: 220px;
  }
}
