/* RELO screens: a light, calm look with one accent colour; red and orange only for real urgency. The class names
   follow docs/walkthrough.html, whose own copy of these styles still shows the earlier look. */
:root {
  color-scheme: light;
  --canvas: #f7f6f3; --card: #fff; --fg: #1d1c1a; --muted: #67635c; --border: #e7e4de; --muted-bg: #f1efeb;
  --text-2: #4a4741; --hover: #faf9f7; --hover-line: #d6d2ca; --side: #f1efeb;
  --accent: #4b4fd8; --accent-fg: #fff; --accent-soft: #ecedfc; --accent-ink: #3236b8;
  --spring: #1e8a4c; --spring-dark: #1e7a44; --spring-soft: #e6f4ec;
  --seaside: #2a64a0; --seaside-soft: #e8f2fb;
  --coral: #c2410c; --coral-soft: #fdeee6; --coral-line: #f6c9b8;
  --amber: #a85704; --amber-soft: #fdf1e2;
  --red: #c8352a; --red-soft: #fdecea;
  --lin: var(--accent-ink); --lin-soft: var(--accent-soft);
  --mail: #0f6cbd; --mail-sel: #e8f1fb; --hl: #fff8e6; --mark: #fff1b8; --edit: #e3f4ea; --phone: #f2f2f2;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 2px 10px rgba(30, 25, 15, .05);
  --shadow-hi: 0 2px 4px rgba(30, 25, 15, .06), 0 10px 28px rgba(30, 25, 15, .10);
  --body: "DM Sans", system-ui, sans-serif; --head: var(--body); --mono: var(--body); --story: var(--body);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #151413; --card: #201f1d; --fg: #eceae6; --muted: #a8a39b; --border: #34312d; --muted-bg: #2a2826;
  --text-2: #cfcac2; --hover: #262422; --hover-line: #4a4640; --side: #1b1a18;
  --accent: #8e91f7; --accent-fg: #14142b; --accent-soft: #2a2b4a; --accent-ink: #c0c2ff;
  --spring: #5cc98a; --spring-dark: #5cc98a; --spring-soft: #1b3326;
  --seaside: #6aa6e0; --seaside-soft: #172838;
  --coral: #f08a5d; --coral-soft: #3a2218; --coral-line: #5a2c1b;
  --amber: #eda04d; --amber-soft: #392a17;
  --red: #f0705f; --red-soft: #3a211d;
  --mail: #2b7fd0; --mail-sel: #1a2a3d; --hl: #2b2410; --mark: #4d3f0f; --edit: #1d3324; --phone: #2a2826;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-hi: 0 4px 22px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--fg); font: 15px/1.55 var(--body); font-feature-settings: "tnum";
       -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }  /* a hidden tab panel, even a .box */
.grow { flex: 1; }

/* ---------- the frame: side menu, top bar, page ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.folded .shell { grid-template-columns: 68px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--border);
        display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; }
.brand { display: flex; align-items: center; gap: 6px; padding: 2px 4px 14px; }
.home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 17px; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-weight: 700;
        font-size: 14px; display: grid; place-items: center; flex: none; }
.fold { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted);
        display: grid; place-items: center; }
.fold:hover { background: var(--muted-bg); color: var(--fg); }
.side .tab { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 10px;
             color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.side .tab:hover { background: var(--card); color: var(--fg); }
.side .tab.on { background: var(--card); color: var(--fg); box-shadow: var(--shadow); font-weight: 600; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side .switch { justify-content: flex-start; gap: 12px; margin: 2px 0 4px; background: var(--card); box-shadow: var(--shadow); }
.side .switch:hover { background: var(--card); color: var(--accent-ink); }
/* Who is looking, in the top bar: one click to the role page */
.viewas { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 4px; border-radius: 999px;
          background: var(--card); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; }
.viewas:hover { box-shadow: var(--shadow-hi); }
.viewas .avatar { width: 32px; height: 32px; font-size: 11px; }
.viewas small { color: var(--muted); font-size: 14px; font-weight: 500; }
.viewas svg.i { width: 16px; height: 16px; color: var(--muted); }
.me .label { line-height: 1.3; overflow: hidden; }
.me b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
          font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.folded .side .label { display: none; }
