/* ================================================================ App chrome */
/*
  The app's look is shared with Beacon, Snag Calc and the homepage: the colours (light and dark),
  rounding, bars, glass and font come from https://no5tyle.github.io/shared/no5tyle.css, linked before
  this file. Apple's system colours, capsule buttons, borderless rounded cards on a grouped background,
  and dark mode that follows the device. The printed program below has its own colours and always
  stays a white page.
*/

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* App bar: a see-through bar like iOS's navigation bar */
.appbar {
  height: var(--n5-bar-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--n5-bar-pad);
  background: var(--bar-bg);
  -webkit-backdrop-filter: var(--bar-filter); backdrop-filter: var(--bar-filter);
  border-bottom: .5px solid var(--border);
  position: relative; z-index: 5;
}
.appbar-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: var(--n5-bar-icon); height: var(--n5-bar-icon); border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; stroke-width: 2.4; }
.brand-title { font-weight: 700; font-size: var(--n5-bar-title-size); letter-spacing: -.01em; }
.brand-sub { font-size: var(--n5-bar-sub-size); color: var(--muted); }
.appbar-actions { display: flex; align-items: center; gap: 4px; }
.divider { width: 1px; height: 24px; background: var(--border); margin: 0 6px; }

/* Buttons: capsules; tinted rather than outlined, as the phone's buttons are */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 999px; border: 0;
  background: transparent; color: var(--text); font-weight: 500; font-size: 14px;
  cursor: pointer; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
}
.btn:focus-visible, .icon-btn:focus-visible, .choice:focus-visible, .menu button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-text); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-tonal { background: var(--tint-fill); color: var(--primary); font-weight: 600; }
.btn-tonal:hover { background: var(--tint-fill-strong); }
.btn-outline { background: var(--fill); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--fill-strong); }
.btn-ghost { color: var(--primary); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); }
.btn-text { color: var(--primary); padding: 0 10px; }
.btn-text:hover { background: var(--hover); }
.btn-danger { background: var(--danger); color: #fff; font-weight: 600; }
.btn.danger, .btn-text.danger { color: var(--danger); }
.btn-outline.danger { background: var(--alert-danger-bg); }
.btn-sm { height: 30px; font-size: 13px; padding: 0 12px; }
.btn-xs { height: 26px; font-size: 12px; padding: 0 8px; }
.btn-block { width: 100%; margin-top: 6px; }
.btn svg { width: 17px; height: 17px; }

.icon-btn {
  width: 28px; height: 28px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--primary); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

/* Layout */
.layout { display: flex; height: calc(100vh - 60px); }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-body { flex: 1; min-height: 0; display: flex; position: relative; }

/* Programs directory, on the left */
.directory {
  width: 260px; flex: none; display: flex; flex-direction: column;
  border-right: .5px solid var(--border); background: var(--bg);
}
.dir-top { display: flex; align-items: flex-start; gap: 6px; padding: 14px 14px 8px 8px; }
.dir-heading { flex: 1; min-width: 0; padding-top: 2px; }
.dir-toggle { flex: none; }
/* Collapsed: a thin strip with the button that brings it back */
.directory.collapsed { width: 48px; }
.directory.collapsed .dir-top { padding: 14px 8px; justify-content: center; }
.directory.collapsed .dir-heading, .directory.collapsed #btnDirNew,
.directory.collapsed .dir-list, .directory.collapsed .dir-foot { display: none; }
.directory.collapsed .dir-toggle svg { transform: rotate(180deg); }
.dir-title { font-weight: 700; font-size: 15px; }
.dir-where { font-size: 12px; color: var(--muted); }
.dir-list { flex: 1; overflow-y: auto; padding: 0 8px 20px; }
.dir-group { margin-top: 10px; }
.dir-head {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.dir-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--faint); }
.dir-count { margin-left: auto; font-weight: 500; letter-spacing: 0; }
.dir-row { position: relative; }
.dir-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.dir-row:hover .dir-actions, .dir-row:focus-within .dir-actions { opacity: 1; }
@media (hover: none) { .dir-actions { opacity: 1; } }
.dir-actions .icon-btn { width: 28px; height: 28px; background: var(--surface); }
.dir-foot { padding: 8px 16px 14px; border-top: .5px solid var(--border); font-size: 13px; }
.directory.attention .dir-list { animation: dir-attention 1.2s ease-out; }
@keyframes dir-attention { 0%, 40% { background: var(--tint-fill); } 100% { background: transparent; } }
.dir-item {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 64px 7px 10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.dir-item:hover { background: var(--hover); }
.dir-item[aria-current="true"] { background: var(--tint-fill); }
.dir-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.dir-item b { font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.dir-item span { font-size: 12px; color: var(--muted); }
.dir-empty, .dir-signin { margin: 10px 8px; font-size: 13px; color: var(--muted); }
.dir-signin { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--tint-fill); color: var(--text-2); }

/* Settings: a floating pane over the right of the workspace. While it's open the program makes room
   beside it (.settings-open), so it never covers the sheet. */
.sidebar {
  position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 4;
  width: 380px; overflow-y: auto;
  padding: 0 14px 24px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow), 0 0 0 .5px var(--border);
}
.pane-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  margin: 0 -14px 4px -16px; padding: 12px 10px 8px 18px; background: var(--bg);
}
.pane-title { font-weight: 700; font-size: 15px; }
.ws-body.settings-open .canvas { padding-right: 428px; }
#btnSettings[aria-pressed="false"] { background: var(--fill); color: var(--text-2); }

