/* The H&A employee portal: in-universe, 2028. Same night as the rest of the site,
   with a little corporate blue — the one colour the company owns. */
:root {
  --bg: #000;
  --ink: #e8e3d8;
  --ink-2: rgba(232, 227, 216, .62);
  --ink-3: rgba(232, 227, 216, .5);
  --line: rgba(232, 227, 216, .14);
  --panel: rgba(232, 227, 216, .04);
  --blue: #7da9d9;            /* H&A corporate blue, quiet */
  --blue-ink: rgba(125, 169, 217, .8);
  --red: #e66;                /* site red (the EGG hex) */
  --serif: Georgia, 'Times New Roman', serif;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--ink); color-scheme: dark; }

/* thin dark scrollbars that sit in the night instead of on it */
* { scrollbar-width: thin; scrollbar-color: rgba(232, 227, 216, .16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 227, 216, .14); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 227, 216, .26); }
::-webkit-scrollbar-button { display: none; }
body { background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

/* ---------- login stage ---------- */
.stage { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; }

.mark { text-align: center; margin-bottom: 7vh; }
.logo { display: block; height: auto; }
.mark .logo { width: 120px; margin: 0 auto 30px; }
.mark h1 {
  font-family: var(--display); font-weight: 300; font-size: 52px; letter-spacing: .3em; margin-right: -.3em;
  color: var(--ink); opacity: .92; line-height: 1;
}
.mark p { font-family: var(--serif); font-style: italic; color: var(--ink-3); letter-spacing: .08em; margin-top: 1em; font-size: 15px; }

.card { width: min(340px, 100%); }
.card label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.card input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); font: inherit; letter-spacing: .02em; outline: none;
  transition: border-color .25s, background .25s;
}
.card input:focus { border-color: var(--blue-ink); background: rgba(125, 169, 217, .06); }
.card button {
  width: 100%; margin-top: 6px; padding: 11px 12px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); font: inherit; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: border-color .25s, color .25s, background .25s;
}
.card button:hover, .card button:focus-visible { border-color: var(--blue-ink); color: var(--blue); background: rgba(125, 169, 217, .06); }
.card button[disabled] { opacity: .5; cursor: wait; }

.error { margin-top: 18px; color: var(--red); font-size: 13px; letter-spacing: .03em; text-align: center; }
.legacy-link { margin-top: 26px; font-size: 12.5px; color: var(--ink-3); text-align: center; letter-spacing: .02em; }
.legacy-link a { color: var(--blue); }

.foot { margin-top: 9vh; font-size: 11px; letter-spacing: .1em; color: var(--ink-3); text-align: center; text-transform: lowercase; }

/* ---------- the portal app (signed in) ----------
   Filled surfaces instead of outlines, sentence case, solid buttons (hona, 11-09). */
.portal {
  --s0: #050607; --s1: #0d0e10; --s2: #15171a; --s3: #1d2024;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr);
  height: 100vh; height: 100svh; padding: 0;
}
.portal.compact { grid-template-columns: 60px minmax(0, 1fr); }
.portal .ico { width: 16px; height: 16px; flex: none; }
.muted { color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--blue); color: #08121e; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #95bae3; text-decoration: none; }
.btn.ghost { background: var(--s2); color: var(--ink); font-weight: 500; }
.btn.ghost:hover { background: var(--s3); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--s2); }

