/* SGWS Safety Talks 2027, program office. Industrial and quiet: warm paper, ink, one red. */
:root {
  --sg: #9b1b1f; --sg-deep: #7a1417; --sg-tint: #f6e9e8; --sg-glow: rgba(155, 27, 31, .18);
  --paper: #f4f1ec; --card: #fffdfa; --ink: #18191a; --ink2: #3d4043; --ink3: #74797e; --rule: #e2ddd5; --rule2: #d3ccc2;
  --ok: #1e6e47; --ok-tint: #e6f2ea; --amber: #a3620f; --amber-tint: #faf0de;
  --d: "Archivo", "Helvetica Neue", sans-serif; --b: "Instrument Sans", "Helvetica Neue", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --lift: 0 1px 1px rgba(60, 30, 20, .05), 0 2px 6px -2px rgba(60, 30, 20, .08);
  --float: 0 2px 4px rgba(60, 30, 20, .06), 0 22px 44px -16px rgba(60, 30, 20, .28);
  --spring: cubic-bezier(.2, .9, .25, 1.1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink2); font: 15px/1.55 var(--b); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(155, 27, 31, .07), transparent 60%), radial-gradient(900px 400px at -10% 110%, rgba(120, 90, 60, .07), transparent 60%); }
/* Great North (Canada), switched in the top bar: pine green from its seal's globe takes the red's place. */
body.gn { --sg: #006953; --sg-deep: #004d3d; --sg-tint: #e3efea; --sg-glow: rgba(0, 105, 83, .18); }
body.gn::before { background: radial-gradient(1200px 500px at 85% -10%, rgba(0, 105, 83, .08), transparent 60%), radial-gradient(900px 400px at -10% 110%, rgba(120, 90, 60, .07), transparent 60%); }
.top .brandseg button { font-size: 12.5px; }
.top .brandseg .on { color: var(--sg); }
@media (max-width: 720px) { .top .brand span { display: none; }
  /* With the program toggle the bar no longer fits one phone row: it wraps, the toggle on its own line. */
  .top .in { flex-wrap: wrap; height: auto; padding-top: var(--s2); padding-bottom: var(--s2); row-gap: var(--s2); gap: var(--s3); }
  .top .brandseg { order: 3; flex: 1 0 100%; } .top .brandseg button { flex: 1; justify-content: center; } .top .who > span:not(.demo-pill) { display: none; } }
a { color: var(--sg); }
h1, h2, h3 { font-family: var(--d); color: var(--ink); margin: 0; }
:focus-visible { outline: 3px solid var(--sg); outline-offset: 2px; border-radius: 4px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 241, 236, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .in { max-width: 1440px; margin: 0 auto; padding: 0 var(--s5); height: 56px; display: flex; align-items: center; gap: var(--s5); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); font: 700 15px var(--d); font-stretch: 85%; letter-spacing: .01em; text-transform: uppercase; }
.brand i { width: 26px; height: 26px; border-radius: 5px; background: var(--sg); display: grid; place-items: center; color: #fff; font: 800 13px var(--d); font-style: normal; }
.nav { display: flex; gap: var(--s1); }
.nav a { text-decoration: none; color: var(--ink2); font-weight: 500; padding: 7px 12px; border-radius: 6px; transition: background-color .15s, color .15s; }
.nav a:hover { background: rgba(0, 0, 0, .05); }
.nav a.on { color: var(--ink); background: var(--card); box-shadow: var(--lift); }
.who { margin-left: auto; display: flex; align-items: center; gap: var(--s3); font-size: 13px; color: var(--ink3); }
.who a { color: var(--ink3); }
.demo-pill { background: var(--amber-tint); color: var(--amber); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }

main.wrap { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); }

/* buttons */
.btn { font: 600 14px var(--b); border: 1px solid var(--rule2); background: var(--card); color: var(--ink); border-radius: 6px; padding: 9px 14px; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .15s var(--spring), background-color .15s, border-color .15s, opacity .15s; }
.btn:hover { border-color: var(--ink3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--sg); border-color: var(--sg); color: #fff; box-shadow: 0 1px 1px rgba(122, 20, 23, .2), 0 6px 14px -6px rgba(122, 20, 23, .5); }
.btn.primary:hover { background: var(--sg-deep); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.quiet:hover { background: rgba(0, 0, 0, .05); }
.btn[disabled] { opacity: .5; cursor: default; }
.seg { display: inline-flex; background: rgba(0, 0, 0, .05); border-radius: 7px; padding: 3px; gap: 2px; }
.seg a, .seg button { font: 600 13px var(--b); padding: 6px 12px; border-radius: 5px; color: var(--ink2); text-decoration: none; border: 0; background: none; cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; transition: background-color .15s, color .15s; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .on { background: var(--card); color: var(--ink); box-shadow: var(--lift); }
.seg .off { opacity: .45; }

/* ---------- calendar ---------- */
.yearhead { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s6); align-items: end; margin-bottom: var(--s6); }
.year { font: 800 128px/.8 var(--d); font-stretch: 75%; letter-spacing: -.03em; color: var(--ink); }
.year span { color: var(--sg); }
.yearhead h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.yearhead p { margin: 6px 0 0; color: var(--ink3); max-width: 520px; }
.stats { display: flex; gap: var(--s5); }
.stat b { display: block; font: 700 34px/1 var(--d); font-stretch: 80%; color: var(--ink); letter-spacing: -.02em; }
.stat small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s5); padding: var(--s3); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); }
.toolbar .hint { color: var(--ink3); font-size: 13px; margin-left: auto; }
.toolbar input[type=search] { font: inherit; border: 1px solid var(--rule2); border-radius: 6px; padding: 8px 12px; min-height: 40px; min-width: 220px; background: #fff; }
.month { display: grid; grid-template-columns: 132px 1fr; gap: var(--s5); padding: var(--s5) 0; border-top: 1px solid var(--rule); }
.month h2 { font: 700 13px var(--d); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); position: sticky; top: 76px; align-self: start; }
.month h2 b { display: block; font: 800 44px/1 var(--d); font-stretch: 75%; letter-spacing: -.02em; color: var(--ink); margin-bottom: 2px; }
.weeks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4); }
.tile { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); overflow: hidden; cursor: grab; display: flex; flex-direction: column;
  transition: transform .25s var(--spring), box-shadow .2s, border-color .2s, opacity .2s; text-decoration: none; color: inherit; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--float); }
