/* Stylesheet for the server-rendered help pages (/help, /es/help, /about). Served as /help/help.css by the help router;
   copied into the build by `buildHelp`. Task 3 renders the markup these classes dress.
   SteadyState Crew tokens (brand spec §8.5): square controls, navy links and buttons, ink text, no dark theme.
   Fonts are the app's self-hosted woff2 files under /fonts/ (owner decision 5); the help CSP allows font-src 'self'. */
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("/fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --help-bg: #FFFFFF;
  --help-fg: #1F262D;
  --help-muted: #5E6A77;
  --help-line: #C8CDD3;
  --help-accent: #163A55;
  --help-accent-hover: #0F2A3E;
  --help-banner: #EDE6DB;
  --help-code: #F3F5F7;
  --help-on-accent: #FFFFFF;
  --help-danger: #B01E2C;
  --help-field: #7D8792;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.help {
  margin: 0;
  background: var(--help-bg);
  color: var(--help-fg);
  font: 16px/1.55 "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

.help-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.help-header,
.help-footer {
  padding: 16px 0;
  border-bottom: 1px solid var(--help-line);
}

.help-footer {
  border-bottom: 0;
  border-top: 1px solid var(--help-line);
  color: var(--help-muted);
  font-size: 14px;
}

.help-header a,
.help-footer a,
.help-article a,
.help-list a,
.help-chat a,
.help-audiences a,
.help-crumb a {
  color: var(--help-accent);
}

.help-article p a,
.help-article li a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.help-banner {
  margin: 16px 0;
  padding: 8px 12px;
  background: var(--help-banner);
  color: var(--help-fg);
  font-size: 14px;
}

body.help main h1,
.help-article h1 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  margin: 24px 0 8px;
}

.help-article h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

.help-article h3 {
  font-size: 17px;
  margin: 24px 0 4px;
}

.help-article p,
.help-article li {
  margin: 8px 0;
}

.help-article img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border: 1px solid var(--help-line);
  border-radius: 2px;
}

.help-article code {
  padding: 1px 4px;
  background: var(--help-code);
  border-radius: 2px;
  font-size: 0.95em;
}

.help-summary {
  color: var(--help-muted);
}

.help-list {
  padding: 0;
  list-style: none;
}

.help-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--help-line);
}

.help-form label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
}

.help-form input,
.help-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--help-field);
  border-radius: 0;
  font: inherit;
}

.help-form button {
  margin-top: 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 0;
  background: var(--help-accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.help-error {
  color: var(--help-danger);
  font-size: 14px;
}

/* Task 3: page chrome, index, article furniture. Tap targets are 48 px; focus rings are visible on every control. */
.help-skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 12px 16px;
  background: var(--help-accent);
  color: var(--help-on-accent);
  border-radius: 0;
  z-index: 10;
}

.help-skip:focus {
  top: 16px;
}

.help-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 0;
}

.help-brand {
  font-weight: 400;
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.help-header .help-brand {
  color: var(--help-fg);
}

.help-brand svg {
  flex: none;
}

.help-brand-name {
  font-weight: 600;
}

.help-nav a,
.help-audiences a,
.help-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.help-audiences {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 8px 0 16px;
}

.help-audiences a[aria-current="page"] {
  font-weight: 700;
  color: var(--help-fg);
  border-bottom: 2px solid var(--help-accent);
}

.help-search label {
  display: block;
  margin: 16px 0 4px;
  font-weight: 600;
}

.help-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--help-field);
  border-radius: 0;
  font: inherit;
  background: var(--help-bg);
  color: var(--help-fg);
}

.help-group h2 {
  font-size: 22px;
  margin: 32px 0 4px;
}

.help-group h3 {
  font-size: 15px;
  color: var(--help-muted);
  font-weight: 600;
  margin: 16px 0 0;
}

.help-list li a {
  display: inline-block;
  min-height: 48px;
  padding: 12px 0 0;
  font-weight: 600;
  box-sizing: border-box;
}

.help-list li .help-summary {
  margin: 0;
}

.help-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  background: var(--help-code);
  color: var(--help-muted);
  vertical-align: middle;
}