/* top bar */
.top { grid-column: 1 / -1; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; background: var(--s0); border-bottom: 1px solid rgba(232, 227, 216, .07); }
.portal.compact .top { grid-template-columns: 220px minmax(0, 1fr) auto; }
.brand { display: flex; align-items: center; gap: 12px; padding-left: 18px; font-family: var(--display); font-size: 19px; letter-spacing: .22em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; }
.gsearch { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-left: 20px; padding: 0 12px; height: 34px; border-radius: 6px; background: var(--s2); color: var(--ink-3); }
.gsearch:focus-within { background: var(--s3); box-shadow: 0 0 0 1px rgba(125, 169, 217, .5); }
.gsearch > input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 13px; }
.gsearch > input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.top-right { display: flex; align-items: center; gap: 4px; padding-right: 14px; }
.iconbtn { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--s2); color: var(--ink); text-decoration: none; }
.iconbtn.off { opacity: .4; cursor: default; }
.iconbtn.off:hover { background: none; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--blue); color: #08121e; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.me { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding: 3px 8px 3px 3px; border: 0; border-radius: 20px; background: none; color: var(--ink-2); font: inherit; font-size: 12.5px; line-height: 1.25; text-align: left; cursor: pointer; }
.me:hover { background: var(--s2); }
.me b { display: block; color: var(--ink); font-weight: 500; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(125, 169, 217, .18); color: var(--blue); font-size: 13px; font-weight: 600; }
.avatar.big { width: 48px; height: 48px; font-size: 19px; margin-bottom: 4px; }
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--s2); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); padding: 12px; }
.me-pop { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 240px; padding: 18px; font-size: 13px; text-align: center; }
.me-pop b { color: var(--ink); font-weight: 600; }
.me-pop .btn { margin-top: 12px; width: 100%; background: var(--s3); }
.apps-pop { width: 300px; }
.apps-pop .apps { padding: 0; grid-template-columns: repeat(3, 1fr); }
.apps-pop .apps a, .apps-pop .apps span { background: var(--s1); }

