/* Keep the chapter links and menu usable at laptop widths, then use the extra columns on wider displays. */
.reader-textgroup,
.menu-desk,
.region-desk {
  min-width: 0;
}
.app-caption small,
.chapter-context,
.reader-contents .wide-section,
.toc-title {
  display: none;
}
.region-desk {
  order: 3;
  padding: 16px;
  border: 1px solid #494150;
  border-radius: 8px;
  background: #22212d;
  align-self: start;
}
.district-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.district-grid a {
  position: relative;
  display: flex;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  min-height: 70px;
  padding: 9px 11px;
  border-radius: 5px;
  color: #fff;
  background: #272636;
}
.district-grid img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.district-grid a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, #100c19e0, #15102198 50%, #21182a0d);
}
.district-grid b,
.district-grid small {
  display: block;
}
.district-grid b {
  font-size: 15px;
  line-height: 1.3;
}
.district-grid small {
  font-size: 11px;
  color: #f3e5eb;
  line-height: 1.3;
  margin-top: 3px;
}
.district-grid a:is(:focus-visible, :hover) {
  box-shadow: inset 0 0 0 2px #ffc2d5;
}
@media (min-width: 761px) {
  .handbook-desk .home-columns {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas: "chapter help" "menus regions";
    align-items: start;
    gap: 18px;
  }
  .home-main {
    display: contents;
  }
  .chapter-section {
    grid-area: chapter;
  }
  .help-desk {
    grid-area: help;
  }
  .menu-desk {
    grid-area: menus;
  }
  .region-desk {
    grid-area: regions;
  }
  .menu-desk .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chapter-context {
    display: block;
  }
  .chapter-preview {
    margin: 6px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid #4a414e;
  }
  .chapter-preview h3 {
    margin: 0 0 4px;
    font-size: 13px;
    color: #e8b4c8;
  }
  .chapter-preview a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e9e3e7;
    min-height: 35px;
    font-size: 14px;
  }
  .chapter-preview a > svg:first-child {
    color: #d499af;
  }
  .chapter-preview a > svg:last-child {
    margin-left: auto;
    color: #c29aac;
  }
  .chapter-preview a:hover {
    color: white;
    background: #38313e;
  }
}
@media (min-width: 1080px) {
  body {
    --page-gutter: clamp(24px, 1.85vw, 64px);
  }
  .hub-shell,
  .library-mode .hub-shell,
  .foot,
  .actions.shell,
  .atlas-page.shell,
  .reader-flow.shell:not([data-reader-flow]),
  .shelf-page.shell:not(.shelf-detail),
  .ref-page.shell,
  .saves-page.shell,
  .trophy-page.shell:has(#award-list) {
    width: calc(100% - 2 * var(--page-gutter));
    max-width: 3100px;
    margin-inline: auto;
  }
  .library-mode #index-panel {
    width: 100%;
    max-width: none;
  }
  .library-mode #cards,
  .shelf-grid,
  .ref-list,
  #award-list,
  .saves-page .save-list,
  .reader-flow .group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    align-items: start;
  }
  .saves-page .save-list {
    max-width: none;
  }
  .library-mode #cards,
  .shelf-grid,
  .ref-list,
  #award-list,
  .reader-flow .group-grid {
    align-items: stretch;
  }
  .shelf-detail.shell,
  .trophy-page.shell:not(:has(#award-list)),
  .reader-flow.shell[data-reader-flow] {
    width: calc(100% - 2 * var(--page-gutter));
    margin-left: var(--page-gutter);
  }
  .atlas-layout {
    grid-template-columns: minmax(0, 1fr) clamp(290px, 24%, 610px);
    gap: 20px;
  }
  .atlas-page #world-map {
    height: clamp(450px, 66vh, 980px);
  }
}
@media (min-width: 1560px) {
  :root {
    --nav-width: clamp(192px, 9vw, 244px);
  }
  .mast .mast-inner {
    padding-inline: clamp(14px, 1vw, 26px);
  }
  .handbook-desk {
    padding-block: clamp(20px, 1.45vw, 40px) 24px;
    min-height: 0;
  }
  .device-landing {
    grid-template-columns: minmax(0, 1.6fr) minmax(420px, 1fr);
    gap: 0 clamp(16px, 1.15vw, 30px);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .device-landing .hero {
    min-height: clamp(285px, 15vw, 395px);
  }
  .device-landing .cover-title {
    inset: clamp(24px, 2.1vw, 58px) auto auto clamp(24px, 2vw, 52px);
  }
  .device-landing .cover-title h1 span {
    font-size: clamp(88px, 5.6vw, 148px);
  }
  .device-landing .cover-title h1 b {
    font-size: clamp(30px, 2.1vw, 54px);
  }
  .device-landing .lookup {
    margin: 0 clamp(20px, 1.7vw, 45px) clamp(18px, 1.1vw, 32px);
  }
  .device-landing .lookup .search-box {
    min-height: 54px;
  }
  .phone-launcher {
    padding: clamp(15px, 1.1vw, 27px);
    gap: 14px;
    border-color: #4f505a;
    background:
      radial-gradient(ellipse at 0% 110%, #49515c, transparent 62%),
      linear-gradient(125deg, #373448, #232832 78%);
  }
  .phone-launcher .resume-tile {
    min-height: 55px;
    padding-inline: 16px;
  }
  .resume-tile b {
    font-size: 17px;
  }
  .phone-launcher .hub-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1;
    gap: 9px;
  }
  .phone-launcher .hub-tool {
    justify-content: center;
    align-items: flex-start;
    padding: 8px clamp(9px, 0.7vw, 19px);
    gap: 6px;
    background: #17172278;
    border: 1px solid #a69bb538;
    border-radius: 6px;
  }
  .phone-launcher .hub-tool:is(:hover, :focus-visible) {
    background: #474251;
  }
  .app-caption {
    text-align: left;
  }
  .phone-launcher .hub-tool strong {
    font-size: 15px;
  }
  .app-caption small {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    color: #e1dce5;
  }
  .handbook-desk .home-columns {
    margin-top: clamp(19px, 1.2vw, 30px);
    gap: clamp(16px, 1.05vw, 28px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr) minmax(0, 1.15fr);
    grid-template-areas: "chapter help regions" "menus menus menus";
  }
  .chapter-section,
  .help-desk,
  .region-desk {
    padding: clamp(16px, 1.05vw, 26px);
    align-self: stretch;
  }
  .desk-heading h2,
  .help-desk .desk-heading h2 {
    font-size: clamp(22px, 1.15vw, 30px);
  }
  .chapter-strip button {
    font-size: 15px;
  }
  .chapter-brief a,
  .help-desk > a,
  .chapter-preview a {
    font-size: clamp(14px, 0.72vw, 19px);
  }
  .chapter-preview h3,
  .chapter-brief a small {
    font-size: 14px;
  }
  .chapter-brief a,
  .help-desk > a {
    min-height: clamp(41px, 2.1vw, 57px);
  }
  .chapter-preview a {
    min-height: clamp(34px, 1.65vw, 48px);
  }
  .region-desk {
    display: flex;
    flex-direction: column;
  }
  .district-grid {
    flex: 1;
    grid-template-rows: repeat(3, minmax(68px, 1fr));
  }
  .district-grid a {
    min-height: 0;
    padding: 10px 14px;
  }
  .district-grid b {
    font-size: clamp(15px, 0.83vw, 22px);
  }
  .district-grid small {
    font-size: 12px;
  }
  .menu-desk .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 0.9vw, 24px);
  }
  .menu-desk .feature-card img {
    aspect-ratio: 2.05;
  }
  .feature-card > span {
    padding: clamp(12px, 0.85vw, 20px);
  }
  .feature-card strong {
    font-size: clamp(17px, 0.92vw, 24px);
  }
  .feature-card p {
    font-size: clamp(14px, 0.73vw, 18px);
  }
  .coverage-note {
    margin-top: 24px;
  }
  .reader.shell {
    margin-left: var(--page-gutter);
    width: calc(100% - 2 * var(--page-gutter));
    max-width: 2080px;
  }
  .reader .detail-head.with-image {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
  }
  .reader .reader-image {
    max-width: 760px;
    justify-self: end;
  }
  .reader .reader-image img {
    max-height: 280px;
  }
  .reader .detail-grid {
    grid-template-columns: minmax(0, 56rem) minmax(235px, 1fr);
    align-items: start;
    gap: clamp(20px, 1.65vw, 48px);
  }
  .reader .detail-grid:has(.reader-contents) {
    grid-template-columns: minmax(190px, 0.68fr) minmax(0, 55rem) minmax(
        245px,
        1fr
      );
  }
  .reader-textgroup:has(.reader-contents) {
    display: contents;
  }
  .reader .detail-side {
    min-width: 0;
  }
  .reader .detail-side .related-list {
    max-width: 38rem;
  }
  .reader-contents {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 14px;
    background: #24212e;
    border: 1px solid #494150;
    border-radius: 6px;
    scrollbar-width: thin;
  }
  .reader-contents .toc-title {
    display: block;
    padding: 1px 8px 8px;
    font-size: 14px;
    color: #e8a9c4;
  }
  .reader-contents .wide-section {
    display: block;
  }
  .reader-contents button {
    min-width: 0;
    text-align: left;
    padding: 8px;
    font-size: 14px;
    line-height: 1.45;
    border: 0;
    border-radius: 3px;
    background: transparent;
  }
  .reader-contents select {
    display: none;
  }
  .reader-start,
  .reader .answer,
  .reader .reader-reveal {
    max-width: 55rem;
  }
  .reader-flow .group-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .library-mode #cards {
    grid-template-columns: repeat(auto-fill, minmax(375px, 1fr));
  }
  .shelf-grid,
  .ref-list,
  #award-list {
    grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  }
  .atlas-page #world-map {
    height: clamp(540px, 70vh, 1150px);
  }
}
@media (max-width: 760px) {
  .region-desk {
    padding: 12px;
  }
  .district-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .district-grid a {
    min-height: 64px;
    padding: 7px;
  }
  .district-grid b {
    font-size: 13px;
  }
  .district-grid small {
    display: none;
  }
}

