/* Read.md web viewer — page-side chrome (drop zone, toolbar, result frame).
   The rendered document itself is styled by app-theme.css INSIDE the
   render iframe; this file only styles the host page around it. */

.viewer-tool {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.viewer-drop {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg-raised);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.viewer-drop:hover,
.viewer-drop--over {
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
}
.viewer-drop--compact { padding: 20px 24px; }
.viewer-drop__inner strong { font-size: 1.1rem; }
.viewer-drop__hint {
  color: var(--color-text-muted);
  margin: 6px 0 0;
  font-size: 0.95rem;
}
.viewer-drop__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.viewer-drop__privacy {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.viewer-drop__privacy strong { color: var(--color-text); }

.viewer-paste { margin-top: 14px; text-align: left; }
.viewer-paste textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px;
  margin-bottom: 10px;
  resize: vertical;
}

.viewer-result { margin-top: 22px; }
.viewer-result__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
#viewer-frame {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 420px;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  /* Dark is the default theme (matches the site); light on request. */
  background: #0d1117;
}
.viewer-result--light #viewer-frame { background: #ffffff; }

/* Once a document renders, reading takes over the viewport: the SEO copy
   collapses and the frame gets the height. Google reads the static HTML;
   users who rendered a file get the reader. */
body.viewer-active .viewer-copy { display: none; }
body.viewer-active #viewer-frame { height: calc(100vh - 240px); }

/* SEO copy sections under the tool */
.viewer-copy {
  max-width: 760px;
  margin: 56px auto 0;
  padding: 0 24px 80px;
}
.viewer-copy h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  margin: 40px 0 12px;
}
.viewer-copy p, .viewer-copy li {
  color: var(--color-text-muted);
  line-height: 1.65;
}
.viewer-copy strong, .viewer-copy a { color: var(--color-text); }
.viewer-copy a { text-decoration: underline; text-underline-offset: 3px; }
.viewer-copy code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-bg-subtle);
  border-radius: 4px;
  padding: 1px 6px;
}
.viewer-copy .guide__badges { margin: 20px 0; }

.viewer-hero {
  text-align: center;
  padding: 56px 24px 32px;
}
/* Tool pages: tighter hero — H1 + privacy line, then straight to the tool. */
.viewer-hero--tool { padding: 40px 24px 20px; }
.viewer-hero__privacy { font-size: 0.95rem; }
.viewer-copy__lede {
  font-size: 1.06rem;
  color: var(--color-text);
}
.viewer-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
}
.viewer-hero h1 em { color: var(--color-accent); font-style: italic; }
.viewer-hero p {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}
