/* Kiln demo page — extends /style.css */

[hidden] { display: none !important; }

.kiln { padding: 3rem 0 2rem; }
.kiln-head { text-align: center; margin-bottom: 2rem; }
.kiln-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
}
.kiln-head .lede { margin-bottom: 0; }

.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0 auto 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.tab {
  border: 0;
  background: transparent;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
}
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.kiln-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.kiln-form { display: grid; gap: 1rem; }
.form-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.form-head h2 { margin: 0; font-size: 1.1rem; letter-spacing: -0.02em; }
.kiln-form label { display: grid; gap: 0.35rem; font-size: 0.8125rem; font-weight: 600; color: var(--text); position: relative; }
.kiln-form .hint { font-weight: 400; color: var(--faint); }
.kiln-form input,
.kiln-form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.925rem;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  resize: vertical;
}
.kiln-form input:focus,
.kiln-form textarea:focus { outline: 2px solid var(--clay-soft); border-color: var(--clay); }
.kiln-form .mono, .md code, .md pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.kiln-form .mono { font-size: 0.825rem; }
.row { display: flex; gap: 0.75rem; }
.row .hours { width: 6.5rem; flex: none; }
.row .grow { flex: 1; }
.count { justify-self: end; font-size: 0.7rem; font-weight: 400; color: var(--faint); min-height: 1em; }
.count.is-over { color: #b42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8125rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.fine { margin: 1.25rem 0 0; font-size: 0.75rem; color: var(--faint); line-height: 1.5; }

.output { min-height: 24rem; padding: 0; overflow: hidden; }
.output-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  min-height: 3rem;
}
.output-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8125rem; color: var(--clay); }
#copy { margin-left: auto; }
.spinner {
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  border: 2px solid var(--clay-soft); border-top-color: var(--clay);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error { margin: 1rem 1.25rem 0; padding: 0.75rem 1rem; border-radius: 10px; background: #fef3f2; color: #b42318; font-size: 0.875rem; }

.md { padding: 1.25rem 1.5rem 1.5rem; font-size: 0.95rem; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { letter-spacing: -0.02em; line-height: 1.25; margin: 1.5rem 0 0.5rem; }
.md h1 { font-size: 1.35rem; } .md h2 { font-size: 1.15rem; } .md h3 { font-size: 1rem; } .md h4 { font-size: 0.95rem; }
.md p, .md li { color: #333336; }
.md ul, .md ol { padding-left: 1.3rem; }
.md li + li { margin-top: 0.25rem; }
.md code { background: var(--bg-soft); padding: 0.1rem 0.3rem; border-radius: 5px; font-size: 0.85em; }
.md pre { background: #1d1d1f; color: #f5f5f7; padding: 0.9rem 1rem; border-radius: 10px; overflow-x: auto; font-size: 0.8rem; line-height: 1.5; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { margin: 1rem 0; padding: 0.25rem 1rem; border-left: 3px solid var(--clay); color: var(--muted); }
/* Tables: display:block makes the table its own horizontal scroll container on narrow screens.
   .md sets overflow-wrap:anywhere, which collapses min-content widths (times like 0:00–0:15 wrapped
   per character), so reset it inside tables and only allow word-wrapping in the last column. */
.md table { border-collapse: collapse; width: 100%; max-width: 100%; font-size: 0.85rem; margin: 1rem 0;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; table-layout: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top;
  overflow-wrap: normal; word-break: normal; }
.md th:first-child, .md td:first-child { white-space: nowrap; }
.md th:nth-child(2), .md td:nth-child(2) { min-width: 9rem; }
.md th:last-child, .md td:last-child { overflow-wrap: break-word; min-width: 14rem; }
.md th:only-child, .md td:only-child { min-width: 0; }
.md th { background: var(--bg-soft); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.placeholder { color: var(--faint); padding: 3rem 0; text-align: center; }
.placeholder p { color: var(--faint); margin: 0.25rem 0; }
.cursor::after { content: "▍"; color: var(--clay); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.powered { text-align: center; margin: 2rem 0 0; font-size: 0.8125rem; color: var(--faint); }

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