.folded .side .tab, .folded .me, .folded .side .switch { justify-content: center; padding: 0; }
.folded .brand { flex-direction: column; padding: 2px 0 14px; }
.folded .fold { margin: 6px 0 0; transform: rotate(180deg); }

.page { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 32px 0; flex-wrap: wrap; }
.clock { font-size: 13px; color: var(--muted); margin-right: auto; }
.lang { display: inline-flex; background: var(--muted-bg); border-radius: 10px; padding: 3px; font-size: 13px; font-weight: 600; }
.lang a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px;
          color: var(--muted); text-decoration: none; }
.lang a[aria-current] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.lang a:not([aria-current]) img { opacity: .5; }
.lang img { border-radius: 2px; }
.theme { width: 40px; height: 40px; border-radius: 10px; background: var(--muted-bg); color: var(--fg); display: grid; place-items: center; }
.theme:hover { background: var(--border); }
.body { width: 100%; max-width: 1160px; margin: 0 auto; padding: 16px 32px 120px; display: grid; gap: 20px; align-content: start; }
/* Grid items grow to their widest content by default; without this a wide table widens the page instead of
   scrolling inside its box. */
.body > *, .box, .box > * { min-width: 0; }

/* ---------- type ---------- */
h1 { font-size: 28px; line-height: 1.2; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 2px; letter-spacing: -.01em; font-weight: 700; }
h3 { font-size: 16px; margin: 0; font-weight: 600; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 4px; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; max-width: 75ch; }
.lead { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.hint, .small { font-size: 13px; color: var(--muted); }
.mono { font-size: 13px; color: var(--muted); }
.kind { font-size: 13px; font-weight: 600; }

/* ---------- pieces ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
       border: 0; border-radius: 10px; background: var(--muted-bg); color: var(--fg); font-size: 14px; font-weight: 600;
       text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--border); }
.btn.dark, .btn.primary, .btn.go { background: var(--accent); color: var(--accent-fg); }
.btn.dark:hover, .btn.primary:hover, .btn.go:hover { filter: brightness(1.08); }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--muted-bg); color: var(--fg); }
.btn.big { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .4; cursor: default; filter: none; }
.box { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 12px;
       align-content: start; overflow-x: auto; }
.box.decide { box-shadow: var(--shadow), inset 0 0 0 1px var(--accent-soft); }
.mock { display: inline-block; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 700;
        letter-spacing: .04em; border-radius: 6px; padding: 2px 7px; vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
        font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle; background: var(--muted-bg); color: var(--text-2); }
.chip svg.i { width: 14px; height: 14px; }
.c-red { background: var(--red-soft); color: var(--red); }
.c-coral { background: var(--coral-soft); color: var(--coral); }
.c-amber { background: var(--amber-soft); color: var(--amber); }
.c-green { background: var(--spring-soft); color: var(--spring-dark); }
.c-sea { background: var(--seaside-soft); color: var(--seaside); }
.c-grey { background: var(--muted-bg); color: var(--text-2); }
.c-lin, .c-accent { background: var(--accent-soft); color: var(--accent-ink); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.tile .v.red { color: var(--red); } .tile .v.g { color: var(--spring-dark); }
.tile .s { font-size: 13px; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: var(--hl); }
td a { color: inherit; font-weight: 500; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.markx { background: var(--mark); border-radius: 3px; padding: 0 2px; }
.needed { background: var(--coral-soft); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.needed b { color: var(--coral); }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.opt:hover { background: var(--hover); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 4px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--muted-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button, .seg a { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; height: 34px; padding: 0 12px;
                      border-radius: 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-decoration: none; }
.seg button.on, .seg a.on { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.drafttabs { display: flex; gap: 6px; flex-wrap: wrap; }
.drafttabs button { border: 0; border-radius: 999px; min-height: 36px; padding: 0 14px; font-size: 14px; font-weight: 600;
                    color: var(--muted); background: var(--muted-bg); }
.drafttabs button.ok { background: var(--spring-soft); color: var(--spring-dark); }
.drafttabs button.on { background: var(--accent); color: var(--accent-fg); }
.to { color: var(--muted); font-size: 13px; }
.txt { white-space: pre-wrap; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--hover); font-size: 15px; line-height: 1.55; }
textarea.txt { background: var(--card); }
.remind { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.event { font-size: 14px; color: var(--spring-dark); background: var(--spring-soft); border-radius: 10px; padding: 8px 12px; }
.hbar { height: 8px; border-radius: 5px; background: var(--muted-bg); overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--seaside); }
.fixed { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--muted-bg); font-size: 13px; font-weight: 500; }
.more summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.more[open] { display: grid; gap: 10px; }
details > summary { cursor: pointer; }
input:not([type=radio]):not([type=checkbox]):not([type=hidden]), select, textarea {
  min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--fg); }
textarea { padding: 10px 12px; }

/* ---------- toasts: the 30 seconds to undo, in sight wherever the page is scrolled ---------- */
.toasts { position: fixed; right: 24px; bottom: 24px; width: min(480px, calc(100vw - 32px)); z-index: 20; display: grid; gap: 8px; }
.toast { position: relative; overflow: hidden; background: #1d1c1a; color: #f4f2ee; border-radius: 14px; padding: 10px 10px 13px 18px;
         display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-hi); flex-wrap: wrap; }