/* Cards: borderless, rounder than fields, on the grouped background */
.card {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.card summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-weight: 600; font-size: 15px;
  cursor: pointer; list-style: none; user-select: none;
}
.card summary::-webkit-details-marker { display: none; }
.card summary::after {
  content: ''; margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.card[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.card[open] summary { border-bottom: .5px solid var(--border-soft); }
.card-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
}
.card-icon svg { width: 17px; height: 17px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field em.muted { font-style: normal; font-weight: 400; color: var(--faint); }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], select {
  height: 38px; width: 100%; min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
select { padding-right: 6px; cursor: pointer; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
input[type=color] {
  width: 38px; height: 38px; flex: none; padding: 3px;
  border: 1px solid var(--input-border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 8px; }
.color-field { display: flex; gap: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.check-inline { align-self: end; height: 38px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.hint:empty { display: none; }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sidebar-foot { font-size: 12.5px; color: var(--muted); padding: 4px 6px; margin: 0; }
.link-btn { color: var(--primary); }

.logo-field { display: flex; align-items: center; gap: 14px; }
.logo-preview {
  width: 64px; height: 64px; border-radius: 14px;
  border: 1px dashed var(--input-border);
  display: grid; place-items: center; overflow: hidden; background: #fff;
}
.logo-preview img { max-width: 56px; max-height: 56px; object-fit: contain; }
.logo-preview .logo-glyph { font-size: 42px; line-height: 1; }

/* Editable lists */
.list { display: flex; flex-direction: column; gap: 6px; }
.list-row { display: flex; align-items: center; gap: 6px; }
.list-row input[type=text] { height: 34px; flex: 1; }
.list-row input[type=color] { width: 34px; height: 34px; }
.list-row .w-num { width: 58px; flex: none; height: 34px; padding: 0 6px; }
.list-row .w-when { flex: 0 0 38%; }
.note-row { flex-wrap: wrap; padding-bottom: 6px; border-bottom: .5px solid var(--border-soft); }
.date-pair { display: flex; align-items: center; gap: 6px; flex: 1 0 100%; font-size: 12px; color: var(--muted); }
.date-pair input { flex: 1; height: 34px; }
.list-row .w-full { flex: 1 0 100%; }
textarea.bound-textarea { width: 100%; padding: 8px 10px; resize: vertical; font: inherit; border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface); }
textarea.bound-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.note-row textarea {
  flex: 1 0 100%; min-height: 52px; padding: 8px 10px; resize: vertical; font: inherit;
  border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface);
}
.note-row textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.col-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); margin: 0 2px; flex: none; }
.col-row.off input[type=text] { color: var(--muted); background: var(--surface-2); }
.col-row .move { display: inline-flex; }
.col-row .move .icon-btn { width: 22px; }
.ch-preview { width: 26px; height: 26px; flex: none; display: grid; place-items: center; }
.ch-preview .ch-icon { width: 24px; height: 24px; }

/* Workspace toolbar */
.ws-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 12px 20px;
  border-bottom: .5px solid var(--border);
  background: var(--bar-bg);
  -webkit-backdrop-filter: var(--bar-filter); backdrop-filter: var(--bar-filter);
}
.ws-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--fill); color: var(--text-2);
}
.chip.ok { background: var(--alert-success-bg); color: var(--alert-success-text); }
.chip.warn { background: var(--alert-warning-bg); color: var(--alert-warning-text); cursor: help; }
.zoom { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.zoom select { height: 32px; width: auto; border-radius: 999px; padding: 0 10px; background: var(--fill); border-color: transparent; }

/* Canvas & paper preview (the paper is always a white page, in dark mode too) */
.canvas { flex: 1; overflow: auto; padding: 32px 48px 40px; }
.paper-wrap { margin: 0 auto; position: relative; }
.paper {
  --paper-w: 297mm; --paper-h: 210mm; --margin: 8mm;
  width: var(--paper-w);
  min-height: var(--paper-h);
  padding: var(--margin);
  background: #fff;
  color-scheme: light;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08), 0 14px 40px rgba(0, 0, 0, .12);
  border-radius: 4px;
  transform-origin: top left;
  position: absolute; top: 0; left: 0;
}
.canvas-tip { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.canvas-note { text-align: center; color: var(--muted); font-size: 12.5px; margin: 6px auto 0; max-width: 640px; }
.page-guides { position: absolute; inset: 0; pointer-events: none; }
.page-guide {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px dashed var(--warning);
}
.page-guide span {
  position: absolute; right: 8px; top: -11px;
  background: var(--warning); color: #fff; font: 600 11px/20px var(--font);
  padding: 0 8px; border-radius: 999px;
}

/* Row handle */
.row-handle {
  position: fixed; z-index: 20;
  width: 18px; height: 26px; padding: 0;
  display: grid; place-items: center;
  border: .5px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12); cursor: pointer;
}
.row-handle:hover { color: var(--primary); background: var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.row-handle svg { fill: currentColor; stroke: none; width: 14px; height: 14px; }

/* Popover & menus: rounded panels, as iOS menus are */
.popover {
  position: fixed; z-index: 30;
  min-width: 220px; max-width: 300px;
  padding: 12px;
  background: var(--surface);
  border: .5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.pop-title { font-weight: 700; font-size: 14px; }
.pop-sub { font-weight: 500; color: var(--muted); margin-left: 4px; }
.popover:has(.days) { max-width: 340px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 0; border: 0; border-radius: 10px;
  background: var(--fill); cursor: pointer; font-size: 11.5px; line-height: 1.2;
}
.day b { font-weight: 600; }
.day span { color: var(--muted); }
.day:hover { background: var(--fill-strong); }
.day.on { background: var(--primary); color: #fff; }
.day.on span { color: #fff; }
.day:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pop-actions { display: flex; justify-content: space-between; }
.choice-list { display: flex; flex-direction: column; gap: 2px; }
.choice {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; cursor: pointer;
}
.choice:hover { background: var(--hover); }
.choice.on { background: var(--tint-fill); color: var(--primary); font-weight: 600; }
.choice .ch-icon { width: 24px; height: 24px; }
.choice .ch { display: contents; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin: 0 5px; }
.dot.none { border: 2px dashed var(--input-border); }
.dot.person { background: var(--tint-fill); box-shadow: inset 0 0 0 2px var(--primary); }
.inline-add { display: flex; gap: 6px; }
.inline-add input { flex: 1; }
.inline-add .btn { height: 38px; }
.choice-list .menu-label { padding: 8px 8px 2px; }
.menu { display: flex; flex-direction: column; margin: -4px; }
.menu button:not(.swatch) {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; cursor: pointer; font-size: 14px;
}
.menu button:not(.swatch):hover:not(:disabled) { background: var(--hover); }
.menu button:disabled { opacity: .4; cursor: default; }
.menu button small { color: var(--muted); margin-left: auto; font-size: 12px; }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: var(--alert-danger-bg) !important; }
.menu svg { width: 16px; height: 16px; color: var(--muted); }
.menu .danger svg { color: var(--danger); }
.menu-sep { height: .5px; background: var(--border); margin: 6px 4px; }
.menu-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 10px 6px; text-transform: uppercase; letter-spacing: .04em; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 4px; }
.swatch {
  height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; font-size: 12px; font-weight: 600; color: #1d1d1f;
}
.swatch.none { background: var(--surface); border-style: dashed; border-color: var(--input-border); color: var(--text-2); }
.swatch.on { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .35);
  display: grid; place-items: center;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(460px, calc(100vw - 32px));
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 22px 22px 16px;
}
.modal h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; }
.modal-body { color: var(--text-2); }
.modal-body p { margin: 0 0 8px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--toast-bg); color: #fff; padding: 11px 18px; border-radius: 999px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow); font-size: 14px; max-width: 520px;
  animation: toast-in .2s ease-out;
  transition: opacity .3s, transform .3s;
}
.toast.error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