.help-tag-draft {
  background: var(--help-banner);
  color: var(--help-fg);
}

.help-crumb {
  margin: 16px 0 0;
  font-size: 14px;
}

.help-crumb a {
  color: var(--help-accent);
}

.help-notice {
  margin: 16px 0;
  padding: 8px 12px;
  border: 1px solid var(--help-line);
  background: var(--help-code);
  font-size: 14px;
}

.help-related {
  margin-top: 32px;
}

.help-related h2,
.help-contact h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

.help-vote {
  margin: 32px 0 16px;
  padding: 16px;
  border: 1px solid var(--help-line);
  border-radius: 0;
}

.help-vote p {
  margin: 0 0 8px;
  font-weight: 600;
}

.help-vote button {
  min-width: 48px;
  min-height: 48px;
  margin: 0 8px 0 0;
  padding: 0 16px;
  border: 1px solid var(--help-field);
  border-radius: 0;
  background: var(--help-bg);
  color: var(--help-fg);
  font: inherit;
  cursor: pointer;
}

.help-vote button[aria-pressed="true"] {
  border-color: var(--help-accent);
  background: var(--help-accent);
  color: var(--help-on-accent);
}

.help-thanks {
  font-weight: 400;
  color: var(--help-muted);
}

.help-updated {
  color: var(--help-muted);
  font-size: 14px;
}

.help-form input,
.help-form textarea {
  min-height: 48px;
  background: var(--help-bg);
  color: var(--help-fg);
}

.help-form input[aria-invalid="true"],
.help-form textarea[aria-invalid="true"] {
  border-color: var(--help-danger);
}

.help-form button {
  min-height: 48px;
  min-width: 96px;
  color: var(--help-on-accent);
  font-weight: 600;
}

.help-form button:hover,
.help-chat-email button:hover {
  background: var(--help-accent-hover);
}

.help-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.help-sent {
  padding: 12px 16px;
  border: 1px solid var(--help-line);
  background: var(--help-code);
}

.help-promise {
  color: var(--help-muted);
  font-size: 14px;
}

.help-open-full {
  margin: 16px 0 0;
}

/* help-p2 Task 16: the chat box (hidden until GET /api/help/bot says enabled). */
.help-chat {
  margin: 32px 0;
  padding: 16px;
  border: 1px solid var(--help-line);
  border-radius: 0;
}

.help-chat h2 {
  margin-top: 0;
}

.help-chat-note {
  color: var(--help-muted);
  font-size: 14px;
}

.help-chat-log:empty {
  display: none;
}

.help-chat-turn {
  padding: 12px 0;
  border-bottom: 1px solid var(--help-line);
}

.help-chat-q p,
.help-chat-text p {
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
}

.help-chat-who {
  color: var(--help-muted);
  font-size: 14px;
}

.help-chat-q p {
  white-space: pre-wrap;
}

.help-chat-thinking {
  color: var(--help-muted);
}

.help-chat-card {
  padding: 12px 16px;
  border: 1px solid var(--help-line);
  background: var(--help-code);
}

.help-chat-card-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.help-chat-sources-label {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.help-chat-sources ul {
  margin: 4px 0;
  padding-left: 20px;
}

.help-chat-sources li {
  padding: 4px 0;
}

.help-chat-vote {
  margin: 12px 0 0;
  padding: 12px;
}

.help-chat-ticket {
  margin-top: 12px;
}

.help-chat-email {
  max-width: 420px;
}

.help-chat-email label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
}

.help-chat-email input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--help-field);
  border-radius: 0;
  background: var(--help-bg);
  color: var(--help-fg);
  font: inherit;
}

.help-chat-email button {
  min-height: 48px;
  min-width: 96px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--help-accent);
  color: var(--help-on-accent);
  font: inherit;
  cursor: pointer;
}

.help-chat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.help-chat-talk {
  display: inline-block;
  padding: 12px 0;
}

.help-chat-form button:disabled,
.help-chat-email button:disabled {
  border: 1px solid var(--help-line);
  background: var(--help-code);
  color: #4A545E;
  cursor: default;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--help-accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

