/* The embedded Draft reader shares the site's editorial paper and its inverted Studio palette. */
@media screen and (forced-colors: none) {
  html.wn-draft-journal {
    --draft-canvas: #f6f2ef;
    --draft-paper: #fffdf9;
    --draft-raised: #f5efef;
    --draft-field: #f7f2f6;
    --draft-ink: #342a36;
    --draft-muted: #645968;
    --draft-line: #ded3d9;
    --draft-control: #a98d9f;
    --draft-shade: linear-gradient(112deg, #fffdf8, #faf7f4 55%, #f5edf4);
    --draft-shadow: 0 2px 8px rgb(72 44 62 / 6%);
  }

  html.wn-draft-journal[data-wn-theme=dark] {
    --draft-canvas: #241f27;
    --draft-paper: #2c2630;
    --draft-raised: #393039;
    --draft-field: #211c24;
    --draft-ink: #fcf6ee;
    --draft-muted: #d3c5cf;
    --draft-line: #584951;
    --draft-control: #9d8496;
    --draft-shade: linear-gradient(112deg, #352d34, #302932 55%, #382c38);
    --draft-shadow: 0 2px 8px rgb(0 0 0 / 16%);
  }

  /* The theme and the native comments component each consume their own colour roles. */
  html.wn-draft-journal,
  html.wn-draft-journal[data-wn-theme] body.wn-quiet-editorial {
    --ev-bg: var(--draft-canvas);
    --ev-surface: var(--draft-paper);
    --ev-raised: var(--draft-raised);
    --ev-ink: var(--draft-ink);
    --ev-muted: var(--draft-muted);
    --ev-line: var(--draft-line);
    --ev-control: var(--draft-control);
    --qe-canvas: var(--draft-canvas);
    --qe-paper: var(--draft-paper);
    --qe-surface: var(--draft-raised);
    --qe-raised: var(--draft-paper);
    --qe-ink: var(--draft-ink);
    --qe-muted: var(--draft-muted);
    --qe-line: var(--draft-line);
    --qe-control: var(--draft-control);
    --qe-review-paper: var(--draft-paper);
    --qe-review-soft: var(--draft-raised);
    --qe-review-raised: var(--draft-paper);
    --qe-review-ink: var(--draft-ink);
    --qe-review-muted: var(--draft-muted);
    --qe-review-line: var(--draft-line);
    --qe-review-control: var(--draft-control);
    --qe-review-brand: var(--tool-purple);
    --qe-review-selected: var(--ev-soft);
    --qe-review-info-soft: var(--draft-raised);
  }

  html.wn-draft-journal body.wn-quiet-editorial :is(#content, #demo-notice) {
    background: var(--draft-canvas) !important;
    color: var(--draft-ink) !important;
  }

  html.wn-draft-journal body.wn-quiet-editorial header.demo-header,
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-workspace .cs-review-toolbar,
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts {
    background: var(--draft-shade) !important;
    border-color: var(--draft-line) !important;
    color: var(--draft-ink) !important;
  }

  html.wn-draft-journal body.wn-quiet-editorial #content #firstHeading { color: var(--draft-ink) !important; }
  html.wn-draft-journal body.wn-quiet-editorial #demo-notice { color: var(--draft-muted) !important; }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-draft > .mw-parser-output {
    color: var(--draft-ink) !important;
    background: var(--draft-paper) !important;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content :is(.cs-review-draft-column, .cs-review-comments-column, .cs-review-tools) {
    border: 1px solid var(--draft-line) !important;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-toolbar {
    border: 1px solid var(--draft-line);
    box-shadow: var(--draft-shadow);
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-workspace {
    background: transparent !important;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-workspace :is(.cs-big-comment,.cs-btn:not(.cs-danger,.cs-reject,.cs-withdraw)) {
    color: var(--tool-purple) !important;
    background: var(--tool-button) !important;
    border: 1px solid var(--tool-border) !important;
    box-shadow: var(--tool-relief) !important;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content #cs-panel textarea {
    color: var(--draft-ink) !important;
    background: var(--draft-field) !important;
    border: 1px solid var(--draft-control) !important;
  }
}

@media screen {
  html.wn-draft-journal body.wn-quiet-editorial #content {
    padding: 0 clamp(12px, 2.5vw, 26px) 20px;
  }
  html.wn-draft-journal body.wn-quiet-editorial #demo-notice {
    padding: 12px clamp(12px, 2.5vw, 26px) 0;
    font-size: .92rem;
    line-height: 1.45;
  }
  html.wn-draft-journal body.wn-quiet-editorial #firstHeading {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .7rem 0 .75rem;
    font-size: clamp(1.65rem, 3.2vw, 2rem);
    font-weight: 400;
    line-height: 1.16;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-workspace {
    margin-top: 0;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-toolbar {
    margin: 0 0 .45rem;
    padding: .55rem .85rem;
    border-radius: .65rem;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-inline-title {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-tools > summary {
    display: flex;
    align-items: center;
    gap: .7rem;
    list-style: none;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-tools > summary::-webkit-details-marker { display: none; }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-tools > summary::before {
    content: "";
    width: .4rem;
    height: .4rem;
    border: solid currentColor;
    border-width: 1px 1px 0 0;
    transform: rotate(45deg);
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-tools[open] > summary::before { transform: rotate(135deg); }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-tools {
    border-radius: .55rem;
    margin-bottom: .65rem;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content :is(.cs-review-draft-column,.cs-review-comments-column) {
    border-radius: .7rem;
    min-width: 0;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-draft-column {
    container-type: inline-size;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-draft {
    padding: clamp(12px, 1.8vw, 19px);
    border-radius: inherit;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .mw-parser-output > p:first-of-type {
    margin-block-start: 0;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-review-workspace .cs-list {
    padding: 10px !important;
    gap: 14px;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content :is(.cs-btn,.cs-big-comment) {
    min-height: 44px;
    padding: .4rem .75rem;
    border-radius: .4rem;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .cs-big-comment {
    width: fit-content;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts {
    border-radius: .55rem;
    padding: .7rem .85rem;
  }
}

@container (max-width: 35rem) {
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts .demo-wordmark {
    max-width: 8rem;
  }
}
@container (min-width: 21rem) and (max-width: 35rem) {
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
    gap: .75rem;
    align-items: start;
  }
  html.wn-draft-journal body.wn-quiet-editorial #content .demo-facts .demo-wordmark { margin: 0; }
}
