/* BlurWriter — every screen, scoped under .wr-app (docs/SITE.md). The editor
   and the explorer are BlurPager's own (`.gd-*`, `.docs-*` in its
   public/styles.css, which every site's page links); only where they sit and
   their width are set here. */

.wr-app {
  --wr-teal: #00c6cf;
  --wr-teal-dark: #00a3ab;
  --wr-ink: #2f3440;
  --wr-muted: #6b7280;
  --wr-line: #e3e6ec;
  --wr-bg: #f6f8fa;
  --wr-bar: 3.25rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--wr-bg);
  color: var(--wr-ink);
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.wr-bar {
  position: sticky; top: 0; z-index: 40; box-sizing: border-box; min-height: var(--wr-bar);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 1rem; background: #fff; border-bottom: 1px solid var(--wr-line);
}
.wr-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--wr-teal); font-size: 1.35rem; text-decoration: none; }
.wr-brand b { font-weight: 700; }
.wr-logo { display: block; width: 28px; height: 28px; border-radius: 4px; }
.wr-nav { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.wr-who { color: var(--wr-muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.wr-inline { display: inline; margin: 0; }
.wr-main { flex: 1 1 auto; width: 100%; max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem; box-sizing: border-box; }
.wr-wide-main { max-width: 84rem; }
.wr-full-main { max-width: none; padding: 0; }
.wr-foot { padding: 1rem; text-align: center; color: var(--wr-muted); font-size: 0.85rem; }
.wr-langs { display: inline-flex; gap: 0.5rem; margin: 0; }
.wr-langs a { color: var(--wr-muted); text-decoration: none; font-size: 0.85rem; }
.wr-langs a[data-on="1"] { color: var(--wr-ink); font-weight: 600; }

/* Buttons: background, colour, border and radius together — BlurPager's
   baseline `button` rule paints white text and its own corners (its D143). */
.wr-app .wr-button, .wr-app button.wr-button {
  display: inline-block; padding: 0.6rem 1.2rem; border: 1px solid var(--wr-teal); border-radius: 6px;
  background: var(--wr-teal); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.wr-app .wr-button:hover { background: var(--wr-teal-dark); border-color: var(--wr-teal-dark); }
.wr-app .wr-small { padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.wr-app .wr-wide { display: block; width: 100%; text-align: center; }
.wr-app button.wr-quiet, .wr-app button.wr-link {
  padding: 0.3rem 0.6rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--wr-muted); font: inherit; cursor: pointer;
}
.wr-app button.wr-link { color: var(--wr-teal-dark); text-decoration: underline; }
.wr-app button.wr-quiet:hover { background: rgba(0, 0, 0, 0.05); color: var(--wr-ink); }
.wr-app a.wr-quiet { padding: 0.3rem 0.6rem; border-radius: 6px; color: var(--wr-muted); text-decoration: none; }
.wr-app a.wr-quiet:hover { background: rgba(0, 0, 0, 0.05); color: var(--wr-ink); }
.wr-app button:disabled { opacity: 0.6; cursor: default; }

.wr-card { background: #fff; border: 1px solid var(--wr-line); border-radius: 10px; padding: 1.5rem; }
.wr-narrow { max-width: 26rem; margin: 2rem auto; }
.wr-card h1 { margin: 0 0 1rem; font-size: 1.4rem; }
.wr-or { text-align: center; margin: 1rem 0 0; }
.wr-error { color: #c0392b; }
.wr-muted { color: var(--wr-muted); }
.wr-hint { margin-top: 0.6rem; font-size: 0.82rem; }

.wr-hero { padding: 2rem 0; }
.wr-hero h1 { font-size: 2rem; margin: 0 0 1rem; }
.wr-lead { font-size: 1.1rem; line-height: 1.55; max-width: 40rem; }
.wr-points { padding-left: 1.2rem; line-height: 1.8; }

/* The explorer: full width here. */
.wr-explorer .docs-body { min-height: 30rem; }
.wr-explorer .docs-main, .wr-explorer .docs-tree { max-height: calc(100vh - 14rem); }

/* The editor: under the bar, which stays on the screen; its own bars stick
   below it (BlurPager's --gd-top, as inside BlurPaper's shop). */
.wr-app .gd { --gd-top: var(--wr-bar); min-height: calc(100vh - var(--wr-bar)); }
/* The editor's page takes the whole width, as /author/write does in the shop. */
.wr-main:has(.wr-editor) { max-width: none; padding: 0; }
.wr-editor-loading { padding: 3rem 1rem; text-align: center; color: var(--wr-muted); }

@media (max-width: 700px) {
  .wr-main { padding: 1rem 0.75rem; }
  .wr-full-main { padding: 0; }
  .wr-who { display: none; }
  .wr-hero h1 { font-size: 1.5rem; }
  .wr-explorer .docs-main, .wr-explorer .docs-tree { max-height: none; }
  .wr-explorer .docs-toolrow { overflow-x: auto; }
  .wr-explorer .docs-tools { flex-wrap: nowrap; }
  .wr-explorer .docs-tools button { white-space: nowrap; }
}
