/* EMCO Hub: design system and page styles.
   Brand: EMCO navy #004681 and sky #00ADEF, from the logo. Display type: Archivo, widened to echo the
   extended EMCO wordmark. Body type: Inter. */
:root {
  --navy-950: #001a33; --navy-900: #00294d; --navy-800: #00365f; --navy: #004681; --navy-600: #0b5a9c;
  --sky: #00adef; --sky-600: #0092cc; --sky-700: #0077a8; --sky-200: #a6e3fa; --sky-100: #d6f2fd; --sky-50: #eef9fe;
  --ink: #0f1c2b; --ink-2: #3a4a5c; --muted: #66778a; --line: #e2e8ef; --line-2: #eef2f6; --bg: #f3f6f9; --surface: #fff;
  --red: #d13b44; --red-50: #fdeeee; --green: #15824f; --green-50: #e7f5ee; --violet: #5b4bc4; --violet-50: #efedfb;
  --amber: #b86e00; --amber-50: #fff4e0;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(15, 28, 43, .05), 0 1px 1px rgba(15, 28, 43, .03);
  --sh-2: 0 6px 18px -6px rgba(0, 41, 77, .14), 0 2px 4px rgba(0, 41, 77, .04);
  --sh-3: 0 24px 48px -18px rgba(0, 26, 51, .38), 0 4px 10px -4px rgba(0, 26, 51, .1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sky-200); outline-offset: 2px; }
