/* The Parliament desk (parliament-desk.js): three parts in tabs, the register's counts and list, the
   question's counts and draft, and the bill brief. Tokens only, so the dark theme follows; one column
   from 320px, wider grids from 640px. */
.pd{min-width:0}
.pd-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin-bottom:14px}
.pd-head h1{font-size:clamp(1.45rem,4vw,2rem);margin:4px 0 6px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.pd-head p{margin:0;max-width:680px;color:var(--muted);line-height:1.55;font-size:.92rem}
.pd-pilot{display:inline-block;padding:3px 10px;border-radius:999px;border:1px solid var(--theme-accent,#08776e);color:var(--theme-accent,#08776e);font-size:.72rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase;line-height:1.4}
.pd-head .pd-office-name{font-weight:650;color:var(--ink)}
.pd-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:12px;background:var(--theme-soft,#eef3f0);margin-bottom:14px}
.pd-tabs button{flex:1 1 auto;border:0;background:transparent;padding:9px 12px;min-height:44px;border-radius:9px;font:inherit;font-size:.86rem;font-weight:650;color:var(--muted);cursor:pointer;line-height:1.3}
.pd-tabs button[aria-selected=true]{background:var(--theme-surface,#fff);color:var(--theme-accent,#08776e);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.pd-tabs button:focus-visible,.pd-seg button:focus-visible,.pd-stat:focus-visible{outline:2px solid var(--theme-accent,#08776e);outline-offset:2px}
.pd-panel{min-width:0}.pd-panel:focus-visible{outline:2px solid var(--theme-accent,#08776e);outline-offset:4px;border-radius:8px}
.pd-help{color:var(--muted);font-size:.9rem;line-height:1.55;margin:0 0 12px;max-width:720px}
.pd-muted{color:var(--muted);font-size:.86rem;margin:6px 0 10px}
.pd-empty{padding:18px;border-radius:14px;border:1px dashed var(--line);color:var(--muted);text-align:center;margin:10px 0}
.pd-toolbar{margin-bottom:12px}
.pd-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:14px}
.pd-stat{display:grid;gap:4px;align-content:start;text-align:left;padding:14px 16px;border-radius:14px;background:var(--theme-surface,#fff);border:1px solid var(--line);min-width:0;font:inherit;color:inherit}
button.pd-stat{cursor:pointer}button.pd-stat:hover{border-color:var(--theme-accent,#08776e)}
.pd-stat strong{font-size:1.6rem;line-height:1.1;color:var(--ink);overflow-wrap:anywhere}.pd-stat span{font-size:.8rem;color:var(--muted);line-height:1.4}.pd-stat small{font-size:.74rem;color:var(--muted)}
.pd-stat[data-pd-count=countPast] strong,.pd-stat[data-fact=overdue] strong{color:var(--orange,#c4561c)}
.pd-wide{grid-column:1/-1}
.pd-filters{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:12px}
.pd-filters label,.pd-field{display:grid;gap:5px;min-width:0;font-size:.84rem;color:var(--muted);margin:0}
.pd-filters select,.pd-filters input,.pd-field select,.pd-field input,.pd-field textarea{width:100%;min-width:0;min-height:44px;box-sizing:border-box;font:inherit;font-size:.95rem;color:var(--ink)}
.pd-field textarea{min-height:96px;resize:vertical;line-height:1.5}
.pd-field small{font-size:.76rem;color:var(--muted)}
.pd-house b{color:var(--ink);font-weight:650;padding:10px 0}
.pd-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.pd-entry{padding:14px 16px;border-radius:14px;background:var(--theme-surface,#fff);border:1px solid var(--line);min-width:0}
.pd-entry[data-past]{border-left:4px solid var(--orange,#c4561c)}
.pd-entry h3{font-size:1rem;margin:6px 0 4px;overflow-wrap:anywhere}
.pd-entry-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 10px;font-size:.78rem}
.pd-kind{color:var(--muted);font-weight:650}
.pd-status{padding:2px 9px;border-radius:999px;background:var(--theme-soft,#eef3f0);color:var(--ink);font-weight:650}
.pd-status[data-pd-status=awaiting_reply],.pd-status[data-pd-status=assurance_pending]{background:#fff1d6;color:#7a4a00}
.pd-status[data-pd-status=reply_received],.pd-status[data-pd-status=assurance_fulfilled]{background:#dcf2e6;color:#145c36}
.pd-status[data-pd-status=draft]{background:transparent;border:1px dashed var(--line);color:var(--muted)}
.pd-meta{margin:0;color:var(--muted);font-size:.82rem;overflow-wrap:anywhere}
.pd-wait{margin:8px 0 0;font-size:.84rem;font-weight:650;color:var(--ink);display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pd-past{display:inline-block;padding:2px 8px;border-radius:999px;background:#fde2dc;color:#9b2c12;font-size:.76rem}
.pd-more{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}.pd-more summary{cursor:pointer;font-weight:650;font-size:.86rem;min-height:32px;display:flex;align-items:center}
.pd-text h4{font-size:.78rem;color:var(--muted);margin:10px 0 2px;font-weight:700}.pd-text p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.pd-link{overflow-wrap:anywhere;margin:6px 0}
.pd-who{font-size:.76rem;color:var(--muted);margin:10px 0 0}
.pd-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.pd-actions .button{min-height:44px}
.pd-remove{color:var(--orange,#c4561c)}
.pd-form,.pd-bform,.pd-draft{padding:16px;border-radius:14px;background:var(--theme-surface,#fff);border:1px solid var(--line);margin:0 0 14px;min-width:0}
.pd-form h3{margin:0 0 6px;font-size:1.05rem}
.pd-warning{margin:0 0 12px;padding:8px 12px;border-radius:10px;background:#fff1d6;color:#7a4a00;font-size:.86rem;font-weight:650}
.pd-grid{display:grid;grid-template-columns:1fr;gap:12px}
.pd-error:empty,.pd-status-line:empty{display:none}.pd-error{color:var(--orange,#c4561c);font-weight:650;margin:10px 0 0;font-size:.88rem}
.pd-status-line{color:var(--muted);font-size:.86rem;margin:8px 0 0}
.pd-qform{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:14px}
.pd-seg{display:inline-flex;flex-wrap:wrap;gap:4px;padding:3px;border-radius:10px;background:var(--theme-soft,#eef3f0);justify-self:start}
.pd-seg button{border:0;background:transparent;padding:8px 14px;min-height:40px;border-radius:8px;font:inherit;font-size:.86rem;font-weight:650;color:var(--muted);cursor:pointer}
.pd-seg button[aria-pressed=true]{background:var(--theme-surface,#fff);color:var(--theme-accent,#08776e);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.pd-wards{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:4px}.pd-wards li{display:flex;justify-content:space-between;gap:10px;font-size:.86rem;color:var(--ink)}
.pd-count{margin:6px 0 0;font-size:.82rem;color:var(--muted);font-variant-numeric:tabular-nums}
[data-pd-words][data-over],.pd-count[data-over]{color:var(--orange,#c4561c);font-weight:700}
.pd-note{margin:10px 0 0;padding:8px 12px;border-left:3px solid var(--theme-accent,#08776e);background:var(--theme-soft,#eef3f0);font-size:.84rem;line-height:1.5;color:var(--ink)}
.pd-mark{margin:8px 0 0;font-size:.82rem;color:var(--muted);font-style:italic}
.pd-save{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.pd-check{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:.88rem;color:var(--ink)}.pd-check input{width:20px;height:20px}
.pd-earlier h3{font-size:1rem;margin:16px 0 8px}
.pd-brief{padding:12px 16px;border-radius:14px;background:var(--theme-surface,#fff);border:1px solid var(--line);margin-bottom:10px;min-width:0}
.pd-brief summary{cursor:pointer;font-weight:700;min-height:32px;display:flex;align-items:center;overflow-wrap:anywhere}
.pd-brief h4{font-size:.9rem;margin:14px 0 4px}.pd-brief p{margin:0;line-height:1.55;overflow-wrap:anywhere}
.pd-questions{margin:0;padding-left:1.3em;display:grid;gap:4px;line-height:1.5}
.pd-settings{margin-top:22px;padding:12px 16px;border-radius:14px;border:1px dashed var(--line)}
.pd-settings summary{cursor:pointer;font-weight:700;min-height:36px;display:flex;align-items:center}
.pd-settings .pd-help{margin-top:8px}
@media (min-width:640px){
  .pd-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr)}
  .pd-grid,.pd-qform{grid-template-columns:repeat(2,minmax(0,1fr))}
}
:root[data-theme=dark] .pd-status[data-pd-status=awaiting_reply],:root[data-theme=dark] .pd-status[data-pd-status=assurance_pending],:root[data-theme=dark] .pd-warning{background:#4a3410;color:#ffd99a}
:root[data-theme=dark] .pd-status[data-pd-status=reply_received],:root[data-theme=dark] .pd-status[data-pd-status=assurance_fulfilled]{background:#163d28;color:#a6e8c2}
:root[data-theme=dark] .pd-past{background:#4a1d12;color:#ffb8a3}
@media print{.pd-tabs,.pd-actions,.pd-toolbar,.pd-filters,.pd-settings{display:none}}
