@import url("../common/styles.css");

main {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.tl-card-info h3 {
  margin: 8px 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tl-accordion {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 85%, var(--bg));
}

.tl-accordion summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.tl-accordion summary::-webkit-details-marker {
  display: none;
}

.tl-accordion[open] {
  border-color: var(--orange);
}

.tl-accordion > *:not(summary) {
  margin-top: 10px;
}

.tl-span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .tl-span-2 {
    grid-column: span 1;
  }
}

.help-accordion summary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.before-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 90%, var(--bg));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.before-card h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tl-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tl-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sample-note {
  margin-top: 10px;
  display: inline-block;
  font-size: 13px;
}

.controls .inputs {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

.name-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.name-input input {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

.type-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.type-input select {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

.slider-block input[type="range"] {
  width: 100%;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.value-input {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--blue);
  font-size: 15px;
  width: 100%;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.checklist {
  margin-top: 16px;
  border: 1px dashed var(--border-soft);
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 85%, var(--bg));
}

.checklist summary {
  cursor: pointer;
  font-weight: 600;
}

.checklist ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.result-card {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 90%, var(--bg));
  text-align: center;
}

.result-card.highlighted {
  background: color-mix(in srgb, var(--panel) 95%, var(--bg));
  border-color: var(--orange);
}

.result-card .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.result-card .value {
  font-size: 28px;
  font-weight: 600;
  margin: 4px 0;
}

.result-card.highlighted .value {
  color: var(--orange);
}

.value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.unit-inline {
  font-size: 16px;
  color: inherit;
}

.result-card .unit {
  font-size: 12px;
  color: inherit;
}

.result-card .note {
  font-size: 12px;
  color: inherit;
  opacity: 0.8;
}

.tl-eq-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 10px;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-equation {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.formulas ol {
  margin: 8px 0 0 18px;
  line-height: 1.5;
}

.help-text {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.ghost {
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.tl-footer {
  margin: 16px auto 0;
  max-width: 1200px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-footer a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

button {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--blue);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tl-help-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tl-help-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}
.tl-help-form input,
.tl-help-form textarea {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
}
.tl-help-form button {
  align-self: flex-start;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--panel-hover);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.tl-help-form button:hover {
  background: var(--orange);
  color: #111;
}