kbd { font: 600 11px/1 var(--font); padding: 4px 6px; border-radius: 6px; background: rgba(15, 28, 43, .06); color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.display { font-family: var(--display); font-stretch: 115%; font-weight: 800; letter-spacing: -.005em; }

/* ---------- dev-mode bar ---------- */
.devbar { position: relative; z-index: 31; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; color: #fff;
  background: repeating-linear-gradient(-45deg, #9b1c26 0 14px, #8a1620 14px 28px); }
.devbar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; height: 68px; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, box-shadow .25s; }
.top .wrap { position: relative; height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 104px; display: block; filter: brightness(0) invert(1); transition: filter .25s; }
.brand .tag { font: 700 11px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .78); padding: 4px 0 4px 14px; border-left: 1px solid rgba(255, 255, 255, .28); transition: color .25s, border-color .25s; }
.top.solid { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--line); }
.top.solid .brand img { filter: none; }
.top.solid .brand .tag { color: var(--navy); border-left-color: var(--line); }
.top-search { margin-left: auto; display: flex; align-items: center; gap: 10px; height: 40px; width: 300px; padding: 0 8px 0 14px; border-radius: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--line);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .2s, transform .2s; }
.top-search span { flex: 1; font-size: 14px; }
.top.solid .top-search { opacity: 1; transform: none; pointer-events: auto; }
.top-search:hover { border-color: #cbd6e1; }
.me { margin-left: 8px; display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; color: #fff; transition: background .2s; }
.me:hover { background: rgba(255, 255, 255, .1); }
.top.solid .me { color: var(--ink); }
.top.solid .me:hover { background: var(--bg); }
.me-name { font-weight: 600; font-size: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 13px/1 var(--font); color: #fff;
  background: linear-gradient(135deg, var(--sky) 0%, var(--navy) 100%); box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; box-shadow: none; }
.menu { position: absolute; right: 28px; top: 62px; width: 300px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-3); color: var(--ink);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .16s, transform .16s var(--ease); }
.menu.on { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; gap: 12px; align-items: center; padding: 12px; }
.menu-head b { display: block; font-size: 15px; }
.menu-head small { display: block; color: var(--muted); font-size: 12.5px; word-break: break-all; }
.menu-note { display: flex; gap: 8px; align-items: center; padding: 6px 12px 10px; font-size: 12.5px; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.menu-item:hover { background: var(--bg); color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -68px; padding: 68px 0 116px; color: #fff;
  background: radial-gradient(1100px 520px at 88% -18%, rgba(0, 173, 239, .38), transparent 62%),
              radial-gradient(800px 420px at -8% 125%, rgba(0, 173, 239, .2), transparent 60%),
              linear-gradient(162deg, #00528f 0%, var(--navy) 42%, var(--navy-900) 100%); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.hero svg.stripes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-in { padding-top: 46px; }
.eyebrow { font: 700 12px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: #8adcfb; }
.hero h1 { margin: 14px 0 12px; font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.04; letter-spacing: -.01em; }
.lede { margin: 0; max-width: 660px; font-size: 16.5px; color: rgba(255, 255, 255, .78); }
.lede b { color: #fff; font-weight: 600; }
.cmd { margin-top: 28px; display: flex; align-items: center; gap: 12px; width: min(640px, 100%); height: 58px; padding: 0 14px 0 18px; border-radius: 16px; background: #fff; color: var(--muted); font-size: 15.5px;
  box-shadow: 0 22px 44px -20px rgba(0, 8, 24, .7), 0 0 0 1px rgba(255, 255, 255, .5); transition: transform .2s var(--ease), box-shadow .2s; }
.cmd:hover { transform: translateY(-1px); box-shadow: 0 28px 50px -20px rgba(0, 8, 24, .75), 0 0 0 4px rgba(0, 173, 239, .35); }
.cmd svg.i { color: var(--navy); width: 22px; height: 22px; }
.cmd span { flex: 1; }
.hero-label { margin-top: 44px; font: 700 12px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }

/* ---------- app cards ---------- */
.apps { position: relative; z-index: 2; margin-top: -90px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 20px; }
.app { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); transition: transform .3s var(--ease), box-shadow .3s; }
.app:hover { transform: translateY(-3px); box-shadow: 0 30px 56px -18px rgba(0, 26, 51, .45), 0 4px 10px -4px rgba(0, 26, 51, .1); }
.app .deco { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; color: var(--navy); opacity: .055; }
.app.erp .deco { color: var(--sky); opacity: .11; }
.app-main { position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-start; padding: 26px 26px 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.app-ico { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; flex: none; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -10px rgba(0, 41, 77, .7); }
.app-ico svg.i { width: 30px; height: 30px; stroke-width: 1.6; }
/* An app's own icon (brand package, web/assets/brand/marks.js): its symbol on flat EMCO navy, the same tile as the
   installed app and the browser tab. */
.app-ico.brand { background: var(--navy); }
.app-ico svg.mark { width: 100%; height: 100%; }
.app-t { flex: 1; min-width: 0; }
.app-t h3 { margin: 3px 0 6px; font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 23px; line-height: 1.1; color: var(--navy-900); }
.app-t p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.app-go { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--navy); transition: background .2s, transform .25s var(--ease); }
.app-go svg.i { transition: transform .25s var(--ease); }
.app-main:hover .app-go { background: var(--sky-700); }
.app-main:hover .app-go svg.i { transform: translateX(3px); }
.app-mods { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 26px 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s; }
.pill svg.i { width: 17px; height: 17px; color: var(--navy); }
.pill:hover { background: var(--sky-50); border-color: var(--sky); color: var(--navy-900); }
/* A demo card: an app not yet released, on the sample project. Its hi-vis amber tag and hint mark it apart from the
   staff apps; its icon is the app's own. */
.app.demo .deco { color: var(--amber); opacity: .08; }
.app.demo .app-main:hover .app-go svg.i { transform: translate(2px, -2px); }
.demo-tag { display: inline-block; padding: 5px 9px; border-radius: 11px; background: var(--amber-50); color: var(--amber); font: 700 11px/1.15 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.demo-hint { position: relative; z-index: 1; display: flex; gap: 10px; align-items: flex-start; margin: 0 26px 14px; padding: 11px 14px; border-radius: 12px; background: var(--amber-50); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.demo-hint svg.i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--amber); }
.noapps { position: relative; z-index: 2; margin-top: -90px; display: flex; gap: 18px; align-items: center; padding: 28px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.noapps h3 { margin: 0 0 4px; font-family: var(--display); font-stretch: 110%; font-size: 20px; color: var(--navy-900); }
.noapps p { margin: 0; color: var(--ink-2); }
.noapps .app-ico { background: linear-gradient(145deg, #8a99aa, #5d6e81); }

/* ---------- main layout ---------- */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 28px; align-items: start; margin-top: 48px; }
.sec-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-h h2 { margin: 0; font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 24px; color: var(--navy-900); }
.sec-h .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn svg.i { width: 18px; height: 18px; }
.btn.primary { background: var(--navy); color: #fff; box-shadow: 0 8px 18px -10px rgba(0, 70, 129, .9); }
.btn.primary:hover { background: var(--navy-800); }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: #c8d3de; color: var(--ink); }
.btn.alert { background: var(--red); color: #fff; box-shadow: 0 8px 18px -10px rgba(209, 59, 68, .9); }
.btn.alert:hover { background: #b9303a; }
.btn.sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }

/* segmented filter */
.seg { display: flex; gap: 3px; padding: 4px; background: #e6ebf1; border-radius: 13px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--navy-900); box-shadow: var(--sh-1); }
.seg .n { font-size: 11px; font-weight: 700; color: var(--muted); }

/* category colours */
.c-safety { --c: var(--red); --cb: var(--red-50); }
.c-projects { --c: var(--sky-700); --cb: var(--sky-50); }
.c-people { --c: var(--green); --cb: var(--green-50); }
.c-it { --c: var(--navy); --cb: #e7eef7; }
.c-social { --c: var(--violet); --cb: var(--violet-50); }

/* ---------- notices ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.feature { position: relative; isolation: isolate; overflow: hidden; display: block; width: 100%; padding: 24px 26px; border-radius: var(--r-lg); cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%); box-shadow: var(--sh-2); }
.feature svg.stripes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.feature .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8adcfb; }
.feature .meta svg.i { width: 16px; height: 16px; }
.feature h3 { margin: 10px 0 8px; font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 22px; line-height: 1.15; }
.feature p { margin: 0; max-width: 680px; color: rgba(255, 255, 255, .82); font-size: 14.5px; }
.feature .by { margin-top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.feature .note-actions { border-top-color: rgba(255, 255, 255, .18); }
.feature .btn.ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.note { position: relative; display: flex; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); cursor: pointer;
  transition: border-color .2s, box-shadow .2s; }
.note:hover { border-color: #ccd7e2; box-shadow: var(--sh-2); }
.note.open { border-color: var(--sky-100); box-shadow: var(--sh-2); cursor: default; }
.note.needs-ack::before { content: ''; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.cat-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--cb); color: var(--c); }
.note-b { flex: 1; min-width: 0; }
.note-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.cat-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.sep::before { content: '·'; }
.new-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sky-700); }
.new-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 3px var(--sky-100); }
.note h4 { margin: 6px 0 5px; font-size: 16.5px; font-weight: 650; line-height: 1.35; color: var(--ink); }
.note p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note.open p { display: block; -webkit-line-clamp: unset; }
.note-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.when { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 9px; background: var(--bg); font-size: 12.5px; font-weight: 600; color: var(--navy); }
.when svg.i { width: 15px; height: 15px; }
.ack-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--red); }
.ack-hint svg.i { width: 15px; height: 15px; }
.chev { flex: none; align-self: flex-start; margin-top: 2px; color: var(--muted); transition: transform .2s var(--ease); }
.note.open .chev { transform: rotate(180deg); }
.note-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.confirmed { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px; background: var(--green-50); color: var(--green); font-weight: 600; font-size: 13px; }
.confirmed svg.i { width: 16px; height: 16px; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #cfd9e3; border-radius: var(--r); }

/* ---------- side rail ---------- */
.rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.panel-h { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.panel-h svg.i { width: 16px; height: 16px; color: var(--sky-600); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; }
.tl li:not(:last-child)::after { content: ''; position: absolute; left: 24px; top: 60px; bottom: -6px; width: 2px; border-radius: 2px; background: var(--line-2); }
.tl button { display: flex; gap: 14px; width: 100%; padding: 6px 6px 12px 0; border-radius: 12px; }
.tl button:hover .tl-t { color: var(--navy); }
.date { width: 50px; height: 54px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 13px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.date b { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sky-700); line-height: 1; }
.date span { font-family: var(--display); font-stretch: 112%; font-size: 21px; font-weight: 800; line-height: 1; color: var(--navy-900); }
.date.soon { background: linear-gradient(160deg, var(--navy), var(--navy-900)); border-color: var(--navy); }
.date.soon b { color: #8adcfb; }
.date.soon span { color: #fff; }
.tl-b { min-width: 0; padding-top: 3px; }
.tl-rel { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--sky-700); }
.tl-t { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); transition: color .15s; }
.tl-s { display: block; font-size: 12.5px; color: var(--muted); }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.tool:hover { border-color: #ccd7e2; box-shadow: var(--sh-2); transform: translateY(-1px); }
.tool-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.tool-ico svg.i { width: 19px; height: 19px; }
.tool b { display: block; font-size: 13.5px; font-weight: 650; }
.tool small { display: block; font-size: 12px; line-height: 1.35; color: var(--muted); }
.tool .ext { position: absolute; top: 12px; right: 12px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.tool .ext svg.i { width: 15px; height: 15px; }
.tool:hover .ext { opacity: 1; }
.t-outlook { background: linear-gradient(145deg, #2b88d8, #0f5fa8); }
.t-teams { background: linear-gradient(145deg, #7b83eb, #4b53bc); }
.t-sharepoint { background: linear-gradient(145deg, #1aa3a3, #036c70); }
.t-procore, .t-cheops { background: linear-gradient(145deg, #8a99aa, #5d6e81); }
.help { position: relative; isolation: isolate; overflow: hidden; color: #fff; border: 0; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); }
.help svg.stripes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .7; }
.help .panel-h { color: #8adcfb; }
.help .panel-h svg.i { color: #8adcfb; }
.help p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .84); }
.help b { color: #fff; }

/* ---------- footer ---------- */
.foot { margin-top: 64px; border-top: 1px solid var(--line); background: #fff; }
.foot .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; font-size: 12.5px; color: var(--muted); }
.foot img { width: 70px; display: block; }
.foot .grow { flex: 1; }

/* ---------- search ---------- */
.pal { position: fixed; inset: 0; z-index: 50; display: none; padding: 12vh 16px 0; background: rgba(0, 26, 51, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pal.on { display: block; animation: fade .15s; }
.pal-box { max-width: 640px; margin: 0 auto; overflow: hidden; background: #fff; border-radius: 20px; box-shadow: var(--sh-3); animation: pop .2s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 18px; border-bottom: 1px solid var(--line-2); color: var(--navy); }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; font: 16.5px var(--font); color: var(--ink); background: none; }
.pal-in input::placeholder { color: #8a98a8; }
.pal-res { max-height: 56vh; overflow: auto; padding: 8px; }
.pal-g { padding: 12px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pal-it { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.pal-it > span:not(.pal-ico) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pal-it small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pal-it.sel { background: var(--sky-50); }
.pal-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.pal-ico svg.i { width: 17px; height: 17px; }
.pal-ico.cat { background: var(--cb); color: var(--c); }
.pal-ico.brand { background: var(--navy); }
.pal-ico svg.mark { width: 100%; height: 100%; }
.pal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.pal-empty { padding: 34px 16px; text-align: center; color: var(--muted); }

/* ---------- modal & forms ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 16px; background: rgba(0, 26, 51, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.on { display: grid; animation: fade .15s; }
.modal .box { width: 620px; max-width: 100%; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px; box-shadow: var(--sh-3); animation: pop .2s var(--ease); }
.mh { padding: 24px 26px 4px; font-family: var(--display); font-stretch: 112%; font-size: 21px; font-weight: 800; color: var(--navy-900); }
.mb { padding: 12px 26px 4px; color: var(--ink-2); }
.mf { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px 24px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font: 15px var(--font); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; min-height: 130px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0, 173, 239, .16); }
.field .invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(209, 59, 68, .12); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pick label { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 10px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.cat-pick label svg.i { width: 17px; height: 17px; color: var(--c); }
.cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.cat-pick label:has(input:checked) { background: var(--cb); border-color: var(--c); color: var(--c); }
.cat-pick label:has(input:focus-visible) { outline: 3px solid var(--sky-200); outline-offset: 2px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--ink); cursor: pointer; }
.switch small { display: block; font-size: 12.5px; color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: #cfd8e2; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--navy); }
.switch input:checked::after { transform: translateX(18px); }
.formerr { margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: var(--red-50); color: var(--red); font-size: 13.5px; }
.readers { list-style: none; margin: 0; padding: 0; }
.readers li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.readers li span:last-child { color: var(--muted); font-size: 13px; }

/* ---------- toast, loading ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--navy-950); color: #fff; font-weight: 500; box-shadow: var(--sh-3);
  opacity: 0; transform: translate(-50%, 16px); transition: opacity .25s, transform .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast svg.i { color: #6ee7a8; width: 18px; height: 18px; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.sk { border-radius: 12px; background: linear-gradient(90deg, #e7ecf1 0%, #f3f6f9 50%, #e7ecf1 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.hero .sk { background: linear-gradient(90deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .1) 100%); background-size: 200% 100%; }
.loadfail { padding: 30vh 16px; text-align: center; color: var(--muted); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.intro .rise { animation: rise .5s var(--ease) both; }
.intro .rise.d1 { animation-delay: .06s; } .intro .rise.d2 { animation-delay: .12s; } .intro .rise.d3 { animation-delay: .18s; } .intro .rise.d4 { animation-delay: .24s; }

/* ---------- sign-in page ---------- */
.auth { display: grid; grid-template-columns: minmax(420px, 560px) 1fr; min-height: 100vh; background: #fff; }
.auth-form { display: flex; flex-direction: column; padding: 40px 56px; }
.auth-form > img { width: 150px; display: block; }
.auth-box { margin: auto 0; padding: 48px 0; max-width: 400px; }
.auth-box .eyebrow { color: var(--sky-700); }
.auth-box h1 { margin: 14px 0 12px; font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 36px; line-height: 1.06; color: var(--navy-900); }
.auth-box > p { margin: 0 0 28px; font-size: 15.5px; color: var(--ink-2); }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; border: 1px solid #8c8c8c; border-radius: 4px; background: #fff; color: #5e5e5e;
  font-family: 'Segoe UI', var(--font); font-size: 15px; font-weight: 600; transition: background .15s; }
.ms-btn:hover { background: #f5f5f5; }
.auth-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-note svg.i { width: 18px; height: 18px; color: var(--green); }
.auth-foot { font-size: 12.5px; color: var(--muted); }
.msg { margin-bottom: 18px; padding: 11px 14px; border-radius: 12px; font-size: 14px; background: var(--sky-50); color: var(--navy); }
.msg.err { background: var(--red-50); color: var(--red); }
.devnote { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: #8a1620; background: var(--red-50); }
.review-signin { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-signin-link { min-height: 44px; padding: 0; border: 0; background: none; font: 500 13px var(--font); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.review-signin-link:hover, .review-signin-link:focus-visible { color: var(--navy); }
.review-signin form { margin-top: 12px; }
.review-signin-note { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.review-signin .btn { width: 100%; }
/* 16px: Safari on iPhone zooms the page when a smaller field takes focus, and this form opens in the app's sign-in sheet. */
.review-signin .field input { font-size: 16px; }
.review-signin .msg { margin: 0 0 14px; }
.personas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.persona { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.persona:hover { border-color: var(--sky); box-shadow: var(--sh-2); transform: translateY(-1px); }
.persona .avatar { box-shadow: none; }
.persona b { display: block; font-size: 13.5px; line-height: 1.25; }
.persona small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.auth-art { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; padding: 64px; color: #fff;
  background: radial-gradient(900px 500px at 90% 0%, rgba(0, 173, 239, .4), transparent 60%), linear-gradient(160deg, #00528f 0%, var(--navy) 45%, var(--navy-900) 100%); }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px); background-size: 22px 22px; }
.auth-art svg.stripes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.auth-copy { max-width: 560px; }
.auth-copy h2 { margin: 0 0 28px; font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(30px, 3vw, 42px); line-height: 1.08; }
.auth-copy h2 em { font-style: normal; color: #8adcfb; }
.feats { display: grid; gap: 12px; }
.feat { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(4px); }
.feat .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .12); color: #8adcfb; }
.feat b { display: block; font-size: 15px; }
.feat small { display: block; font-size: 13px; color: rgba(255, 255, 255, .72); }

/* ---------- responsive ---------- */
/* Connect an AI app and AI apps (ADR 040) */
.cn-app { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.cn-app svg.i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--green); }
.cn-app.warn svg.i { color: var(--amber); }
.cn-app b { display: block; font-size: 14.5px; }
.cn-app small { display: block; font-size: 12.5px; color: var(--muted); }
.cn-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.cn-list li { display: flex; gap: 10px; align-items: flex-start; }
.cn-list svg.i { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green); }
.cn-list .cn-no svg.i { color: var(--muted); }
.cn-small { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.cn-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.aa-body { background: var(--bg); }
.aa-top { background: var(--navy-950); }
.aa-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.aa-top .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.aa { padding-bottom: 64px; }
.aa-head h1 { margin: 36px 0 8px; font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 34px; color: var(--navy-900); }
.aa-lede { margin: 0 0 24px; max-width: 720px; font-size: 15.5px; color: var(--ink-2); }
.aa .msg svg.i { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.aa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.aa-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.aa-rail { position: sticky; top: 24px; }
.aa-p { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.aa-p.small { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.aa-url { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.aa-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; color: var(--navy-900); }
.aa-seg { margin-bottom: 12px; width: fit-content; }
.aa-steps { margin: 0 0 4px; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.aa-steps code, .aa-calls code { font-size: 12.5px; padding: 1px 5px; border-radius: 6px; background: var(--bg); overflow-wrap: anywhere; }
.aa-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.aa-sec .panel-h { margin: 0; }
.aa-conn { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.aa-conn-h { display: flex; gap: 12px; align-items: center; }
.aa-blob { width: 34px; height: 34px; flex: none; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; background: radial-gradient(circle at 35% 30%, var(--sky-200), var(--sky) 70%); }
.aa-conn-t { flex: 1; min-width: 0; }
.aa-conn-t b { display: block; font-size: 15px; }
.aa-conn-t small { display: block; font-size: 12.5px; color: var(--muted); }
.aa-tag { flex: none; padding: 4px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: var(--amber); background: var(--amber-50); }
.aa-tag.red { color: var(--red); background: var(--red-50); }
.aa-conn-m { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; font-size: 13px; color: var(--muted); }
.aa-conn-m b { color: var(--ink); font-weight: 600; }
.aa-conn-a { display: flex; gap: 8px; flex-wrap: wrap; }
.aa-calls { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); overflow-x: auto; }
.aa-calls table, .aa-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aa-calls th, .aa-table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; }
.aa-calls td, .aa-table td { padding: 8px; border-top: 1px solid var(--line-2); vertical-align: top; }
.aa-calls small, .aa-table small { display: block; color: var(--muted); }
.aa-use { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.aa-use b { font-family: var(--display); font-stretch: 112%; font-size: 26px; color: var(--navy-900); }
.aa-use span { font-size: 13px; color: var(--muted); }
.aa-apps { margin-top: 32px; }
.aa-table { overflow-x: auto; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.aa-table b { font-size: 14px; }

@media (max-width: 1080px) {
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .top-search { width: 220px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-form { padding: 28px 22px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .menu { right: 18px; }
  .me-name, .top-search { display: none; }
  .me { margin-left: auto; }
  .hero { padding-bottom: 104px; }
  .hero-in { padding-top: 28px; }
  .lede { font-size: 15px; }
  .cmd { height: 52px; margin-top: 22px; }
  .cmd kbd { display: none; }
  .hero-label { margin-top: 34px; }
  .app-main { padding: 20px 20px 16px; gap: 14px; }
  .app-ico { width: 52px; height: 52px; border-radius: 15px; }
  .app-ico svg.i { width: 26px; height: 26px; }
  .app-t h3 { font-size: 20px; }
  .app-go { width: 40px; height: 40px; border-radius: 12px; }
  .app-mods { padding: 0 20px 20px; }
  .pill { height: 36px; }
  .main-grid { margin-top: 36px; }
  .sec-h h2 { font-size: 21px; }
  .note { padding: 16px; gap: 12px; }
  .cat-ico { width: 38px; height: 38px; border-radius: 11px; }
  .feature { padding: 20px; }
  .row2, .personas { grid-template-columns: 1fr; }
  .mh { padding: 20px 20px 4px; } .mb { padding: 10px 20px 4px; } .mf { padding: 14px 20px 20px; }
  .auth-box h1 { font-size: 30px; }
  .aa-grid { grid-template-columns: minmax(0, 1fr); }
  .aa-rail { position: static; }
  .aa-head h1 { font-size: 28px; }
  .aa-top .wrap, .aa.wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Check and apply (ADR 040 change note, 11 Nov 2026): a change an AI asked for, as the person reads it. */
.ac-t { margin: 18px 0 10px; font-size: 16px; color: var(--navy-900); }
.ac-kv { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; font-size: 14px; }
.ac-kv div { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 12px; align-items: baseline; }
.ac-kv dt { font-size: 12.5px; color: var(--muted); }
.ac-kv dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-line; max-height: 320px; overflow: auto; }
.auth-box .msg svg.i { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
