/* Controls follow the viewport of the embedded tool, including narrow article columns. */
@media screen and (max-width: 700px) {
  html.wn-public-tool body.wn-quiet-editorial > header.demo-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 8px clamp(10px, 3vw, 18px);
  }

  html.wn-public-tool body.wn-quiet-editorial header.demo-header .demo-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0 auto 0 0;
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.15;
    white-space: nowrap;
  }

  html.wn-public-tool body.wn-quiet-editorial header.demo-header .wn-theme-switch {
    min-height: 44px;
    min-width: 44px;
    gap: 5px;
    padding: 4px 8px;
    font-size: 14px;
  }

  html.wn-public-tool body.wn-quiet-editorial header.demo-header #demo-reset {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    padding: 5px 9px;
    margin: 0;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .csrc-list > li {
    padding: clamp(14px, 4vw, 20px);
    border-radius: 10px;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .csrc-list .csrc-title {
    display: block;
    margin-block: 6px;
    font-size: 1.2rem;
    line-height: 1.24;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .csrc-meta {
    overflow-wrap: anywhere;
    line-height: 1.65;
    text-underline-offset: .16em;
  }

  html.wn-public-tool body.wn-quiet-editorial #content :is(.csrc-source-details, .csrc-preparation, .csrc-restricted, .csrc-wrap details, .cs-review-tools) > summary {
    box-sizing: border-box;
    min-height: 44px;
    padding-block: 10px;
    line-height: 1.45;
    cursor: pointer;
  }

  html.wn-public-tool body.wn-quiet-editorial #content #demo-samples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 14px;
  }

  html.wn-public-tool body.wn-quiet-editorial #content #demo-samples > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-underline-offset: .18em;
  }

  html.wn-public-tool body.wn-quiet-editorial #content #demo-samples > p {
    flex-basis: 100%;
    margin-block: 0 .5rem;
  }
}

@media screen and (max-width: 440px) {
  html.wn-public-tool body.wn-quiet-editorial #content .cs-review-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 8px;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .cs-inline-title {
    grid-area: 1 / 1;
    margin: 0;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .cs-review-rotate {
    grid-area: 1 / 2;
    justify-self: end;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .cs-review-tabs {
    grid-area: 2 / 1 / 3 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 700px) and (forced-colors: none) {
  html.wn-public-tool body.wn-quiet-editorial #content .cs-review-tabs [role=tab] {
    background: transparent;
    color: var(--tool-ink);
    border: 1px solid var(--tool-edge);
    border-radius: .35rem;
  }

  html.wn-public-tool body.wn-quiet-editorial #content .cs-review-tabs [aria-selected=true] {
    background: var(--tool-button);
    color: var(--tool-purple);
    border-color: var(--tool-border);
    box-shadow: inset 0 -2px var(--tool-focus);
  }
}


/* The switch itself carries the accessible name when space is tight. */
@media screen and (max-width: 340px) {
  html.wn-public-tool body.wn-quiet-editorial header.demo-header .wn-theme-switch > span:first-child {
    display: none;
  }
}
