/* Tetramia Help: dark reading surfaces within the existing site theme.
   CSS-only presentation; no game-state handlers, navigation or theme selection changed. */

body.tt-page-help #col-2 { min-width:0; }
body.tt-page-help .tt-help {
  --help-surface:#102536;
  --help-surface-raised:#152d40;
  --help-surface-inset:#0a1b29;
  --help-ink:#e9f3f9;
  --help-muted:#bdcfdd;
  --help-heading:#f6fbff;
  --help-link:#a8e8f4;
  --help-accent:#70d9d4;
  --help-border:#426276;
  --help-article-size:calc(var(--tt-reading-size,17px) + 3px);
  max-width:1080px;
  min-width:0;
  margin:0 auto 48px;
  padding:0 12px 20px;
  color:var(--help-ink);
  font:400 var(--help-article-size)/1.72 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","DejaVu Sans",Arial,sans-serif;
  letter-spacing:normal;
  overflow-wrap:break-word;
}
body.tt-page-help .tt-help *,
body.tt-page-help .tt-help *::before,
body.tt-page-help .tt-help *::after { box-sizing:border-box; }

body.tt-page-help .tt-help a {
  color:var(--help-link)!important;
  text-decoration:underline;
  text-decoration-color:rgba(168,232,244,.55);
  text-underline-offset:3px;
}
body.tt-page-help .tt-help a:hover { color:#e6fcff!important; text-decoration-color:currentColor; }
body.tt-page-help .tt-help :is(a,button,input,summary):focus-visible {
  outline:3px solid #a5f5ed!important;
  outline-offset:3px;
}
body.tt-page-help .tt-help :is(h1,h2,h3) {
  color:var(--help-heading)!important;
  font-family:inherit;
  font-weight:720;
  line-height:1.3;
  letter-spacing:-.015em;
}
body.tt-page-help .tt-help h1 { font-size:clamp(1.65rem,2.6vw,2.25rem);margin:4px 0 12px!important; }
body.tt-page-help .tt-help h2 { font-size:clamp(1.35rem,2vw,1.75rem);margin:0 0 12px!important; }
body.tt-page-help .tt-help h3 { font-size:1.12em;margin:0 0 14px!important; }
body.tt-page-help .tt-help p { margin:0 0 1em; }
body.tt-page-help .tt-help ul { list-style:none;padding:0;margin:0; }

body.tt-page-help .tt-help-kicker {
  margin:0 0 5px!important;
  color:#90e5df;
  font-size:.74em;
  font-weight:760;
  letter-spacing:.085em;
  text-transform:uppercase;
}
body.tt-page-help .tt-help-header {
  background:linear-gradient(135deg,#192e40,#0c1d2b);
  border:1px solid var(--help-border);
  border-radius:14px;
  padding:25px clamp(18px,3vw,32px);
  margin-bottom:16px;
}
body.tt-page-help .tt-help-header>p:not(.tt-help-kicker) {
  color:var(--help-muted);
  max-width:64ch;
}
body.tt-page-help .tt-help-search { margin-top:20px; }
body.tt-page-help .tt-help-search label {
  display:block;
  font-size:.93em;
  font-weight:700;
  color:var(--help-heading);
  margin-bottom:8px;
}
body.tt-page-help .tt-help-search-row { display:flex;gap:10px;align-items:stretch; }
body.tt-page-help .tt-help-search input {
  flex:1 1 280px;
  min-width:0;
  width:100%;
  min-height:52px;
  background:var(--help-surface-inset)!important;
  border:1px solid #65889c!important;
  border-radius:9px;
  color:var(--help-heading)!important;
  padding:11px 15px!important;
  font:400 1em/1.4 system-ui,sans-serif;
  font-family:inherit;
}
body.tt-page-help .tt-help-search input::placeholder { color:#afc6d5;opacity:1; }
body.tt-page-help .tt-help-search input:focus { border-color:#a0eee7!important; }
body.tt-page-help .tt-help-search button {
  flex:0 0 auto;
  min-height:52px;
  padding:10px 22px;
  border:1px solid #83cbd2;
  border-radius:9px;
  background:#1d5664;
  color:#f6fcff;
  font:720 .91em/1.35 system-ui,sans-serif;
  font-family:inherit;
  cursor:pointer;
}
body.tt-page-help .tt-help-search button:hover { background:#267180; }
body.tt-page-help .tt-help-hint {
  color:var(--help-muted);
  font-size:.8em;
  margin:10px 0 0!important;
}
body.tt-page-help .tt-help-actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin:0 0 24px;
}
body.tt-page-help .tt-help-actions a,
body.tt-page-help .tt-help-section-jumps a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:9px 14px;
  border:1px solid #486e82;
  border-radius:8px;
  background:#142c3e;
  font-size:.83em;
  font-weight:680;
  line-height:1.4;
  text-decoration:none;
}
body.tt-page-help .tt-help-actions a:hover,
body.tt-page-help .tt-help-section-jumps a:hover {
  background:#1f4458;
  border-color:#92d8dd;
}
body.tt-page-help .tt-help-panel {
  min-width:0;
  padding:24px clamp(19px,3vw,30px);
  margin:0 0 18px;
  background:var(--help-surface);
  color:var(--help-ink);
  border:1px solid var(--help-border);
  border-radius:13px;
  scroll-margin-top:16px;
}
body.tt-page-help .tt-help-section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 14px;
}
body.tt-page-help .tt-help-section-heading h2 { margin:0!important; }
body.tt-page-help .tt-help-count {
  color:var(--help-muted);
  font-size:.81em;
  font-weight:630;
  white-space:nowrap;
}
body.tt-page-help .tt-help-welcome {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  background:#15313f;
  border:1px solid #3c6a77;
  border-left:4px solid var(--help-accent);
  border-radius:10px;
  padding:21px 24px;
  margin:0 0 25px;
}
body.tt-page-help .tt-help-welcome p:not(.tt-help-kicker) {
  margin:0;
  color:var(--help-muted);
  max-width:60ch;
}
body.tt-page-help .tt-help-welcome-links { display:flex;flex-wrap:wrap;gap:9px; }
body.tt-page-help .tt-help-welcome-links a,
body.tt-page-help .tt-help-open-screen a {
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:9px 14px;
  border:1px solid #75adbb;
  border-radius:8px;
  background:#174459;
  color:#e8fcff!important;
  font-size:.86em;
  font-weight:720;
  text-decoration:none;
}
body.tt-page-help .tt-help-welcome-links a:hover,
body.tt-page-help .tt-help-open-screen a:hover { background:#205c72; }

body.tt-page-help .tt-help-subject-shortcuts {
  margin:0 0 17px;
  border:1px solid #36586c;
  background:#102333;
  border-radius:10px;
}
body.tt-page-help .tt-help-subject-shortcuts>summary {
  cursor:pointer;
  color:var(--help-ink);
  font-size:.86em;
  font-weight:680;
  padding:11px 16px;
  min-height:48px;
}
body.tt-page-help .tt-help-section-jumps {
  display:flex;flex-wrap:wrap;gap:9px;
  padding:0 15px 14px;
}
body.tt-page-help .tt-help-groups {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  max-width:960px;
  align-items:start;
}
body.tt-page-help .tt-help-group { margin:0; padding:20px 24px; }
body.tt-page-help .tt-help-group>summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:13px;
  min-height:52px;
  list-style:none;
  cursor:pointer;
}
body.tt-page-help .tt-help-group>summary::-webkit-details-marker { display:none; }
body.tt-page-help .tt-help-group>summary::before {
  content:"+";
  display:inline-grid;
  place-items:center;
  flex:0 0 29px;
  width:29px;
  height:29px;
  border-radius:7px;
  border:1px solid #4d7184;
  background:#183547;
  color:#b7f1ed;
  font-size:1.08em;
  font-weight:750;
}
body.tt-page-help .tt-help-group[open]>summary::before { content:"−"; }
body.tt-page-help .tt-help-group>summary h3 {
  flex:1;min-width:0;
  margin:0!important;
  font-size:1.06em;
}
body.tt-page-help .tt-help-group[open]>summary {
  margin-bottom:14px;
  padding-bottom:13px;
  border-bottom:1px solid #385a6d;
}
body.tt-page-help .tt-help-group:target { border-color:var(--help-accent); }
body.tt-page-help .tt-help-topic-list,
body.tt-page-help .tt-help-link-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
body.tt-page-help .tt-help-link-grid {
  grid-template-columns:repeat(auto-fit,minmax(min(205px,100%),1fr));
}
body.tt-page-help .tt-help-topic-list li,
body.tt-page-help .tt-help-link-grid li { min-width:0; }
body.tt-page-help .tt-help-topic-list a,
body.tt-page-help .tt-help-link-grid a {
  display:flex;
  align-items:center;
  min-height:50px;
  padding:11px 14px;
  border:1px solid #3b6075;
  border-radius:8px;
  background:var(--help-surface-raised);
  font-size:.9em;
  font-weight:540;
  line-height:1.45;
  text-decoration:none;
}
body.tt-page-help .tt-help-topic-list a:hover,
body.tt-page-help .tt-help-link-grid a:hover {
  border-color:#81cbd3;
  background:#21475d;
}
body.tt-page-help .tt-help-note {
  color:var(--help-muted);
  font-size:.82em;
  margin:18px 0 0!important;
}
body.tt-page-help .tt-help-breadcrumb {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:11px 0 18px;
  color:var(--help-muted);
  font-size:.83em;
}
body.tt-page-help .tt-help-breadcrumb [aria-current] {
  color:var(--help-heading);
  font-weight:740;
}
body.tt-page-help .tt-help-article {
  width:100%;
  max-width:960px;
  padding:clamp(23px,3vw,38px) clamp(20px,4vw,46px) 40px;
  background:#112839; /* deliberately dark: no light-paper article override */
  color:var(--help-ink);
  border:1px solid #4a7184;
  box-shadow:0 12px 32px rgba(0,0,0,.19);
}
body.tt-page-help .tt-help-article h2 { margin:4px 0 18px!important; }
body.tt-page-help .tt-help-article-copy {
  max-width:68ch;
  color:var(--help-ink);
  font-size:1em;
  line-height:1.82;
  white-space:normal;
  overflow-wrap:break-word;
  hyphens:none;
}
body.tt-page-help .tt-help-article-copy p {
  max-width:68ch;
  margin:0 0 1.25em!important;
}
body.tt-page-help .tt-help-article-copy p:last-child { margin-bottom:0!important; }
body.tt-page-help .tt-help-article-copy h3 {
  margin:1.5em 0 .65em!important;
  padding-bottom:.3em;
  border-bottom:1px solid #426276;
  font-size:1.12em;
  font-weight:730;
}
body.tt-page-help .tt-help-article-copy h3:first-child { margin-top:.25em!important; }
body.tt-page-help .tt-help-article-copy ul {
  display:block;
  list-style:disc outside;
  color:var(--help-ink);
  padding-left:1.55em;
  margin:0 0 1.25em;
}
body.tt-page-help .tt-help-article-copy li {
  display:list-item;
  padding:0;
  margin:0 0 .55em;
  line-height:1.7;
}
body.tt-page-help .tt-help-category-notice { color:var(--help-muted); }
body.tt-page-help .tt-help-open-screen { margin:0 0 22px!important; }
body.tt-page-help .tt-help-article-related {
  max-width:68ch;
  margin:30px 0 0;
  padding:22px 0 0;
  border-top:1px solid #45657a;
}
body.tt-page-help .tt-help-article-related h3 { margin:0 0 14px!important; }
body.tt-page-help .tt-help-result-list { display:grid;gap:0; }
body.tt-page-help .tt-help-result-list li {
  padding:18px 0;
  border-bottom:1px solid #39596b;
}
body.tt-page-help .tt-help-result-list li:last-child { border-bottom:0; }
body.tt-page-help .tt-help-result-list a {
  color:var(--help-link)!important;
  font-weight:730;
  font-size:1.04em;
}
body.tt-page-help .tt-help-result-list p {
  color:var(--help-muted);
  font-size:.9em;
  line-height:1.64;
  margin:6px 0 0;
  max-width:70ch;
}
body.tt-page-help .tt-help-more { padding:22px 26px;max-width:960px; }
body.tt-page-help .tt-help-more h2 { font-size:1.13em;margin:0 0 14px!important; }
body.tt-page-help .tt-help-return { display:flex;justify-content:space-between;flex-wrap:wrap;gap:14px;margin:18px 0!important; }

/* Existing reader-size selector remains in the shared page shell. */
body.tt-page-help #col-2 .tt-reading-controls {
  max-width:1080px;
  margin:0 auto 16px;
  background:#132a3b;
  color:#eaf5fb;
  border-color:#486b80;
  padding:12px 16px;
  line-height:1.5;
}
body.tt-page-help #col-2 .tt-reading-controls legend {
  color:#d9eaf3;
  font-size:15px;
  font-weight:700;
}
body.tt-page-help #col-2 .tt-reading-controls label {
  min-height:42px;
  min-width:48px;
  background:#0b1e2c;
  border:1px solid #577a8f;
  color:#eaf5fb;
  font-size:15px;
}
body.tt-page-help #col-2 .tt-reading-controls label:has(input:checked) {
  background:#21636b;
  color:#fff;
  border-color:#98e6e1;
}
body.tt-page-help #col-2 .tt-reading-controls label:has(input:focus-visible) {
  outline:3px solid #a5f5ed;
  outline-offset:3px;
}

