/* Saved highlights. Builds on ../shared/theme.css and the reader's shared pieces (../reader/reader.css):
   header, footer, .cite, .seg, .sources, .badge, .comment, .toast. */

/* The crumb's box is as tall as its line was; its words stand on a baseline set half a cap height below the
   box's middle (the ::before, of no width, reaches down to it), so their capitals are centred in it exactly. */
.top-crumb { display: flex; align-items: baseline; height: 1.55em; font-family: var(--font-pixel); font-size: .7rem; line-height: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-left: .9rem; border-left: 1px solid var(--line); }
.top-crumb::before { content: ""; height: calc(50% + var(--half-cap)); }
.top .theme-btn { margin-left: auto; }

.sv { width: 100%; max-width: 64rem; margin: 0 auto; padding: 2.4rem var(--pad-x) 6rem; }

/* Hero */
.sv-hero > * { animation: pop-in var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.sv-hero .back { margin-bottom: 1.5rem; }
.hero-title { margin: .35rem 0 .4rem; font-family: var(--font-display); font-size: clamp(2.4rem, 4.2vw, 4.4rem); font-weight: 400; letter-spacing: .07em; line-height: 1; color: var(--blue); text-transform: uppercase; }
.lede { margin: .2rem 0 1.4rem; color: var(--ink-2); max-width: 40rem; }
.sv-local { margin: 1rem 0 0; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); }

.schedule { margin-top: 3rem; padding-top: 1.3rem; border-top: 2px solid var(--blue); }
.schedule[hidden] { display: none; }
.schedule-head, .schedule-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }
.schedule-head .sv-section-title { margin: .1rem 0; }
.schedule-head .eyebrow { margin: 0; }
.schedule-field { display: grid; gap: .35rem; margin: 1rem 0; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2); }
.schedule-field input, .schedule-field textarea, .schedule-field select { width: 100%; min-width: 0; padding: .65rem .7rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 .88rem/1.5 var(--font-text); }
.schedule-field textarea { min-height: 5rem; resize: vertical; }
.schedule-field :is(input,textarea,select):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.schedule-issues { display: grid; gap: 1rem; margin-top: 1.8rem; }
.schedule-row :is(h3,h4) { margin: 0; }
.schedule-issue { padding: 1rem; border: 1px solid var(--line-strong); background: var(--surface); }
.schedule-issue fieldset { margin: 1rem 0 0; padding: .8rem; border: 1px solid var(--line); }
.schedule-issue legend { padding: 0 .3rem; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); }
.schedule-quotes { display: grid; gap: .65rem; max-height: 18rem; overflow: auto; }
.schedule-quotes label { display: flex; gap: .6rem; align-items: start; cursor: pointer; }
.schedule-quotes input { margin-top: .28rem; accent-color: var(--blue); }
.schedule-quotes span { display: grid; gap: .15rem; min-width: 0; }
.schedule-quotes b { font-size: .8rem; font-weight: 600; }
.schedule-quotes small { font-size: .76rem; line-height: 1.4; color: var(--ink-2); }
.schedule-warning { font-size: .8rem; color: var(--del); }
.schedule-preview { margin-top: 2rem; padding: 1rem; border: 1px solid var(--line); background: var(--sunken); }
.schedule-preview > h3 { margin: 0; }
.schedule-preview-issue { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-strong); }
.schedule-preview-issue h4 { margin: .2rem 0; font-size: 1.05rem; }
.schedule-preview-issue blockquote { margin: .8rem 0; padding-left: .8rem; border-left: 2px solid var(--blue); }
.schedule-preview-issue .cite { margin-top: .45rem; font-size: .78rem; }

/* Tools: sticky under the header */
.sv-tools { position: sticky; top: var(--top-h); z-index: 20; margin: 2rem calc(-1 * var(--pad-x)) 0; padding: .7rem var(--pad-x);
  background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line); }
.sv-tools[hidden] { display: none; }
.sv-tools-in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; }
.sv-tools-gap { flex: 1; }
.sv-tools .btn { min-height: 2.2rem; font-size: .76rem; }
/* One line under the tools: what the chosen citation style produces. */
.sv-tools .seg-hint { flex-basis: 100%; order: 10; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.sv-tools .seg-hint .eyebrow { font-size: .62rem; }

/* Export to Word: a button with a two-item menu (the docx library loads only when one is chosen) */
.sv-export { position: relative; display: inline-flex; }
.sv-export > .btn[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
.sv-export > .btn[aria-busy="true"] { cursor: progress; color: var(--ink-2); }
.sv-export .caret { font-size: .7em; position: relative; top: -.095em; transform-origin: 50% calc(50% + .095em); transition: transform var(--t) var(--ease); }   /* the ▾ is drawn .095em below the middle of the capitals: lifted by that, and it turns about its own middle */
.sv-export > .btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.sv-menu { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 30; min-width: 19rem; display: grid;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 14px 34px -16px color-mix(in oklab, var(--ink) 35%, transparent);
  transform-origin: top left; animation: pop-in var(--t) var(--ease) both; }
.sv-menu[hidden] { display: none; }
.sv-menu.out { animation: menu-out var(--t-fast) var(--ease) both; pointer-events: none; }
@keyframes menu-out { to { opacity: 0; transform: translateY(-.25rem) scale(.985); filter: blur(2px); } }
.sv-menu button { display: grid; gap: .2rem; padding: .75rem .9rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.sv-menu button:last-child { border-bottom: 0; }
.sv-menu button:hover, .sv-menu button:focus-visible { background: var(--blue-wash); color: var(--blue); outline: none; }
.sv-menu b { font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .02em; }
.sv-menu small { font-size: .74rem; line-height: 1.4; color: var(--ink-2); }

/* Country and note groups */
.sv-country { margin-top: 2.8rem; animation: pop-in var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.sv-country-head { display: flex; align-items: center; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--blue); }
.sv-country-head canvas.dotflag { width: 3.6rem; }
.sv-country-name { margin: .15rem 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.4rem); letter-spacing: .06em; line-height: 1; color: var(--blue); text-transform: uppercase; }
.sv-country-head .tag { margin-left: auto; }
.sv-note { margin-top: 1.6rem; }
.sv-note-head { display: grid; gap: .35rem; padding: 0 0 .9rem; }
.sv-note-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; }   /* the tag's lettering and the words beside it are of a size: one baseline levels them */
.sv-note-when { font-family: var(--font-pixel); font-size: .7rem; letter-spacing: .05em; color: var(--ink-2); }
.sv-note-title { margin: 0; font-size: 1.3rem; font-weight: 620; letter-spacing: -.015em; line-height: 1.25; }
.sv-note-head .note-verbatim { margin: 0; }
.sv-note-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.sv-note-links .btn { min-height: 2.05rem; font-size: .74rem; }
.sv-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }

/* One highlight */
.sv-item { display: grid; gap: .8rem; padding: 1.1rem 1.2rem 1.15rem; border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), opacity var(--t) var(--ease), transform var(--t) var(--ease), filter var(--t) var(--ease); }
.sv-item:hover, .sv-item:focus-within { border-color: var(--line-strong); }
.sv-item.is-target { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.sv-item.is-changed { background: var(--sunken); }
.sv-item.leaving { opacity: 0; transform: scale(.985); filter: blur(3px); }
.sv-item-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; }
.sv-item-top .eyebrow { min-width: 0; }
.sv-item-top .saved-when { margin-left: auto; }
.sv-item-top .sv-remove { min-height: 2rem; flex: none; color: var(--del); border-color: var(--del); font-size: .72rem; }
.sv-item-top .sv-remove:hover { background: var(--del-wash); }
.sv-quote { margin: 0; padding: .1rem 0 .1rem 1rem; border-left: 2px solid var(--blue); font-size: 1.02rem; line-height: 1.65; color: var(--ink); }
.sv-item.is-changed .sv-quote { border-left-color: var(--line-strong); color: var(--ink-2); }
.sv-item .cite.swap { animation: cite-swap var(--t) var(--ease) both; }
.sv-note-field .comment { min-height: 3rem; }
.sv-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.sv-actions .btn { min-height: 2.1rem; font-size: .74rem; }
.sv-actions .btn-del { margin-left: auto; color: var(--ink-2); border-color: transparent; }
.sv-actions .btn-del:hover { color: var(--ink); border-color: var(--line-strong); }
.badge--checking { color: var(--ink-3); }
.badge--checking::before { background: var(--ink-3); animation: shimmer .8s var(--ease-in-out) infinite alternate; }

