/* placeholder: filled by the UX work */

/* ---- feedback ---- */
/* "Was this helpful?" and "Report a problem" under guide, tool, function and database pages (js/analytics.js). */
.pf { margin: 2.5rem auto 1rem; max-width: var(--maxw-prose, 46rem); padding: 1.1rem 1.25rem; border: 1px solid var(--line, #d7dce5); border-radius: var(--radius-sm, 8px); background: var(--surface, transparent); color: var(--ink, inherit); font-size: var(--fs-sm, .95rem); }
.pf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.pf-q { margin: 0; font-weight: 600; }
.pf-votes { display: flex; gap: .5rem; }
.pf-btn { font: inherit; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong, #aab3c2); background: transparent; color: inherit; cursor: pointer; }
.pf-btn:hover:not(:disabled) { border-color: var(--accent, #2f6bff); }
.pf-btn:disabled { opacity: .6; cursor: default; }
.pf-btn[aria-pressed="true"] { border-color: var(--accent, #2f6bff); background: var(--accent-soft, rgba(47, 107, 255, .12)); }
.pf-btn.primary { background: var(--cta, #2f6bff); color: var(--cta-ink, #fff); border-color: transparent; }
.pf-link { font: inherit; margin-left: auto; padding: 0; border: 0; background: none; color: var(--accent, #2f6bff); text-decoration: underline; cursor: pointer; }
.pf-msg { min-height: 1.4em; margin: .5rem 0 0; color: var(--muted, #5b6472); }
.pf-form { margin-top: .75rem; display: grid; gap: .75rem; }
.pf-form[hidden] { display: none; }
.pf-field { display: grid; gap: .3rem; }
.pf-field span { font-weight: 600; }
.pf-field select, .pf-field textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line-strong, #aab3c2); border-radius: var(--radius-sm, 6px); background: var(--bg, #fff); color: inherit; max-width: 100%; }
.pf-field textarea { resize: vertical; }
.pf-count { margin: 0; font-size: var(--fs-xs, .8rem); color: var(--muted, #5b6472); }
.pf-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.pf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pf-msg:empty { min-height: 0; margin: 0; }
@media (max-width: 560px) { .pf { margin-left: 16px; margin-right: 16px; } .pf-link { margin-left: 0; } }
/* ---- end feedback ---- */

/* ---- palette ---- */
.pal { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.pal[hidden] { display: none; }
.pal-back { position: absolute; inset: 0; background: rgba(2,6,23,.62); backdrop-filter: blur(3px); }
.pal-panel { position: relative; width: min(720px, 100%); max-height: 82vh; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 80px rgba(2,6,23,.55); overflow: hidden; }
.pal-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--faint); }
.pal-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: 18px 0; outline: none; }
.pal-input::placeholder { color: var(--faint); }
.pal-input::-webkit-search-cancel-button { display: none; }
.pal-esc { font: 600 .72rem/1 var(--font-body, inherit); padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--faint); }
.pal-list { overflow: auto; padding: 4px 8px 8px; min-height: 0; }
.pal-group { margin-top: 6px; }
.pal-gh { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.pal-opt, .pal-all { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; cursor: pointer; }
.pal-opt.is-on, .pal-all.is-on, .pal-opt:hover { background: var(--accent-soft); }
.pal-opt:focus-visible, .pal-all:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pal-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pal-t { font-weight: 600; font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-s { font-size: .8rem; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-k { margin-left: auto; font-size: .74rem; color: var(--faint); white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.pal mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.pal-all { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; font-weight: 600; font-size: .9rem; color: var(--accent); }
.pal-all .pal-k { color: var(--faint); font-weight: 500; }
.pal-empty { color: var(--faint); font-size: .9rem; padding: 16px 12px; margin: 0; }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--faint); }
.pal-foot kbd, .pal-esc { font-family: var(--mono, monospace); }
.pal-foot kbd { font-size: .72rem; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--muted); }
@media (max-width: 720px) { .pal { padding: 10px 10px; } .pal-foot { display: none; } .pal-k { display: none; } .pal-list { max-height: 70vh; } }
/* ---- end palette ---- */

/* ---- a11y ---- */
/* Wide tables: scroll region with a shadow hint on the edges that have more to show. */
.table-wrap, .ls-tw {
  display: block; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; background-color: var(--surface);
  background-image:
    linear-gradient(to right, var(--surface) 30%, transparent),
    linear-gradient(to left, var(--surface) 30%, transparent),
    linear-gradient(to right, color-mix(in srgb, var(--text) 22%, transparent), transparent),
    linear-gradient(to left, color-mix(in srgb, var(--text) 22%, transparent), transparent);
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 10px 100%, 10px 100%;
  background-position: left center, right center, left center, right center;
  background-attachment: local, local, scroll, scroll;
}
/* Phones: the first column stays put while the rest scrolls. */
@media (max-width: 640px) {
  .table-wrap table th:first-child, .table-wrap table td:first-child,
  .ls-tw table th:first-child, .ls-tw table td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
  }
  .table-wrap table thead th:first-child, .ls-tw table thead th:first-child {
    z-index: 2; background: var(--surface-2);
  }
}
/* Dark theme: filled buttons with white text use the darker solid blue (6.6:1 instead of 3.3:1). */
[data-theme="dark"] :is(.btn-primary, .btn-run, .execute, .cpx-btn.solid, .cpx-btn:hover, .tool-btn.primary,
  .ml-btn.primary, .ml-tr.on, .rc-chips button[aria-pressed="true"], .rc-tabs button[aria-selected="true"],
  .ts-n, .lsp-role.on, .ex-check, .lsp-pill, .run-btn, .ml-lv.on .ml-lv-n,
  button[aria-pressed="true"], button[aria-selected="true"]) {
  background: var(--accent-solid); border-color: var(--accent-solid); color: #fff;
}
[data-theme="dark"] .btn-primary:hover { background: var(--accent-solid-hover); }
/* Copy buttons sit on the code surface, which is dark in both themes, so the button stays dark too. */
.codeblock .copy { background: var(--code-bg); color: var(--code-ink); border-color: #334155; }
.codeblock .copy:hover { background: #1e293b; color: #fff; }
/* Code samples: the code surface is dark in both themes, so code text takes the code colour, not the prose ink. */
.cs pre code, .prose pre code, .callout pre code, .hub-wrap pre code { color: var(--code-ink); background: none; border: 0; padding: 0; }
/* Light theme: white text on the CPE Today orange needs a deeper orange (3.6:1 -> 5.2:1); level stars need a deeper amber. */
[data-theme="light"] :is(.btn-cta, .pf-btn.primary) { background: #c2410c; border-color: #c2410c; color: #fff; }
[data-theme="light"] :is(.btn-cta:hover, .pf-btn.primary:hover) { background: #9a3412; border-color: #9a3412; }
[data-theme="light"] :is(.ml-lv-s, .ml-win-s, .ml-bd.pk) { color: #92400e; }
/* ---- end a11y ---- */