[hidden] { display: none !important; }

/* ================================================================ Program document */
.sheet {
  color-scheme: light;
  --fs: 10pt;
  --hfs: 11pt;
  width: calc(var(--paper-w) - 2 * var(--margin));
  height: calc(var(--paper-h) - 2 * var(--margin));
  display: flex; flex-direction: column;
  font-family: var(--doc-font, 'Nunito', Arial, sans-serif);
  font-size: var(--fs);
  color: #1d1d1f;
  overflow: visible;
}
.sheet.multi { height: auto; }

.doc-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4mm;
  font-size: var(--hfs);
  margin-bottom: 3mm;
}
.doc-logo { height: 21mm; min-width: 16mm; display: flex; align-items: center; }
.doc-logo img { max-height: 21mm; max-width: 40mm; object-fit: contain; }
.doc-logo .logo-glyph { font-size: 17mm; line-height: 1; }
.doc-titles { text-align: center; }
.doc-group { font-size: 2.05em; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.doc-group sup { font-size: .55em; }
.doc-title { font-size: 1.55em; font-weight: 700; color: var(--title); margin-top: .15em; line-height: 1.15; }
.doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1mm; }
.doc-leaders { font-size: .86em; line-height: 1.3; }
.doc-leaders-label { font-weight: 800; color: var(--title); }
.doc-leaders-grid { display: grid; column-gap: 2.2mm; row-gap: 0; }
.doc-leaders .l-name { font-weight: 700; }
.doc-leaders .l-phone { white-space: nowrap; margin-right: 3mm; }
.doc-version { font-size: .72em; color: #555; }

.doc-legend { display: flex; justify-content: flex-end; gap: 1.5mm; margin: -1mm 0 1.6mm; font-size: max(7pt, calc(var(--fs) * .85)); }
.doc-legend span { padding: .2em .9em; border: .5pt solid rgba(0, 0, 0, .35); font-weight: 600; }
.doc-side-row { display: flex; align-items: flex-start; gap: 4mm; }
/* Beside the leaders: a two-column grid at the heading's own text size. */
.doc-legend.beside {
  display: grid; grid-template-columns: repeat(2, auto); gap: 1.2mm;
  margin: 0; font-size: .7em; align-self: center;
}
.doc-legend.beside span { text-align: center; white-space: nowrap; }
/* Heading note (top right, like the Joey program), or under the heading when there's no room */
.doc-note { max-width: 62mm; font-size: .66em; line-height: 1.3; white-space: pre-line; color: #333; }
.doc-strip { display: flex; align-items: flex-start; justify-content: space-between; gap: 5mm; }
.doc-strip:empty { display: none; }
.doc-note.below { max-width: none; flex: 1; margin: -1mm 0 1.6mm; font-size: max(7pt, calc(var(--hfs) * .66)); }
.doc-strip .doc-legend { margin-left: auto; }
/* A picked cell's own style (bold, italic, colour: cellHTML), over its contents' usual look */
.prog td.fs-c, .prog td.fs-c *:not(.ph) { color: var(--fsc) !important; }
.prog td.fs-b, .prog td.fs-b *:not(.ph) { font-weight: 800 !important; }
.prog td.fs-nb, .prog td.fs-nb *:not(.ph) { font-weight: 400 !important; }
.prog td.fs-i, .prog td.fs-i *:not(.ph) { font-style: italic !important; }
.prog td.fs-ni, .prog td.fs-ni *:not(.ph) { font-style: normal !important; }

/*
 * Grid lines are drawn in a layer above every cell background, not as cell borders.
 * Print previews are rendered at low resolution: a thin border's edge pixels get blended,
 * and the next cell's background then paints over them, so lines randomly vanish. Each cell
 * draws its right and bottom line with pseudo-elements (z-index 1, so after all backgrounds),
 * centred on the boundary. The outer left edge is the table's own border and the top edge is the
 * heading cells' top border, so nothing can cover them, they're the same solid line as the rest
 * (the app-made PDF drew the old inset shadows thin and soft), and the top edge repeats with
 * the heading on every printed page.
 */
.prog {
  --line: 1pt;
  --line-color: #2b2b2b;
  width: 100%; table-layout: fixed; font-size: var(--fs);
  border-collapse: separate; border-spacing: 0;
  border: 0; border-left: var(--line) solid var(--line-color);
}
.prog th, .prog td {
  border: 0;
  position: relative;
  padding: .28em .4em;
  vertical-align: middle;
  line-height: 1.22;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
.prog [data-align=left] { text-align: left; }
.prog [data-align=right] { text-align: right; }
.prog [data-align=center] { text-align: center; }
/* Drag between headings to resize columns (screen only) */
.prog .col-grip {
  position: absolute; top: 0; bottom: 0; right: -6px; width: 12px; z-index: 3;
  cursor: col-resize; touch-action: none;
}
.prog .col-grip::after {
  content: ''; position: absolute; top: 15%; bottom: 15%; left: 5px; width: 2px; border-radius: 2px;
  background: transparent; transition: background .12s;
}
.prog th:hover .col-grip::after { background: rgba(0, 122, 255, .35); }
.prog .col-grip:hover::after, .prog .col-grip.active::after { background: var(--primary); top: 0; bottom: 0; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }
.sheet.capture .col-grip { display: none; }
@media print { .prog .col-grip { display: none; } }
body.mobile .prog .col-grip { display: none; }
.prog thead tr:first-child th { border-top: var(--line) solid var(--line-color); }
.prog th::after, .prog td::after,
.prog th::before, .prog td::before {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  background: var(--line-color);
}
.prog th::after, .prog td::after {            /* right edge */
  top: calc(var(--line) / -2); bottom: calc(var(--line) / -2);
  right: calc(var(--line) / -2); width: var(--line);
}
.prog th::before, .prog td::before {          /* bottom edge */
  left: calc(var(--line) / -2); right: calc(var(--line) / -2);
  bottom: calc(var(--line) / -2); height: var(--line);
}
.prog thead th {
  background: var(--head-bg); color: var(--head-fg);
  font-weight: 800; line-height: 1.15; padding: .4em .3em;
}
.prog thead { display: table-header-group; }
.prog tr { break-inside: avoid; page-break-inside: avoid; }
.prog .c-week { font-weight: 800; }
.prog .c-week .wk, .prog th .th-l { display: inline-block; }
.prog .c-date { white-space: pre-line; }
.prog .c-date .dt { white-space: pre-line; } /* "Tue 2 Feb" may wrap after the weekday only */
.prog .c-activity .ed { font-weight: 600; }
.prog .ed {
  white-space: pre-wrap;
  /* Editable text gets break-word from the browser; words must never break. */
  overflow-wrap: normal !important;
  word-break: normal;
  line-break: auto;
  outline: none;
  min-height: 1.2em;
  border-radius: 2px;
}
/* Placeholders sit on top so they never change the layout (which must match the printout). */
.prog .ed { position: relative; }
.prog .ed:empty::before {
  content: attr(data-ph); color: #b3b3b3; font-weight: 400; font-style: italic;
  position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* While measuring column needs, contents shrink to their longest unbreakable piece. */
.sheet.measuring .prog td > *, .sheet.measuring .prog th > * { width: min-content !important; max-width: none !important; display: inline-block; }
.sheet.measure-oneline.weeks-oneline .prog .wk,
.sheet.measure-oneline.dates-oneline .prog .dt { white-space: pre !important; }
.prog .patrol { font-weight: 700; display: inline-block; max-width: 100%; }
.prog .pick { display: inline-block; max-width: 100%; }
/* Screen-only prompt in an empty picker cell: overlaid so it never changes the layout. */
.prog .c-leader > .ph, .prog .c-uniform > .ph {
  position: absolute; left: .4em; right: .4em; top: 50%; transform: translateY(-50%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.prog .ch { display: inline-flex; flex-direction: column; align-items: center; gap: .1em; vertical-align: middle; }
.prog td.c-challenge { padding: .1em .15em; }
.prog .ch-icon { width: 3em; height: 3em; max-width: 100%; display: block; object-fit: contain; }
.prog .ch-icon.ch-named { width: 3.9em; height: 3.9em; }
/*
 * An icon on its own fills the height the rest of the row gives it (up to 3em), so choosing a
 * challenge area never makes the row taller. When the column is measured it counts as 2em wide.
 */
.prog td.c-challenge .ch.fill {
  position: absolute; inset: .12em; display: flex; align-items: center; justify-content: center;
}
.prog td.c-challenge .ch.fill .ch-icon { width: auto; height: 100%; max-height: 3em; max-width: 100%; }
.prog td.c-challenge .ch.fill .ch-icon.ch-named { max-height: 3.9em; }
.sheet.measuring .prog td.c-challenge .ch.fill { position: static; }
.sheet.measuring .prog td.c-challenge .ch.fill .ch-icon { width: 2em; height: 2em; }
.prog .ch-label { font-size: .82em; font-weight: 700; line-height: 1.1; }
.prog .ph, .doc-group .ph { color: #b3b3b3; font-style: italic; }
.empty-row td { padding: 8mm; color: #888; font-style: italic; }
/* Weeks with no section night */
.prog tr.no-meeting td.c-date { background: #f3f3f3; }
.prog tr.no-meeting td.c-break {
  background: repeating-linear-gradient(135deg, #f3f3f3 0 7px, #e9e9e9 7px 14px);
  color: #555;
}
.prog tr.no-meeting td.c-break .ed { font-weight: 700; font-style: italic; letter-spacing: .01em; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Programs menu */
.popover:has(.prog-list) { min-width: 320px; max-width: 380px; }
.prog-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 0 -4px; }
.prog-item { display: flex; align-items: center; gap: 4px; border-radius: 10px; padding-right: 4px; }
.prog-item:hover { background: var(--hover); }
.prog-item.on { background: var(--tint-fill); }
.prog-open {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 7px 10px; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.prog-open b { font-weight: 600; font-size: 13.5px; }
.prog-open span { font-size: 12px; color: var(--muted); }
.prog-open em { font-style: normal; color: var(--primary); font-weight: 600; }
.prog-open:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px; }
/* Under the table: other dates and notes (like the Joey program) */
.doc-extras {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 5mm; align-items: start;
  margin-top: 3mm; font-size: max(7pt, calc(var(--fs) * .95)); line-height: 1.3;
}
.doc-extras.single { grid-template-columns: minmax(0, 1fr); }
.doc-extras-title { font-weight: 800; margin-bottom: .35em; }
.doc-date { margin: .15em 0; }
.doc-date b { font-weight: 700; }
.doc-notes { border: 1pt solid #2b2b2b; padding: .5em .8em; font-style: italic; }
.doc-notes p { margin: .2em 0 .45em; white-space: pre-line; }
.doc-notes p:last-child { margin-bottom: .1em; }
.doc-notes b { font-weight: 800; }
.doc-footer { margin-top: 2mm; font-size: max(7pt, calc(var(--fs) * .85)); color: #444; }

/* Screen-only editing affordances */
@media screen {
  .prog { --line: 1px; }  /* crisp on screen; 1pt in print */
  .prog .clickable { cursor: pointer; }
  .prog td:hover { outline: 1.5px solid rgba(0, 122, 255, .35); outline-offset: -2px; }
  .prog td:focus-within { outline: 2px solid var(--primary); outline-offset: -2px; }
  .prog .ed { cursor: text; }
  .prog tr.editing td { background-image: linear-gradient(rgba(0, 122, 255, .05), rgba(0, 122, 255, .05)); }
}

/* ================================================================ Print */
/* While the app draws the sheet into a PDF: no screen-only prompts, plain week-off shading. */
.sheet.capture .prog .ph, .sheet.capture .prog .ed:empty::before, .sheet.capture .doc-group .ph { display: none !important; }
.sheet.capture .prog tr.no-meeting td.c-break { background: #ececec; }

@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  .appbar, .sidebar, .directory, .ws-toolbar, .canvas-tip, .canvas-note, .row-handle, .popover, .modal-backdrop, .toasts, .page-guides { display: none !important; }
  .layout, .workspace, .ws-body, .canvas { display: block; height: auto; overflow: visible; padding: 0 !important; }
  .paper-wrap { width: auto !important; height: auto !important; margin: 0; }
  .paper { position: static; transform: none !important; box-shadow: none; padding: 0; min-height: 0; width: auto; border-radius: 0; }
  .sheet:not(.multi) { height: calc(var(--paper-h) - 2 * var(--margin) - 1mm); overflow: hidden; }
  .prog .ed:empty::before, .prog .ph, .doc-group .ph { content: none; display: none; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ---------------------------------------------------------------- first-visit wizard and tour (js/welcome.js) */
.wz-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.wz {
  width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 22px;
}
.wz h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.015em; }
.wz-body { color: var(--text-2); }
.wz-body p { margin: 0 0 14px; }
.wz-body .field { margin: 0; }
.wz-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.wz-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--border); }
.wz-dots span.on, .wz-dots span.done { background: var(--primary); }
.wz-dots span.done { opacity: .45; }
.wz-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.wz-section {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.wz-section img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.wz-section:hover { border-color: var(--sc); }
.wz-section.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--tint-fill); }
.wz-leaders { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.wz-leader { display: flex; align-items: center; gap: 6px; }
.wz-leader input {
  flex: 1; min-width: 0; height: 40px; padding: 0 10px; font: inherit;
  border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.wz-leader input[data-f="phone"] { flex: 1.3; }
.wz-error { min-height: 1.3em; margin: 10px 0 0; color: var(--danger, #d70015); font-size: 14px; }
.wz-error:empty { min-height: 0; margin: 0; }
.wz-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.wz-actions .btn-primary { margin-left: auto; min-width: 96px; justify-content: center; }

/* The page is dimmed and can't be used, except (on a step that asks for it) what the spotlight shows */
.tour-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.tour-layer > * { pointer-events: auto; }
.tour-layer .tour-spot { pointer-events: none; }
/* Takes every press on a step that only shows something; a step that asks for a click hides it, so the
   spotlit part (through the hole in the dimming) can be used */
.tour-block { position: fixed; inset: 0; }
.tour-layer.interactive .tour-block { display: none; }
.tour-spot {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--primary);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}
/* Dims everything but the spot: a full-screen layer with the spot cut out of it */
.tour-dim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); }
.tour-tip {
  position: fixed; padding: 14px 16px 12px;
  background: var(--surface); color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: left .25s ease, top .25s ease;
}
.tour-tip h3 { margin: 2px 0 4px; font-size: 16px; }
.tour-tip p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.tour-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.tour-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tour-gap { flex: 1; }
.tour-arrow { position: absolute; width: 12px; height: 12px; background: var(--surface); transform: rotate(45deg); margin: -6px; }
.tour-tip[data-side="below"] .tour-arrow { top: 0; }
.tour-tip[data-side="above"] .tour-arrow { top: 100%; }
.tour-tip[data-side="right"] .tour-arrow { left: 0; }
.tour-tip[data-side="left"] .tour-arrow { left: 100%; }
.tour-tip[data-side="inside"] .tour-arrow { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-tip { transition: none; } }
@media print { .wz-backdrop, .tour-layer { display: none !important; } }

/* Whole weeks (js/app.js "whole weeks"): an empty week, and adding an activity on a day of a week */
.prog tr.empty-week td { background: #fafafa; }
.prog td.c-empty-week { text-align: center; }
.prog .ph.wk-empty-add {
  padding: .35em .9em; border: 1px dashed #9dbcf0; border-radius: .5em; background: #fff;
  color: #0060df; font: inherit; font-style: normal; font-weight: 600; cursor: pointer;
}
.prog .ph.wk-empty-add:hover { background: #eef4ff; }
.prog .ph.wk-add {
  /* Centred on the table's left edge, matching the row's ⋮ on its right edge */
  position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; place-items: center; width: 18px; height: 26px; padding: 0;
  border: .5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12); cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.prog .ph.wk-add svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.prog .ph.wk-add:hover { box-shadow: 0 0 0 2px var(--primary); }
/* Shows when the Week cell is hovered */
.prog td.c-week:hover .ph.wk-add, .prog .ph.wk-add:focus-visible, .prog .ph.wk-add.tour-show { opacity: 1; }
@media (hover: none) { .prog .ph.wk-add { opacity: .85; } }
.day.meet b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wz-term { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.wz-term .field { margin: 0; }
.wz-term .wz-wide { grid-column: 1 / -1; }
.wz-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.wz-dates[hidden] { display: none; }
.wz-summary { margin: 12px 0 0 !important; color: var(--text-2); }

/* Time picker (openTimePopover) */
.popover:has(#tStart) { max-width: 340px; }
.prog td.c-time .ed { cursor: pointer; }
#tLen { margin: -2px 0 8px; }
#tLen[hidden] { display: none; }

/* Text formatting (js/rich.js): the toolbar that hovers above a field being edited, and the formats */
.fmt-bar {
  position: fixed; z-index: 35; display: flex; gap: 2px; padding: 4px;
  background: var(--surface); border: .5px solid var(--border); border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.fmt-bar[hidden] { display: none; }
.fmt-bar button {
  display: grid; place-items: center; width: 34px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--text);
  font: 600 15px/1 system-ui, -apple-system, sans-serif; cursor: pointer;
}
.fmt-bar button:hover { background: var(--fill); }
.fmt-bar button[aria-pressed="true"] { background: var(--tint-fill); color: var(--primary); }
.fmt-bar button svg { width: 17px; height: 17px; }
.prog .ed b, .m-rich b { font-weight: 800; }
/* Formatted text's colours (TEXT_COLOURS in js/rich.js) */
.prog .ed .r, .m-rich .r { color: #d0021b; }
.prog .ed .co, .m-rich .co { color: #d9480f; }
.prog .ed .cg, .m-rich .cg { color: #1e8e3e; }
.prog .ed .cb, .m-rich .cb { color: #0060df; }
.prog .ed .cp, .m-rich .cp { color: #6f42c1; }
@media print { .fmt-bar { display: none !important; } }
.fmt-bar { align-items: center; }
.fs-sep { width: 1px; height: 20px; margin: 0 3px; background: var(--border); }
.fmt-bar .fs-swatch { width: 30px; }
.fmt-bar .fs-swatch span { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.fmt-bar .fs-swatch[aria-pressed="true"] { background: var(--tint-fill); }
.fmt-bar .fs-swatch[aria-pressed="true"] span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

/* Clicking a Week cell brings up its style toolbar */
@media screen { .prog td.c-week[data-week] { cursor: pointer; } }

/* Anywhere in a typed cell puts the cursor in its text (see the sheet's mousedown in js/app.js) */
@media screen { .prog td:has(> .ed[contenteditable="true"]) { cursor: text; } }
/* Narrow screens: slimmer buttons so a whole toolbar fits; anything narrower still wraps onto two rows */
.fmt-bar { flex-wrap: wrap; max-width: calc(100vw - 16px); }
@media (max-width: 440px) {
  .fmt-bar { gap: 0; padding: 3px; }
  .fmt-bar button { width: 30px; }
  .fmt-bar .fs-swatch { width: 27px; }
  .fmt-bar .fs-sep { margin: 0 2px; }
}

/* A tall menu scrolls rather than running off the screen */
.popover { max-height: calc(100vh - 24px); overflow-y: auto; }

/* The ? beside Export: an icon on its own */
.btn-help { width: 36px; padding: 0; justify-content: center; }
.btn-help svg { margin: 0; }

.wz-example { margin: 12px 0 0; font-size: 14px; color: var(--text-2); align-items: flex-start; }
.wz-example input { margin-top: 2px; }

/* 2. More settings: the less-used sections, closed until opened */
.more-settings { display: flex; flex-direction: column; gap: 12px; }
.more-settings > summary {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 64px 12px 16px; cursor: pointer; list-style: none; user-select: none;
  border-radius: var(--radius-lg); background: var(--fill); font-weight: 600; font-size: 15px;
}
.more-settings > summary::-webkit-details-marker { display: none; }
/* Show / Hide on the right, centred, its right edge in line with the cards' chevrons */
.more-settings > summary::after {
  content: 'Show'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-weight: 600; font-size: 14px;
}
.more-settings[open] > summary::after { content: 'Hide'; }
.more-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.more-settings[open] { gap: 12px; }

/* 4. 'All changes saved' by Undo */
.save-state { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.save-state svg { width: 15px; height: 15px; color: var(--alert-success-text, #248a3d); }
.save-state[data-state="saving"] svg { opacity: .3; }
.save-state[data-state="failed"] { color: var(--danger); }
.save-state[data-state="failed"] svg { display: none; }

/* 5. Help: questions that open to their answers */
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
.help-list { display: flex; flex-direction: column; gap: 2px; }
.help-list details { border-bottom: .5px solid var(--border-soft); }
.help-list summary { padding: 9px 2px; cursor: pointer; font-weight: 600; color: var(--text); }
.help-list details p { margin: 0 2px 10px; }
@media print { .prog .ph.wk-add, .prog .ph.wk-empty-add { display: none !important; } }

/* ---- accounts (js/account.js) ---- */
.save-state[data-state="local"] { color: var(--text-2); }
.save-state[data-state="local"] svg { display: none; }
.save-state span { overflow: hidden; text-overflow: ellipsis; }
.btn-signin { margin-left: 4px; }
.btn-account { width: 36px; padding: 0; justify-content: center; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
}
.pop-email { margin: 2px 0 0; font-size: 12.5px; overflow-wrap: anywhere; }
.prog-signin {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: var(--tint-fill); font-size: 12.5px; color: var(--text-2);
}
.prog-signin span { flex: 1; }
.conflict { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.conflict-side { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 13px; }
.conflict-side h3 { margin: 0 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.conflict-side b { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.modal-body .hint { margin: 0; }
.modal-body .field { margin-top: 10px; }
.help-support { margin-top: 12px !important; }
/* Sign in with Microsoft, in Microsoft's own look for the button: its logo, on white with a grey edge */
.btn-ms { width: 100%; justify-content: center; gap: 10px; height: 44px; margin: 8px 0 2px; border: 1px solid #8c8c8c; border-radius: var(--radius);
  background: #fff; color: #5e5e5e; font-weight: 600; font-family: 'Segoe UI', var(--font); }
.btn-ms:hover { background: #f3f3f3; }
.ms-logo { width: 21px; height: 21px; flex: none; }
.or { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: .5px; background: var(--border); }
@media (max-width: 520px) { .conflict { grid-template-columns: 1fr; } }
