/* ============================================================
   TRAINING.CSS — ai-training.html
   Digital Atelier · no borders, surface tiers, copper accents
   ============================================================ */

.training-page {
  background-color: var(--bg-main);
}

/* ---- Shared container ---- */
.at-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ---- Eyebrow ---- */
.at-eyebrow,
.at-section-eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

/* ====================================================
   ① HERO
   ==================================================== */
.at-hero {
  background: var(--bg-main);
  padding: 80px 0 40px;
}

.at-display {
  font-family: "Noto Serif SC", "Noto Serif", "Songti SC", serif;
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 0 0 20px;
}

.at-hero-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ====================================================
   ② SUB-NAV — mode switcher
   ==================================================== */
.at-subnav {
  background: var(--bg-section);
  border-top: 1px solid rgba(177, 178, 176, 0.25);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  position: sticky;
  top: var(--nav-height);
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.at-subnav-tabs {
  display: flex;
  gap: 0;
}

.at-subnav-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 32px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  text-align: left;
  transition: background 200ms ease, border-color 200ms ease;
}

.at-subnav-btn:hover {
  background: rgba(122, 88, 59, 0.04);
}

.at-subnav-btn.active {
  border-bottom-color: var(--accent);
}

.at-subnav-label {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 200ms ease;
}

.at-subnav-btn.active .at-subnav-label,
.at-subnav-btn:hover .at-subnav-label {
  color: var(--accent);
}

.at-subnav-desc {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 200ms ease;
}

.at-subnav-btn.active .at-subnav-desc {
  color: var(--muted);
}

/* ====================================================
   MODE PANELS
   ==================================================== */
.at-mode-panel { display: none; }
.at-mode-panel.active { display: block; }

/* ====================================================
   ③ QUIZ CONFIG SECTION
   ==================================================== */
.at-config-section {
  background: var(--bg-section);
  padding: 48px 0;
}

/* ---- Form ---- */
.at-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

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

.at-form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.at-form select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-main);
  border: 1px solid rgba(177, 178, 176, 0.3);
  border-radius: 10px;
  padding: 11px 36px 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235e5f5d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.at-form select:focus {
  outline: none;
  border-color: rgba(122, 88, 59, 0.4);
  box-shadow: 0 0 0 3px rgba(122, 88, 59, 0.1);
}

.at-config-foot { }

.at-btn-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 28px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-ambient);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.at-btn-start:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(122, 88, 59, 0.18);
}

/* ====================================================
   ROLEPLAY LAUNCHER
   ==================================================== */
.rp-launch-section {
  background: var(--bg-main);
  padding: 72px 0 80px;
}

.rp-launch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  margin-bottom: 48px;
}

.rp-launch-copy {
  max-width: 560px;
}

.rp-launch-title {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
}

.rp-launch-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.rp-btn-enter {
  flex-shrink: 0;
  margin-top: 4px;
}

/* Feature strip */
.rp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(177, 178, 176, 0.2);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  margin-bottom: 40px;
}

.rp-feature-item {
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(177, 178, 176, 0.2);
  padding-right: 40px;
}

.rp-feature-item + .rp-feature-item {
  padding-left: 40px;
}

.rp-feature-item:last-child {
  border-right: none;
  padding-right: 0;
}

.rp-feature-item strong {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.rp-feature-item span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Difficulty row */
.rp-difficulty-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rp-diff-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  white-space: nowrap;
}

.rp-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ====================================================
   ③ DATA SECTION
   ==================================================== */
.at-data-section {
  background: var(--bg-main);
  padding: 64px 0 96px;
}

