/* GridLine v0.30 — styles for the AI pages (计划 / 模拟器 / 遥测)
   Reuses the palette from app.css so the site keeps one visual voice. */

:root {
  --ai-ok: #30b37f;
  --ai-warn: #ff9f0a;
  --ai-bad: #e5484d;
  --ai-soft: #fafbfd;
}

/* ---------------- shared page shell ---------------- */

.ai-main {
  display: grid;
  gap: 16px;
  padding: 18px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.ai-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.ai-card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.ai-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.ai-field {
  margin-bottom: 10px;
}

.ai-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.ai-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.ai-row > .ai-field {
  flex: 1 1 180px;
  min-width: 150px;
}

.ai-timer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 16px;
}

.ai-empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.ai-empty p {
  margin: 0 0 12px;
}

.ai-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}

.ai-badge.is-weak {
  color: var(--ai-bad);
  border-color: rgba(229, 72, 77, 0.45);
  background: rgba(229, 72, 77, 0.08);
}

.ai-badge.is-strong {
  color: var(--ai-ok);
  border-color: rgba(48, 179, 127, 0.45);
  background: rgba(48, 179, 127, 0.08);
}

/* ---------------- 计划 (today's instruction) ---------------- */

.plan-view {
  padding: 18px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: 16px;
}

.plan-status {
  font-size: 12px;
  color: var(--muted);
}

.plan-instruction {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.plan-instruction-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--calendar-line, #e5e7ee);
}

.plan-instruction-head strong {
  font-size: 15px;
}

.plan-instruction-head span {
  font-size: 11.5px;
  color: var(--muted);
}

.plan-instruction-body {
  font-size: 15px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1c1f26;
}

.plan-tasks {
  display: grid;
  gap: 12px;
}

.plan-task {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.plan-task.is-done {
  border-color: rgba(48, 179, 127, 0.5);
  background: rgba(48, 179, 127, 0.04);
}

.plan-task.is-skipped {
  opacity: 0.65;
}

.plan-task.is-hard {
  border-color: rgba(229, 72, 77, 0.5);
}

.plan-task-top {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.plan-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--primary-dark, #2c59cf);
  background: rgba(59, 111, 245, 0.1);
  border: 1px solid rgba(59, 111, 245, 0.35);
}

.plan-subject {
  font-size: 12px;
  color: var(--muted);
}

.plan-minutes {
  font-size: 12px;
  color: var(--muted);
}

.plan-status-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}

.plan-status-badge.is-done {
  color: var(--ai-ok);
  border-color: var(--ai-ok);
  background: rgba(48, 179, 127, 0.1);
}

.plan-status-badge.is-skipped {
  color: #8b8b8b;
}

.plan-status-badge.is-hard {
  color: var(--ai-bad);
  border-color: var(--ai-bad);
  background: rgba(229, 72, 77, 0.08);
}

.plan-status-badge.is-easy {
  color: var(--ai-warn);
  border-color: var(--ai-warn);
  background: rgba(255, 159, 10, 0.1);
}

.plan-task-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 4px;
}

.plan-task-detail {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 6px;
}

.plan-task-reason {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  padding: 8px 10px;
  background: var(--ai-soft);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.plan-task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---------------- 模拟器 / 遥测 ---------------- */

.answer-block {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--ai-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
}

.answer-block summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--primary-dark, #2c59cf);
}

.answer-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 6px;
}

.question {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}

.question:last-child {
  border-bottom: none;
}

.question-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.question-stem {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.paper-section {
  margin-top: 20px;
}

.paper-section h3 {
  font-size: 14px;
  margin: 0 0 4px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--calendar-line, #e5e7ee);
}

.paper-section .paper-instructions {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}

.report-body {
  font-size: 14px;
  line-height: 1.95;
  word-break: break-word;
}

.report-body p {
  margin: 0 0 8px;
}

.report-body h3,
.report-body h4,
.report-body h5 {
  margin: 16px 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c1f26;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}

.report-body strong {
  color: #b3261e;
}

.report-headline {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #b3261e;
}

.report-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.crisis-list {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.85;
}

.crisis-list li::marker {
  color: var(--ai-bad);
}

.next-priority {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 159, 10, 0.08);
  border: 1px solid rgba(255, 159, 10, 0.45);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.8;
}

.skill-list {
  display: grid;
  gap: 8px;
}

.skill-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.skill-row .skill-name {
  font-weight: 600;
}

.skill-row .skill-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 720px) {
  .plan-view,
  .ai-main {
    padding: 12px;
  }
  .plan-instruction {
    padding: 14px 15px;
  }
  .plan-instruction-body {
    font-size: 14px;
    line-height: 1.9;
  }
}
