/* Layout B (the inbox) from Bokatt's drawing, in warm greys with an orange-red accent.
   Below the top bar everything is flat. The lava shows up in three places only: the bar, the big numbers and the heat. */
:root {
  --card: #efebe6; --sheet: #fff; --panel: #f6f2ed; --ink: #120d0b; --muted: #5f554e; --faint: #9a8f87;
  --hair: rgb(18 13 11 / .07); --line: rgb(18 13 11 / .16); --chip: #e6dfd8;
  --tint: #ffe6d9; --tint-ink: #7c2409; --accent: #dc3a10; --accent-text: #b82c08;
  --f-text: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Unbounded', 'Arial Black', Impact, sans-serif;
  --ease: cubic-bezier(.3, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--card); color: var(--ink); font: 400 14px/1.45 var(--f-text); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.top :focus-visible { outline-color: #fff; }
[hidden] { display: none !important; }
.app { height: 100%; display: flex; flex-direction: column; }

/* ---- Top bar: the lava ---- */
.top { position: relative; flex: none; height: 54px; display: flex; align-items: center; gap: 14px; padding: 0 12px 0 18px; color: #fff; background: #cf2a16; z-index: 20; }
.top > * { position: relative; }
.top .lava { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.word { font: 700 13px/1 var(--f-display); letter-spacing: .03em; }
.blob { width: 18px; height: 18px; flex: none; background: #fff; border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%; }
.running .top .blob { animation: blob 7s ease-in-out infinite; }
@keyframes blob {
  0%, 100% { border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%; transform: rotate(0deg) scale(1); }
  33% { border-radius: 42% 58% 60% 40% / 44% 60% 40% 56%; transform: rotate(60deg) scale(1.06); }
  66% { border-radius: 52% 48% 38% 62% / 62% 40% 60% 38%; transform: rotate(120deg) scale(.96); }
}
.slash { width: 1px; height: 22px; background: rgb(255 255 255 / .45); transform: skewX(-18deg); }
.tabs { position: relative; display: flex; gap: 2px; }
.tabs a { position: relative; z-index: 1; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 6px; font-weight: 600; color: #fff; transition: color .18s; white-space: nowrap; }
.tabs a.on { color: var(--ink); }
.tabs .pill { position: absolute; top: 0; left: 0; height: 34px; width: 0; background: #fff; border-radius: 6px; transition: transform .24s var(--ease), width .24s var(--ease); }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.go { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px 0 11px; border-radius: 6px; background: #fff; color: var(--ink); font-weight: 600; white-space: nowrap; }
.go small { font-size: 13px; font-weight: 500; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.clock { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 4px 0 12px; border-radius: 6px; background: var(--ink); color: #fff; white-space: nowrap; }
.clock .dot { width: 8px; height: 8px; border-radius: 2px; background: #ff6a2b; animation: pulse 1.6s ease-in-out infinite; }
.clock.away .dot { background: var(--faint); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.clock b { font: 600 15px/1 var(--f-text); letter-spacing: -.01em; min-width: 62px; }
.clock small { font-size: 13px; color: rgb(255 255 255 / .7); max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.clock .stop { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; background: #fff; color: var(--ink); margin-left: 2px; }
.ico { width: 14px; height: 14px; flex: none; fill: currentColor; }
.ico.line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Menu under the initial ---- */
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 270px; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: none; color: var(--ink); }
.menu-wrap.open .menu { display: block; }
.menu .item { display: flex; align-items: center; width: 100%; padding: 8px 10px; border-radius: 6px; text-align: left; border: 0; }
.menu .item:hover { background: var(--panel); }
.menu hr { border: 0; border-top: 1px solid var(--hair); margin: 6px 4px; }
.menu .who { padding: 8px 10px 6px; }
.menu .who b { display: block; font-weight: 600; }
.menu .who small { color: var(--muted); font-size: 12px; }

/* ---- Shared pieces ---- */
.mono { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 5px; background: var(--chip); color: var(--ink); font: 700 11px/1 var(--f-text); letter-spacing: .02em; }
.mono.inv { width: 30px; height: 30px; background: #fff; }
.pc { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 3px; }
.pc.lg { width: 14px; height: 14px; border-radius: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--accent-text); }
.btn.chip { background: var(--chip); color: var(--ink); }
.btn.chip:hover { background: #dcd4cc; }
.btn.dark { background: var(--ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 5px; }
.btn.wide { width: 100%; }
.btn kbd { font: 600 11px/1 var(--f-text); padding: 3px 5px; border-radius: 3px; background: rgb(255 255 255 / .22); }
.btn.chip kbd { background: rgb(18 13 11 / .08); }
.nav { width: 30px; height: 30px; flex: none; border-radius: 5px; background: var(--chip); display: grid; place-items: center; color: var(--ink); }
.nav:not(:disabled):hover { background: #dcd4cc; }
.link { text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 4px; font: 600 11px/1 var(--f-text); white-space: nowrap; }
.tag.wait { background: var(--tint); color: var(--accent-text); }
.tag.ok { background: var(--chip); color: var(--ink); }
.tag.live { background: var(--ink); color: #fff; }
.muted { color: var(--muted); font-weight: 400; }
.sheet { background: var(--sheet); border-radius: 8px; }
.empty { padding: 28px 18px; color: var(--muted); }
.n { text-align: right; white-space: nowrap; }

/* ---- Big numbers, filled with the lava from the top bar ---- */
.lavatext { position: relative; display: inline-block; font: 700 44px/1 var(--f-display); letter-spacing: -.035em; white-space: nowrap; vertical-align: baseline; }
.lavatext > span { color: var(--accent-text); }
.lava-ok .lavatext > span { color: transparent; }
.lavatext canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero { margin-left: auto; text-align: right; white-space: nowrap; }
.hero > small { font: 700 15px/1 var(--f-display); color: var(--muted); margin-left: 6px; }
.hero p { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---- The timeline: you on top, the agents under ---- */
.tl { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tl .lane { position: relative; background: var(--panel); border-radius: 3px; overflow: hidden; }
.tl .lane.you { height: 8px; }
.tl .lane i { position: absolute; top: 0; height: 100%; border-radius: 2px; min-width: 2px; }
.tl .lane.agents i { height: 5px; }
.tl.big { grid-template-columns: 62px minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.tl.big > b { font: 600 12px/1 var(--f-text); color: var(--muted); }
.tl.big .lane.you { height: 22px; }
.tl.big .lane.agents { min-height: 12px; background: none; border-radius: 0; }
.tl.big .lane.agents::before { content: ''; position: absolute; inset: 0; background: var(--panel); border-radius: 3px; }
.tl .axis { position: relative; height: 14px; font-size: 11px; color: var(--faint); }
.tl .axis span { position: absolute; top: 0; transform: translateX(-50%); }
.tl .axis span:first-child { transform: none; }
.tl .axis span:last-child { transform: translateX(-100%); }

/* ---- "You were away" ---- */
.awaybar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--ink); color: #fff; }
.awaybar p { margin-right: auto; }
.awaybar p small { color: rgb(255 255 255 / .65); font-size: 13px; margin-left: 6px; }
.awaybar .btn.chip { background: rgb(255 255 255 / .14); color: #fff; }
.awaybar .btn.chip:hover { background: rgb(255 255 255 / .22); }

/* ---- Pages: I dag and Underlag ---- */
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page { flex: 1; overflow-y: auto; padding: 28px 28px 48px; }
.page .in { max-width: 1040px; margin: 0 auto; }
.dayhead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.dayhead h1 { font: 600 26px/1.15 var(--f-text); letter-spacing: -.02em; }
.dayhead p { color: var(--muted); margin-top: 3px; font-size: 13px; }
.daynav { display: flex; gap: 4px; padding-bottom: 3px; }
.daytl { padding: 18px 18px 12px; margin-bottom: 12px; }
.drow { display: grid; grid-template-columns: 10px 190px minmax(0, 1fr) 76px 76px 76px; gap: 14px; align-items: center; width: 100%; padding: 13px 18px; border-top: 1px solid var(--hair); text-align: left; }
.drow:first-child { border-top: 0; }
button.drow:hover { background: var(--panel); }
button.drow:last-child { border-radius: 0 0 8px 8px; }
.drow.head { padding-top: 12px; padding-bottom: 8px; font: 600 12px/1.3 var(--f-text); color: var(--muted); }
.drow .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow .wh { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drow .wh i { color: var(--faint); font-style: normal; }
.drow .n { font-weight: 600; }
.drow .n.sub { font-weight: 400; color: var(--muted); }
.pagefoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.split { display: flex; gap: 2px; height: 10px; margin-bottom: 12px; }
.split i { border-radius: 2px; min-width: 3px; }
.ut { width: 100%; border-collapse: collapse; }
.ut th { font: 600 12px/1.3 var(--f-text); color: var(--muted); text-align: left; padding: 12px 18px 8px; white-space: nowrap; }
.ut th.n { text-align: right; }
.ut td { padding: 13px 18px; border-top: 1px solid var(--hair); vertical-align: middle; }
.ut .who { display: flex; align-items: center; gap: 12px; }
.ut .who b { display: block; font-weight: 600; }
.ut .who small { color: var(--muted); font-size: 12px; }
.ut tbody tr { cursor: pointer; }
.ut tbody tr:hover td { background: var(--panel); }
.ut tbody tr:last-child td:first-child { border-radius: 0 0 0 8px; }
.ut tbody tr:last-child td:last-child { border-radius: 0 0 8px 0; }
.ut .sum { font-weight: 600; }
.ut td.c { width: 1%; }

/* ---- List and detail ---- */
.body { flex: 1; display: grid; grid-template-columns: 348px minmax(0, 1fr); min-height: 0; }
.list { background: var(--sheet); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.lh { display: flex; align-items: baseline; gap: 10px; padding: 18px 16px 12px; }
.lh b { font: 600 16px/1.2 var(--f-text); letter-spacing: -.01em; }
.lh .tot { margin-left: auto; font: 700 16px/1 var(--f-display); letter-spacing: -.02em; }
.lh .tot small { font-size: 11px; color: var(--muted); margin-left: 4px; }
.heat { display: flex; align-items: flex-end; gap: 18px; padding: 0 16px 16px; border-bottom: 1px solid var(--hair); }
.heat .grid { display: grid; grid-template-columns: repeat(7, 17px); gap: 3px; }
.heat .grid b { font: 600 10px/1 var(--f-text); color: var(--faint); text-align: center; padding-bottom: 2px; }
.heat .c { width: 17px; height: 17px; border-radius: 3px; background: var(--panel); display: block; }
.heat button.c:hover { outline: 2px solid var(--line); outline-offset: 1px; }
.heat .c.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat .c.later { background: none; outline: 1px solid var(--hair); outline-offset: -1px; }
.heat dl { margin-left: auto; display: grid; grid-template-columns: auto auto; gap: 3px 12px; font-size: 13px; }
.heat dt { color: var(--muted); white-space: nowrap; }
.heat dd { text-align: right; font-weight: 600; white-space: nowrap; }
.item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px 11px; border-bottom: 1px solid var(--hair); position: relative; text-align: left; width: 100%; flex: none; }
.item:hover { background: var(--panel); }
.item.on { background: var(--tint); }
.item.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .amt { font: 700 13px/1 var(--f-display); letter-spacing: -.02em; }
.item .s { grid-column: 2 / 4; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.item .s .r { margin-left: auto; }
.item .share { grid-column: 2 / 4; height: 3px; margin-top: 3px; background: rgb(18 13 11 / .06); border-radius: 2px; overflow: hidden; }
.item .share i { display: block; height: 100%; border-radius: 2px; }
.item .ic { align-self: start; margin-top: 1px; color: var(--muted); display: grid; place-items: center; width: 10px; }
.item .ic .ico { width: 16px; height: 16px; }
.det { display: flex; flex-direction: column; min-height: 0; min-width: 0; container-type: inline-size; }
.scroll { flex: 1; overflow-y: auto; padding: 26px 28px 28px; }
.dh { display: flex; align-items: flex-start; gap: 16px; }
.dh h1 { font: 600 24px/1.25 var(--f-text); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.dh .meta { color: var(--muted); margin-top: 3px; font-size: 13px; }
.dh .meta code, .rows code { font: 12px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; background: var(--panel); padding: 2px 5px; border-radius: 3px; }
.dh .meta code { background: var(--chip); }
.tags { display: flex; gap: 6px; margin-top: 10px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; margin-top: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vt { width: 100%; border-collapse: collapse; font-size: 13px; }
.vt th { font: 600 12px/1.3 var(--f-text); color: var(--muted); text-align: left; padding: 12px 14px 4px; white-space: nowrap; }
.vt th.n { text-align: right; }
.vt td { padding: 8px 14px; border-top: 1px solid var(--hair); vertical-align: top; }
.vt .n { width: 72px; }
.vt .when { width: 112px; white-space: nowrap; color: var(--muted); font-size: 12px; padding-top: 9px; }
.vt .dim { color: var(--faint); }
.vt .dayrow td { padding: 14px 14px 8px; border-top: 1px solid var(--line); }
.vt tbody tr.dayrow:first-child td { border-top: 0; }
.vt .dayrow + tr td { border-top: 0; }
.vt .dayrow td > div { display: flex; align-items: center; gap: 14px; }
.vt .dayrow b { width: 84px; flex: none; font-weight: 600; }
.vt .dayrow .n { width: auto; font-weight: 600; }
.vt tfoot td { font-weight: 600; border-top: 1px solid var(--line); padding-top: 11px; padding-bottom: 12px; }
.vt tfoot td:first-child { font-weight: 400; color: var(--muted); }
.vt .what { outline: 0; border-radius: 3px; display: block; min-height: 1.45em; }
.vt .what:empty::before { content: 'Vad gjorde du?'; color: var(--faint); }
.vt .what:focus { background: var(--panel); outline: 4px solid var(--panel); }
.vt tr.new td { background: var(--tint); }
.note { background: var(--tint); color: var(--tint-ink); border-radius: 8px; padding: 12px 14px; font-size: 13px; }

/* ---- The receipt ---- */
.side { display: flex; flex-direction: column; gap: 16px; }
.receipt { position: relative; background: #fff; border-radius: 6px 6px 0 0; padding: 18px 18px 16px; font-size: 12px; line-height: 1.5; color: #3a322d; }
.receipt::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 7px; background: linear-gradient(135deg, #fff 5px, transparent 0), linear-gradient(-135deg, #fff 5px, transparent 0); background-size: 10px 7px; background-repeat: repeat-x; }
.receipt .rh { display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-display); letter-spacing: .02em; color: var(--ink); }
.receipt .rh .blob { width: 13px; height: 13px; background: var(--ink); }
.receipt .from { margin-top: 12px; color: var(--muted); }
.receipt .to { margin: 8px 0 14px; }
.receipt .to b { color: var(--ink); font-weight: 600; }
.receipt .ln { display: flex; align-items: baseline; margin-top: 7px; color: var(--ink); }
.receipt .ln i { flex: 1; border-bottom: 1px dotted var(--line); margin: 0 6px; transform: translateY(-3px); }
.receipt .how { color: var(--faint); font-size: 11px; }
.receipt .tot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; }
.receipt .tot b { font: 700 17px/1 var(--f-display); letter-spacing: -.03em; }
.receipt .rate { width: 6ch; border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; background: none; text-align: right; padding: 0 1px; color: var(--ink); }
.receipt .rate:focus { outline: 0; border-bottom: 1px solid var(--ink); }
.act { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 28px; background: var(--sheet); border-top: 1px solid var(--line); position: relative; }
.act .r { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* ---- Add time ---- */
.add { position: absolute; left: 28px; bottom: calc(100% + 8px); width: 420px; max-width: calc(100vw - 56px); background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; z-index: 5; }
.add label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.add label.full { grid-column: 1 / 3; }
.add input { height: 34px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--sheet); font-weight: 400; color: var(--ink); font-size: 14px; }
.add input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.add .err { grid-column: 1 / 3; color: var(--accent-text); font-size: 13px; }
.add .row { grid-column: 1 / 3; display: flex; gap: 8px; }

/* ---- Kopplingar ---- */
.rows > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 12px 14px; border-top: 1px solid var(--hair); font-size: 13px; }
.rows > div:first-child { border-top: 0; }
.rows > div > span:first-child { color: var(--muted); }
.rows code { display: inline-block; margin: 1px 0; }
.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--chip); border-radius: 6px; vertical-align: middle; }
.seg button { height: 26px; padding: 0 10px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--sheet); color: var(--ink); font-weight: 600; }
.wide-cols { display: grid; grid-template-columns: minmax(0, 720px); gap: 12px; margin-top: 18px; }

/* ---- Toast ---- */
#toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 50; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Narrow ---- */
/* The receipt drops below the table when the detail column gets too narrow for both. */
@container (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } .side { max-width: 320px; } }
@media (max-width: 980px) { .drow { grid-template-columns: 10px 150px minmax(0, 1fr) 64px 64px 64px; gap: 10px; } }
@media (max-width: 860px) {
  .app { height: auto; min-height: 100%; }
  .top { height: auto; flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  .slash { display: none; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .go small, .clock small { display: none; }
  .body { display: block; }
  .list { border-right: 0; border-bottom: 1px solid var(--line); }
  .scroll { padding: 20px 14px; overflow: visible; }
  .act { padding: 12px 14px; position: sticky; bottom: 0; }
  .vt .when { width: 96px; }
  .page { padding: 20px 14px; }
  .ut .hide { display: none; }
  .dayhead { flex-wrap: wrap; }
  .lavatext { font-size: 34px; }
  .drow { grid-template-columns: 10px minmax(0, 1fr) 64px; }
  .drow .wh { grid-column: 2 / 4; grid-row: 2; }
  .drow .n.sub, .drow.head { display: none; }
}
@media (prefers-reduced-motion: reduce) { .running .top .blob, .clock .dot { animation: none; } .tabs .pill { transition: none; } }

/* ---- The new look (docs/design/ritning): one surface, a sentence and a number per row ---- */
body.ny { background: #f7f4ef; }
.n-page { flex: 1; min-height: 0; overflow-y: auto; padding: 44px 24px 40px; }
.n-col { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.n-head { display: flex; flex-direction: column; gap: 12px; }
.n-title { display: flex; align-items: center; gap: 8px; }
.n-title h1 { margin-right: auto; font: 600 20px/1.2 var(--f-text); letter-spacing: -.01em; }
.n-meta { font-size: 15px; color: var(--muted); margin-right: 4px; }
.n-hero { align-self: flex-start; white-space: nowrap; }
.n-hero .lavatext { font-size: 76px; letter-spacing: -.04em; }
.n-hero small { margin-left: 10px; font: 700 22px/1 var(--f-display); color: var(--muted); }
.n-sub { font-size: 15px; color: var(--muted); }
.n-wave { display: flex; flex-direction: column; gap: 8px; }
.n-wave svg { display: block; width: 100%; height: auto; }
.n-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
/* What the agents used that day, under the clock. The explanation opens beside the clock, or under the line where there is no room. */
.n-top { position: relative; align-self: flex-start; display: flex; flex-direction: column; gap: 12px; }
.n-ai { position: static; align-self: flex-start; display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.n-ai b { font-weight: 600; color: var(--ink); }
.n-i { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 5px; color: var(--muted); }
.n-i .ico { width: 16px; height: 16px; stroke-width: 1.5; }
.n-i:hover, .n-i:focus-visible, .n-ai.open .n-i { background: var(--chip); color: var(--ink); }
.n-pop { display: none; position: absolute; left: calc(100% + 12px); top: 0; z-index: 20; width: 360px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); font-size: 13px; color: var(--ink); }
.n-ai.open .n-pop, .n-i:hover + .n-pop { display: block; }
.n-pop p { color: var(--muted); }
.n-pop dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin-top: 10px; }
.n-pop dt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-pop dt span { color: var(--muted); }
.n-pop dd { text-align: right; }
.n-col { container-type: inline-size; }
@container (max-width: 700px) { .n-pop { left: 0; top: calc(100% + 8px); width: min(360px, 100cqw); } }
.n-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.n-legend span { display: inline-flex; align-items: center; gap: 7px; }
.n-legend i { width: 10px; height: 10px; border-radius: 3px; }
.n-rows { display: flex; flex-direction: column; gap: 6px; }
.n-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 32px; align-items: baseline; width: calc(100% + 24px); margin: 0 -12px; padding: 9px 12px; border-radius: 8px; text-align: left; }
button.n-row:hover { background: rgb(18 13 11 / .045); }
.n-row b { font: 600 17px/1.3 var(--f-text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-row .n-num { grid-row: 1 / 3; grid-column: 2; align-self: center; font: 700 20px/1 var(--f-display); letter-spacing: -.02em; white-space: nowrap; }
.n-row .n-sent { font-size: 15px; color: var(--muted); min-height: 1.45em; }
.n-row.quiet b { color: var(--muted); }
.n-row.quiet .n-num { color: var(--muted); }
.n-rows:not(.n-diary) .n-row.quiet .n-num { font: 400 15px/1 var(--f-text); letter-spacing: 0; }
/* The diary: a rail with a dot where each stretch starts. Colour means who (orange you, pastel the agent), so the dots are black. */
.n-diary::before { content: ''; position: absolute; left: 72px; top: 22px; bottom: 40px; width: 1px; background: rgb(18 13 11 / .16); }
.n-diary { position: relative; }
.n-diary .n-row { grid-template-columns: 56px 9px minmax(0, 1fr) auto; column-gap: 12px; }
.n-diary button.n-row:hover { background: none; }
.n-diary button.n-row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.n-diary .n-time { font-size: 14px; color: var(--muted); }
.n-diary .n-dot { align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); outline: 4px solid #f7f4ef; }
.n-diary .n-row.quiet .n-dot { background: var(--faint); }
.n-diary .n-num { grid-column: 4; margin-left: 20px; }
.n-diary .n-sent { grid-column: 3; }
.n-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.n-list { display: flex; flex-direction: column; padding: 32px 0; border-right: 1px solid rgb(18 13 11 / .14); overflow-y: auto; }
.n-lh { display: flex; align-items: baseline; padding: 0 24px 18px 27px; font-size: 15px; color: var(--muted); }
.n-lh b, .n-item b { margin-left: auto; font: 700 15px/1 var(--f-display); letter-spacing: -.02em; }
.n-item { display: flex; align-items: center; gap: 10px; flex: none; height: 52px; padding: 0 24px; border-left: 3px solid transparent; text-align: left; font: 600 16px/1.3 var(--f-text); letter-spacing: -.01em; }
.n-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-item:hover { background: rgb(18 13 11 / .045); }
.n-item.on { border-left-color: var(--accent); background: var(--tint); }
.n-item.new { color: var(--muted); }
.n-det { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.n-det .n-page { padding: 48px 32px 32px; }
.ny .act { background: none; border-top-color: rgb(18 13 11 / .14); flex-wrap: wrap; }
.n-due { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--muted); }
.n-due b { font: 700 15px/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }

/* ---- The project dialog ---- */
.dlg-back { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(18 13 11 / .5); }
.dlg { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; padding: 28px; border-radius: 8px; background: #fff; }
.dlg-h { display: flex; align-items: center; }
.dlg-h h2 { margin-right: auto; font: 600 20px/1.2 var(--f-text); letter-spacing: -.01em; }
.dlg .x, .dlg .folder button { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 5px; background: #f1ece6; }
.dlg .folder button { margin-left: auto; background: var(--chip); }
.dlg-f, .dlg-adv { display: flex; flex-direction: column; gap: 18px; }
.dlg-f label, .dlg-f .fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dlg-f input[type=text], .dlg-f select { height: 40px; min-width: 0; padding: 0 12px; border: 1px solid rgb(18 13 11 / .22); border-radius: 6px; background: #fff; color: var(--ink); font: 400 15px/1 var(--f-text); }
.dlg-f input:focus, .dlg-f select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.dlg-f .rowx { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; color: var(--ink); }
.dlg-f .rowx input { width: 96px; text-align: right; }
.dlg-f .said { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.dlg-f .seg button { height: 34px; }
.dlg-f .seg button:disabled { opacity: .45; }
.dlg-f select.vat { flex: 1; }
.dlg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dlg-two .rowx input { flex: 1; width: auto; }
.dlg-f .folder { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 5px 5px 12px; border-radius: 6px; background: #f7f4ef; font-size: 15px; font-weight: 400; color: var(--ink); }
.dlg-f .folder span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-f select.addf { height: 30px; max-width: 180px; padding: 0 8px; border: 0; background: var(--chip); font: 600 13px/1 var(--f-text); }
.dlg-f small { font-size: 13px; font-weight: 400; color: var(--muted); }
.dlg-adv > small { margin-top: -10px; }
.dlg-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dlg-more .ico { transition: transform .15s var(--ease); }
.dlg-more.open .ico { transform: rotate(90deg); }
.dlg-f .chk { flex-direction: row; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; color: var(--ink); }
.dlg-f .chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.dlg .err { margin-top: -10px; font-size: 13px; color: var(--accent-text); }
.dlg-b { display: flex; align-items: center; gap: 8px; }
.dlg-b .link { margin-right: auto; color: var(--muted); }
@media (max-width: 860px) {
  .n-body { display: block; }
  .n-list { border-right: 0; border-bottom: 1px solid rgb(18 13 11 / .14); padding: 16px 0; }
  .n-page, .n-det .n-page { padding: 28px 16px; overflow: visible; }
  .n-hero .lavatext { font-size: 56px; }
  .n-due { margin-left: 0; width: 100%; justify-content: space-between; }
}
.n-item.quiet { color: var(--muted); }
.dlg-f .mk { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; font-size: 15px; font-weight: 400; color: var(--ink); }
.dlg-f .rowx .mk input { width: 56px; }
.menu .item small { margin-left: auto; padding-left: 20px; font-size: 12px; color: var(--muted); }
.n-title .menu { min-width: 0; }
.n-title .menu .item { white-space: nowrap; }