/* Empty state */
.sv-empty { margin-top: 2.4rem; display: grid; gap: 1.6rem; max-width: 46rem; }
.sv-empty > * { animation: pop-in var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.sv-steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.sv-steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: baseline; gap: .8rem; min-height: calc(3.8rem + 1px); padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.sv-steps li:last-child { min-height: 3.8rem; border-bottom: 0; }
/* The numeral stands on the first line's baseline, then drops until the tops of its capitals and the
   line's are level: by the difference of the two cap heights (its own, less the words' .71 of 1rem). Its
   top margin takes the same back; the row keeps the height the numeral's 1.8rem line gave it (min-height). */
.sv-steps .numeral { --drop: calc(2 * var(--half-cap) - .71rem); font-size: 1.8rem; line-height: 1; color: var(--blue); position: relative; top: var(--drop); margin-top: calc(-1 * var(--drop)); }
.sv-steps p { margin: 0; color: var(--ink-2); }
.sv-steps b { color: var(--ink); font-weight: 600; }
.sv-demo { display: inline-flex; justify-self: start; max-width: 100%; overflow: hidden; background: var(--blue); color: var(--blue-ink); font-family: var(--font-mono); font-size: .74rem; box-shadow: var(--shadow); }
.sv-demo span { padding: .65rem .8rem; white-space: nowrap; }
.sv-demo span + span { border-left: 1px solid color-mix(in oklab, var(--blue-ink) 25%, transparent); }
.sv-demo .st-pin { font-family: var(--font-pixel); font-size: .62rem; letter-spacing: .1em; }
.sv-start h2 { margin: 0 0 .7rem; }
.sv-start ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.sv-start a.row { display: flex; align-items: baseline; gap: .65rem; padding: .65rem .1rem; border-bottom: 1px solid var(--line); color: var(--ink); transition: color var(--t-fast) var(--ease), padding var(--t) var(--ease); }
.sv-start a.row:hover { color: var(--blue); padding-left: .45rem; text-decoration: none; }
.sv-start a.row small { margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
/* The flag stands on the title's baseline, level with its capitals (as on the start page: see .dotflag in dashboard.css). */
.sv-start a.row > .dotflag { --drop: calc(1.35rem * 3 / 8 - var(--half-cap)); position: relative; top: var(--drop); margin-top: calc(-1 * var(--drop)); }

@media (max-width: 899px) {
  .top { flex-wrap: nowrap; height: var(--top-h); padding-top: 0; padding-bottom: 0; }
  .top-crumb { display: none; }
}
@media (max-width: 600px) {
  .sv { padding-top: 1.6rem; }
  .sv-tools { position: static; }
  .sv-item { padding: .9rem .9rem 1rem; }
  .sv-tools-gap { display: none; }
  .sv-tools .btn { flex: 1 1 auto; }
  .sv-export { flex: 1 1 auto; }
  .sv-menu { right: 0; min-width: 0; }
  .sv-actions .btn-del { margin-left: 0; }
  .sv-country-head canvas.dotflag { width: 2.8rem; }
}

/* Phones: the example selection bar wraps onto two rows; before, its last buttons were cut off. */
@media (max-width: 600px) {
  .sv-demo { flex-wrap: wrap; }
  .sv-demo span { flex: 1 1 auto; text-align: center; box-shadow: 0 -1px 0 color-mix(in oklab, var(--blue-ink) 25%, transparent); }
}

/* Saved shortcuts sit alongside, and do not change, edition-bound highlights. */
.sv-section-title { font-size:1.3rem; margin:1.5rem 0 .75rem; }
.sv-pins { margin:2rem 0; padding:1.25rem; border:1px solid var(--line); background:var(--surface); }
.sv-pins .sv-section-title { margin-top:0; }
.pin-form, .pin-lists { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; }
.pin-form { margin:1.25rem 0; }
.pin-form label { display:block; margin-bottom:.4rem; font-size:.85rem; }
.pin-form select { display:block; width:100%; max-width:100%; padding:.65rem; margin-bottom:.5rem; color:var(--ink); background:var(--bg); border:1px solid var(--line); font:inherit; font-size:.85rem; }
.pin-lists h3 { font-size:.95rem; }
.pin-lists ul { list-style:none; margin:0; padding:0; }
.pin-lists li { display:flex; align-items:center; justify-content:space-between; gap:.75rem; border-top:1px solid var(--line); padding:.65rem 0; }
.pin-lists li a { overflow-wrap:anywhere; }
.pin-lists .btn { flex:none; }
@media(max-width:600px) { .pin-form, .pin-lists { grid-template-columns:1fr; } .sv-pins { padding:1rem; } }

/* projects */
.sv-projects { margin: 2.4rem 0 1rem; }
.proj-bar, .proj-form, .proj-form form, .proj-delete { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.proj-bar label, .proj-form label { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2); }
.proj-bar select, .proj-form input, .sv-move select, .sched-tribunal select { min-width: 0; max-width: 100%; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 .88rem/1.4 var(--font-text); }
.proj-bar select { flex: 1 1 16rem; }
.proj-form { margin-top: .9rem; padding: .9rem; border: 1px solid var(--line-strong); background: var(--surface); }
.proj-form input { flex: 1 1 18rem; }
.proj-warn { flex-basis: 100%; margin: 0; padding: .55rem .7rem; border-left: 3px solid var(--blue); background: var(--sunken); font-size: .82rem; }
.proj-bar { margin-top: 1rem; }
.proj-show { padding-top: 1rem; border-top: 1px solid var(--line); }
.proj-list { list-style: none; margin: 1.25rem 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.proj-item { padding: .9rem 1rem; border-top: 1px solid var(--line); transition: background-color .2s ease; }
.proj-item:first-child { border-top: 0; }
.proj-item.is-open { background: var(--sunken); box-shadow: inset 3px 0 0 var(--blue); }
.proj-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.proj-info { flex: 1 1 16rem; min-width: 0; }
.proj-name { margin: 0; font: 600 1rem/1.35 var(--font-text); overflow-wrap: anywhere; }
.proj-meta { margin: .2rem 0 0; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); }
.proj-flags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0 0; }
.proj-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.proj-item .proj-form { margin-top: .8rem; }
.proj-delete p { flex-basis: 100%; margin: 0; font-size: .88rem; }
.proj-empty { margin: 1.25rem 0; padding: 1rem; border: 1px dashed var(--line-strong); font-size: .9rem; }
@media (max-width: 600px) { .proj-actions { flex-basis: 100%; } .proj-item { padding: .8rem .75rem; } }
:is(.proj-bar, .proj-form) :is(select, input):focus-visible, :is(.sv-move, .sched-tribunal) select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sv-move { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; min-width: 0; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); }
.sv-move select { flex: 1 1 auto; }   /* a long project name must not widen the page on a phone */
.sv-item { grid-template-columns: minmax(0, 1fr); }

/* country schedule */
.sched-issue-group { margin-top: 1.6rem; }
.sched-issue-group h4 { margin: 0; font-size: .95rem; letter-spacing: .02em; }
.sched-sub { margin: 1.2rem 0 0 1rem; font-size: .9rem; }
.sched-move { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.sched-row { margin-top: .8rem; padding: 1rem; border: 1px solid var(--line-strong); background: var(--surface); }
.sched-row[data-status="Human reviewed"] { border-color: var(--blue); }
.sched-from { flex: 1 1 14rem; min-width: 0; font-size: .82rem; }
.sched-saved { margin: .7rem 0; font-size: .85rem; }
.sched-saved blockquote { margin: .5rem 0; padding-left: .8rem; border-left: 2px solid var(--line-strong); }
.sched-sources { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .78rem; overflow-wrap: anywhere; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); column-gap: 1rem; }
.sched-grid .schedule-field { margin: .6rem 0; }
.sched-choice { margin: .8rem 0; padding: .6rem .8rem; border: 1px solid var(--line); display: grid; gap: .35rem; font-size: .85rem; }
.sched-choice legend { padding: 0 .3rem; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); }
.sched-choice input, .sched-reviewed input { accent-color: var(--blue); }
.sched-underlying { margin: .4rem 0; padding: .2rem .8rem .4rem; border-left: 3px solid var(--blue); }
.sched-tribunal { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); }
.sched-tribunal select { max-width: min(26rem, 70vw); }
/* Finding more sources: the prompt, shown in full to read before it is copied (schedule-research.js). */
.sched-steps { margin: .4rem 0 .8rem; padding-left: 1.3rem; display: grid; gap: .25rem; font-size: .85rem; color: var(--ink-2); }
.sched-prompt { display: block; width: 100%; box-sizing: border-box; margin-bottom: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font-family: var(--font-mono); font-size: .75rem; line-height: 1.5; resize: vertical; }
/* A source with its title and link: one line as the Word file cites it; its fields folded underneath. */
.sched-source-line { margin: .4rem 0; font-size: .85rem; overflow-wrap: anywhere; }
.sched-src-edit > summary { cursor: pointer; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); }
.sched-note { margin: .6rem 0 0; font-size: .82rem; }
/* Published reviews of a row's footnotes: the reader's own mark (same classes), then one line. Information only. */
.sched-reviews { margin: .6rem 0 0; font-size: .82rem; }
.sched-reviews .sv-local { margin: 0 0 .25rem; font-size: .76rem; }
.sched-reviews ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.sched-reviews li { display: flex; gap: .45rem; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.sched-reviews .review-marker { flex: none; margin: 0; font-size: 1rem; cursor: default; pointer-events: none; align-self: center; }
.schedule-field .sv-local { margin: 0; font-family: var(--font-text); }
.sched-reviewed { display: inline-flex; gap: .4rem; align-items: center; font-size: .85rem; }
.sched-checks { margin: .8rem 0 0; padding-left: 1.1rem; font-size: .82rem; display: grid; gap: .25rem; }
.sched-checks .is-block { color: var(--del); }
.sched-checks .is-warn { color: var(--ink); }
.sched-checks .is-info { color: var(--ink-2); }
.sched-ok { margin: .8rem 0 0; font-size: .82rem; color: var(--blue); }
.sched-add { margin-top: 2rem; }
.sched-add ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .6rem; }
.sched-add li { display: flex; gap: .7rem; align-items: start; }
.sched-add li span { display: grid; gap: .15rem; min-width: 0; font-size: .82rem; }
.sched-add small { color: var(--ink-2); line-height: 1.4; }
/* A footnote's published reviews: a drop-down, as on the reader's footnotes. */
.sched-review { margin: .3rem 0; font-size: .82rem; }
.sched-review > summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; }
.sched-review .source-review-panel { margin: .3rem 0 .6rem; }