.device-landing .cover-title h1 .cover-wordmark {
  display: inline-block;
  padding: 0;
  background: none;
  max-width: 100%;
  letter-spacing: normal;
  line-height: 1;
}
.cover-wordmark img {
  width: 3.76em;
  max-width: 100%;
  height: auto;
  display: block;
}
@media (min-width: 1560px) {
  .shelf-detail.shell {
    width: calc(100% - 2 * var(--page-gutter));
    max-width: 2320px;
    display: grid;
    grid-template-columns: minmax(435px, 1fr) minmax(0, 1.15fr);
    align-items: start;
    column-gap: clamp(32px, 3vw, 84px);
  }
  .topic-reading,
  .topic-links {
    min-width: 0;
  }
  .shelf-detail .topic-reading .shelf-answer p {
    max-width: 50em;
  }
  .shelf-detail .topic-links {
    padding-top: 1.25rem;
  }
  .shelf-detail .shelf-locals {
    margin-top: 0;
  }
  .shelf-detail .shelf-locals > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reader .detail-grid:has(.reader-contents) {
    grid-template-columns: minmax(210px, 17%) minmax(0, 55rem) minmax(
        245px,
        1fr
      );
  }
  .handbook-desk.library-mode #cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .handbook-desk.library-mode
    #cards:has(.reference-search)
    > .entry-card:nth-child(-n + 2) {
    grid-column: span 2;
  }
  .reader-flow.shell[data-reader-flow] {
    max-width: 1480px;
  }
}

