/* ============================================================
   Deadline 365 — cross-page polish
   Small, shared fit-and-finish rules that sit above every page
   family. Loaded last; intentionally conservative.
   ============================================================ */

/* Keyboard focus is always visible, in both themes. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
}
html[data-theme="dark"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: #ffb38a;
}

/* One primary CTA colour in light mode. The page families currently mix a
   bright orange (dark ink) with the ember used by the app. Standardising the
   filled action removes that inconsistency without changing dark mode. */
html:not([data-theme="dark"]) :is(.btn-primary):not(:disabled) {
  background: #c2410c;
  border-color: #c2410c;
  color: #fffaf3;
  box-shadow: 0 1px 2px rgba(28, 26, 23, .12);
}
html:not([data-theme="dark"]) :is(.btn-primary):not(:disabled):hover {
  background: #9a3412;
  border-color: #9a3412;
  color: #fffaf3;
}
html:not([data-theme="dark"]) :is(.btn-primary):not(:disabled) svg {
  color: currentColor;
}

/* The compact header guide is icon-only, so it needs a surface that stays
   visible on both light chrome and the dark app topbar. */
.g-guide-trigger--compact {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #d8cabb;
  background: #fff8ef;
  color: #8a2f12;
  box-shadow: 0 1px 2px rgba(28, 26, 23, .10);
}
.g-guide-trigger--compact:hover {
  background: #f4e7d8;
  border-color: #c9b7a4;
  color: #7c2a0e;
}
.g-guide-trigger--compact svg {
  width: 17px;
  height: 17px;
}
html[data-theme="dark"] .g-guide-trigger--compact {
  background: #2a211b;
  border-color: #4a3b31;
  color: #ffb38a;
}
html[data-theme="dark"] .g-guide-trigger--compact:hover {
  background: #382b22;
  border-color: #6a5142;
  color: #ffc6a8;
}

/* Help's glossary disclosure should read as a disclosure. */
.g-help-glossary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.g-help-glossary summary::after {
  content: "+";
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--g-line, #dcd4c5);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font: 600 15px/1 var(--g-font, sans-serif);
  color: var(--g-link, #8a2f12);
}
.g-help-glossary[open] summary::after {
  content: "−";
}

/* Keep the library's floating book stack out of the sticky header and away
   from the viewport edge. */
@media (min-width: 1100px) {
  .lib-hero .pm-lib-scene {
    top: 34px;
    right: 24px;
    width: min(24vw, 300px);
  }
}

/* Mobile orientation: keep the explanation, not the wall of bullets. The
   bullets move into an expandable "How this page works" block below. */
.g-orient-mobile {
  display: none;
}
@media (max-width: 640px) {
  .g-orient {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 15px;
    margin: 10px 12px 14px;
    border-radius: 14px;
  }
  .g-orient-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .g-orient-icon svg {
    width: 20px;
    height: 20px;
  }
  .g-orient h2 {
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.1;
  }
  .g-orient-intro {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
  }
  .g-orient-copy > ul {
    display: none;
  }
  .g-orient-mobile {
    display: block;
    margin-top: 8px;
  }
  .g-orient-mobile summary {
    cursor: pointer;
    color: var(--g-link, #8a2f12);
    font-size: 11.5px;
    font-weight: 650;
    list-style: none;
  }
  .g-orient-mobile summary::-webkit-details-marker {
    display: none;
  }
  .g-orient-mobile summary::after {
    content: "+";
    margin-left: 5px;
    color: var(--g-faint, #746c60);
  }
  .g-orient-mobile[open] summary::after {
    content: "−";
  }
  .g-orient-mobile ul {
    margin-top: 8px;
    grid-template-columns: 1fr;
  }
  .g-orient-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    width: 100%;
    gap: 8px;
  }
  .g-orient-actions .g-next-primary {
    flex: 1 1 150px;
    min-height: 40px;
  }
  .g-orient-actions .g-guide-trigger {
    flex: 0 1 auto;
    min-height: 40px;
  }
  .g-orient-more {
    margin-top: 8px;
    padding-top: 7px;
  }
  .g-orient-more summary {
    font-size: 11px;
  }
  .g-setup {
    padding: 14px 14px;
    margin: 0 12px 16px;
  }
  .g-setup-head b {
    font-size: 19px;
  }
  .g-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .g-step {
    padding: 9px;
  }
  .g-step b {
    font-size: 12px;
  }
  .g-step small {
    font-size: 10.5px;
  }
}
@media (max-width: 379px) {
  .g-orient-actions {
    grid-column: 1 / -1;
  }
  .g-steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-guide-trigger--compact,
  .g-orient-mobile summary,
  .g-help-glossary summary {
    transition: none;
  }
}

/* The checker orientation sits in a narrow column, so its three-column bullet
   list becomes a stack. The bullets stay available in the disclosure. */
.g-orient[data-g-page="checker"] .g-orient-copy > ul {
  display: none;
}
.g-orient[data-g-page="checker"] .g-orient-mobile {
  display: block;
  margin-top: 8px;
}
@media (min-width: 641px) {
  .g-orient[data-g-page="checker"] .g-orient-mobile {
    margin-top: 10px;
  }
}

/* Keep the narrow-screen "How this page works" disclosure visually identical
   to the other guide disclosures (some pages show it on desktop too). */
.g-orient-mobile summary {
  list-style: none;
  cursor: pointer;
  color: var(--g-link, #8a2f12);
  font-size: 11.5px;
  font-weight: 650;
}
.g-orient-mobile summary::-webkit-details-marker {
  display: none;
}
.g-orient-mobile summary::after {
  content: "+";
  margin-left: 5px;
  color: var(--g-faint, #746c60);
}
.g-orient-mobile[open] summary::after {
  content: "−";
}

/* Keyword landing pages use a lighter header than the main site. On phones
   its controls wrapped into two uneven rows; keep one clean row instead. */
@media (max-width: 700px) {
  .keyword-landing header .wrap.nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
  }
  .keyword-landing header .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
  }
  .keyword-landing header .brand-sub {
    display: none;
  }
  .keyword-landing header .hdr-actions {
    flex: none;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: auto;
  }
  .keyword-landing header .hdr-actions .wow-theme-btn,
  .keyword-landing header .hdr-actions .btn-ghost {
    display: none !important;
  }
  .keyword-landing header .btn-sm {
    min-height: 40px;
    padding-left: 13px;
    padding-right: 13px;
  }
}
@media (max-width: 380px) {
  .keyword-landing header .hdr-actions .btn-primary {
    display: none !important;
  }
}
