/* web/guide-styles.css */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #222632;
  --border: #2a2e3a;
  --text: #e2e4e9;
  --text-dim: #8b8fa3;
  --accent: #7c6ef0;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --purple: #a78bfa;
  --blue: #60a5fa;
}

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

body {
  background: var(--bg);
  color: var(--text);
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 80px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  line-height: 1.6;
}

header {
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  padding: 24px 0;
}

header h1 {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 700;
}

header .sub {
  color: var(--text-dim);
  font-size: 13px;
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 16px;
  font-size: 12px;
}

.back-link:hover {
  text-decoration: underline;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
}

.section .intro {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 14px;
}

.section p {
  margin-bottom: 12px;
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  padding: 20px;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.card .note {
  color: var(--text-dim);
  background: var(--surface2);
  border-radius: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12px;
}

.flow {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 0;
}

.flow-step {
  background: var(--surface2);
  border: 1px solid var(--border);
  text-align: center;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
}

.flow-step .label {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-size: 11px;
}

.flow-step .value {
  font-size: 16px;
  font-weight: 700;
}

.flow-arrow {
  color: var(--text-dim);
  padding: 4px 0;
  font-size: 20px;
}

.flow-step.highlight {
  border-color: var(--accent);
  background: #7c6ef014;
}

.flow-op {
  color: var(--yellow);
  padding: 2px 0;
  font-size: 11px;
  font-weight: 600;
}

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

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

.bar-label {
  text-align: right;
  color: var(--text-dim);
  flex-shrink: 0;
  width: 120px;
  font-size: 12px;
}

.bar-track {
  background: var(--surface2);
  overflow: hidden;
  position: relative;
  border-radius: 4px;
  flex: 1;
  height: 22px;
}

.bar-fill {
  display: flex;
  border-radius: 4px;
  justify-content: flex-end;
  align-items:  center;
  height: 100%;
  padding-right: 6px;
  transition: width .3s;
}

.bar-val {
  color: var(--bg);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}

.bar-val-outside {
  text-align: left;
  flex-shrink: 0;
  width: 55px;
  font-size: 11px;
  font-weight: 600;
}

.range-diagram {
  position: relative;
  background: var(--surface2);
  overflow: hidden;
  border-radius: 8px;
  height: 60px;
  margin: 16px 0;
}

.range-fill {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items:  center;
  height: 100%;
  font-size: 12px;
  font-weight: 600;
  top: 0;
}

.priority-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .priority-grid {
    grid-template-columns: 1fr;
  }
}

.priority-card {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px;
}

.priority-card.mult {
  border-left-color: var(--green);
}

.priority-card.add {
  border-left-color: var(--yellow);
}

.priority-card.low {
  border-left-color: var(--text-dim);
}

.priority-card .name {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.priority-card .desc {
  color: var(--text-dim);
  font-size: 12px;
}

.priority-card .type-tag {
  display: inline-block;
  border-radius: 3px;
  margin-top: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

.type-tag.mult {
  color: var(--green);
  background: #4ade8026;
}

.type-tag.add {
  color: var(--yellow);
  background: #fbbf2426;
}

.decision {
  background: var(--surface2);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 14px 16px;
}

.decision.yes {
  border-left-color: var(--green);
}

.decision.no {
  border-left-color: var(--red);
}

.decision.info {
  border-left-color: var(--cyan);
}

.decision.warn {
  border-left-color: var(--yellow);
}

.decision .q {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.decision .a {
  color: var(--text-dim);
  font-size: 13px;
}

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

.compare-table th {
  text-align: left;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
}

.compare-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
}

.compare-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

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

.yellow {
  color: var(--yellow);
}

.red {
  color: var(--red);
}

.cyan {
  color: var(--cyan);
}

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

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

.dim {
  color: var(--text-dim);
}

.bold {
  font-weight: 700;
}

.callout {
  background: var(--surface2);
  display: flex;
  border-radius: 8px;
  align-items:  flex-start;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 16px;
  font-size: 13px;
}

.callout .icon {
  flex-shrink: 0;
  font-size: 18px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 32px;
  padding: 16px 20px;
}

.toc h3 {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-size: 13px;
}

.toc a {
  display: block;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 0;
  font-size: 14px;
}

.toc a:hover {
  text-decoration: underline;
}

.tag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 10px;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

.tag-mult {
  color: var(--green);
  background: #4ade8026;
}

.tag-add {
  color: var(--yellow);
  background: #fbbf2426;
}