/* A menu screenshot is a reference: all four edges may contain controls. */
.menu-desk .feature-card img {
  display: block;
  object-fit: contain;
  background: linear-gradient(120deg, #292735, #191821);
}
.mast .brand {
  align-items: center;
  gap: 9px;
}
.mast .brand span {
  font:
    italic 900 clamp(16px, 1.15vw, 23px) / 1.15 "Arial Black",
    Arial,
    sans-serif;
  letter-spacing: 0.015em;
}
.mast .brand small {
  display: block;
  margin-top: 3px;
  color: #e8d1dc;
  font: 650 clamp(8px, 0.48vw, 10px) / 1.15 var(--sans);
  letter-spacing: 0.19em;
}
@media (min-width: 1100px) {
  .reader-flow.shell[data-reader-flow] {
    width: calc(100% - 2 * var(--page-gutter));
    max-width: 2300px;
    display: grid;
    grid-template-columns: minmax(290px, 0.67fr) minmax(0, 1.35fr);
    align-items: start;
    gap: clamp(24px, 2.7vw, 78px);
    padding-top: clamp(22px, 1.7vw, 42px);
  }
  .reader-flow[data-reader-flow] .flow-heading {
    position: sticky;
    top: 16px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    min-width: 0;
    scrollbar-width: thin;
    border: 1px solid var(--reader-rule);
    border-radius: 8px;
    background: #201e2b;
    padding: clamp(16px, 1.45vw, 36px);
  }
  .reader-flow[data-reader-flow] h1 {
    font-size: clamp(27px, 2.35vw, 52px);
  }
  .reader-flow[data-reader-flow] .flow-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .reader-flow[data-reader-flow] .flow-switch,
  .reader-flow[data-reader-flow] .flow-switch select {
    min-width: 0;
    max-width: 100%;
  }
  .reader-flow[data-reader-flow] .flow-list {
    width: 100%;
    max-width: none;
  }
  .reader-flow[data-reader-flow] .flow-card:first-child {
    padding-top: 4px;
  }
  .reader-flow[data-reader-flow] .flow-summary {
    max-width: 53em;
  }
  .reader-flow[data-reader-flow] .flow-empty {
    grid-column: 2;
  }
}

.mast .brand img {
  display: block;
  flex: none;
}
.mast .brand img {
  width: 38px;
  height: 38px;
}
@media (min-width: 1100px) {
  .mast .brand {
    align-self: center;
    width: max-content;
    margin-inline: 0;
  }
  .mast .brand img {
    width: 52px;
    height: 52px;
  }
}