[data-theme="dark"] .toast { background: #f1efeb; color: #1d1c1a; }
.toast > span:first-child { flex: 1; }
.toast .btn { min-height: 34px; background: rgba(255, 255, 255, .14); color: inherit; }
[data-theme="dark"] .toast .btn { background: rgba(0, 0, 0, .08); }
.toast .tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.toast .tbar i { display: block; height: 100%; width: 60%; background: var(--accent); }

/* ---------- the countdown: a calm pill ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card);
        box-shadow: var(--shadow); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: var(--spring); }
.pill.soon::before { background: var(--amber); }
.pill.late::before { background: var(--red); }

/* ---------- phone (SMS preview) and "Got it" ---------- */
.phone { width: 290px; border: 9px solid #1d1c1a; border-radius: 32px; background: var(--phone); padding: 18px 12px; min-height: 480px; margin: 0 auto; }
.bubble { background: var(--card); border-radius: 14px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; box-shadow: var(--shadow); }
.gotit { display: block; width: 100%; min-height: 48px; border: 0; text-align: center; background: var(--accent); color: var(--accent-fg);
         border-radius: 12px; padding: 10px; margin-top: 8px; font-weight: 600; font-size: 16px; }
.mailapp { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 4px 10px; }
.mailtext { white-space: pre-wrap; line-height: 1.6; max-width: 70ch; margin: 0; font-size: 15px; }

/* ---------- English next to other languages (PRD rule 11) ---------- */
.en { background: var(--seaside-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; max-width: 70ch; }
.en::before { content: "In English"; display: block; font-size: 12px; font-weight: 700; color: var(--seaside); margin-bottom: 2px; }
.phone .en { margin-top: 8px; padding: 6px 8px; font-size: 12px; }

/* ---------- How it works ---------- */
.flow-frame { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: auto; }
.flow-frame svg { display: block; width: 100%; height: auto; cursor: zoom-in; }
.flow-frame.zoomed svg { width: 2080px; max-width: none; cursor: zoom-out; }

/* ---------- My day ---------- */
.hello { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hello > div:first-child { flex: 1; min-width: 260px; }
.ribbon { position: relative; height: 56px; }
.ribbon .track, .ribbon .past { position: absolute; left: 0; top: 24px; height: 6px; border-radius: 3px; background: var(--muted-bg); }
.ribbon .track { right: 0; }
.ribbon .past { background: var(--accent); opacity: .4; }
.ribbon .tick { position: absolute; top: 37px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.ribbon .cut { position: absolute; top: 16px; height: 22px; width: 2px; margin-left: -1px; background: var(--red); }
.ribbon .tick.cutl { color: var(--red); font-weight: 600; }
.ribbon .now { position: absolute; top: 19px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--accent); border: 3px solid var(--canvas); }
.ribbon .nowl { position: absolute; top: 0; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ribbon.off .nowl { color: var(--muted); font-weight: 500; }
.where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.where a { display: grid; gap: 2px; padding: 14px 18px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow);
           color: inherit; text-decoration: none; border-top: 4px solid var(--c); }
.where a:hover { box-shadow: var(--shadow-hi); }
.where .k { font-weight: 600; }
.where .v { font-size: 26px; font-weight: 700; line-height: 1.2; }
.where .s { font-size: 13px; color: var(--muted); }
.part { display: grid; gap: 16px; scroll-margin-top: 16px; }
.part > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.part > summary h2 { margin: 0; }
.part > summary .n { color: var(--muted); font-size: 18px; font-weight: 600; }
/* My day's parts and groups fold away with a click on their heading; the arrow shows which way */
.part > summary, .due-group > summary { list-style: none; cursor: pointer; }
.part > summary::-webkit-details-marker, .due-group > summary::-webkit-details-marker { display: none; }
.part > summary svg.i, .due-h svg.i { color: var(--muted); transition: transform .15s; }
.part:not([open]) > summary svg.i, .due-group:not([open]) > summary svg.i { transform: rotate(-90deg); }
.part[open], .due-group[open] { display: grid; }
.group { display: grid; gap: 10px; }
/* My day's time groups: each a tinted band of its own, so "before the cut-off" never runs into "later today" */
.due-group { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--tint); }
.due-red { --tint: color-mix(in srgb, var(--red-soft) 70%, transparent); }
.due-amber { --tint: color-mix(in srgb, var(--amber-soft) 75%, transparent); }
.due-grey { --tint: var(--side); }
.due-h { display: flex; align-items: center; gap: 10px; padding: 4px 6px 2px; flex-wrap: wrap; }
.due-h h3 { font-size: 17px; }
.due-h .n { color: var(--muted); font-weight: 600; margin-right: auto; }
.due-red .due-h h3 { color: var(--red); } .due-amber .due-h h3 { color: var(--amber); }
.icard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center;
         padding: 16px 20px 16px 24px; overflow: hidden; background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
         transition: box-shadow .15s, transform .15s; }
.icard:hover { box-shadow: var(--shadow-hi); transform: translateY(-1px); }
.icard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--strip, var(--border)); }
.icard.u-red { --strip: var(--red); } .icard.u-amber { --strip: var(--amber); } .icard.u-green { --strip: var(--spring); }
.icard a.art::after { content: ""; position: absolute; inset: 0; }  /* the whole card opens the issue */
.icard .meta, .icard .side-act, .icard form, .icard .who-list { position: relative; z-index: 1; }
.icard .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.icard .art { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0; color: inherit; text-decoration: none; }
.icard .why { color: var(--muted); }
.icard .next { font-size: 14px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--muted-bg); }
.icard .side-act { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.due { font-size: 13px; font-weight: 600; text-align: right; color: var(--muted); }
.due.red { color: var(--red); } .due.amber { color: var(--amber); }
.who-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.done-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.done-row + .done-row { border-top: 1px solid var(--border); }
.done-row .tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--spring-soft); color: var(--spring-dark); flex: none; }
.empty { padding: 14px 18px; color: var(--muted); }
.demo { background: var(--accent-soft); border-radius: 14px; padding: 12px 16px; }
.demo summary { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; list-style: none; cursor: pointer; }
.demo summary::-webkit-details-marker { display: none; }
.demo .dots { display: flex; gap: 4px; }
.demo .dots i { width: 18px; height: 5px; border-radius: 9px; background: var(--accent); opacity: .25; }
.demo .dots i.on { opacity: 1; }
.demo .next { flex: 1; min-width: 220px; color: var(--text-2); }
.demo .next::after { content: " ▾"; color: var(--muted); }
.demo-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; }
.demo-steps li.done { color: var(--muted); }
.demo-steps li.done::marker { content: "✓  "; color: var(--spring-dark); }
.brief-box summary { font-weight: 600; }

