/* Tool pages — extends /styles.css Seimei design system */

.tool-hero {
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 1px solid var(--stone);
}
.tool-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}
.tool-hero p { color: var(--ash); font-size: 1.05rem; max-width: 56ch; }

.tool-body { padding: var(--space-md) 0 var(--space-lg); }

.tool-card {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.tool-card label {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 6px;
}
.tool-card input[type="text"],
.tool-card input[type="number"],
.tool-card textarea,
.tool-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.tool-card input:focus,
.tool-card textarea:focus,
.tool-card select:focus { border-color: var(--accent); }
.tool-card textarea { min-height: 140px; resize: vertical; }

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--ink); }

.tool-output {
  background: var(--surface);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-top: var(--space-sm);
}
.tool-output.hidden { display: none; }
.hidden { display: none; }

.tool-cta {
  background: var(--deep);
  color: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.tool-cta p { margin: 0; font-size: 1rem; opacity: 0.9; }
.tool-cta strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.tool-cta a {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: opacity 0.2s;
}
.tool-cta a:hover { opacity: 0.88; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-sm);
}
.tool-tile {
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: var(--space-sm);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: border-color 0.2s;
}
.tool-tile:hover { border-color: var(--accent); }
.tool-tile h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 4px; }
.tool-tile p  { font-size: 0.85rem; color: var(--ash); margin: 0; }

.progress-bar { height: 4px; background: var(--stone); border-radius: 2px; margin-bottom: var(--space-sm); }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }

.quiz-option {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; margin-bottom: 8px;
  background: var(--bg); border: 1px solid var(--stone);
  border-radius: var(--radius); cursor: pointer; font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option.correct { background: #e6f4ea; border-color: #2e7d32; }
.quiz-option.wrong   { background: #fde8e8; border-color: var(--accent); }

.tab-btn { transition: background 0.2s, color 0.2s; }
.tab-btn.active { background: var(--accent); color: var(--paper); border-color: var(--accent); }

mark.highlight {
  background: transparent;
  border-bottom: 2px solid currentColor;
  cursor: help;
}

@media (max-width: 600px) {
  .tool-cta { flex-direction: column; align-items: flex-start; }
}
