.card h1 { margin-bottom: 4px; }

.tc-intro {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.tc-mode-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: var(--key-bg);
  margin-bottom: 20px;
  width: fit-content;
}

.tc-mode-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 8px 16px;
  cursor: pointer;
}
.tc-mode-btn:hover { color: var(--text-primary); }
.tc-mode-btn.active {
  color: var(--accent-primary);
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(31, 35, 51, 0.12);
}

/* Every element below that's toggled via the "hidden" PROPERTY in JS also
   sets its own "display" for the visible state - which has equal CSS
   specificity to the browser's default [hidden] rule and loads after it,
   so each one needs its own [hidden] override or the JS toggle silently
   does nothing visually (a real bug that shipped once already). */
.tc-panel[hidden],
.gc-results[hidden] { display: none; }

.tc-panel-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.tc-triangle-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.tc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.tc-field input, .tc-angle-input {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
}
.tc-field input:focus, .tc-angle-input:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
}

.tc-circle-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tc-angle-field { min-width: 140px; }

.tc-quick-angles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-quick-angle-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--key-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.tc-quick-angle-btn:hover { background: var(--key-bg-hover); }

.gc-results {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gc-error {
  margin: 0;
  font-size: 13px;
  color: var(--accent-error);
}

.tc-solution {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tc-solution-heading {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.tc-diagram {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.tc-diagram-shape {
  fill: var(--accent-primary-dim);
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-linejoin: round;
}

.tc-diagram-label {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--text-primary);
}

.tc-axis { stroke: var(--panel-border); stroke-width: 1.5; }
.tc-dashed { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 4 3; }
.tc-ray { stroke: var(--accent-primary); stroke-width: 2; }
.tc-point { fill: var(--accent-primary); }

.tc-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  text-align: center;
}
.tc-summary-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tc-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--key-bg);
}
.tc-summary-grid span { font-size: 11px; color: var(--text-muted); }
.tc-summary-grid strong { font-family: var(--mono); font-size: 15px; color: var(--text-primary); }

.tc-method {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.gc-output {
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-primary);
  border-radius: 12px;
  padding: 12px 16px;
}

.gc-output-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.gc-output-top span { font-size: 13px; color: var(--text-muted); }
.gc-output-top strong { font-family: var(--mono); font-size: 20px; color: var(--text-primary); }

.gc-output-formula {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  word-break: break-word;
}

.gc-info-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gc-info-list li {
  padding: 14px 16px;
  border-left: 3px solid var(--accent-primary);
  background: var(--key-bg);
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gc-info-list strong { font-size: 13px; color: var(--text-primary); }
.gc-info-list span { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

@media (max-width: 480px) {
  .tc-summary-grid { grid-template-columns: repeat(3, 1fr); }
}