/* Use the same dark palette in Classic Console rather than forcing a new theme. */
html[data-tetramia-theme="legacy-classic"] body.tt-page-help .tt-help {
  --help-surface:#142333;
  --help-surface-raised:#1a3042;
  --help-surface-inset:#0e1d2b;
  --help-ink:#e9f3f9;
}

@media(max-width:800px) {
  body.tt-page-help .tt-help { padding:0 4px 20px; }
  body.tt-page-help .tt-help-topic-list { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:640px) {
  body.tt-page-help .tt-help { padding:0 1px 18px; }
  body.tt-page-help .tt-help-header,body.tt-page-help .tt-help-panel { padding:19px 17px; }
  body.tt-page-help .tt-help-group { padding:15px 16px; }
  body.tt-page-help .tt-help-search-row { flex-direction:column; }
  body.tt-page-help .tt-help-search input,body.tt-page-help .tt-help-search button { flex:none;width:100%; }
  body.tt-page-help .tt-help-topic-list { grid-template-columns:1fr; }
  body.tt-page-help .tt-help-actions a { flex:1 1 43%;text-align:center; }
  body.tt-page-help .tt-help-article { padding:23px 19px 27px; }
  body.tt-page-help .tt-help-article-copy { line-height:1.78; }
  body.tt-page-help .tt-help-article-copy h3 { line-height:1.35; }
  body.tt-page-help .tt-help-section-heading { align-items:flex-start; }
}
@media(max-width:420px) {
  body.tt-page-help .tt-help { font-size:var(--help-article-size); }
  body.tt-page-help .tt-help-header,body.tt-page-help .tt-help-panel { padding:17px 14px; }
  body.tt-page-help .tt-help-article { padding:20px 16px 24px; }
  body.tt-page-help .tt-help-article-copy { line-height:1.78; }
}
@media(prefers-reduced-motion:reduce) {
  body.tt-page-help .tt-help * { scroll-behavior:auto!important; }
}
