/* The campaign window: an illustration of the service running, drawn in code. */
.iw { position: relative; container-type: inline-size; background: #fff; border-radius: 18px; border: 1px solid #e3e0ee;
  box-shadow: 0 1px 1px rgba(20,14,60,.04), 0 24px 48px -18px rgba(45,26,140,.32), 0 0 0 6px rgba(255,255,255,.55);
  overflow: hidden; font-size: 14px; line-height: 1.45; color: var(--fg); text-align: left; }
.iw-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-bottom: 1px solid #eeecf5; background: #fbfaff; }
.iw-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e3e0ee; }
.iw-bar i:nth-child(1) { background: #ff6b6b; } .iw-bar i:nth-child(2) { background: #ffc24b; } .iw-bar i:nth-child(3) { background: #2fd27a; }
.iw-title { margin-left: 10px; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-title span { color: var(--muted); font-weight: 400; }
.iw-tag { margin-left: auto; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: #3a23b8; white-space: nowrap; }
.iw-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); height: 430px; }
.iw-side { border-right: 1px solid #eeecf5; padding: 12px 10px; display: grid; gap: 4px; align-content: start; background: #fdfcff; }
.iw-side button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); cursor: pointer; position: relative; }
.iw-side button svg { width: 18px; height: 18px; flex: none; }
.iw-side button.on { background: var(--accent-soft); color: #2a1a8f; font-weight: 600; }
.iw-side button:focus-visible { outline: 2px solid var(--accent); }
.iw-side .iw-sep { height: 1px; background: #eeecf5; margin: 8px 4px; }
.iw-side .iw-note { font-size: 11.5px; color: var(--muted); padding: 0 10px; }
.iw-main { position: relative; overflow: hidden; }
.iw-scene { position: absolute; inset: 0; padding: 18px 20px; display: grid; align-content: start; gap: 12px; opacity: 0; visibility: hidden; }
.iw-scene.first { opacity: 1; visibility: visible; }
.iw-h { display: flex; align-items: center; gap: 10px; }
.iw-h strong { font-size: 15px; }
.iw-h .iw-count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* list */
.iw-table { display: grid; gap: 6px; }
.iw-row { display: grid; grid-template-columns: 30px 1.3fr 1fr 1.2fr 96px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid #f0eef6; background: #fff; }
.iw-row.head { border: 0; background: none; padding-block: 2px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.iw-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #2a1a8f; background: var(--accent-soft); }
.iw-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-row .rl, .iw-row .co { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-status { position: relative; height: 22px; }
.iw-status > * { position: absolute; left: 0; top: 0; }
.iw-spin { width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 2px solid #e3e0ee; border-top-color: var(--accent); }
.iw-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.iw-pill.ok { background: #e9fbf1; color: #137a43; }
.iw-pill.bad { background: #f3f2f7; color: #6b6876; }
.iw-pill.vio { background: var(--accent); color: #fff; }
.iw-row.removed .nm, .iw-row.removed .rl, .iw-row.removed .co { text-decoration: line-through; text-decoration-color: #b9b6c4; }

/* email */
.iw-mail { border: 1px solid #eeecf5; border-radius: 12px; overflow: hidden; }
.iw-field { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #f1eff7; font-size: 13px; }
.iw-field span { color: var(--muted); width: 54px; flex: none; }
.iw-text { padding: 14px; min-height: 150px; white-space: pre-wrap; font-size: 13.5px; }
.iw-caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -2px; margin-left: 1px; animation: iwblink 1s steps(1) infinite; }
@keyframes iwblink { 50% { opacity: 0; } }
.iw-actions { display: flex; align-items: center; gap: 10px; }
.iw-btn { height: 30px; padding: 0 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; }
.iw-mini { font-size: 12px; color: var(--muted); }

/* replies */
.iw-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.iw-inbox { display: grid; gap: 6px; align-content: start; }
.iw-msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid #f0eef6; background: #fff; }
.iw-msg b { font-size: 13px; } .iw-msg p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-msg.hot { border-color: #d6ccff; background: #faf8ff; box-shadow: 0 6px 18px -10px rgba(97,66,255,.5); }
.iw-msg.hot p { color: var(--fg); white-space: normal; }
.iw-checks { border: 1px solid #eeecf5; border-radius: 12px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.iw-checks .t { font-size: 12px; color: var(--muted); }
.iw-ck { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.iw-ck svg { width: 18px; height: 18px; flex: none; }
.iw-ck .box { fill: none; stroke: #d9d5e6; stroke-width: 1.6; }
.iw-ck .tick { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* calendar */
.iw-cal { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); border: 1px solid #eeecf5; border-radius: 12px; overflow: hidden; position: relative; }
.iw-cal > div { border-right: 1px solid #f1eff7; border-bottom: 1px solid #f1eff7; height: 46px; font-size: 11.5px; color: var(--muted); padding: 4px 6px; }
.iw-cal .dh { height: 32px; font-weight: 600; color: var(--fg); background: #fbfaff; }
.iw-cal > .iw-event { color: #fff; border: 0; height: auto; padding: 6px 8px; font-size: 11.5px; }
.iw-event { position: absolute; border-radius: 9px; background: var(--accent); color: #fff; padding: 6px 8px; font-size: 11.5px; line-height: 1.3;
  box-shadow: 0 10px 22px -8px rgba(97,66,255,.7); transform-origin: 50% 0; overflow: hidden; }
.iw-event b { display: block; font-size: 12px; }
.iw-confirm { display: flex; align-items: center; gap: 10px; }
.iw-confirm .lt { width: 44px; height: 44px; }

/* record */
.iw-record { border: 1px solid #eeecf5; border-radius: 14px; padding: 16px; display: grid; gap: 10px; max-width: 460px; }
.iw-record .who { display: flex; align-items: center; gap: 10px; }
.iw-record .who .iw-av { width: 36px; height: 36px; font-size: 13px; }
.iw-line { display: flex; align-items: center; gap: 8px; font-size: 13px; padding-top: 8px; border-top: 1px dashed #ebe8f4; }
.iw-line svg { width: 16px; height: 16px; flex: none; }
.iw-line .tick { fill: none; stroke: #137a43; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ghost cursor */
.iw-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 5; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.iw-ripple { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; z-index: 4; pointer-events: none; }

/* narrow windows: sidebar becomes an icon rail, fewer columns */
@container (max-width: 640px) {
  .iw-body { grid-template-columns: 52px minmax(0, 1fr); height: 420px; }
  .iw-side button { justify-content: center; padding: 0; } .iw-side button span, .iw-side .iw-note, .iw-side .iw-sep { display: none; }
  .iw-row { grid-template-columns: 28px 1.2fr 1fr 84px; } .iw-row .rl { display: none; }
  .iw-split { grid-template-columns: 1fr; } .iw-checks { display: none; }
  .iw-scene { padding: 14px; }
}
@container (max-width: 420px) {
  .iw-row { grid-template-columns: 28px minmax(0, 1fr) 78px; } .iw-row .co { display: none; }
  .iw-cal { grid-template-columns: 34px repeat(3, minmax(0, 1fr)); } .iw-cal .wkx { display: none; }
}
