/* Symbol Rules training page — extends portal/style.css */

.tr-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.tr-sidebar {
  position: sticky; top: 12px;
  background: var(--surface, #fffef8);
  border: 1px solid var(--border, #e8d8a8);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.tr-progress { padding: 4px 2px; }
.tr-progress-label {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #4a3f5e; margin-bottom: 4px;
}
.tr-progress-track {
  height: 8px; background: #e8d8a8; border-radius: 4px; overflow: hidden;
}
.tr-progress-bar {
  height: 100%; background: linear-gradient(90deg, #b89a4a, #8b6e2e);
  width: 0%; transition: width 0.3s;
}

.tr-nav {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid #e8d8a8;
  border-bottom: 1px solid #e8d8a8;
  padding: 8px 0;
}
.tr-nav button {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left;
  background: transparent; border: none;
  padding: 8px 10px; border-radius: 6px;
  color: #4a3f5e; font: inherit; cursor: pointer;
}
.tr-nav button.active { background: #fff5cf; color: #8b6e2e; font-weight: 700; }
.tr-nav button:hover:not(.active) { background: #faf2d6; }
.tr-nav .nav-pct {
  font-size: 11px; color: #7a6e8e; font-variant-numeric: tabular-nums;
}
.tr-nav button.active .nav-pct { color: #8b6e2e; }

.tr-toolbar { display: flex; flex-direction: column; gap: 6px; }
.tr-toolbar button {
  width: 100%;
  background: transparent; border: 1px solid #b89a4a; color: #8b6e2e;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  font-weight: 600; font: inherit;
}
.tr-toolbar button:hover { background: #fff5cf; }

.tr-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4a3f5e; }
.tr-checkbox input { width: auto; }

.tr-saved-status { font-size: 12px; margin: 0; }
.tr-footnote { font-size: 11px; line-height: 1.5; margin: 0; }

.tr-main {
  background: var(--surface, #fffef8);
  border: 1px solid var(--border, #e8d8a8);
  border-radius: 12px;
  padding: 22px 26px;
  min-height: calc(100vh - 80px);
}

.tr-section-title { margin: 0 0 4px; font-size: 22px; color: #1a132e; }
.tr-section-lead { margin: 0 0 18px; }

.tr-field {
  border: 1px solid #e8d8a8; border-radius: 10px; padding: 14px 16px;
  margin-bottom: 14px; background: #fffdf2;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tr-field.filled { background: var(--surface, #fffef8); border-color: #cfb868; }
.tr-field-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.tr-field-label {
  font-weight: 700; color: #8b6e2e; font-size: 15px;
}
.tr-field-meta {
  font-size: 11px; color: #7a6e8e; font-style: italic;
}
.tr-field-hint {
  font-size: 12px; color: #4a3f5e; margin: 0 0 8px;
}
.tr-field textarea {
  width: 100%; min-height: 80px;
  padding: 10px; border: 1px solid #e8d8a8; border-radius: 6px;
  background: #fff; font: inherit; line-height: 1.55; resize: vertical;
}
.tr-field textarea:focus {
  outline: none; border-color: #8b6e2e; box-shadow: 0 0 0 3px #fff5cf;
}

.tr-empty {
  text-align: center; padding: 50px 20px; color: #7a6e8e; font-style: italic;
}

/* Scenarios composer ----------------------------------------------------- */
.scen-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 14px; background: #fffdf2;
  border: 1px solid #e8d8a8; border-radius: 10px; margin-bottom: 14px;
}
.scen-toolbar button.primary {
  background: #8b6e2e; color: #fff8e0; border: none;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 700;
}
.scen-toolbar button.primary:hover { background: #6f5723; }

.scen-list { display: flex; flex-direction: column; gap: 8px; }
.scen-row {
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
  padding: 12px 14px; border: 1px solid #e8d8a8; border-radius: 10px;
  background: var(--surface, #fffef8);
}
.scen-row-name { font-weight: 700; color: #1a132e; }
.scen-row-summary { color: #4a3f5e; font-size: 13px; margin-top: 2px; }
.scen-row-meta { color: #7a6e8e; font-size: 11px; margin-top: 4px; font-style: italic; }
.scen-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.scen-row-actions button { padding: 6px 10px; font-size: 12px; }
.scen-row-actions button.danger { color: #a83232; border-color: #a83232; }

.scen-composer { display: flex; flex-direction: column; gap: 14px; }
.scen-composer-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid #e8d8a8;
}
.scen-h { margin: 12px 0 4px; color: #8b6e2e; font-size: 16px; }
.scen-h-hint { margin: 0 0 6px; }

.scen-card {
  border: 1px solid #e8d8a8; border-radius: 10px; padding: 12px 14px;
  background: #fffdf2; margin-bottom: 8px;
}
.scen-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.scen-card-title { font-weight: 700; color: #4a3f5e; font-size: 13px; }

.scen-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px; align-items: start;
}
.scen-grid-full { grid-column: 1 / -1; }

.tr-block { display: flex; flex-direction: column; gap: 4px; }
.tr-block-lbl {
  font-size: 12px; font-weight: 600; color: #4a3f5e;
}
.tr-block input, .tr-block select, .tr-block textarea {
  width: 100%; padding: 6px 8px;
  border: 1px solid #e8d8a8; border-radius: 6px;
  background: #fff; font: inherit;
}
.tr-block input:focus, .tr-block select:focus, .tr-block textarea:focus {
  outline: none; border-color: #8b6e2e; box-shadow: 0 0 0 3px #fff5cf;
}

.scen-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.scen-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid #b89a4a; border-radius: 14px;
  font-size: 13px; color: #4a3f5e; cursor: pointer; user-select: none;
  background: #fff;
}
.scen-chip.on { background: #fff5cf; color: #8b6e2e; font-weight: 700; }
.scen-chip input { display: none; }

.scen-degrees { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.scen-deg {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #4a3f5e;
}
.scen-deg input { width: 70px; }
.scen-retro {
  font-size: 11px; color: #7a6e8e;
  display: inline-flex; align-items: center; gap: 4px; margin-right: 6px;
}

.scen-actions {
  display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid #e8d8a8;
}
.scen-actions button.primary {
  background: #8b6e2e; color: #fff8e0; border: none;
  padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: 700;
}
.scen-actions button.primary:hover { background: #6f5723; }
.scen-actions button.ghost.danger { color: #a83232; border-color: #a83232; }