/* ---- Tab bar ---- */
.at-tab-bar {
  display: flex;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 0;
  margin-right: 32px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.tab-btn:hover { color: var(--accent); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: none;
  box-shadow: none;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Stats strip ---- */
.at-stats-strip {
  display: flex;
  align-items: center;
  padding: 40px 0;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.at-stat-sep {
  width: 1px;
  height: 48px;
  background: rgba(177, 178, 176, 0.25);
  flex-shrink: 0;
  margin: 0 48px;
}

.stat-value {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.at-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.at-stat-mission .at-stat-label {
  order: -1;
  margin-top: 0;
  margin-bottom: 4px;
}

.at-mission-text {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

/* ---- Suggestions ---- */
.at-suggestions {
  margin-bottom: 48px;
}

.at-sug-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(177, 178, 176, 0.2);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-sug-item {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(177, 178, 176, 0.2);
  padding-right: 40px;
}

.at-sug-item + .at-sug-item {
  padding-left: 40px;
  padding-right: 40px;
}

.at-sug-item:last-child {
  border-right: none;
  padding-right: 0;
}

.at-sug-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.at-sug-value {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

/* ---- Recent ---- */
.at-recent {
  margin-bottom: 8px;
}

.at-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.at-sub-head .at-section-eyebrow { margin-bottom: 0; }

.at-link-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 200ms ease;
}

.at-link-more:hover { opacity: 1; }

.at-tip {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

.recent-list { display: grid; gap: 2px; }

.recent-item {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(177, 178, 176, 0.15);
}

.recent-item:last-child { border-bottom: none; }

.recent-head { margin: 0; font-weight: 600; font-size: 15px; }

.recent-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recent-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex-shrink: 0;
}

.recent-score strong {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
}

/* ---- Insight nums (history tab) ---- */
.at-insight-nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 48px;
  border-top: 1px solid rgba(177, 178, 176, 0.2);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.insight-stat {
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(177, 178, 176, 0.2);
  padding-right: 40px;
}

.insight-stat + .insight-stat { padding-left: 40px; }

.insight-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.insight-stat span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.insight-stat strong {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ---- Charts row ---- */
.at-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-chart-panel { }

.at-chart-panel .at-section-eyebrow { margin-bottom: 16px; }

/* ---- Trend bars ---- */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

/* ---- Weakness list ---- */
.weakness-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weakness-score strong {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  color: var(--accent);
}

/* ---- Table ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: var(--bg-depth);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wrap th {
  text-align: left;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  background: var(--bg-section);
  white-space: nowrap;
}

.table-wrap td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.12);
  color: var(--text);
  vertical-align: middle;
}

.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: rgba(122, 88, 59, 0.03); }

/* ---- Difficulty badges ---- */
.difficulty-badge {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.difficulty-L1 { background: rgba(122, 88, 59, 0.1); color: var(--accent); }
.difficulty-L2 { background: rgba(122, 88, 59, 0.2); color: var(--accent); }
.difficulty-L3 { background: var(--accent); color: var(--accent-text); }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .at-container { padding: 0 32px; }
  .at-hero { padding: 60px 0 32px; }
  .at-form { grid-template-columns: repeat(2, 1fr); }
  .at-insight-nums { grid-template-columns: repeat(2, 1fr); }
  .at-insight-nums .insight-stat:nth-child(2) { border-right: none; padding-right: 0; }
  .at-insight-nums .insight-stat:nth-child(3) { padding-left: 0; border-top: 1px solid rgba(177,178,176,0.2); }
  .at-insight-nums .insight-stat:nth-child(4) { border-top: 1px solid rgba(177,178,176,0.2); }
  .rp-features { grid-template-columns: 1fr 1fr; }
  .rp-feature-item:nth-child(2) { border-right: none; padding-right: 0; }
  .rp-feature-item:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid rgba(177,178,176,0.2);
    padding-top: 32px;
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .at-container { padding: 0 20px; }
  .at-hero { padding: 48px 0 28px; }
  .at-subnav-btn { padding: 14px 20px 12px; }
  .at-form { grid-template-columns: 1fr 1fr; }
  .at-stats-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 32px 0;
  }
  .at-stat-sep { width: 100%; height: 1px; margin: 0; }
  .at-sug-row { grid-template-columns: 1fr; }
  .at-sug-item,
  .at-sug-item + .at-sug-item {
    border-right: none;
    border-bottom: 1px solid rgba(177, 178, 176, 0.2);
    padding-left: 0;
    padding-right: 0;
  }
  .at-sug-item:last-child { border-bottom: none; }
  .at-charts-row { grid-template-columns: 1fr; }
  .rp-launch-head {
    flex-direction: column;
    gap: 28px;
  }
  .rp-features { grid-template-columns: 1fr; }
  .rp-feature-item,
  .rp-feature-item + .rp-feature-item {
    border-right: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(177,178,176,0.2);
  }
  .rp-feature-item:last-child { border-bottom: none; }
  .rp-difficulty-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .at-display { font-size: clamp(36px, 10vw, 52px); }
  .at-form { grid-template-columns: 1fr; }
  .at-insight-nums { grid-template-columns: 1fr 1fr; }
  .at-subnav-desc { display: none; }
  .at-subnav-btn { padding: 14px 16px 12px; }
}
