/* ═══════════════════════════════════════════════
   THE IPSUM LAB — Theme Page Styles
   Used by all 9 ipsum pages
═══════════════════════════════════════════════ */

/* ── Theme color vars (set by JS) ──────────── */
:root {
  --theme-color:       #C17A5A;
  --theme-color-light: #F5EDE7;
}

/* ── Page layout ───────────────────────────── */
.theme-page {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
  align-items: start;
}

/* ── Left panel (sticky controls) ─────────── */
.theme-panel {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.theme-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.theme-title {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.theme-title-accent {
  font-style: italic;
  color: var(--theme-color);
}

.theme-tagline {
  font-size: 0.875rem;
  color: var(--ink-mid);
  font-style: italic;
  border-left: 2px solid var(--theme-color);
  padding-left: 0.875rem;
  line-height: 1.6;
}

/* Controls */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.para-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.2s;
}
.para-input:focus {
  outline: none;
  border-color: var(--theme-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color) 15%, transparent);
}

.gen-btn {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: var(--theme-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.gen-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.gen-btn:active { opacity: 1;    transform: translateY(0); }
.gen-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Ad slot in panel */
.panel-ad {
  margin-top: auto;
}

/* ── Right content area ─────────────────────── */
.theme-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Output box */
.output-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}
.output-box.has-content {
  border-color: color-mix(in srgb, var(--theme-color) 30%, var(--border));
  box-shadow: var(--shadow-lift);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--theme-color-light);
}

.word-count {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover  { background: var(--theme-color); color: #fff; border-color: var(--theme-color); }
.copy-btn.copied { background: #2D5A3D; color: #fff; border-color: #2D5A3D; }

.ipsum-body {
  padding: 1.75rem 2rem;
  min-height: 180px;
  position: relative;
}

.ipsum-empty {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  line-height: 1.7;
}

#ipsum-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.25em;
  border-left: 2px solid var(--theme-color);
  padding-left: 1.25rem;
}
#ipsum-content p:last-child { margin-bottom: 0; }

/* Below-output ad */
.content-ad {
  display: flex;
  justify-content: center;
}

/* ── Editorial section ─────────────────────── */
.editorial {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 680px;
}

.editorial h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.editorial h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.5rem;
}

.editorial p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink-mid);
}

.editorial ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.editorial ul li {
  font-size: 0.875rem;
  color: var(--ink-mid);
  padding-left: 1.25rem;
  position: relative;
}
.editorial ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--theme-color);
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q:hover { background: var(--theme-color-light); }

.faq-icon { transition: transform 0.25s; flex-shrink: 0; font-style: normal; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--ink-mid);
}
.faq-item.open .faq-a { display: block; }

/* Also Try */
.also-try {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.also-try-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 0.25rem;
}

.also-try-link {
  font-size: 0.8rem;
  padding: 0.3rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  color: var(--ink-mid);
  transition: all 0.15s;
  background: var(--bg-card);
}
.also-try-link:hover {
  background: var(--theme-color);
  color: #fff;
  border-color: var(--theme-color);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .theme-page {
    grid-template-columns: 1fr;
  }
  .theme-panel {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }
  .theme-content {
    padding: 1.5rem;
  }
  .theme-title { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .theme-title { font-size: 2rem; }
  .ipsum-body { padding: 1.25rem; }
  #ipsum-content p { padding-left: 0.875rem; }
}