/* sidebar */
.side { display: flex; flex-direction: column; padding: 12px 0; background: #030304; border-right: 1px solid rgba(232, 227, 216, .07); overflow-y: auto; }
.side a, .side span.off { display: flex; align-items: center; gap: 12px; margin: 1px 8px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.side a:hover { background: var(--s1); color: var(--ink); text-decoration: none; }
.side a[aria-current] { background: var(--s2); color: var(--ink); }
.side a[aria-current] .ico { color: var(--blue); }
.side span.off { opacity: .38; cursor: default; }
.side .n { margin-left: auto; font-size: 11px; color: var(--blue); font-variant-numeric: tabular-nums; }
.side .sep { margin: 16px 18px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.side .side-foot { margin-top: auto; padding: 10px 18px; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.portal.compact .side .lbl, .portal.compact .side .sep, .portal.compact .side .side-foot, .portal.compact .side .n { display: none; }
.portal.compact .side a, .portal.compact .side span.off { justify-content: center; padding: 10px 0; }

.main { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.main > section { height: 100%; overflow-y: auto; }

/* widgets */
.w { background: var(--s1); border-radius: 10px; }
.w-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px 8px; }
.w-head h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.w-head > a:not(.btn) { font-size: 12.5px; }
.w-body { padding: 4px 0 8px; }
.w-empty { padding: 10px 18px 16px; color: var(--ink-3); font-size: 13px; }
.mrow { display: grid; grid-template-columns: 8px minmax(90px, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; margin: 0 6px; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.mrow:hover { background: var(--s2); text-decoration: none; }
.mrow .dot { width: 6px; height: 6px; border-radius: 50%; align-self: center; }
.mrow.unread .dot { background: var(--blue); }
.mrow .f { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow.unread .f, .mrow.unread .s { color: var(--ink); font-weight: 600; }
.mrow .d { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 16px 16px; }
.apps a, .apps span { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 8px; background: var(--s2); font-size: 12px; color: var(--ink-2); text-align: center; }
.apps a:hover { background: var(--s3); color: var(--ink); text-decoration: none; }
.apps span.off { opacity: .38; }
.apps .ico { width: 20px; height: 20px; }
.tag { display: block; font-size: 12px; font-weight: 600; color: var(--blue); }

/* home */
.home { padding: 26px 30px 48px; }
.hello { font-family: var(--display); font-weight: 300; font-size: 32px; line-height: 1.15; margin-bottom: 20px; color: var(--ink); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.issue-line { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 18px 4px; }
.issue-line b { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--ink); }
.issue-line span { font-size: 12px; }
.lead { display: block; margin: 10px 14px 12px; padding: 18px; border-radius: 8px; background: linear-gradient(120deg, rgba(125, 169, 217, .16), rgba(125, 169, 217, .03) 70%); color: var(--ink); }
.lead:hover { text-decoration: none; background: linear-gradient(120deg, rgba(125, 169, 217, .22), rgba(125, 169, 217, .05) 70%); }
.lead h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.3; margin: 6px 0; }
.lead p { font-size: 13px; color: var(--ink-2); }
.story { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; margin: 0 6px; padding: 10px 12px; border-radius: 6px; color: var(--ink); }
.story:hover { background: var(--s2); text-decoration: none; }
.story .thumb { height: 46px; border-radius: 4px; background: repeating-linear-gradient(135deg, rgba(232, 227, 216, .05) 0 6px, rgba(232, 227, 216, .02) 6px 12px); }
.story h4 { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.story p { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.app-error { margin-top: 24px; color: var(--ink-2); font-size: 13px; }

/* newsletter */
.news { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.main > .news { overflow: hidden; }
.issues { padding: 16px 8px; border-right: 1px solid rgba(232, 227, 216, .07); overflow-y: auto; }
.issue { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.issue b { font-weight: 500; }
.issue span { font-size: 11px; color: var(--ink-3); }
.issue:hover { background: var(--s1); text-decoration: none; color: var(--ink); }
.issue[aria-current] { background: var(--s2); color: var(--ink); }
.news-body { padding: 26px 34px 60px; overflow-y: auto; max-width: 900px; }
.news-title { font-family: var(--display); font-weight: 300; font-size: 34px; line-height: 1.1; color: var(--ink); }
.news-date { font-size: 12.5px; margin: 4px 0 8px; }
.news-body > .lead { margin: 14px 0 10px; padding: 24px; }
.news-body > .lead h3 { font-size: 24px; }
.stories { margin: 0 -6px; }
.back { display: inline-block; font-size: 13px; margin-bottom: 18px; }
.article { max-width: 70ch; }
.article h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.25; margin: 8px 0 8px; color: var(--ink); }
.article .byline { font-size: 12.5px; color: var(--ink-3); margin-bottom: 26px; }
.article .body { white-space: pre-wrap; font-size: 15px; line-height: 1.8; color: var(--ink); }

/* portal-wide search */
.find { padding: 26px 30px 48px; }
.find-title { font-family: var(--display); font-weight: 300; font-size: 30px; margin-bottom: 18px; color: var(--ink); }
.find-sec { max-width: 900px; margin-bottom: 16px; padding-bottom: 6px; }
.find-sec .apps { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* ---------- mail client ---------- */
.mail { display: grid; grid-template-columns: 190px minmax(280px, 380px) minmax(0, 1fr); }
.main > .mail { overflow: hidden; }
.folders { padding: 12px 8px; border-right: 1px solid rgba(232, 227, 216, .07); overflow-y: auto; min-width: 0; }
.folder { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; }
.folder:hover, .folder:focus-visible { text-decoration: none; color: var(--ink); background: var(--s1); }
.folder[aria-current="page"] { color: var(--ink); background: var(--s2); }
.folder-count { font-size: 11px; color: var(--blue); font-variant-numeric: tabular-nums; }

.list-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--s0); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 12px 10px 18px; }
.list-head h2 { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager span { margin-right: 6px; }
.pager button { width: 26px; height: 24px; border: 0; border-radius: 5px; background: var(--s2); color: var(--ink-2); font-size: 15px; line-height: 1; cursor: pointer; }
.pager button:hover:not([disabled]) { background: var(--s3); color: var(--ink); }
.pager button[disabled] { opacity: .3; cursor: default; }

.list { overflow-y: auto; flex: 1; padding: 0 6px 10px; }
.list-empty { padding: 16px 12px; color: var(--ink-3); font-size: 13px; }
.item-wrap { position: relative; }
.list .item { display: block; position: relative; padding: 10px 12px 10px 22px; border-radius: 6px; color: var(--ink-2); outline: none; }
.list .item:hover, .list .item:focus-visible { text-decoration: none; background: var(--s1); }
.list .item:focus-visible { box-shadow: 0 0 0 1px rgba(125, 169, 217, .5); }
.list .item[aria-current="true"] { background: var(--s2); }
.list .item.unread::before { content: ''; position: absolute; left: 9px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.list .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.list .from { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .count { font-size: 11px; color: var(--ink-3); margin-left: 6px; font-weight: 400; }
.list .date { display: flex; align-items: center; gap: 5px; flex: none; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.list .date .ico { width: 12px; height: 12px; }
.list .subject { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; padding-right: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .snippet { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; padding-right: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item.unread .from, .list .item.unread .subject { color: var(--ink); font-weight: 600; }
.list .subj { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .who { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; padding-right: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item.unread .subj, .list .item.unread .who { color: var(--ink); font-weight: 600; }
.star { position: absolute; right: 8px; bottom: 9px; border: 0; padding: 3px; border-radius: 4px; background: none; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s; }
.star .ico { width: 14px; height: 14px; }
.star svg path { fill: none; }
.item-wrap:hover .star, .star:focus-visible, .star.on { opacity: 1; }
.star:hover { color: var(--ink); }
.star.on { color: #e6c35c; }
.star.on svg path { fill: currentColor; }

.reader { padding: 18px 30px 48px; overflow-y: auto; min-width: 0; }
.reader .empty { color: var(--ink-3); font-size: 13px; padding-top: 8px; }
.reader-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; }
.reader-tools .back { display: none; margin: 0 auto 0 0; }
.reader h2 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.3; color: var(--ink); margin-bottom: 16px; }
.h2-count { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-left: 12px; vertical-align: middle; }

.msg { margin-bottom: 8px; border-radius: 8px; background: var(--s1); }
.msg-head { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 11px 16px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: var(--ink-2); cursor: pointer; }
.msg-head:hover { background: var(--s2); }
.msg-from { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.msg-snip { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { font-size: 11px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg.open .msg-snip { visibility: hidden; }
.msg.open .msg-head:hover { background: none; }
.msg-inner { display: none; padding: 0 16px 20px; }
.msg.open .msg-inner { display: block; }
.msg .head { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 12.5px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid rgba(232, 227, 216, .07); }
.msg .head dt { color: var(--ink-3); }
.msg .head dd { color: var(--ink-2); overflow-wrap: anywhere; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.att { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--s2); font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.att .ico { width: 13px; height: 13px; color: var(--ink-3); }
.att:hover:not([disabled]) { background: var(--s3); }
.att[disabled] { cursor: not-allowed; opacity: .5; }
.att-size { color: var(--ink-3); font-size: 11.5px; }
.msg .body { white-space: pre-wrap; color: var(--ink); font-size: 14px; line-height: 1.75; max-width: 72ch; overflow-wrap: anywhere; }

.viewer { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .7); }
.viewer-box { width: min(760px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--s1); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); }
.viewer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.viewer pre { overflow: auto; padding: 4px 18px 18px; font: 13px/1.6 ui-monospace, Consolas, monospace; color: var(--ink); white-space: pre-wrap; }

/* ---------- service desk (reuses the mail panes) ---------- */
.desk { display: grid; grid-template-columns: 190px minmax(280px, 380px) minmax(0, 1fr); }
.main > .desk { overflow: hidden; }
.desk .list .item { padding-left: 12px; }
.tmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 5px; font-size: 11.5px; }
.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: var(--s3); color: var(--ink-2); }
.status.s-open, .status.s-new { background: rgba(125, 169, 217, .18); color: var(--blue); }
.status.s-pending, .status.s-in-progress, .status.s-waiting, .status.s-waiting-on-requester, .status.s-on-hold { background: rgba(230, 195, 92, .16); color: #e6c35c; }
.status.s-resolved, .status.s-closed { background: rgba(120, 190, 140, .14); color: #8cc79e; }
.status.s-cancelled, .status.s-rejected { background: rgba(230, 102, 102, .14); color: var(--red); }
.prio { font-weight: 600; color: var(--red); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 0 0 22px; padding: 14px 16px; border-radius: 8px; background: var(--s1); font-size: 12.5px; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { color: var(--ink); overflow-wrap: anywhere; }
dl.facts dd.status { justify-self: start; }
.msg-head.static { cursor: default; }
.msg-head.static:hover { background: none; }
.msg.internal { box-shadow: inset 3px 0 0 #e6c35c; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.main > .cal { overflow: hidden; }
.cal-main { display: flex; flex-direction: column; min-height: 0; padding: 22px 24px 20px 30px; overflow-y: auto; }
.cal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.cal-head h1 { font-family: var(--display); font-weight: 300; font-size: 32px; line-height: 1.1; color: var(--ink); }
.cal-head p { font-size: 12.5px; margin-top: 2px; }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(92px, 1fr); gap: 4px; flex: 1; }
.cal-dow { align-self: end; padding: 0 8px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cal-grid .cal-dow { height: auto; }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 6px 7px; border-radius: 6px; background: var(--s1); }
.cal-cell.blank { background: none; }
.cal-cell.today { box-shadow: inset 0 0 0 1px rgba(125, 169, 217, .55); }
.cal-date { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.cal-date b { font-size: 13px; font-weight: 600; color: var(--ink); }
.cal-cell.today .cal-date b { color: var(--blue); }
.cal-date span { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 4px; background: rgba(125, 169, 217, .14); color: var(--ink); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover, .cal-ev.on { background: rgba(125, 169, 217, .3); text-decoration: none; }
.cal-more { font-size: 11px; color: var(--ink-3); padding-left: 6px; }
.cal-side { padding: 22px 22px 40px; overflow-y: auto; border-left: 1px solid rgba(232, 227, 216, .07); }
.cal-side h2 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.cal-side .back + h2 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.3; }
.cal-side .body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.agenda { display: grid; gap: 1px; margin: 0 -10px; padding: 9px 10px; border-radius: 6px; color: var(--ink); }
.agenda:hover { background: var(--s1); text-decoration: none; }
.ag-day { font-size: 11px; color: var(--blue); font-weight: 600; }
.ag-title { font-size: 13.5px; }
.ag-meta { font-size: 11.5px; color: var(--ink-3); }

@media (max-width: 1100px) {
  .desk, .docs { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cal { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; overflow-y: auto; }
  .main > .cal { overflow-y: auto; }
  .cal-main { overflow: visible; }
  .cal-side { border-left: 0; border-top: 1px solid rgba(232, 227, 216, .07); overflow: visible; }
}
@media (max-width: 760px) {
  .desk, .contacts, .docs { grid-template-columns: minmax(0, 1fr); }
  .docs.reading .list-pane { display: none; }
  .docs:not(.reading) .reader { display: none; }
  .contacts.reading .list-pane { display: none; }
  .contacts:not(.reading) .reader { display: none; }
  .adv-checks, .adv-legacy { padding-left: 0 !important; }
  .adv-pop label, .adv-row label:first-child { grid-template-columns: 90px 1fr; }
  .adv-row { grid-template-columns: 1fr; }
  .desk.reading .list-pane { display: none; }
  .desk:not(.reading) .reader { display: none; }
  .cal-main { padding: 16px 10px; }
  .cal-grid { gap: 2px; grid-auto-rows: minmax(58px, auto); }
  .cal-date span { display: none; }
  .cal-ev { font-size: 0; height: 6px; padding: 0; }
  .cal-head h1 { font-size: 26px; }
}

/* ---------- advanced search ---------- */
.gsearch { position: relative; }
.adv-btn { display: grid; place-items: center; width: 26px; height: 26px; margin-right: -6px; border: 0; border-radius: 5px; background: none; color: var(--ink-3); cursor: pointer; }
.adv-btn:hover { background: var(--s3); color: var(--ink); }
.adv-pop { left: 0; right: auto; width: min(460px, calc(100vw - 24px)); padding: 16px 18px; display: grid; gap: 10px; color: var(--ink); font-size: 12.5px; }
.adv-pop h3 { font-size: 14px; font-weight: 600; }
.adv-pop label { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; color: var(--ink-2); }
.adv-pop input:not([type]), .adv-pop select { height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--s3); color: var(--ink); font: inherit; outline: none; min-width: 0; }
.adv-pop input:not([type]):focus, .adv-pop select:focus { box-shadow: 0 0 0 1px rgba(125, 169, 217, .55); }
.adv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adv-row label { grid-template-columns: 50px 1fr; }
.adv-row label:first-child { grid-template-columns: 110px 1fr; }
.adv-pop .adv-legacy { display: flex; justify-content: flex-start; align-items: center; gap: 6px; padding-left: 120px; color: var(--ink-3); }
.adv-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-left: 120px; }
.adv-checks label { display: flex; gap: 6px; }
.adv-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.adv-hint { color: var(--ink-3); font-size: 11.5px; line-height: 1.9; }
.adv-hint code { padding: 1px 5px; border-radius: 4px; background: var(--s3); color: var(--ink-2); font-size: 11px; }

/* ---------- contacts ---------- */
.contacts { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
.main > .contacts { overflow: hidden; }
.sorter { display: flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--s1); }
.sorter button { height: 24px; padding: 0 8px; border: 0; border-radius: 5px; background: none; color: var(--ink-3); font: inherit; font-size: 11.5px; cursor: pointer; }
.sorter button.on { background: var(--s3); color: var(--ink); }
.cfilter { padding: 0 12px 8px; }
.cfilter input { width: 100%; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--s2); color: var(--ink); font: inherit; font-size: 12.5px; outline: none; }
.list .item.contact { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; }
.c-txt { min-width: 0; }
.c-txt .from, .c-txt .snippet { display: block; }
.c-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.c-head h2 { margin: 0; }
.c-head p { font-size: 12.5px; }
.reader .w { margin-top: 4px; }
.reader .w-head h2 { font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0; }
a.plink { color: var(--ink); }
a.plink:hover { color: var(--blue); }

/* ---------- documents ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(260px, 360px) minmax(0, 1fr); }
.main > .docs { overflow: hidden; }
.docpage { max-width: 76ch; }
.docpage h1 { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.25; margin: 6px 0 6px; color: var(--ink); }
.docpage .byline { font-size: 12.5px; color: var(--ink-3); margin-bottom: 24px; }
.md { font-size: 14.5px; line-height: 1.75; color: var(--ink); }
.md p, .md ul, .md ol, .md table { margin-bottom: 14px; }
.md h2, .md h3, .md h4 { font-family: var(--sans); font-weight: 600; color: var(--ink); margin: 22px 0 8px; line-height: 1.35; }
.md h2 { font-size: 18px; } .md h3 { font-size: 16px; } .md h4 { font-size: 14.5px; }
.md ul, .md ol { padding-left: 22px; }
.md table { border-collapse: collapse; font-size: 13px; width: 100%; }
.md th, .md td { text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(232, 227, 216, .08); }
.md th { color: var(--ink-2); font-weight: 600; background: var(--s1); }

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .mail { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .folders { grid-column: 1 / -1; display: flex; gap: 4px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid rgba(232, 227, 216, .07); overflow-x: auto; scrollbar-width: none; }
  .folder { gap: 8px; white-space: nowrap; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .portal, .portal.compact { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .top, .portal.compact .top { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; }
  .brand { padding-left: 14px; }
  .brand { font-size: 0; letter-spacing: 0; }
  .gsearch { margin-left: 0; }
  .me-txt, .top-right .iconbtn.off { display: none; }
  .top-right { padding-right: 8px; }
  .side { grid-row: 3; flex-direction: row; justify-content: space-around; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid rgba(232, 227, 216, .07); overflow: visible; }
  .side span.off, .side .sep, .side .side-foot, .side .n { display: none; }
  .side a, .portal.compact .side a { flex-direction: column; gap: 3px; margin: 0; padding: 6px 14px; font-size: 11px; }
  .portal.compact .side .lbl { display: inline; }
  .home, .find { padding: 20px 16px 40px; }
  .hello { font-size: 27px; }
  .mrow { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .mrow { row-gap: 2px; }
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mrow .d { grid-row: 1; grid-column: 3; }
  .mrow .s { grid-row: 2; grid-column: 2 / 4; font-size: 12px; }
  .news { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .issues { display: flex; gap: 4px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid rgba(232, 227, 216, .07); overflow-x: auto; scrollbar-width: none; }
  .issue { gap: 8px; white-space: nowrap; }
  .news-body { padding: 20px 16px 40px; }
  .mail { grid-template-columns: minmax(0, 1fr); }
  .mail.reading .list-pane { display: none; }
  .mail:not(.reading) .reader { display: none; }
  .reader { padding: 14px 16px 40px; }
  .reader-tools .back { display: inline; }
  .star { opacity: 1; }
  .pop { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; }
}
