/* Site feedback: the footer link, the side tab on wide screens, and the small form.
   Colours come from each page's own :root tokens (--accent, --paper, --ink and the rest, with
   their dark-mode versions), so light and dark mode follow the page. */

/* Footer link, on every page. A text button with a full 44px tap area. */
.fb-row{margin:0}
/* Pages whose feedback link has no mailto fallback (the research pages) hide it until feedback.js runs. */
.fb-js{display:none}
.fb-open{
  display:inline-flex;align-items:center;
  font:inherit;font-family:var(--mono);font-size:.8rem;font-weight:600;letter-spacing:.02em;
  color:var(--accent);background:none;border:0;padding:0 2px;min-height:44px;cursor:pointer;
  text-decoration:underline;text-underline-offset:.22em;text-decoration-thickness:1px;
}
.fb-open:hover{text-decoration-thickness:2px}

/* Phone top-bar icon (below 900px, where the side tab is hidden). It jumps to the footer link
   without JavaScript and opens the form with it. Below 600px the top bar drops its optional links
   (the pages' "hide-xs" items, which used to go only below 440px and overflowed from 441px) and
   tightens its spacing, so everything fits from 360px up; below 360px the icon hides and the
   footer link remains. */
html .bar nav a.fb-bar{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;color:var(--ink-2)}
html .bar nav a.fb-bar svg{width:20px;height:20px}
@media (min-width:900px){.fb-bar-li{display:none}}
@media (max-width:599px){
  html .bar nav .hide-xs{display:none}
  html .bar-in{gap:8px}
  html .bar nav ul{gap:2px}
  html .bar nav a{padding:8px 5px}
  html .brand .wm{letter-spacing:.05em}
}
@media (max-width:359px){.fb-bar-li{display:none}}

/* Side tab. Only where the page has room beside the text, so it never covers
   content on phones or tablets held upright. */
.fb-tab{display:none}
@media (min-width:900px){
  .fb-tab{
    display:block;position:fixed;right:0;bottom:88px;z-index:15;
    writing-mode:vertical-rl;transform:rotate(180deg);
    font-family:var(--mono);font-size:.74rem;font-weight:600;letter-spacing:.06em;
    color:var(--accent-ink);background:var(--accent);
    border:0;border-radius:0 4px 4px 0;padding:14px 12px;min-width:44px;min-height:44px;cursor:pointer;
    box-shadow:var(--win-shadow);
  }
  .fb-tab:hover{filter:brightness(1.08)}
  .fb-tab:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
}
@media print{.fb-tab,.fb-row,.fb-bar-li{display:none!important}}

/* The dialog */
.fb-dialog{
  width:min(460px, calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;
  margin:auto;padding:0;border:1.5px solid var(--rule-strong);border-radius:4px;
  background:var(--paper);color:var(--ink);box-shadow:var(--shadow);
}
.fb-trap{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);opacity:0}
.fb-dialog::backdrop{background:rgba(13,15,18,.55)}
.fb-in{padding:18px 20px 20px;display:grid;gap:14px}
.fb-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.fb-head h2{margin:0;font-family:var(--serif);font-weight:600;font-size:1.25rem;line-height:1.2}
.fb-x{
  flex:none;width:44px;height:44px;margin:-6px -10px -6px 0;display:inline-grid;place-items:center;
  background:none;border:0;border-radius:4px;color:var(--ink-2);cursor:pointer;font:inherit;
}
.fb-x:hover{background:var(--code-bg);color:var(--ink)}
.fb-x svg{width:18px;height:18px}
.fb-form{display:grid;gap:14px;margin:0}
.fb-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.fb-field label{font-family:var(--serif);font-size:1rem;line-height:1.35;color:var(--ink)}
.fb-field .fb-opt{color:var(--ink-3)}
.fb-field input,.fb-field textarea{
  font:inherit;font-family:var(--serif);font-size:1rem;color:var(--ink);background:var(--field);
  border:1.5px solid var(--ink-3);border-radius:3px;padding:10px 12px;min-height:46px;width:100%;
}
.fb-field textarea{min-height:120px;resize:vertical;line-height:1.45}
.fb-field input:focus-visible,.fb-field textarea:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.fb-field [aria-invalid="true"]{border-color:var(--crit)}
.fb-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.fb-send{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:96px;padding:10px 18px;
  font-family:var(--mono);font-weight:600;font-size:.86rem;
  color:var(--accent-ink);background:var(--accent);border:0;border-radius:3px;cursor:pointer;
}
.fb-send:hover{filter:brightness(1.08)}
.fb-send[aria-disabled="true"]{opacity:.7;cursor:progress}
.fb-note{margin:0;font-size:.88rem;line-height:1.45;color:var(--ink-2)}
.fb-status{margin:0;font-family:var(--mono);font-size:.8rem;line-height:1.5;color:var(--ink)}
/* Kept in the page (not display:none) so screen readers announce text added to it. */
.fb-status:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.fb-status a{color:inherit}
.fb-status.is-err{color:var(--crit)}
.fb-done{display:grid;gap:14px;justify-items:start}
.fb-done p{margin:0;font-size:1.1rem}
.fb-done p:focus{outline:none}