/* The preview: a sheet of the Word file, in its type and layout (country-schedule-docx.js), white in either theme, inside
   a dashed border labelled "Preview" so it is not taken for the page itself. 1pt is about 1.333px. */
.sched-paper { position: relative; overflow-x: auto; margin-top: 1.4rem; padding: 2.2rem 1.6rem 1.6rem; background: #fff; color: #000;
  font-family: Arial, Helvetica, sans-serif; font-size: 14.67px; line-height: 1.15; border: 2px dashed var(--blue); box-shadow: 0 0 0 6px var(--bg); }
.sched-paper p { margin: 0; }
.sched-paper-tag { position: absolute; top: .55rem; left: .7rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.sp-court p { font-weight: 700; }
.sp-court { margin-bottom: 8px; }
.sp-refs { text-align: right; margin-bottom: 22px; }
.sp-between { font-weight: 700; margin-bottom: 14px !important; }
.sp-party { text-align: center; }
.sp-name { font-weight: 700; }
.sp-role { font-style: italic; }
.sp-and { text-align: center; margin: 12px 0 !important; }
.sp-party + .sp-title { margin-top: 28px !important; }
.sp-title { text-align: center; font-weight: 700; font-size: 16px; margin-bottom: 22px !important; }
.sched-table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1.33px solid #000; font-size: 13.33px; }
.sched-table th, .sched-table td { border: .67px solid #8c8c8c; padding: 6px 9px; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.sched-table thead th { text-align: center; background: #f2f2f2; border-bottom: 1.33px solid #000; }
.sched-table td p { text-align: justify; line-height: 1.15; margin: 4px 0; }
.sched-table a { color: #00f; }
.sched-issue th { font-weight: 700; background: #f2f2f2; }
.sched-issue.is-sub th { padding-left: 28px; }

/* A project's two tabs: its saved passages and its country schedule. */
.sv-tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 2rem 0 0; border-bottom: 2px solid var(--blue); }
.sv-tabs [role=tab] { min-height: 2.6rem; padding: .55rem 1.1rem; border: 1px solid var(--line-strong); border-bottom: 0; margin-right: -1px; border-radius: 0;
  background: var(--surface); color: var(--ink-2); font: 500 .8rem/1.2 var(--font-mono); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.sv-tabs [role=tab][aria-selected=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.sv-tabs [role=tab]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sv-panel:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.sv-tabs:not([hidden]) + .sv-panel .sv-section-title:first-child { margin-top: 1.2rem; }
.sv-tabs:not([hidden]) ~ #panelSchedule .schedule { margin-top: 1.2rem; padding-top: 0; border-top: 0; }
@media (max-width: 600px) { .sv-tabs [role=tab] { flex: 1 1 50%; padding: .55rem .6rem; } }

/* A saved passage can be closed to its first words. */
.sv-fold > summary { list-style: none; cursor: pointer; margin: .5rem 0 0; font-size: .82rem; color: var(--ink-2); }
/* A passage's quote, citation, sources, private note and actions sit inside the fold, out of reach of
   .sv-item's grid gap (a <details> does not lay its content out as grid items), so each takes the gap itself. */
.sv-fold > :not(summary) { margin-top: .8rem; }
.sv-fold > summary::-webkit-details-marker { display: none; }
.sv-fold > summary::before { content: "▸ "; color: var(--blue); }
.sv-fold[open] > summary::before { content: "▾ "; }
.sv-fold:not([open]) .sv-fold-open, .sv-fold[open] .sv-fold-shut { display: none; }
.sv-fold-shut { font-family: var(--font-text); color: var(--ink); }
.sv-fold-open { font-family: var(--font-mono); font-size: .72rem; }
.sv-fold > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sv-fold-all { display: inline-flex; flex-wrap: wrap; gap: .4rem; }

/* The schedule's sections and rows open and close. */
.sched-section { margin-top: 1.6rem; border-top: 1px solid var(--line-strong); }
.sched-section > summary { cursor: pointer; padding: .8rem 0 .4rem; list-style: none; }
.sched-section > summary::-webkit-details-marker, .sched-row > summary::-webkit-details-marker { display: none; }
.sched-section > summary h3 { display: inline; margin: 0; font-size: 1.05rem; }
.sched-section > summary::before, .sched-row > summary::before { content: "▸ "; color: var(--blue); }
.sched-section[open] > summary::before, .sched-row[open] > summary::before { content: "▾ "; }
.sched-section > summary:focus-visible, .sched-row > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sched-fold { justify-content: flex-start; margin: .2rem 0 .4rem; }
.sched-actions { justify-content: flex-end; }
.sched-history { display: inline-flex; gap: .3rem; }
.sched-row > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; cursor: pointer; list-style: none; }
.sched-sum b { font-size: .82rem; }
.sched-sum-text { flex: 1 1 18rem; min-width: 0; font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.sched-sum-n { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.sched-row[open] .sched-sum-text { display: none; }
.sched-body { margin-top: .6rem; }
.sched-choice .sched-note { margin-top: .2rem; }
/* The schedule's editor, as Bundle Wizard edits its index: issue cards, sub-issues within
   them, passages dragged between them and to and from the set-aside pool beside them (schedule-mock.html). */
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1rem 0; }
.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .42fr); gap: 1.3rem; align-items: start; }
.ed-issues { min-width: 0; }
.ed-card { margin-bottom: 1rem; padding: .9rem 1.1rem; border: 1px solid var(--line); background: var(--surface); }
.ed-card.drop-before { box-shadow: 0 -3px 0 var(--blue); }
.ed-card.drop-after { box-shadow: 0 3px 0 var(--blue); }
.ed-card.is-dragging, .ed-row.is-dragging { opacity: .45; }
.ed-head, .ed-sub-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.ed-sub-head { margin-top: .4rem; padding: .45rem 0 .45rem 1.4rem; }
.ed-handle { cursor: grab; color: var(--ink-3); font-size: 1rem; user-select: none; padding: 0 .1rem; }
.ed-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.ed-name { flex: 1 1 12rem; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; font-size: .9rem; }
.ed-head .ed-name { font-weight: 600; }
.ed-arrows { display: inline-flex; gap: .2rem; }
.ed-link { border: 0; background: none; color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; cursor: pointer; white-space: nowrap; }
.ed-link:hover { color: var(--blue); }
.ed-x { min-width: 1.7rem; min-height: 1.7rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.ed-x:hover:not(:disabled) { color: var(--blue); border-color: var(--blue); }
.ed-x[data-act^="ed-aside"]:hover, .ed-x[data-act="ed-dissolve-sub"]:hover { color: var(--red); border-color: var(--red); }
.ed-x:disabled { opacity: .35; cursor: default; }
.ed-rows { min-height: .5rem; }
.ed-rows.is-over, .ed-pool.is-over { outline: 2px dashed var(--blue); outline-offset: 2px; }
.ed-row { display: flex; align-items: flex-start; gap: .65rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.ed-row.drop-before { box-shadow: inset 0 3px 0 var(--blue); }
.ed-sub-rows .ed-row { padding-left: 1.6rem; }
.ed-row:hover .ed-title { color: var(--blue); }
.ed-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.ed-row.is-open { background: var(--blue-wash); }
.ed-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.ed-title { font-size: .86rem; overflow-wrap: anywhere; }
.ed-meta { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-2); }
.ed-text { margin-top: .1rem; font-size: .8rem; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ed-why { font-family: var(--font-mono); font-size: .66rem; color: var(--blue); }
.ed-status { font-family: var(--font-pixel); font-size: .72rem; color: var(--blue); white-space: nowrap; }
.ed-status.is-todo { color: var(--red); }
.ed-detail { margin: 0 .2rem .6rem 2rem; cursor: default; }
.ed-detail .sched-row { margin-top: 0; border-color: var(--blue-line); }
.ed-empty { padding: 1.2rem 1rem; margin: .6rem 0; border: 1px dashed var(--line-strong); background: var(--sunken); color: var(--ink-2); text-align: center; font-size: .82rem; }
.ed-pool { position: sticky; top: calc(var(--top-h) + var(--sched-bar-h, 3.5rem) + 1rem); max-height: calc(100vh - var(--top-h) - var(--sched-bar-h, 3.5rem) - 2rem); overflow-y: auto; padding: 1rem; border: 1px solid var(--line); background: var(--sunken); }
.ed-pool h3 { margin: 0 0 .3rem; font-size: .95rem; }
.ed-hint { margin: 0 0 .6rem; font-size: .76rem; color: var(--ink-2); }
.ed-pool .ed-row { cursor: grab; }
@media (max-width: 900px) { .ed-layout { grid-template-columns: minmax(0, 1fr); } .ed-pool { position: static; max-height: none; } .ed-detail { margin-left: 0; } }

/* Sharing a project (saved.js: shareHtml, deleteSharedHtml, leaveHtml; shared/project-share.js). Rules of their own:
   the project rows' other styles and the schedule's are left as they are. ---- */
.proj-item.is-shared .proj-name::after { content: "Shared"; margin-left: .5rem; padding: .05rem .35rem; border: 1px solid var(--blue); color: var(--blue); font: 400 .66rem/1.4 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; vertical-align: .15em; }
.proj-shared-line { margin: .2rem 0 0; font-family: var(--font-mono); font-size: .74rem; color: var(--blue); }
.proj-share > p { flex-basis: 100%; margin: 0; font-size: .88rem; }
.proj-share-add { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; flex-basis: 100%; }
.proj-share-add input { flex: 1 1 18rem; min-width: 0; max-width: 100%; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 .88rem/1.4 var(--font-text); }
.proj-share-add input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.proj-members { flex-basis: 100%; list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.proj-members li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .55rem .7rem; border-top: 1px solid var(--line); }
.proj-members li:first-child { border-top: 0; }
.proj-member-who { display: flex; flex-direction: column; flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; font-size: .88rem; }
.proj-member-email { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); }
.proj-share-note { min-height: 0; color: var(--ink); }
.proj-share-note:empty { display: none; }
/* Invitations, roles and suggestions (5 November 2026; shared/share-panel.js). */
.proj-share-add select, .proj-members select { min-width: 0; max-width: 100%; padding: .45rem .5rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 .82rem/1.4 var(--font-mono); }
.proj-share-add select:focus-visible, .proj-members select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.share-combo { position: relative; display: flex; flex: 1 1 18rem; min-width: 0; }
.share-combo input { width: 100%; }
.share-suggest { position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 30; margin: 0; padding: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 14px 34px -16px color-mix(in oklab, var(--ink) 35%, transparent);
  transform-origin: top left; animation: pop-in var(--t) var(--ease) both; }
.share-suggest[hidden] { display: none; }
.share-suggest li { display: grid; gap: .1rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; font-size: .86rem;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.share-suggest li:last-child { border-bottom: 0; }
.share-suggest li b { font-weight: 500; }
.share-suggest li span { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.share-suggest li:hover, .share-suggest li.is-active { background: var(--blue-wash); color: var(--blue); }
.proj-share-hint { flex-basis: 100%; margin: 0; font-size: .76rem; color: var(--ink-2); }
.sv-invites { display: grid; gap: .6rem; margin: 0 0 .8rem; }
.sv-invite { display: grid; gap: .55rem; padding: .8rem .9rem; border: 1px solid var(--blue); background: var(--surface); }
.sv-invite p { margin: 0; font-size: .9rem; }
.sv-invite-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.sv-view-only { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
/* Working together (5 November 2026; shared/project-presence.js): who else has the project open, the passage another
   member is editing, and a clash shown on the passage itself. */
.sv-present { display: inline-flex; align-items: center; gap: .25rem; margin-left: .7rem; vertical-align: middle; }
.sv-avatar { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid var(--blue); color: var(--blue); background: var(--blue-wash);
  font: 500 .62rem/1 var(--font-mono); letter-spacing: .02em; animation: pop-in var(--t) var(--ease) both; }
.sv-present-words { margin-left: .2rem; }
.pp-lock { display: inline-block; margin: 0 .5rem .3rem 0; padding: .1rem .4rem; border: 1px solid var(--blue); color: var(--blue); font: 400 .68rem/1.4 var(--font-mono); }
.is-locked { background: color-mix(in oklab, var(--blue-wash) 60%, transparent); transition: background var(--t) var(--ease); }
.pp-clash { display: grid; gap: .45rem; margin: .5rem 0; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--blue); background: var(--surface); font-size: .84rem; }
.pp-clash p { margin: 0; }
.pp-clash-acts { display: flex; flex-wrap: wrap; gap: .4rem; }
/* Generate with AI (shared/schedule-generate.js): the summary, the choices, the cost line and the button; and the
   label on a quotation the AI added. */
.sched-gen { display: grid; gap: .8rem; max-width: 52rem; }
.sched-gen-warn { margin: 0; padding: .55rem .8rem; border: 1px solid var(--blue-line); color: var(--ink-2); font-size: .8rem; }
.sched-gen-summary { display: grid; gap: .3rem; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.sched-gen-summary textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: .88rem/1.45 var(--font-text); resize: vertical; }
.sched-gen fieldset { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; padding: .5rem .8rem .65rem; border: 1px solid var(--line); }
.sched-gen fieldset[disabled] { opacity: .5; }
.sched-gen legend { padding: 0 .3rem; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.sched-gen label { font-size: .84rem; }
.sched-gen-summary textarea, .sched-gen-notes textarea { width: 100%; }
.sched-gen-notes { display: grid; gap: .3rem; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.sched-gen-notes textarea { padding: .55rem .7rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: .88rem/1.45 var(--font-text); resize: vertical; }
.sched-gen-country { display: inline-flex; align-items: center; gap: .6rem; margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.sched-gen-cost { margin: 0; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.sched-gen-act { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0; }
.sched-gen-note { flex: 1 1 18rem; color: var(--ink-2); font-size: .78rem; }
.ed-ai { font-family: var(--font-mono); font-size: .66rem; color: var(--blue); }
/* The schedule as one table: the Word file's layout in the site's style, edited in place. */
.pp-layout { display: grid; grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr) minmax(13rem, 16rem); gap: 1.3rem; align-items: start; margin-top: 1rem; }
/* The schedule's index (its issues and sub-issues), in the style of the contents beside a CPIN (reader.css: .toc), kept in view under the frozen bar. */
.pp-index { top: calc(var(--top-h) + var(--sched-bar-h, 3.5rem) + 1rem); max-height: calc(100vh - var(--top-h) - var(--sched-bar-h, 3.5rem) - 2rem); }
.pp-index li { position: relative; }
.pp-index .toc-label { overflow-wrap: anywhere; }
.toc a.is-within { color: var(--blue); }
/* The arrows that move an entry: over its count while the entry is pointed at or has the focus. */
.ix-move { position: absolute; top: 50%; right: 0; display: inline-flex; transform: translateY(-50%); background: var(--bg); opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.pp-index li:hover .ix-move, .pp-index li:focus-within .ix-move { opacity: 1; }
.ix-move button { width: 1.4rem; height: 1.5rem; padding: 0; border: 0; background: none; color: var(--ink-2); font: .78rem var(--font-mono); cursor: pointer; }
.ix-move button:hover { color: var(--blue); }
.ix-move button:disabled { opacity: .3; cursor: default; }
.ix-move button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pp-index li.is-over > a { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--blue-wash); }
.pp-index li.drop-before > a { box-shadow: inset 0 2px 0 var(--blue); }
.pp-index li.drop-after > a { box-shadow: inset 0 -2px 0 var(--blue); }
.pp-index li.is-dragging { opacity: .45; }
.sv:has(#panelSchedule:not([hidden])) { max-width: 104rem; }
/* The index's entries are dragged like the table's rows: the same handle. */
.ix-handle { margin-right: .4rem; font-size: .8rem; line-height: 1; }
.pp-index li > a { cursor: grab; }
.pp-done { margin: .2rem 0 0; }
.pp-ask td { padding: .3rem .5rem; }
.pp-ask .inline-ask { margin: 0; }
.pp-paper { min-width: 0; padding: 1.6rem 1.7rem 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.pp-paper p { margin: 0; }
.pp-court p { font-weight: 700; letter-spacing: .02em; }
.pp-court { margin-bottom: .5rem; }
.pp-refs { text-align: right; margin-bottom: 1.4rem; color: var(--ink-2); }
.pp-between { font-weight: 700; margin-bottom: .8rem !important; }
.pp-party { text-align: center; }
.pp-pname { font-weight: 700; }
.pp-role { font-style: italic; color: var(--ink-2); }
.pp-and { text-align: center; margin: .7rem 0 !important; }
.pp-title { text-align: center; font-weight: 700; font-size: 1.05rem; margin: 1.7rem 0 1.3rem !important; letter-spacing: .03em; }
.pp-table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1px solid var(--line-strong); font-size: .86rem; }
.pp-table col:first-child { width: 38%; }
.pp-table col:last-child { width: 62%; }
.pp-table th, .pp-table td { border: 1px solid var(--line-strong); padding: .5rem .7rem; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.pp-table thead th { text-align: center; background: var(--sunken); font-weight: 600; }
.pp-issue th, .pp-sub th { background: var(--sunken); font-weight: 700; }
.pp-issue th, .pp-sub th { display: table-cell; }
.pp-issue th { text-transform: uppercase; letter-spacing: .02em; }
.pp-sub th { padding-left: 1.7rem; }
.pp-lab { margin-right: 0; white-space: nowrap; }
.pp-name { width: min(26rem, 56%); padding: .2rem .35rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; text-transform: inherit; letter-spacing: inherit; }
.pp-name:hover { border-color: var(--blue-line); }
.pp-name:focus { border-color: var(--blue); outline: 0; }
.pp-acts { float: right; display: inline-flex; gap: .5rem; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 400; }
.pp-handle { display: inline-block; cursor: grab; color: var(--ink-3); user-select: none; margin-right: .45rem; }
.pp-src { position: relative; padding-left: 1.7rem !important; }
.pp-src > .pp-handle { position: absolute; left: .45rem; top: .55rem; margin: 0; }
.pp-lines p { margin: .1rem 0; }
.pp-lines a { color: var(--blue); }
.pp-missing { color: var(--red); font-weight: 600; }
.pp-status { margin-top: .3rem; }
.pp-addlink { margin: .5rem 0 0; }
.pp-wording { margin: .3rem 0 .5rem; }
.pp-link-in { display: block; width: 100%; margin-top: .5rem; padding: .45rem .55rem; border: 1px solid var(--blue); border-radius: 0; background: var(--bg); color: var(--ink); font: 400 .86rem/1.4 var(--font-mono); }
.pp-link-in:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pp-edit .gen-chk { margin-top: .2rem; }
.pp-edit .pp-size { margin: .2rem 0 0; }
.pp-tools { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .45rem; }
.pp-edit { margin-top: .6rem; display: grid; gap: .5rem; }
.pp-ext { position: relative; padding-right: 2.4rem !important; }
/* The extract is edited where it stands in its cell: no box of its own inside the cell, and a clear outline while it has the focus. */
.pp-extract { display: block; width: 100%; min-height: 1.5em; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.pp-extract:focus { outline: 2px solid var(--blue); outline-offset: .3rem; }
.pp-fmt { position: absolute; top: -.8rem; right: 2.9rem; z-index: 3; display: none; border: 1px solid var(--blue); background: var(--surface); box-shadow: 0 .3rem .8rem rgb(0 0 0 / .18); }
.pp-ext:focus-within .pp-fmt { display: inline-flex; }
.pp-fmt button { width: 1.8rem; height: 1.6rem; padding: 0; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); font: 400 .82rem var(--font-text); cursor: pointer; }
.pp-fmt button:last-child { border-right: 0; }
.pp-fmt button:hover { background: var(--blue-wash); color: var(--blue); }
.pp-fmt button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pp-it { font-style: italic; }
.pp-edit .sched-grid { grid-template-columns: minmax(0, 1fr); }               /* the source cell is narrow: one field to a line, never wider than it */
.date-field { display: flex; align-items: stretch; }
.date-field input { flex: 1 1 auto; border-right: 0 !important; }
.date-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.date-btn:hover, .date-btn[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
.date-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pp-x { position: absolute; top: .4rem; right: .5rem; }
.pp-detail-row td { background: var(--sunken); }
.pp-detail .sched-checks { margin: 0 0 .5rem; }
.pp-empty td { padding: 1rem; text-align: center; color: var(--ink-2); border-style: dashed; }
.pp-end td { border: 0; padding: .6rem 0 0; text-align: center; }
.pp-row.is-dragging, .pp-issue.is-dragging, .ed-row.is-dragging { opacity: .45; }
tr.drop-before > td, tr.drop-before > th { box-shadow: inset 0 3px 0 var(--blue); }
tr.drop-after > td, tr.drop-after > th { box-shadow: inset 0 -3px 0 var(--blue); }
@media (max-width: 1150px) {
  .pp-layout { grid-template-columns: minmax(0, 1fr) minmax(13rem, 16rem); }
  .pp-index { grid-column: 1 / -1; position: static; max-height: 16rem; }
}
@media (max-width: 900px) { .pp-layout { grid-template-columns: minmax(0, 1fr); } }
/* The proposed Saved page (saved-mock.html): one box for the project, collapsible countries and
   reports, notes only where there are some, and the report beside the list. These rules follow the older ones above. */
.sv { max-width: 84rem; padding-top: 1.2rem; }
.sv-bar { margin-bottom: 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.sv-bar-top { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .8rem 1.1rem; }
.sv-proj { position: relative; }
.sv-proj-btn { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem .75rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-family: var(--font-pixel); font-size: 1.5rem; letter-spacing: .06em; cursor: pointer; }
.sv-proj-btn:hover, .sv-proj-btn[aria-expanded="true"] { border-color: var(--blue); }
.sv-caret { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.sv-proj-menu { min-width: 17rem; max-height: 24rem; overflow: auto; padding: .3rem; }
.sv-proj-menu button { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: .5rem .7rem; border: 0; font-size: .86rem; text-align: left; }
.sv-proj-menu button[aria-current="true"] { background: var(--blue-wash); }
.sv-proj-menu hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
.sv-sp { flex: 1; }
.sv-shared-line { margin: 0; padding: 0 1.1rem .7rem; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.sv-forms { padding: 0 1.1rem 1rem; }
.sv-forms .proj-form { margin: 0; }
.sv-forms textarea { width: 100%; padding: .5rem .65rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
.sv-bar .sv-tabs { margin: 0; padding: 0 1.1rem; border: 0; border-block: 1px solid var(--line); }
.sv-bar .sv-tabs [role=tab] { border: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; background: none; padding: .65rem 1rem; color: var(--ink-2); font: inherit; font-size: .88rem; }
.sv-bar .sv-tabs [role=tab][aria-selected=true] { background: none; color: var(--blue); border-bottom-color: var(--blue); }
.sv-bar .sv-tools { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; padding: .7rem 1.1rem; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sv-bar .sv-tools[hidden] { display: none; }
.sv-search { flex: 1 1 18rem; display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; border: 1px solid var(--line-strong); background: var(--bg); }
.sv-search:focus-within { border-color: var(--blue); }
.sv-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .9rem; outline: 0; }
.sv-search kbd { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-3); border: 1px solid var(--line); padding: .05rem .35rem; }
.sv-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.sv-split.has-reader { grid-template-columns: minmax(0, 1fr) var(--reader-w, minmax(24rem, .9fr)); }
.sv-main { min-width: 0; }
.sv-country { margin: 0 0 .9rem; padding: 0; border: 1px solid var(--line); background: var(--surface); animation: none; }
.sv-country > summary, .sv-note > summary { list-style: none; cursor: pointer; }
.sv-country > summary::-webkit-details-marker, .sv-note > summary::-webkit-details-marker { display: none; }
.sv-country-head { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border: 0; }
.sv-country-head canvas.dotflag { width: 3rem; }
.sv-country-head:hover .sv-country-name { color: var(--blue); }
.sv-country-name { margin: 0; font-size: 1.55rem; letter-spacing: .05em; }
.sv-count { margin-left: auto; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.sv-chev { width: 1rem; font-family: var(--font-mono); color: var(--blue); }
details[open] > summary > .sv-chev::before { content: "▾"; }
details:not([open]) > summary > .sv-chev::before { content: "▸"; }
.sv-country-body { display: grid; gap: .7rem; padding: 0 1.1rem 1rem; }
.sv-note { margin: 0; border: 1px solid var(--line); background: var(--bg); }
.sv-note-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; padding: .65rem .9rem; }
.sv-note-title { flex: 1 1 18rem; margin: 0; font-size: .95rem; font-weight: 600; letter-spacing: 0; }
.sv-note-meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); }
.sv-note-links { margin: 0; padding: 0 .9rem .4rem; }
.sv-note .sv-items { padding: 0 .9rem .6rem; gap: 0; }
.sv-note .sv-item { border: 0; border-top: 1px solid var(--line); background: none; padding: .8rem 0; }
.sv-note .sv-item.is-target { box-shadow: none; background: var(--blue-wash); margin: 0 -.9rem; padding-left: .9rem; padding-right: .9rem; }
.sv-link { border: 0; background: none; padding: 0; color: var(--ink-2); font: inherit; font-family: var(--font-mono); font-size: .7rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.sv-link:hover { color: var(--blue); }
.sv-note .sv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-top: .4rem; }
.sv-move { position: relative; }
.sv-move .sv-menu { min-width: 14rem; }
.sv-remove:hover { color: var(--red); }
.sv-reader { position: sticky; top: calc(var(--top-h) + .8rem); max-height: calc(100vh - var(--top-h) - 1.6rem); border: 1px solid var(--blue-line); background: var(--surface); display: grid; grid-template-rows: auto 1fr; min-height: 28rem; }
.sv-reader[hidden] { display: none; }
.sv-reader-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.sv-reader-head b { flex: 1; min-width: 0; font-size: .84rem; }
.sv-reader iframe { width: 100%; height: 100%; min-height: 26rem; border: 0; background: var(--bg); }
@media (max-width: 960px) { .sv-split.has-reader { grid-template-columns: minmax(0, 1fr); } .sv-reader { position: static; max-height: none; } }
.sv-reader { position: sticky; }
.sv-grip { position: absolute; top: 0; bottom: 0; left: -.7rem; width: .9rem; cursor: col-resize; z-index: 3; touch-action: none; }
.sv-grip::after { content: ""; position: absolute; top: 50%; left: .3rem; width: 3px; height: 2.6rem; margin-top: -1.3rem; background: var(--line-strong); border-radius: 2px; }
.sv-grip:hover::after, .sv-grip:focus-visible::after, .is-resizing .sv-grip::after { background: var(--blue); }
.sv-reader.is-resizing iframe { pointer-events: none; }
.sv-item.is-viewing { background: var(--blue-wash); }
/* The schedule tab's toolbar and its AI box: tight, with the AI clearly marked off. */
/* Frozen under the site's header: Undo, Redo, the court, the Word file and the figures stay in view. */
.sched-bar { position: sticky; top: var(--top-h); z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin: 0 0 .2rem; padding: .55rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.sched-sp { flex: 1; }
.ai-box { margin: .9rem 0 0; border: 1px solid var(--blue-line); background: var(--surface); }
.ai-box > summary { display: flex; align-items: baseline; gap: .8rem; padding: .6rem 1rem; cursor: pointer; list-style: none; }
.ai-box > summary::-webkit-details-marker { display: none; }
.ai-box > summary::before { content: "▸"; color: var(--blue); font-family: var(--font-mono); }
.ai-box[open] > summary::before { content: "▾"; }
.ai-box > summary h3 { margin: 0; font-family: var(--font-pixel); font-weight: 400; font-size: 1.1rem; letter-spacing: .08em; color: var(--blue); }
.ai-sub { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.ai-box > .ai-seg { margin: 0 1rem .8rem; }
.ai-box > .sched-gen, .ai-box > .ai-own, .ai-box > .sv-local { margin-left: 1rem; margin-right: 1rem; }
.ai-box > :last-child { margin-bottom: 1rem; }
.ai-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.ai-own .sched-prompt { margin-top: .7rem; width: 100%; }
.sv-tabn { margin-left: .4rem; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.sv-bar .sv-tabs [role=tab][aria-selected=true] .sv-tabn { color: inherit; }
.sv-main .schedule { margin-top: 0; padding-top: 0; border-top: 0; }
.sv-reader { height: calc(100vh - var(--top-h) - 1.6rem); }
@media (max-width: 960px) { .sv-reader { height: 70vh; } }
/* One right edge for every ×: the issue's, the sub-issue's and the row's. */
.pp-table th, .pp-table td { padding-right: .7rem; }
.pp-ext { padding-right: 2.9rem !important; }
.pp-x { right: .7rem; }
.pp-acts { margin-top: -.15rem; }
.pp-acts .ed-x, .pp-x { width: 1.7rem; height: 1.7rem; padding: 0; line-height: 1; }
.pp-issue th, .pp-sub th { padding-top: .55rem; padding-bottom: .55rem; }
/* The ticker at the top right of a country schedule (pages against the 12-page limit, in red only when over it; the AI's
   budget; whether every edit is saved), and a row's share of a page. */
.sched-ticker { margin: 0 0 0 auto; border: 0; flex: 0 1 auto; }
.sched-ticker > * { padding: .1rem 1.1rem .1rem 0; margin-right: 1.1rem; }
.sched-ticker > :last-child { padding-right: 0; margin-right: 0; }
.sched-ticker .v { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.sched-ticker [data-key="tk-saving"] { position: relative; cursor: default; }
.sched-ticker [data-key="tk-saving"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* What the dot means, with the time saved: shown on hover or focus, read out always (it is in the cell's words). */
.save-tip { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; padding: .35rem .6rem; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: .76rem/1.4 var(--font-mono); white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / .18); clip-path: inset(50%); opacity: 0; transition: opacity var(--t-fast) var(--ease); pointer-events: none; }
[data-key="tk-saving"]:hover .save-tip, [data-key="tk-saving"]:focus-visible .save-tip { clip-path: none; opacity: 1; }
.sched-ticker [data-key="tk-saving"] .v { display: flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .8rem; line-height: 1.6rem; letter-spacing: 0; }
/* The saving dot: green when every edit is saved, amber while saving, red when not saved. The time saved is on hover. */
.save-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 3px color-mix(in oklab, #1f9d55 22%, transparent); }
[data-saving="saving"] .save-dot { background: #d99a06; box-shadow: 0 0 0 3px color-mix(in oklab, #d99a06 22%, transparent); }
[data-saving="unsaved"] .save-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pp-size { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); margin-right: .2rem; }
/* The AI box (28 October 2026): the run takes the whole box; the confirmation sits under the form in the CPIN style; and what the AI changed. */
.gen-run { display: grid; gap: .7rem; justify-items: start; padding: 1.2rem 0 1rem; }
.gen-run-title { margin: 0; font-family: var(--font-pixel); font-size: 1.3rem; letter-spacing: .08em; color: var(--blue); }
.gen-bar { position: relative; width: min(30rem, 100%); height: .5rem; border: 1px solid var(--blue-line); background: var(--blue-wash); overflow: hidden; }
.gen-bar > span { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--blue); animation: gen-slide 1.4s var(--ease-in-out) infinite; }
@keyframes gen-slide { 0% { left: -30%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .gen-bar > span { animation: none; width: 100%; opacity: .5; } }
.gen-run-time { margin: 0; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gen-confirm { display: grid; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--blue); background: var(--blue-wash); }
.gen-model { margin: 0; font-size: .9rem; }
.gen-boxes { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .8rem; }
.gen-box { padding: .6rem .8rem .7rem; border: 1px solid var(--line-strong); background: var(--bg); }
.gen-box h4 { margin: 0 0 .35rem; font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.gen-sent h4 { color: var(--blue); }
.gen-notsent { background: var(--sunken); }
.gen-notsent h4 { color: var(--ink-2); }
.gen-box ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; line-height: 1.5; }
.gen-ok { display: flex; gap: .5rem; align-items: baseline; font-size: .86rem; }
.gen-actions { display: flex; gap: .5rem; margin: 0; }
@media (max-width: 40rem) { .gen-boxes { grid-template-columns: minmax(0, 1fr); } }
.sched-gen-may { }
.ai-run { display: grid; gap: .4rem; margin: .9rem 0 0; }
.ai-run h4 { margin: 0; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--blue); }
.ai-run h5 { display: flex; align-items: baseline; gap: .8rem; margin: .5rem 0 0; font-size: .84rem; font-weight: 600; }
.run-time { color: var(--ink-2); margin-left: .5rem; }
.run-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.run-list li { display: flex; align-items: baseline; gap: .8rem; padding: .35rem .6rem; background: var(--sunken); font-size: .82rem; }
.run-title { flex: 0 1 16rem; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.run-text { flex: 1 1 auto; min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.run-acts { display: inline-flex; gap: .8rem; margin-left: auto; align-items: baseline; white-space: nowrap; }
.run-state { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); }
tr.is-ai-new > td { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); }
.ed-keep { font-weight: 600; }
.gen-preview { font-size: .82rem; }
.gen-preview summary { cursor: pointer; color: var(--blue); }
.gen-preview p { margin: .4rem 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.gen-use { margin: 0; font-size: .76rem; color: var(--ink-2); }
/* The AI box, second pass (28 October 2026): the case summary as a line to edit, notes and options on lines of their own, in the CPIN style
   (no browser check boxes or radio buttons), and a warning on Send. */
.sched-gen { gap: .75rem; }
.sched-gen .k { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.gen-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin: 0; }
.gen-sum-text { flex: 1 1 24rem; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.gen-sum-done { margin: 0; }
.sched-gen-summary, .sched-gen-notes { display: grid; gap: .3rem; }
.sched-gen-summary textarea, .sched-gen-notes textarea { width: 100%; padding: .4rem 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); font: .9rem/1.5 var(--font-text); resize: none; field-sizing: content; min-height: 2.2rem; }
.sched-gen-summary textarea:focus, .sched-gen-notes textarea:focus { outline: 0; border-bottom-color: var(--blue); }
.gen-opts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.6rem; }
.gen-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.gen-group[aria-disabled="true"] { opacity: .45; }
.gen-chk { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; cursor: pointer; }
.gen-chk input { appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; width: 1rem; height: 1rem; margin: 0; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); cursor: pointer; }
.gen-chk input:hover { border-color: var(--blue); }
.gen-chk input:checked { background: var(--blue); border-color: var(--blue); }
.gen-chk input:checked::after { content: ""; width: .5rem; height: .26rem; margin-top: -.1rem; border-left: 2px solid var(--blue-ink); border-bottom: 2px solid var(--blue-ink); transform: rotate(-45deg); }
.gen-chk input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.gen-chk input:disabled { opacity: .5; cursor: default; }
.gen-box p { margin: 0; font-size: .86rem; line-height: 1.5; }
.gen-warn { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; margin: 0; padding: .55rem .8rem; border: 1px solid var(--red-line); background: var(--red-wash); font-size: .84rem; }
/* Third pass (28 October 2026): the notes in a box, and the confirmation in two columns. Times New Roman is the Word file's alone: the preview and the AI box keep the site's fonts. */
.pp-table { font-size: .95rem; }
.pp-paper .pp-tools, .pp-paper .ed-link, .pp-paper .pp-size, .pp-paper .pp-lab, .pp-paper .tag, .pp-paper .pp-acts { font-family: var(--font-mono); }
.gen-sum-text { font-size: 1.02rem; line-height: 1.5; }
.sched-gen-notes textarea { padding: .5rem .7rem; border: 1px solid var(--line-strong); background: var(--bg); font-size: 1rem; line-height: 1.5; min-height: 2.6rem; }
.sched-gen-notes textarea:focus { border-color: var(--blue); }
.gen-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; }
/* What goes to CPIN Explorer under what goes to the AI (owner, 6 November 2026). */
.gen-cols--stack { grid-template-columns: minmax(0, 1fr); }
.gen-col h5 { margin: 0 0 .4rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-2); }
.gen-col p { margin: 0 0 .4rem; font-size: .88rem; line-height: 1.5; }
.gen-text { font-size: 1rem !important; color: var(--ink); }
@media (max-width: 40rem) { .gen-cols { grid-template-columns: minmax(0, 1fr); } }
/* What the latest AI run changed: cards in a colour for each kind (added blue, moved amber, set aside red), the button that shows those
   rows, and a tick and a cross on each. */
:root { --chg-move: #b86e00; --chg-move-wash: color-mix(in oklab, #d98a00 14%, var(--bg)); }
:root[data-theme="dark"] { --chg-move: #e0a040; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chg-move: #e0a040; } }
.ai-changes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin: .8rem 0 0; }
.chg { display: inline-flex; align-items: baseline; gap: .4rem; padding: .35rem .75rem; border: 1px solid; font-size: .84rem; }
.chg b { font-family: var(--font-pixel); font-weight: 400; font-size: 1.1rem; }
.chg--add { border-color: var(--blue); background: var(--blue-wash); color: var(--blue); }
.chg--move { border-color: var(--chg-move); background: var(--chg-move-wash); color: var(--chg-move); }
.chg--aside { border-color: var(--red); background: var(--red-wash); color: var(--red); }
tr.is-chg > td { box-shadow: inset 3px 0 0 var(--bar); background: var(--wash); }
tr.is-chg--add { --bar: var(--blue); --wash: var(--blue-wash); }
tr.is-chg--move { --bar: var(--chg-move); --wash: var(--chg-move-wash); }
tr.is-chg--aside { --bar: var(--red); --wash: var(--red-wash); }
.chg-acts { display: inline-flex; gap: .4rem; margin-right: .5rem; }
.chg-acts .ed-link { width: 1.7rem; height: 1.6rem; padding: 0; border: 1px solid currentColor; text-decoration: none; font-size: .95rem; line-height: 1; }
.chg-acts--add { color: var(--blue); }
.chg-acts--move { color: var(--chg-move); }
.chg-acts--aside { color: var(--red); }
.gen-bar.is-steps > span { animation: none; left: 0; transition: width .6s var(--ease); }
.gen-reply { margin: 0; padding: .55rem .7rem; border-left: 3px solid var(--blue); background: var(--blue-wash); font: 1rem/1.5 var(--font-text); overflow-wrap: anywhere; }
/* A row or issue the reply names: a link to it, and the row marked for a moment once there. */
.gen-link { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.gen-link:hover { text-decoration-thickness: 2px; }
.is-pointed, .is-pointed > td { animation: pointed 2.4s var(--ease); }
@keyframes pointed { 0%, 40% { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .is-pointed, .is-pointed > td { animation: none; background: var(--blue-wash); } }
.sched-gen-act .gen-chk { margin-left: .2rem; }
.chg--replace { border-color: var(--chg-move); background: var(--chg-move-wash); color: var(--chg-move); }
tr.is-chg--replace { --bar: var(--chg-move); --wash: var(--chg-move-wash); }
.chg-acts--replace { color: var(--chg-move); }

/* The AI conversation, from the first message or Generate: in the column on the right, above the Set aside pile, in view while the
   schedule scrolls. On a narrow screen it is a drawer at the foot of the window. */
.pp-layout.has-chat { grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr) minmax(18rem, 22rem); }
.pp-side { position: sticky; top: calc(var(--top-h) + var(--sched-bar-h, 3.5rem) + 1rem); display: flex; flex-direction: column; gap: 1rem; min-width: 0;
  max-height: calc(100vh - var(--top-h) - var(--sched-bar-h, 3.5rem) - 2rem); }
.pp-side .ed-pool { position: static; flex: 0 0 auto; max-height: min(22vh, 11rem); }
.ai-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 16rem; border: 1px solid var(--blue-line); background: var(--surface); }
.ai-chat-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.ai-chat-head h3 { margin: 0; font-family: var(--font-pixel); font-weight: 400; font-size: 1.05rem; letter-spacing: .08em; color: var(--blue); }
.ai-chat-fold { display: none; }
.ai-thread { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 1.1rem; margin: 0; padding: .8rem; list-style: none; }
.gen-turn { display: grid; gap: .5rem; min-width: 0; }
.gen-ask { justify-self: end; max-width: 90%; margin: 0; padding: .45rem .65rem; border: 1px solid var(--line); background: var(--sunken); font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.ai-chat .gen-reply { font-size: .94rem; }
.ai-chat .gen-run { padding: .2rem 0; }
.gen-act { display: inline-flex; align-items: center; margin: 0 .1rem; padding: 0 .45rem; border: 1px solid var(--blue); background: var(--bg); color: var(--blue); font: 500 .74rem/1.6 var(--font-mono); vertical-align: baseline; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.gen-act:hover, .gen-act:focus-visible { background: var(--blue); color: var(--blue-ink); }
.gen-act.is-done { border-color: var(--line-strong); color: var(--ink-2); }
.gen-act.is-done:hover, .gen-act.is-done:focus-visible { background: var(--sunken); color: var(--ink); }
.gen-found { color: var(--ink); }
.gen-offers { display: grid; gap: .35rem; margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.gen-outcome-line { margin: 0; font: .8rem/1.5 var(--font-mono); color: var(--ink-2); }
.gen-report { font: .8rem/1.5 var(--font-mono); color: var(--ink-2); }
.gen-report > summary { cursor: pointer; color: var(--ink); list-style: none; }
.gen-report > summary::-webkit-details-marker { display: none; }
.gen-report > summary::before { content: "▸ "; color: var(--blue); }
.gen-report[open] > summary::before { content: "▾ "; }
.gen-report ul { display: grid; gap: .3rem; margin: .4rem 0 0; padding-left: 1.1rem; font-family: var(--font-text); font-size: .88rem; }
.gen-note { margin: 0; font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.gen-follow { display: flex; flex-wrap: wrap; gap: .4rem; }
.gen-chip { padding: .3rem .6rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: .84rem/1.35 var(--font-text); text-align: left; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.gen-chip:hover, .gen-chip:focus-visible { border-color: var(--blue); color: var(--blue); }
.ai-chat .gen-confirm { padding: .7rem; }
.ai-chat .gen-boxes, .ai-chat .gen-cols { grid-template-columns: minmax(0, 1fr); }
.ai-compose { display: grid; gap: .4rem; padding: .6rem .8rem .7rem; border-top: 1px solid var(--line); }
.ai-compose textarea { width: 100%; min-height: 2.6rem; max-height: 10rem; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--ink); font: .95rem/1.45 var(--font-text); resize: none; field-sizing: content; }
.ai-compose textarea:focus { outline: 0; border-color: var(--blue); }
.ai-compose-act { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0; }
.ai-compose-act .gen-model { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; }
.ai-compose-act .gen-model select { padding: .3rem .4rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--ink); font: 400 .84rem/1.3 var(--font-mono); }
.ai-compose-act .gen-model select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* What Send message sends, said under the box before it is pressed (6 November 2026): a line, Details, and the reminder. */
.gen-goes { display: grid; gap: .3rem; font-size: .8rem; color: var(--ink-2); }
.gen-goes p { margin: 0; overflow-wrap: anywhere; }
.gen-goes-more { display: grid; gap: .3rem; padding: .5rem .6rem; border: 1px solid var(--line); background: var(--sunken); }
.gen-goes-more .gen-sent-list { margin: 0; padding-left: 1.1rem; line-height: 1.5; }
.gen-goes-more .k { margin-right: .3rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; }
.gen-goes-warn { color: var(--red); }
@media (max-width: 1150px) { .pp-layout.has-chat { grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem); } }
@media (max-width: 900px) {
  .pp-layout.has-chat { grid-template-columns: minmax(0, 1fr); padding-bottom: 3.5rem; }
  .pp-side { position: static; display: block; max-height: none; }
  .pp-side .ed-pool { max-height: none; }
  .ai-chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 28; min-height: 0; max-height: 75dvh; overflow: hidden; border-width: 2px 0 0; border-top-color: var(--blue); transition: max-height var(--t) var(--ease); }
  .ai-chat.is-folded { max-height: 2.9rem; }
  .ai-chat-head { min-height: 2.9rem; align-items: center; padding: .4rem max(16px, env(safe-area-inset-right)) .4rem max(16px, env(safe-area-inset-left)); }
  .ai-chat-fold { display: inline-block; }
  .ai-thread, .ai-compose { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .ai-compose { padding-bottom: max(.8rem, env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) { .ai-chat { transition: none; } }

/* 4 November 2026 (owner's review of the Country schedule tab). */
/* Text boxes as tall as their text: a title or link wraps onto more lines (still one line of text), the source's wording grows with it. */
.schedule-field textarea.fit { min-height: 0; padding: .4rem .55rem; resize: none; field-sizing: content; overflow-wrap: anywhere; }
.schedule-field textarea.fit:not(.fit--line) { min-height: 2.6rem; max-height: 24rem; }
.pp-edit .schedule-field input { padding: .4rem .55rem; }
.sched-grid .schedule-field { margin: .45rem 0; }
.pp-edit .sched-reviews { margin: .2rem 0 0; }

/* In Select mode (17 November 2026), a tick box on each passage, under its handle, for the rows toolbar; a ticked row is tinted. */
.pp-pick { position: absolute; left: .4rem; top: 2rem; margin: 0; accent-color: var(--blue); cursor: pointer; }
.rows-bar { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .84rem; }
.rows-bar .pick-all { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.4rem; font-family: var(--font-mono); font-size: .78rem; cursor: pointer; }
.rows-bar .pick-all input { accent-color: var(--blue); }
.rows-n { min-width: 5.5rem; font-family: var(--font-mono); font-size: .76rem; color: var(--blue); }
.rows-act { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rows-bar .dd-menu li.is-sub { padding-left: 1.6rem; }
.rows-done { margin-left: auto; }
tr.pp-row.is-picked > td { background: var(--blue-wash); }

/* Find in the schedule (17 November 2026): its bar across the frozen bar, and the matches in the site's blue, the one it is on filled.
   An issue's or sub-issue's name is a box, so a match there marks the box. */
.sched-find { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; padding: .4rem .5rem; border: 1px solid var(--blue); background: var(--blue-wash); }
.sched-find input { flex: 1 1 12rem; min-width: 0; padding: .35rem .5rem; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; }
.sched-find input:focus { border-color: var(--blue); outline: 2px solid var(--focus); outline-offset: 1px; }
.sched-find-acts { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.sched-find-n { min-width: 5.5rem; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2); }
.sched-find-step { display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0; }
.sched-find-step svg { width: .95rem; height: .95rem; }
.sched-find-step:disabled { opacity: .4; cursor: default; }
::highlight(sched-find) { background-color: color-mix(in oklab, var(--blue) 20%, transparent); }
::highlight(sched-find-now) { background-color: var(--blue); color: var(--blue-ink); }
.pp-name.is-find-hit { background: color-mix(in oklab, var(--blue) 12%, var(--bg)); border-color: var(--blue-line); }
.pp-name.is-find-now { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }

/* The column on the right: the AI conversation and the Set aside pile each open and close by their headings, and the divider between
   them shares the column. Opening and closing glide (no snap); nothing moves with reduced motion. */
.side-fold { display: inline-flex; align-items: center; gap: .45rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.side-fold::before { content: "▾"; font-family: var(--font-mono); font-size: .8em; color: var(--blue); transition: transform var(--t) var(--ease-in-out); }
.side-fold[aria-expanded="false"]::before { transform: rotate(-90deg); }
.side-fold:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fold { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t) var(--ease-in-out), opacity var(--t) var(--ease-in-out); }
.fold.is-shut { grid-template-rows: 0fr; opacity: 0; }
.fold > .fold-in { min-height: 0; overflow: hidden; }
.ed-pool.is-shut h3 { margin: 0; }
@media (min-width: 901px) {
  .pp-layout.has-chat .pp-side { height: calc(100vh - var(--top-h) - var(--sched-bar-h, 3.5rem) - 2rem); gap: 0; }
  .pp-side .ai-chat { flex: 0 0 calc(var(--ai-share, 60) * 1% - .5rem); min-height: 0; overflow: hidden; transition: flex-basis var(--t) var(--ease-in-out); }
  .pp-side .ed-pool { flex: 1 1 0; min-height: 0; max-height: none; transition: flex-basis var(--t) var(--ease-in-out); }
  .pp-side.ai-shut .ai-chat { flex-basis: 2.75rem; }
  .pp-side.pool-shut:not(.ai-shut) .ai-chat { flex-basis: calc(100% - 4.4rem); }
  .pp-side.pool-shut .ed-pool { flex: 0 0 auto; }
  .pp-side.ai-shut .ai-chat-head { border-bottom-color: transparent; }
  .pp-side .side-divider { display: block; }
  .pp-side .side-divider[hidden] { height: 1rem; visibility: hidden; }
}
.side-divider { display: none; flex: 0 0 1rem; position: relative; cursor: row-resize; touch-action: none; }
.side-divider::before { content: ""; position: absolute; left: 35%; right: 35%; top: calc(50% - 2px); height: 4px; background: var(--line-strong); transition: background var(--t-fast) var(--ease); }
.side-divider:hover::before, .side-divider.is-dragging::before { background: var(--blue); }
.side-divider:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* A set-aside passage: pressed, it opens in place to be read before it is put back or dismissed. */
.ed-pool .ed-row { gap: .5rem; padding: .55rem .1rem; cursor: grab; }
.ed-peek { display: grid; gap: .1rem; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ed-peek:hover .ed-title { color: var(--blue); }
.ed-peek:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ed-row.is-open .ed-text { display: none; }
.ed-full { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .6rem; margin: .45rem 0 .2rem; font-size: .8rem; }
.ed-full dt { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-2); padding-top: .15rem; }
.ed-full dd { margin: 0; overflow-wrap: anywhere; }
.ed-full a { color: var(--blue); }
.ed-extract { white-space: pre-wrap; }
.ed-acts { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin-top: .3rem; font-family: var(--font-mono); font-size: .74rem; }
.ed-dismiss:hover { color: var(--red); }
.ed-dismissed { margin-top: .7rem; padding-top: .5rem; border-top: 1px dashed var(--line-strong); font-family: var(--font-mono); font-size: .74rem; }
.ed-dismissed .ed-row { opacity: .8; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .fold, .side-fold::before, .pp-side .ai-chat, .pp-side .ed-pool { transition: none; }
}

/* One saving indicator on this tab: the tab's own, beside the page count. The account's "Saving to account…" line says the same, so it
   is not shown while the tab is (its other lines, which ask for something to be done, still are). */
body:has(#panelSchedule:not([hidden])) .account-sync[data-state="saving"] { display: none; }
