/* The weXare panel in Outlook: the arenas' colors (packages/node/src/web/pages.ts), in a narrow pane. */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1d2330; --muted: #5b6475; --line: #e2e5eb;
  --accent: #2457d6; --accent-text: #ffffff; --ok: #1f7a4d; --warn-bg: #fff6e0; --warn: #8a5a00;
  --err-bg: #fdecec; --err: #a12626; --info-bg: #eaf1ff; --info: #1d3f99;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; --radius: 10px; --radius-sm: 7px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --panel: #1b1f27; --text: #e6e9ef; --muted: #9aa3b4; --line: #2c323d;
    --accent: #6d95ff; --accent-text: #0d1220; --ok: #5cc995; --warn-bg: #3a2f12; --warn: #f2c66d;
    --err-bg: #3d1c1c; --err: #ff9c9c; --info-bg: #1b2a4d; --info: #a9c1ff;
    color-scheme: dark;
  }
}
/* Outlook's own theme, when it says which (taskpane.ts). */
:root[data-theme="dark"] {
  --bg: #12151b; --panel: #1b1f27; --text: #e6e9ef; --muted: #9aa3b4; --line: #2c323d;
  --accent: #6d95ff; --accent-text: #0d1220; --ok: #5cc995; --warn-bg: #3a2f12; --warn: #f2c66d;
  --err-bg: #3d1c1c; --err: #ff9c9c; --info-bg: #1b2a4d; --info: #a9c1ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
[hidden] { display: none !important; }
a { color: var(--accent); }
p { margin: 0; }

header.bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
header .arena { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.icon { margin-left: auto; flex: none; width: 32px; height: 32px; padding: 6px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; }
button.icon:hover, button.icon:focus-visible { border-color: var(--line); color: var(--text); }
button.icon svg { width: 100%; height: 100%; display: block; }

main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
h1 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

button, .button { font: inherit; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
  color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; }
button:hover, .button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea, input[type="text"] { width: 100%; font: inherit; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); }
textarea { resize: vertical; min-height: 150px; line-height: 1.45; }
textarea.lesson { min-height: 140px; }
textarea.code { min-height: 84px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.card.lead { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.suggested { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  text-transform: none; letter-spacing: 0; }

.summary { display: flex; flex-direction: column; gap: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--muted); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip.high { background: var(--err-bg); color: var(--err); }
.chip.medium { background: var(--warn-bg); color: var(--warn); }
.chip.low { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.gist { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.why { color: var(--muted); overflow-wrap: anywhere; }
.lead-line { font-size: 15px; font-weight: 600; }

.who { font-weight: 600; overflow-wrap: anywhere; }
.contact { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
ol.sources { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); }
ul.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.steps li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
ul.steps .step { min-width: 0; overflow-wrap: anywhere; }
ul.steps .step-title { font-weight: 600; }
ul.steps .step-detail { color: var(--muted); font-size: 12px; }
ul.steps li button { flex: none; }
.state { flex: none; color: var(--ok); font-weight: 600; font-size: 12px; white-space: nowrap; padding-top: 2px; }

.note, .problem, .decided { padding: 10px 12px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.note { background: var(--info-bg); color: var(--info); }
.problem { background: var(--err-bg); color: var(--err); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.decided { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); display: flex; gap: 8px; align-items: center; justify-content: space-between; font-weight: 600; }
.foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.foot .open { margin-left: auto; font-size: 13px; }
.dismiss { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }

.waiting { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 8px 0; }
.spinner { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
ol.howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