.tile:active { cursor: grabbing; }
.tile.dragging { opacity: .35; transform: scale(.97); }
.tile.target { border-color: var(--sg); box-shadow: 0 0 0 3px var(--sg-glow), var(--float); transform: translateY(-2px); }
.tile.dim { opacity: .28; }
.tile .pic { aspect-ratio: 5 / 4; background: repeating-linear-gradient(-45deg, #efebe5 0 10px, #f6f3ee 10px 20px); position: relative; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .pic:has(img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 55%); }
.tile .pic:not(:has(img)) .wk { color: var(--ink); text-shadow: none; }
.tile .pic:not(:has(img)) .dates { color: var(--ink3); }
.tile .wk { position: absolute; left: 10px; bottom: 6px; z-index: 1; font: 800 42px/1 var(--d); font-stretch: 75%; color: #fff; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.tile .dates { position: absolute; right: 10px; bottom: 10px; z-index: 1; color: rgba(255, 255, 255, .92); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.tile .noimg { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.tile .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile h3 { font: 650 15px/1.25 var(--d); letter-spacing: -.005em; }
.tile .meta { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.chip { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: rgba(0, 0, 0, .05); color: var(--ink3); }
.chip.review { background: var(--amber-tint); color: var(--amber); }
.chip.approved { background: var(--ok-tint); color: var(--ok); }
.langs { margin-left: auto; display: flex; gap: 3px; }
.langs span { font-size: 10px; font-weight: 700; padding: 2px 4px; border-radius: 3px; border: 1px solid var(--rule2); color: var(--ink3); }
.langs span.has { background: var(--ink); border-color: var(--ink); color: #fff; }
.tile .moved { position: absolute; top: 10px; right: 10px; z-index: 1; background: var(--sg); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 4px; letter-spacing: .04em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 6px; box-shadow: var(--float); display: flex; gap: var(--s4); align-items: center; font-size: 14px; transition: transform .3s var(--spring), opacity .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast button { background: none; border: 0; color: #f3b9b9; font: 600 14px var(--b); cursor: pointer; padding: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.month { animation: rise .5s var(--spring) both; }

/* ---------- editor ---------- */
.edit { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: var(--s5); align-items: start; }
.edhead { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.edhead .wkbig { font: 800 64px/.85 var(--d); font-stretch: 75%; color: var(--sg); letter-spacing: -.02em; }
.edhead h1 { font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.edhead p { margin: 2px 0 0; color: var(--ink3); font-size: 13px; }
.edhead .acts { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); }
.form { padding: var(--s4); max-height: calc(100vh - 210px); overflow: auto; }
.grp { padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.grp:first-child { padding-top: 0; }
.grp > h2 { font: 700 12px var(--d); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); margin-bottom: var(--s3); }
.fld { display: block; margin-bottom: var(--s3); }
.fld > span { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.fld > span em { font-style: normal; font-weight: 500; color: var(--ink3); }
.fld > span em.over { color: var(--sg); font-weight: 700; }
.fld textarea, .fld input, .fld select { width: 100%; font: 14px/1.5 var(--b); color: var(--ink); border: 1px solid var(--rule2); border-radius: 6px; padding: 8px 10px; background: #fff; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.fld textarea:focus, .fld input:focus, .fld select:focus { outline: none; border-color: var(--sg); box-shadow: 0 0 0 3px var(--sg-glow); }
.sub2 { padding: var(--s3); border: 1px solid var(--rule); border-radius: 6px; margin-bottom: var(--s3); background: #fbf9f6; }
.sub2 > b { display: block; font: 700 12px var(--d); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-bottom: var(--s2); }
.opts { display: grid; gap: 6px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: center; }
.opt input[type=radio] { accent-color: var(--ok); width: 18px; height: 18px; }
.opt input[type=radio]:disabled { opacity: .6; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.slot { border: 1.5px dashed var(--rule2); border-radius: 6px; aspect-ratio: 4 / 5; position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; cursor: pointer; background: #fbf9f6; transition: border-color .15s, background-color .15s; }
.slot:hover, .slot.over { border-color: var(--sg); background: var(--sg-tint); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .lbl { position: relative; z-index: 1; font-size: 12.5px; color: var(--ink3); padding: var(--s3); }
.slot .lbl b { display: block; color: var(--ink); font: 700 13px var(--d); margin-bottom: 2px; }
.slot.has .lbl { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(24, 25, 26, .78); color: #fff; border-radius: 4px; padding: 6px 8px; font-size: 12px; text-align: left; }
.slot.has .lbl b { color: #fff; }
.slot .x { position: absolute; top: 6px; right: 6px; z-index: 2; }
.slot input { display: none; }
.prompt { font-size: 12.5px; color: var(--ink3); background: #fbf9f6; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; margin-top: var(--s2); }
.preview { position: sticky; top: 72px; padding: var(--s3); }
.preview .bar:not(:has(:not([hidden]))) { display: none; }
.preview .bar { display: flex; gap: var(--s2); align-items: center; margin-bottom: var(--s3); flex-wrap: wrap; }
.preview .bar .fitwarn { color: var(--sg); font-size: 13px; font-weight: 600; }
.stage { background: #e6e2dc; border-radius: 6px; height: calc(100vh - 200px); overflow: auto; padding: var(--s4); }
.stage iframe { border: 0; display: block; margin: 0 auto; transform-origin: top center; background: transparent; }
.savebar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--rule); padding: var(--s3) var(--s4); display: flex; gap: var(--s2); align-items: center; }
.savebar .state { font-size: 13px; color: var(--ink3); margin-right: auto; }
.savebar .state.dirty { color: var(--amber); font-weight: 600; }
.savebar .state.err { color: var(--sg); font-weight: 600; }
.versions { font-size: 13px; }
.versions li { margin-bottom: 4px; }

/* ---------- results ---------- */
table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; box-shadow: var(--lift); font-size: 14px; }
table.data th { text-align: left; font: 700 11px var(--d); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); padding: 10px 12px; background: #f9f6f1; border-bottom: 1px solid var(--rule); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--rule); }
table.data td.n { font-variant-numeric: tabular-nums; text-align: right; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.bars i { width: 8px; background: var(--sg); border-radius: 2px 2px 0 0; opacity: .85; }
.cols2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5); align-items: start; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 var(--s3); }
.section-h h2 { font-size: 20px; letter-spacing: -.01em; }
.empty-state { padding: var(--s6); text-align: center; color: var(--ink3); background: var(--card); border: 1px dashed var(--rule2); border-radius: 6px; }

/* ---------- print toolbar ---------- */
.printbar { position: sticky; top: 0; z-index: 5; display: flex; gap: var(--s3); align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px 16px; margin: -24px 0 24px; background: rgba(244, 241, 236, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); font: 14px var(--b); }
.printbar .back { text-decoration: none; color: var(--ink2); font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.printbar .back:hover { background: rgba(0, 0, 0, .05); }
.printnote { text-align: center; color: var(--amber); font: 600 14px var(--b); }

/* ---------- login ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; padding: var(--s4); }
.loginbox { position: relative; z-index: 1; width: 100%; max-width: 400px; }
.loginbox .mark { font: 800 96px/.8 var(--d); font-stretch: 75%; color: var(--ink); letter-spacing: -.03em; }
.loginbox .mark span { color: var(--sg); }
.loginbox h1 { font-size: 22px; margin: 12px 0 4px; }
.loginbox p { color: var(--ink3); margin: 0 0 var(--s5); }
.loginbox form { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s5); box-shadow: var(--float); }
.loginbox .btn { width: 100%; justify-content: center; min-height: 46px; }
.err-msg { color: var(--sg); font-weight: 600; font-size: 14px; margin: 0 0 var(--s3); }

@media (max-width: 1180px) { .weeks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .edit { grid-template-columns: 1fr; } .preview { position: static; } .form { max-height: none; } .cols2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .top .in { padding: 0 var(--s4); gap: var(--s3); } .brand span { display: none; }
  main.wrap { padding: var(--s5) var(--s4) var(--s7); }
  .yearhead { grid-template-columns: 1fr; gap: var(--s3); padding-top: var(--s3); } .year { font-size: 88px; }
  .month { grid-template-columns: 1fr; gap: var(--s3); } .month h2 { position: static; } .month h2 b { display: inline; font-size: 28px; margin-right: 8px; }
  .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .toolbar .hint { display: none; } .toolbar input[type=search] { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- tray: talks off the calendar ---------- */
.tray { border: 1.5px dashed var(--rule2); border-radius: 6px; padding: var(--s3) var(--s4); margin-bottom: var(--s5); background: rgba(255, 253, 250, .6); transition: border-color .15s, background-color .15s; }
.is-dragging .tray { border-color: var(--ink3); }
.tray.target { border-color: var(--sg); background: var(--sg-tint); }
.trayhead { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.trayhead h2 { font: 700 12px var(--d); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.trayhead span { font-size: 13px; color: var(--ink3); }
.traylist { display: flex; flex-wrap: wrap; gap: var(--s2); }
.traylist:not(:empty) { margin-top: var(--s3); }
.chiptalk { display: flex; align-items: center; gap: var(--s2); padding: 6px 10px 6px 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); text-decoration: none; color: var(--ink); cursor: grab; font-size: 13.5px; transition: transform .2s var(--spring), box-shadow .2s; }
.chiptalk:hover { transform: translateY(-1px); box-shadow: var(--float); }
.thumb { width: 34px; height: 34px; border-radius: 4px; overflow: hidden; flex: none; background: repeating-linear-gradient(-45deg, #efebe5 0 6px, #f6f3ee 6px 12px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chiptalk.dragging, .bar.dragging { opacity: .35; }
.chiptalk.dim, .bar.dim { opacity: .28; }

/* open week in the year view */
.tile.open { cursor: default; border-style: dashed; box-shadow: none; background: transparent; }
.tile.open:hover { transform: none; box-shadow: none; }
.tile.open .pic { background: transparent; }
.tile.open h3 { color: var(--ink3); }
.hint2 { margin: 0; font-size: 12.5px; color: var(--ink3); }

/* ---------- month view ---------- */
.mhead { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.mhead h2 { font: 800 40px/1 var(--d); font-stretch: 78%; letter-spacing: -.02em; min-width: 260px; text-align: center; }
.mhead .btn { font-size: 18px; min-width: 44px; justify-content: center; }
.mpills { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; background: rgba(0, 0, 0, .05); border-radius: 7px; padding: 3px; }
.mpills button { font: 600 12.5px var(--b); border: 0; background: none; padding: 6px 9px; border-radius: 5px; cursor: pointer; color: var(--ink2); min-height: 30px; }
.mpills button.on { background: var(--card); color: var(--ink); box-shadow: var(--lift); }
.mgrid { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); overflow: hidden; }
.dows, .mrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dows span { padding: 10px 12px; font: 700 11px var(--d); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); background: #f9f6f1; border-bottom: 1px solid var(--rule); }
.mrow { position: relative; min-height: 132px; border-bottom: 1px solid var(--rule); transition: background-color .15s; }
.mrow:last-child { border-bottom: 0; }
.mrow.target { background: var(--sg-tint); }
.day { border-right: 1px solid var(--rule); padding: 8px 10px; }
.day:last-of-type { border-right: 0; }
.day span { font: 600 13px var(--d); color: var(--ink2); font-variant-numeric: tabular-nums; }
.day.out span { color: #bdb6ad; }
.bar { position: absolute; left: 8px; right: 8px; bottom: 10px; display: flex; align-items: center; gap: var(--s3); padding: 8px 12px 8px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--rule2); box-shadow: var(--float); text-decoration: none; color: var(--ink); cursor: grab; transition: transform .2s var(--spring), box-shadow .2s; }
.bar:hover { transform: translateY(-1px); }
.bar .thumb { width: 48px; height: 48px; }
.bar .bwk { font: 800 22px/1 var(--d); font-stretch: 75%; color: var(--sg); white-space: nowrap; }
.bar b { font: 650 16px/1.2 var(--d); flex: 1; min-width: 0; }
.bar .langs { margin-left: 0; }
.bar.empty { justify-content: center; border-style: dashed; box-shadow: none; background: transparent; color: var(--ink3); cursor: default; font-size: 13.5px; min-height: 66px; }
.mrow.target .bar.empty { border-color: var(--sg); color: var(--sg); }
@media (max-width: 760px) {
  .mhead h2 { min-width: 0; font-size: 30px; } .mpills { margin-left: 0; }
  .mrow { min-height: 150px; } .day { padding: 6px; } .bar { flex-wrap: wrap; } .bar .chip, .bar .langs { display: none; }
}

/* ---------- calendar + tray column ---------- */
.calwrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s5); align-items: start; }
.calwrap .tray { position: sticky; top: 72px; margin: 0; max-height: calc(100vh - 92px); overflow: auto; }
.calwrap .trayhead { flex-direction: column; gap: 4px; }
.calwrap .traylist { flex-direction: column; flex-wrap: nowrap; }
.calwrap .traylist:empty { min-height: 160px; }
.calwrap .chiptalk { width: 100%; }
.calwrap .chiptalk b { flex: 1; min-width: 0; }

/* ---------- year overview: 12 months at once ---------- */
.ygrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.ycard { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); padding: var(--s3); display: flex; flex-direction: column; gap: 6px; }
.ycard h2 button { font: 800 22px/1 var(--d); font-stretch: 78%; letter-spacing: -.01em; color: var(--ink); background: none; border: 0; padding: 2px 0 6px; cursor: pointer; }
.ycard h2 button:hover { color: var(--sg); }
.yrow { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) 8px; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 5px; border: 1px solid transparent; text-decoration: none; color: inherit; cursor: grab; transition: background-color .15s, border-color .15s, transform .2s var(--spring); }
.yrow:hover { background: #f8f5f0; border-color: var(--rule); }
.yrow.target { border-color: var(--sg); background: var(--sg-tint); }
.yrow.dragging { opacity: .35; } .yrow.dim { opacity: .28; }
.yrow .thumb { width: 30px; height: 30px; }
.ywk { font: 800 15px/1 var(--d); font-stretch: 78%; color: var(--sg); font-variant-numeric: tabular-nums; }
.ytx { min-width: 0; line-height: 1.25; }
.ytx b { display: block; font: 600 13px/1.25 var(--b); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytx small { font-size: 11.5px; color: var(--ink3); }
.yrow.open { grid-template-columns: 22px minmax(0, 1fr); border: 1px dashed var(--rule2); cursor: default; }
.yrow.open b { color: var(--ink3); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule2); }
.dot.review { background: var(--amber); } .dot.approved { background: var(--ok); }
@media (max-width: 1400px) { .ygrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .calwrap { grid-template-columns: 1fr; } .calwrap .tray { position: static; max-height: none; order: -1; } .calwrap .traylist { flex-direction: row; flex-wrap: wrap; } .calwrap .chiptalk { width: auto; } .ygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ygrid { grid-template-columns: 1fr; } }

/* approve switch: review (editable) or approved (locked for sending) */
.approve { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 600 13.5px var(--b); color: var(--ink2); padding: 6px 12px 6px 6px; border: 1px solid var(--rule2); border-radius: 6px; background: var(--card); min-height: 40px; }
.approve input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.approve i { width: 34px; height: 20px; border-radius: 10px; background: var(--rule2); position: relative; transition: background-color .2s; }
.approve i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .25s var(--spring); }
.approve.on { border-color: var(--ok); color: var(--ok); background: var(--ok-tint); }
.approve.on i { background: var(--ok); }
.approve.on i::after { transform: translateX(14px); }
.approve:has(input:focus-visible) { outline: 3px solid var(--sg); outline-offset: 2px; }
body.locked .form textarea, body.locked .form input { background: #f6f3ee; color: var(--ink2); cursor: not-allowed; }
body.locked .slot { cursor: not-allowed; }
body.locked .slot .x { display: none; }

/* quiz results: each person's answers */
tr.ans td { padding-top: 0; }
tr.ans summary { display: flex; gap: 6px; align-items: center; cursor: pointer; list-style: none; }
tr.ans summary::-webkit-details-marker { display: none; }
.pick { font: 700 11.5px var(--d); padding: 3px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.pick.ok { background: var(--ok-tint); color: var(--ok); }
.pick.no { background: var(--sg-tint); color: var(--sg); }
tr.ans .more { margin-left: auto; font-size: 12.5px; color: var(--sg); font-weight: 600; }
tr.ans details[open] .more { visibility: hidden; }
tr.ans ol { margin: 10px 0 4px; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.okt { color: var(--ok); font-weight: 600; } .not { color: var(--sg); font-weight: 600; }

/* per-talk quiz results */
.tiles { display: flex; gap: var(--s6); flex-wrap: wrap; margin-bottom: var(--s5); padding: var(--s4) var(--s5); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--lift); }
.qcard { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s4); margin-bottom: var(--s3); box-shadow: var(--lift); }
.qtop { display: flex; gap: var(--s3); justify-content: space-between; align-items: baseline; margin-bottom: var(--s3); }
.qtop b { color: var(--ink); font-family: var(--d); font-size: 15px; line-height: 1.3; }
.qpct { font: 700 13px var(--d); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.obar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(80px, 1fr) 28px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.obar .ol { color: var(--ink2); }
.obar .ol em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); margin-left: 4px; }
.obar .track { height: 12px; background: #efebe5; border-radius: 0 4px 4px 0; overflow: hidden; }
.obar .track i { display: block; height: 100%; background: #a39d97; border-radius: 0 4px 4px 0; min-width: 0; transition: width .4s var(--spring); }
.obar.right .track i { background: var(--ok); }
.obar.right .ol { color: var(--ink); font-weight: 600; }
.obar .ov { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .obar { grid-template-columns: 1fr 28px; } .obar .track { grid-column: 1 / -1; grid-row: 2; } }
.sel { font: 14px var(--b); border: 1px solid var(--rule2); border-radius: 6px; padding: 8px 10px; min-height: 40px; background: #fff; color: var(--ink); }
/* Weeks SGWS ran before the system: shown for the record, not a drop target, never edited here. */
.tile.ran, .yrow.ran, .mrow.ran .bar.ran { opacity: .62; cursor: default; }
.tile.ran { background: transparent; border-style: dashed; }
.tile.ran .pic { background: rgba(0, 0, 0, .03); }
.yrow.ran b, .bar.ran b { font-weight: 500; }
.yrow.ran { grid-template-columns: 22px minmax(0, 1fr); }
.yrow.ran:hover { background: transparent; border-color: transparent; }
.tile.ran:hover { transform: none; box-shadow: none; }

/* ---------- tray groups + search ---------- */
@media (min-width: 1101px) { .calwrap { grid-template-columns: minmax(0, 1fr) 300px; } }
#trayq { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; margin-top: var(--s3); border: 1px solid var(--rule2); border-radius: 6px; background: #fff; color: var(--ink); }
.traygrp { display: flex; flex-direction: column; gap: var(--s2); }
.traygrp + .traygrp { margin-top: var(--s3); }
.traygrp h3 { position: sticky; top: calc(-1 * var(--s3)); z-index: 1; padding: 6px 0 4px; background: var(--paper); font: 700 11px var(--d); letter-spacing: .12em; text-transform: uppercase; color: var(--sg); display: flex; justify-content: space-between; }
.traygrp h3 span { color: var(--ink3); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .calwrap .tray { max-height: 60vh; overflow: auto; } .traygrp { flex-direction: row; flex-wrap: wrap; } .traygrp h3 { width: 100%; } }