/* ---------- issue page ---------- */
.steps-line { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; font-size: 13px; }
.steps-line .st { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px;
                  background: var(--muted-bg); color: var(--muted); font-weight: 600; }
.steps-line .st.ok { background: var(--spring-soft); color: var(--spring-dark); }
.steps-line .st.now { background: var(--accent); color: var(--accent-fg); }
.steps-line .st svg.i { width: 14px; height: 14px; }
.steps-line .sep { color: var(--muted); }
.story { font-size: 19px; line-height: 1.5; margin: 0; max-width: 64ch; }
.actionbar { display: block; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); text-decoration: none; }
.actionbar:hover { box-shadow: var(--shadow); }
.sticky { position: sticky; bottom: 16px; z-index: 3; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
          padding: 12px 12px 12px 20px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-hi); border: 1px solid var(--border); }
.sticky > span { flex: 1; min-width: 200px; }
.role-av { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--accent-soft);
           color: var(--accent-ink); vertical-align: middle; margin-right: 8px; }
.role-av svg.i { width: 16px; height: 16px; }

/* ---------- filters above a list (Suppliers) ---------- */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 200px; max-width: 320px; }
.seg label, .toggle { position: relative; cursor: pointer; }
.more-filters[open] { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.more-filters > summary { color: var(--accent-ink); font-weight: 600; font-size: 14px; padding: 0 6px; cursor: pointer; }
.seg input, .toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; font-size: 13px;
                  font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.toggle span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px;
               font-weight: 600; background: var(--muted-bg); color: var(--text-2); }
