/* Product windows on the Apps page. This is client software, not the agency site, so it follows
   the conventions of software: small type, dense data, status colour, soft corners.
   It is the one place corners are rounded (see DESIGN.md and _build/check-solid.mjs).
   Everything is in em, set from the container width, so it is true app size on a laptop. */
:root { --brand: #0f6b4f; }
.pw {
  --brand-tint: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-mid: color-mix(in srgb, var(--brand) 22%, #fff);
  --t1: #1b1b21; --t2: #65656f; --t3: #8d8d96; --ln: #ececea; --bg2: #f8f8f6;
  --ok: #146c43; --ok-bg: #e4f3ea; --warn: #8a5300; --warn-bg: #fbf0d9; --bad: #b3261e; --bad-bg: #fce9e7;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  height: 55em;
  font-size: clamp(11px, calc(100cqw / 107), 14px);
  font-family: var(--font); font-weight: 400; line-height: 1.35; letter-spacing: 0; color: var(--t1);
  background: #fff; border: 1px solid #dcdbd5; border-radius: 0.85em; overflow: hidden; cursor: default;
}
.pw p, .pw ul, .pw dl { margin: 0; }
.pw em { font-style: normal; }
.pw b { font-weight: 600; }
.pi { width: 1.15em; height: 1.15em; flex: none; }

/* Browser */
.pbar { display: grid; grid-template-columns: 1fr minmax(0, 2.4fr) 1fr; align-items: center; padding: 0.55em 1em; background: #f1f0ed; border-bottom: 1px solid #e3e2dd; }
.pdots { display: inline-flex; gap: 0.45em; grid-column: 1; grid-row: 1; }
.pdots i { width: 0.85em; height: 0.85em; border-radius: 50%; background: #d3d2cc; }
.pdots i:nth-child(1) { background: #ec6a5e; } .pdots i:nth-child(2) { background: #f4bf4f; } .pdots i:nth-child(3) { background: #61c554; }
.pnavb { grid-column: 1; grid-row: 1; margin-left: 5.5em; color: var(--t3); font-size: 1.25em; line-height: 1; word-spacing: 0.3em; }
.paddr { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 0.4em; min-width: 0; padding: 0.3em 0.8em; background: #fff; border-radius: 0.5em; font-size: 0.92em; color: var(--t1); white-space: nowrap; overflow: hidden; }
.paddr .pi { width: 0.9em; height: 0.9em; color: var(--t3); }
.paddr__path { margin-left: -0.4em; color: var(--t3); }

/* App frame */
.pw__app { display: flex; min-height: 0; overflow: hidden; }
.pside { display: flex; flex-direction: column; flex: none; width: 15.5em; padding: 0.9em 0.7em; background: var(--bg2); border-right: 1px solid var(--ln); }
.pbrand { display: flex; align-items: center; gap: 0.55em; min-width: 0; padding: 0.15em 0.4em; font-size: 1.04em; }
.pbrand b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: -0.01em; }
.pbrand--m { display: none; }
.plogo { display: grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 0.4em; background: var(--brand); color: #fff; font-weight: 700; font-size: 0.92em; transition: background-color 0.4s var(--ease); }
.pnav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.12em; margin-top: 1.3em !important; }
.pnav li { display: flex; align-items: center; gap: 0.6em; padding: 0.46em 0.55em; border-radius: 0.45em; color: var(--t2); white-space: nowrap; }
.pnav li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pnav li em { margin-left: auto; font-size: 0.86em; color: var(--t3); }
.pnav li.is-on { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.pnav li.is-on em { color: inherit; }
.pside__foot { margin-top: auto; padding: 0.6em 0.4em 0; border-top: 1px solid var(--ln); }
.pmain { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.ptop { display: flex; align-items: center; gap: 1em; flex: none; padding: 0.55em 1.5em; border-bottom: 1px solid var(--ln); }
.psearch { display: flex; align-items: center; gap: 0.5em; width: 19em; padding: 0.34em 0.6em; background: var(--bg2); border: 1px solid var(--ln); border-radius: 0.5em; color: var(--t3); }
.psearch kbd { margin-left: auto; font: inherit; font-size: 0.82em; }
.ptop__r { display: flex; align-items: center; gap: 0.9em; margin-left: auto; color: var(--t2); }
.pbellw { position: relative; display: inline-flex; }
.pbellw i { position: absolute; top: -0.1em; right: -0.1em; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--bad); }
.pcontent { flex: 1; min-height: 0; padding: 1.3em 1.5em 0; overflow: hidden; }

.pav { display: inline-grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; font-size: 0.82em; font-weight: 600; }
.pav.t0 { background: #e7e3f6; color: #4c3a9c; } .pav.t1 { background: #dff0e8; color: #1c6a4b; } .pav.t2 { background: #fbe6d8; color: #9a4518; }
.pav.t3 { background: #f6e1e8; color: #94304f; } .pav.t4 { background: #ebe9e2; color: #55524a; }
.pwho { display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; }

/* Page head */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5em; margin-bottom: 1.1em; }
.pcrumb { color: var(--t3); font-size: 0.92em; }
.pcrumb u { text-decoration: none; margin-inline: 0.2em; }
.ptitle { font-size: 1.6em; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 0.1em; }
.psub { color: var(--t2); margin-top: 0.1em !important; }
.pacts { display: flex; align-items: center; gap: 0.5em; flex: none; }
.pbtn { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.42em 0.8em; background: #fff; border: 1px solid #dfdfdb; border-radius: 0.5em; font-weight: 500; white-space: nowrap; }
.pbtn--p { background: var(--brand); border-color: var(--brand); color: #fff; transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease); }
.pseg { display: inline-flex; padding: 0.15em; background: #f0efec; border-radius: 0.5em; font-size: 0.95em; color: var(--t2); }
.pseg > * { padding: 0.28em 0.7em; font-weight: 500; }
.pseg b { background: #fff; color: var(--t1); border-radius: 0.38em; }

/* Status */
.ppill { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.14em 0.55em; border-radius: 1em; background: #f0efec; color: #55555f; font-size: 0.9em; font-weight: 500; white-space: nowrap; }
.ppill i { width: 0.45em; height: 0.45em; border-radius: 50%; background: currentColor; }
.ppill.ok { background: var(--ok-bg); color: var(--ok); }
.ppill.warn { background: var(--warn-bg); color: var(--warn); }
.ppill.bad { background: var(--bad-bg); color: var(--bad); }
.ppill.brand { background: var(--brand-tint); color: var(--brand); }

/* Numbers */
.pkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8em; margin-bottom: 0.9em; }
.pkpi { position: relative; display: grid; gap: 0.1em; padding: 0.75em 0.95em; border: 1px solid var(--ln); border-radius: 0.65em; }
.pkpi > span { color: var(--t2); font-size: 0.95em; }
.pkpi b { font-size: 1.7em; letter-spacing: -0.02em; line-height: 1.2; }
.pkpi em { color: var(--t3); font-size: 0.9em; }
.pkpi em.up { color: var(--ok); } .pkpi em.down { color: var(--bad); }
.pspark { position: absolute; right: 0.95em; bottom: 0.9em; width: 5.5em; height: 1.9em; overflow: visible; }
.pspark path { fill: none; stroke: var(--brand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* Cards and tables */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 21em; gap: 0.9em; align-items: start; }
.pcard { padding: 0.85em 0.95em; border: 1px solid var(--ln); border-radius: 0.65em; min-width: 0; }
.pcard--flush { padding: 0; overflow: hidden; }
.pcard__h { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.pcard--flush .pcard__h { padding: 0.7em 0.95em; }
.pcard__h--in { margin-top: 1.1em; }
.pmeta { display: inline-flex; align-items: center; gap: 0.3em; color: var(--t3); font-size: 0.92em; }
.ptbl { width: 100%; border-collapse: collapse; }
.ptbl th { padding: 0.45em 0.95em; background: var(--bg2); border-block: 1px solid var(--ln); color: var(--t2); font-size: 0.9em; font-weight: 500; text-align: left; white-space: nowrap; }
.ptbl td { padding: 0.58em 0.95em; border-bottom: 1px solid var(--ln); white-space: nowrap; color: var(--t2); }
.ptbl td b, .ptbl td .pwho { color: var(--t1); font-weight: 500; }
.ptbl td em { display: block; color: var(--t3); font-size: 0.9em; }
.ptbl .r { text-align: right; color: var(--t1); }
.ptbl tbody tr { transition: background-color 0.15s; }
.ptbl tbody tr:hover { background: var(--bg2); }
.ptbl tr.is-on { background: var(--brand-tint) !important; }
.ptbl--tall td { padding-block: 0.46em; }
.pitem { display: flex; align-items: center; gap: 0.6em; }
.pmono { font-family: var(--font-code); font-size: 0.88em; color: var(--t2); }
.pprog { display: flex; align-items: center; gap: 0.6em; }
.pprog i, .pstock i, .pbarsh i { display: block; flex: 1; min-width: 4em; height: 0.4em; background: #efeeeb; border-radius: 1em; overflow: hidden; }
.pprog i b, .pstock i b, .pbarsh i b { display: block; height: 100%; background: var(--brand); border-radius: 1em; transition: background-color 0.4s var(--ease); }

.pagenda { display: grid; gap: 0.75em; margin-top: 0.8em !important; }
.pagenda li { display: flex; align-items: center; gap: 0.7em; min-width: 0; }
.pagenda li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.pagenda li b { font-weight: 500; }
.pagenda em { color: var(--t3); font-size: 0.92em; }
.pdate { display: grid; place-items: center; flex: none; width: 2.9em; padding: 0.25em 0; background: var(--brand-tint); color: var(--brand); border-radius: 0.5em; line-height: 1.1; }
.pdate i { font-style: normal; font-size: 0.8em; }
.pdate b { font-size: 1.1em; font-weight: 600 !important; }
.ptime { flex: none; width: 3em; color: var(--t2); }

/* Split pane */
.psplit { display: grid; grid-template-columns: minmax(0, 1fr) 22em; gap: 1.3em; height: 100%; margin-inline: -1.5em; padding-left: 1.5em; align-items: start; }
.ptabs { display: flex; gap: 1.5em; margin-bottom: 0.6em; border-bottom: 1px solid var(--ln); color: var(--t2); }
.ptabs > * { padding-bottom: 0.5em; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.ptabs b { color: var(--t1); border-bottom: 2px solid var(--brand); }
.ptabs em { color: var(--t3); font-size: 0.9em; }
.pdrawer { padding: 0.95em 1.2em; border-left: 1px solid var(--ln); height: 100%; min-width: 0; }
.pname { font-size: 1.2em; font-weight: 600; letter-spacing: -0.01em; }
.ppills { display: flex; gap: 0.4em; margin-top: 0.5em; }
.pdl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em 1em; margin-top: 0.9em !important; }
.pdl--one { grid-template-columns: 1fr; gap: 0.4em; margin-top: 0.5em !important; }
.pdl--one div { display: flex; justify-content: space-between; }
.pdl dt { color: var(--t3); font-size: 0.9em; }
.pdl dd { margin: 0; font-weight: 500; }
.plabel { display: flex; justify-content: space-between; margin-top: 1.1em !important; font-weight: 600; }
.pdrawer > .plabel:first-child { margin-top: 0 !important; }
.plabel span { color: var(--t3); font-weight: 400; }
.pchecks { display: grid; gap: 0.35em; margin-top: 0.5em !important; }
.pchecks li { display: flex; align-items: center; gap: 0.55em; color: var(--t2); }
.pchecks li::before { content: ''; flex: none; width: 1em; height: 1em; border: 1.5px solid #cfcec9; border-radius: 0.28em; }
.pchecks li.on { color: var(--t3); text-decoration: line-through; }
.pchecks li.on::before { background: var(--brand); border-color: var(--brand); }
.plog { display: grid; gap: 0.6em; margin-top: 0.5em !important; }
.plog li { display: flex; gap: 0.55em; color: var(--t2); line-height: 1.3; }
.plog b { font-weight: 500; color: var(--t1); }
.plog em { display: block; color: var(--t3); font-size: 0.9em; }

/* Calendar */
.pcal { display: grid; grid-template-columns: 3.4em repeat(5, minmax(0, 1fr)); grid-template-rows: 2em repeat(20, 1.78em); position: relative; min-width: 0; }
.pcal__d { grid-row: 1; padding-left: 0.5em; color: var(--t2); font-weight: 500; }
.pcal__d b { color: var(--t1); }
.pcal__d.is-today, .pcal__d.is-today b { color: var(--brand); }
.pcal__t { grid-column: 1; align-self: start; margin-top: -0.65em; color: var(--t3); font-size: 0.85em; }
.pcal__l { grid-column: 2 / -1; align-self: start; border-top: 1px solid var(--ln); }
.pcal__tod { grid-column: 4; grid-row: 2 / -1; background: var(--brand-tint); opacity: 0.45; }
.pev { display: grid; align-content: start; gap: 0; margin: 1px 0.2em 1px 0; padding: 0.22em 0.45em; min-width: 0; border-left: 0.2em solid; border-radius: 0.3em; font-size: 0.9em; line-height: 1.22; overflow: hidden; position: relative; }
.pev b, .pev span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pev b { font-weight: 600; }
.pev.k-a { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); }
.pev.k-b { background: var(--warn-bg); border-color: #d9a441; color: var(--warn); }
.pev.k-c { background: #f0efec; border-color: #b9b8b1; color: #55555f; }
.pcal__now { grid-column: 4; align-self: start; position: relative; border-top: 2px solid var(--bad); z-index: 2; }

/* Portal */
.ptopnav { display: flex; align-items: center; gap: 2em; flex: none; padding: 0.55em 1.5em; border-bottom: 1px solid var(--ln); }
.ptopnav ul { display: flex; gap: 1.5em; color: var(--t2); font-weight: 500; }
.ptopnav li.is-on { color: var(--brand); }
.pcontent--portal { padding: 0; }
.pinbox { display: grid; grid-template-columns: 22em minmax(0, 1fr) 19em; height: 100%; }
.plist { background: var(--bg2); border-right: 1px solid var(--ln); min-width: 0; overflow: hidden; }
.plist__h { display: flex; justify-content: space-between; align-items: center; padding: 0.8em 1em; border-bottom: 1px solid var(--ln); }
.plist li { display: grid; gap: 0.15em; padding: 0.7em 1em; border-bottom: 1px solid var(--ln); }
.plist li.is-on { background: #fff; border-left: 0.2em solid var(--brand); }
.pl1 { display: flex; justify-content: space-between; gap: 0.8em; }
.pl1 b { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pl1 em { flex: none; color: var(--t3); font-size: 0.9em; }
.pl2 { color: var(--t2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pl3 { display: flex; justify-content: space-between; align-items: center; margin-top: 0.2em; }
.pthread { display: flex; flex-direction: column; min-width: 0; padding: 1em 1.4em 1.2em; }
.pthread__h { display: flex; justify-content: space-between; align-items: center; padding-bottom: 0.8em; border-bottom: 1px solid var(--ln); }
.pmsg { display: flex; gap: 0.7em; margin-top: 1.1em; line-height: 1.5; }
.pmsg > div { display: grid; gap: 0.3em; justify-items: start; min-width: 0; }
.pmsg p em { margin-left: 0.5em; color: var(--t3); font-size: 0.9em; }
.pfile { display: inline-flex; align-items: center; gap: 0.45em; margin-top: 0.3em; padding: 0.4em 0.7em; border: 1px solid var(--ln); border-radius: 0.5em; font-weight: 500; }
.pfile em { color: var(--t3); font-weight: 400; }
.pcompose { display: flex; align-items: center; gap: 0.7em; margin-top: auto; padding: 0.5em 0.5em 0.5em 0.9em; border: 1px solid #dfdfdb; border-radius: 0.6em; color: var(--t3); }
.pcompose span:first-child { flex: 1; }
.pfiles { display: grid; gap: 0.55em; margin-top: 0.55em !important; }
.pfiles li { display: flex; align-items: center; gap: 0.55em; color: var(--t2); }
.pfiles span { display: grid; min-width: 0; color: var(--t1); font-weight: 500; }
.pfiles em { color: var(--t3); font-size: 0.9em; font-weight: 400; }

/* Shop */
.pthumb { display: grid; place-items: center; flex: none; width: 2.3em; height: 2.3em; background: var(--bg2); border: 1px solid var(--ln); border-radius: 0.4em; color: var(--t3); }
.ptbl--item td { padding-block: 0.36em; }
.pstock { display: grid; gap: 0.9em; margin-top: 0.8em !important; }
.pstock li { display: grid; gap: 0.3em; }
.pstock span { display: flex; justify-content: space-between; gap: 1em; }
.pstock span b { font-weight: 500; }
.pstock em { color: var(--bad); font-size: 0.92em; flex: none; }
.pstock i b { background: var(--bad); }

/* Chart */
.plegend { display: inline-flex; align-items: center; gap: 0.4em; color: var(--t2); font-size: 0.92em; }
.plegend i { width: 0.9em; height: 2px; }
.plegend i.a { background: var(--brand); }
.plegend i.b { background: #b9b8b1; margin-left: 0.7em; }
.pchart { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); grid-template-rows: 25em auto; margin-top: 0.9em; }
.pchart__y { display: flex; flex-direction: column; justify-content: space-between; margin-block: -0.6em; color: var(--t3); font-size: 0.86em; }
.pchart__plot { position: relative; }
.pchart__plot > i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--ln); }
.pchart__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
.pchart__plot path { fill: none; vector-effect: non-scaling-stroke; }
.pchart__plot path.area { fill: var(--brand); fill-opacity: 0.08; stroke: none; }
.pchart__plot path.prev { stroke: #b9b8b1; stroke-width: 1.5; }
.pchart__plot path.now { stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.pchart__x { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #c9c8c2; }
.pchart__dot { position: absolute; width: 0.75em; height: 0.75em; margin: -0.375em; background: var(--brand); border: 2px solid #fff; border-radius: 50%; }
.pchart__tip { position: absolute; display: grid; gap: 0.1em; width: 10.5em; padding: 0.5em 0.7em; margin: 0 0 0 -11.3em; background: var(--t1); color: #fff; border-radius: 0.5em; font-size: 0.92em; }
.pchart__tip span { display: flex; justify-content: space-between; color: #c9c9d0; }
.pchart__tip em { color: #fff; font-weight: 600; }
.pchart__m { grid-column: 2; display: flex; justify-content: space-between; margin-top: 0.5em; color: var(--t3); font-size: 0.86em; }
.pbarsh { display: grid; gap: 0.65em; margin-top: 0.8em !important; }
.pbarsh li { display: grid; gap: 0.25em; }
.pbarsh span { display: flex; justify-content: space-between; color: var(--t2); }
.pbarsh span b { color: var(--t1); font-weight: 500; }

/* The window narrows the way the software would. */
@container (max-width: 1160px) {
  .pw .hs { display: none; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .paside { display: none; }
  .psplit { grid-template-columns: minmax(0, 1fr); margin-inline: 0; padding-left: 0; }
  .psplit--cal { grid-template-columns: minmax(0, 1fr) 19em; gap: 0.8em; }
  .pdrawer:not(.pdrawer--keep) { display: none; }
  .pdrawer--keep { padding-inline: 0.9em 0; }
  .pinbox { grid-template-columns: 20em minmax(0, 1fr); }
  .psearch { width: 13em; }
}
@container (max-width: 760px) {
  .pw { height: 47em; }
  .pside, .psearch, .pw .hm, .pacts .pbtn:not(.pbtn--p), .ptopnav ul, .pnavb, .pseg, .pcal { display: none; }
  .pbrand--m { display: flex; }
  .pbar { grid-template-columns: auto minmax(0, 1fr); gap: 1em; }
  .pcontent, .ptop, .ptopnav { padding-inline: 1em; }
  .pcontent--portal { padding-inline: 0; }
  .ptop__r .pwho span { display: none; }
  .pkpis { grid-template-columns: 1fr 1fr; }
  .pspark { display: none; }
  .phead { align-items: center; }
  .ptbl th, .ptbl td { padding-inline: 0.6em; }
  .ptabs { gap: 1em; overflow: hidden; }
  .pinbox { grid-template-columns: minmax(0, 1fr); }
  .psplit--cal { grid-template-columns: minmax(0, 1fr); }
  .pdrawer--keep { padding-inline: 0; border-left: 0; }
  .pchart { grid-template-rows: 15em auto; }
}