.toggle input:checked + span { background: var(--accent); color: var(--accent-fg); }
.seg input:focus-visible + span, .toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Control tower ---------- */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lane { background: var(--side); border-radius: 16px; padding: 12px; display: grid; gap: 10px; }
.lane > h2 { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 16px; margin: 0; }
.lane > h2 .n { margin-left: auto; color: var(--muted); }
.lane .icard { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 14px 20px; }
.lane .icard .art { font-size: 16px; }
.lane .foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; }
.lane details summary { list-style: none; color: var(--muted); font-weight: 600; padding: 6px; }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.owner .avatar { width: 28px; height: 28px; font-size: 11px; }
.owner select { min-height: 32px; border-radius: 999px; font-size: 13px; font-weight: 600; padding: 0 10px; background: var(--muted-bg); border: 0; }

/* ---------- the pages before a role is picked, and "Got it" ---------- */
.public { max-width: 480px; margin: 8vh auto; padding: 0 16px; }
.public > .row { margin-bottom: 16px; }
.public form { display: grid; gap: 10px; }
.public .box + .box { margin-top: 14px; }
.public:has(.roles) { max-width: 760px; display: grid; gap: 18px; }
.public:has(.roles) .box + .box { margin-top: 0; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.roles form { align-content: space-between; }
.roles h3 { display: flex; align-items: center; }
.demo-start { background: var(--accent-soft); box-shadow: none; }
@media (max-width: 640px) { .roles { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 900px) {
  .two, .three, .lanes { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A phone: the side menu becomes a bar of icons at the bottom. */
@media (max-width: 700px) {
  .shell, .folded .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 64px; z-index: 10; flex-direction: row;
          justify-content: space-around; padding: 8px; border-right: 0; border-top: 1px solid var(--border); overflow-x: auto; }
  .side .brand, .side .grow, .side .label { display: none; }
  .side .tab, .side .switch { justify-content: center; padding: 0; min-width: 44px; margin: 0; box-shadow: none; background: none; }
  .me, .viewas .who { display: none; }
  .viewas { padding: 0 6px 0 4px; }
  .clock { display: none; }  /* the top bar stays one line; My day's line shows the time */
  .topbar { justify-content: flex-end; }
  .topbar, .body { padding-left: 16px; padding-right: 16px; }
  .body { padding-bottom: 140px; }
  .where { gap: 8px; }
  .where a { padding: 10px 12px; }
  .where .s { display: none; }
  .icard { grid-template-columns: minmax(0, 1fr); }
  .icard .side-act { grid-row: auto; grid-column: auto; align-items: stretch; }
  .due { text-align: left; }
  .sticky { bottom: 76px; }
  .toasts { right: 16px; bottom: 84px; }
  h1 { font-size: 24px; }
}

/* The brief on a phone: each problem on two lines, rank, kind and "act by" on top, article and reason below. */
@media (max-width: 640px) {
  .brief-lines tr:first-child { display: none; }
  .brief-lines tr { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 2px;
                    padding: 10px 0; border-bottom: 1px solid var(--border); }
  .brief-lines td { border: 0; padding: 0; }
  .brief-lines td:nth-child(1) { order: 1; }
  .brief-lines td:nth-child(2) { order: 2; }
  .brief-lines td:nth-child(5) { order: 3; font-weight: 600; }
  .brief-lines td:nth-child(3) { order: 4; grid-column: 1 / -1; }
  .brief-lines td:nth-child(4) { order: 5; grid-column: 1 / -1; color: var(--text-2); }
}
