
  :root {
    --navy: #14254f; --navy-2: #1c3470; --blue: #2455d6; --blue-soft: #e8efff;
    --gold-1: #FFDE1A; --gold-2: #FF9B00;
    --bg: #f3f6fb; --surface: #ffffff; --surface-2: #f7f9fd; --line: #e2e8f3;
    --text: #14203d; --muted: #5b6784; --faint: #8a94ad;
    --shadow: 0 1px 2px rgba(20,37,79,.06), 0 8px 24px -12px rgba(20,37,79,.18);
    --shadow-hover: 0 2px 4px rgba(20,37,79,.08), 0 18px 40px -16px rgba(20,37,79,.35);
    --tile-ms: #2455d6; --tile-ms-bg: #e8efff; --tile-gov: #c26a00; --tile-gov-bg: #fff3df;
    --tile-co: #0e8a5f; --tile-co-bg: #e3f6ee;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0b1226; --surface: #121c36; --surface-2: #17223f; --line: #24315a;
      --text: #e8edf9; --muted: #a3afcb; --faint: #7482a6; --blue-soft: #1b2a55;
      --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
      --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px -16px rgba(0,0,0,.8);
      --tile-ms: #8fb0ff; --tile-ms-bg: #1b2a55; --tile-gov: #ffb44d; --tile-gov-bg: #3a2a10;
      --tile-co: #5fd3a6; --tile-co-bg: #123a2c;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0b1226; --surface: #121c36; --surface-2: #17223f; --line: #24315a;
    --text: #e8edf9; --muted: #a3afcb; --faint: #7482a6; --blue-soft: #1b2a55;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px -16px rgba(0,0,0,.8);
    --tile-ms: #8fb0ff; --tile-ms-bg: #1b2a55; --tile-gov: #ffb44d; --tile-gov-bg: #3a2a10;
    --tile-co: #5fd3a6; --tile-co-bg: #123a2c;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
         background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
  a { color: inherit; text-decoration: none; }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

  /* ---------- header ---------- */
  .hero { position: relative; overflow: hidden; color: #fff;
          background: radial-gradient(1200px 400px at 85% -10%, rgba(36,85,214,.55), transparent 60%),
                      linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
  .hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
          background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 22px 22px; }
  .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
          background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); }
  .ring { position: absolute; border-radius: 50%; border: 2px dashed rgba(255,255,255,.08); pointer-events: none; }
  .ring.r1 { width: 520px; height: 520px; right: -140px; top: -220px; }
  .ring.r2 { width: 340px; height: 340px; right: -50px; top: -130px; border-style: solid; border-color: rgba(255,178,26,.12); }
  .topbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 0; }
  .brand img { height: 62px; width: auto; display: block; }
  .tools { display: flex; align-items: center; gap: 10px; }
  .clock { text-align: right; line-height: 1.25; }
  .clock .t { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
  .clock .d { font-size: 12px; color: rgba(255,255,255,.7); }
  .iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
             background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
  .iconbtn:hover { background: rgba(255,255,255,.16); }
  .iconbtn svg { width: 19px; height: 19px; }

  .hero-body { position: relative; padding: 40px 0 44px; }
  .hello { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #FFB21A; font-weight: 600; margin: 0 0 6px; }
  .hero h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin: 0 0 22px; font-weight: 700; letter-spacing: -.01em; }
  .hero h1 span { background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .search { position: relative; max-width: 640px; }
  .search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #7b88aa; }
  .search input { width: 100%; height: 56px; border-radius: 16px; border: 0; padding: 0 64px 0 50px; font: inherit; font-size: 16px;
                  color: #14203d; background: #fff; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); outline: none; }
  .search input:focus { box-shadow: 0 0 0 4px rgba(255,178,26,.55), 0 10px 30px -10px rgba(0,0,0,.45); }
  .search kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 600 12px/1 "Poppins", sans-serif;
                color: #5b6784; background: #eef2fa; border: 1px solid #d9e0ee; border-radius: 7px; padding: 6px 9px; }
  .recent { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
  .recent:empty { display: none; }
  .recent .lbl { font-size: 12px; color: rgba(255,255,255,.65); margin-right: 2px; }
  .chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 12px 5px 6px; border-radius: 999px;
          background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; }
  .chip:hover { background: rgba(255,255,255,.2); }
  .chip img, .chip .mini { width: 22px; height: 22px; border-radius: 50%; background: #fff; }
  .chip .mini { display: grid; place-items: center; color: var(--blue); }
  .chip .mini svg { width: 13px; height: 13px; }

  /* ---------- sections ---------- */
  main.wrap { padding-top: 40px; padding-bottom: 20px; }
  section { margin-bottom: 40px; }
  .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .sec-head h2 { font-size: 19px; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 10px; }
  .sec-head h2::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: linear-gradient(var(--gold-1), var(--gold-2)); }
  .sec-head p { margin: 0; color: var(--muted); font-size: 13px; }

  .apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
  .app { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 18px; background: var(--surface);
         border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; overflow: hidden; }
  .app::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold-1), var(--gold-2));
                 transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
  .app:hover, .app:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; outline: none; }
  .app:hover::before, .app:focus-visible::before { transform: scaleX(1); }
  .app .row { display: flex; align-items: center; gap: 14px; }
  .app img { width: 64px; height: 64px; flex: none; border-radius: 50%; background: #fff; }
  .app h3 { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.3; }
  .app .url { font-size: 12.5px; color: var(--blue); font-weight: 500; word-break: break-all; }
  :root[data-theme="dark"] .app .url { color: #8fb0ff; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app .url { color: #8fb0ff; } }
  .app .desc { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1; }
  .app .foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--faint); }
  .app .open { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
  .app .open svg { width: 16px; height: 16px; transition: transform .18s; }
  .app:hover .open svg { transform: translate(2px, -2px); }
  .tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
  :root[data-theme="dark"] .tag { color: #8fb0ff; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag { color: #8fb0ff; } }
  .tag.gold, :root[data-theme="dark"] .tag.gold { background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); color: #3b2500; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.gold { color: #3b2500; } }

  .links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
  .link { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 14px; background: var(--surface);
          border: 1px solid var(--line); transition: background .15s, border-color .15s, transform .15s; }
  .link:hover, .link:focus-visible { border-color: var(--blue); transform: translateY(-2px); outline: none; }
  .link .ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; }
  .link .ic svg { width: 21px; height: 21px; }
  .link.ms .ic { background: var(--tile-ms-bg); color: var(--tile-ms); }
  .link.gov .ic { background: var(--tile-gov-bg); color: var(--tile-gov); }
  .link.co .ic { background: var(--tile-co-bg); color: var(--tile-co); }
  .link b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
  .link small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }

  .empty { display: none; text-align: center; padding: 40px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
  .empty b { color: var(--text); }
  .hide { display: none !important; }

  footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--faint); font-size: 12.5px; }
  footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
  footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

  @media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .brand img { height: 46px; }
    .clock { display: none; }
    .hero-body { padding: 28px 0 38px; }
    .search input { height: 50px; font-size: 15px; }
    .search kbd { display: none; }
    .apps { grid-template-columns: 1fr; gap: 12px; }
    .app { padding: 16px; }
    .sec-head p { display: none; }
    .app img { width: 54px; height: 54px; }
    .links { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
  @media print { .hero { background: #14254f !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .search, .recent, .iconbtn { display: none; } }

  /* ---------- access control (locked cards, sign-in pop-up, user bar) ---------- */
  .item.locked { cursor: not-allowed; opacity: .5; filter: grayscale(1); box-shadow: none; }
  .item.locked:hover, .item.locked:focus-visible { transform: none; box-shadow: none; border-color: var(--line); }
  .app.locked:hover::before { transform: scaleX(0); }
  .app.locked img { opacity: .8; }
  .lockbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .lockbadge svg { width: 14px; height: 14px; }
  .link.locked { position: relative; }
  .link.locked .lockbadge { position: absolute; right: 12px; top: 10px; }
  .link.locked .lockbadge span { display: none; }

  .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.85); }
  .who b { color: #fff; font-weight: 600; }
  .who .role { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
  .pillbtn { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
             color: #fff; font: 500 13px/1 "Poppins", sans-serif; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
  .pillbtn:hover { background: rgba(255,255,255,.16); }
  .pillbtn svg { width: 16px; height: 16px; }
  .pillbtn.gold { background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); color: #3b2500; border: 0; font-weight: 600; }
  .tools form { margin: 0; }

  .flash { margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; font-size: 14px; border: 1px solid; }
  .flash.ok { background: #e3f6ee; border-color: #b6e6d1; color: #0b5e41; }
  .flash.err { background: #fdecec; border-color: #f5c2c2; color: #8a1f1f; }
  .accessnote { margin: 0 0 22px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
  .accessnote svg { width: 15px; height: 15px; flex: none; }

  body.gated { overflow: hidden; }
  body.gated .page { filter: blur(3px); pointer-events: none; user-select: none; }
  .gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
          background: rgba(11,18,38,.55); backdrop-filter: blur(2px); }
  .modal { width: 100%; max-width: 410px; background: var(--surface); color: var(--text); border-radius: 22px; overflow: hidden;
           box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); border: 1px solid var(--line); }
  .modal .mhead { position: relative; padding: 24px 26px 20px; color: #fff; text-align: center;
          background: radial-gradient(500px 200px at 85% -20%, rgba(36,85,214,.6), transparent 60%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
  .modal .mhead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); }
  .modal .mhead img { width: 76px; height: 76px; display: block; margin: 0 auto 10px; }
  .modal .mhead h2 { margin: 0; font-size: 19px; font-weight: 600; }
  .modal .mhead p { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.75); }
  .modal .mbody { padding: 22px 26px 24px; }
  .modal label.f { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
  .modal input[type=email], .modal input.code { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); padding: 0 14px;
           font: inherit; font-size: 15px; color: var(--text); background: var(--surface-2); outline: none; }
  .modal input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36,85,214,.18); }
  .modal input.code { text-align: center; font: 700 26px/1 ui-monospace, Consolas, monospace; letter-spacing: .45em; padding-left: calc(14px + .45em); }
  .modal .primary { width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 12px; cursor: pointer; color: #fff;
           font: 600 15px/1 "Poppins", sans-serif; background: var(--blue); box-shadow: 0 6px 16px -6px rgba(36,85,214,.6); }
  .modal .primary:hover { background: #1c43ad; }
  .modal .err { margin: 8px 0 0; font-size: 13px; color: #c62828; }
  :root[data-theme="dark"] .modal .err { color: #ff8a80; }
  .modal .msg { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
  .modal .msg b { color: var(--text); word-break: break-all; }
  .modal .okmsg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: #e3f6ee; color: #0b5e41; }
  .modal .remember { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
  .modal .links2 { display: flex; justify-content: center; gap: 10px; margin-top: 14px; font-size: 13px; }
  .modal .links2 form { margin: 0; }
  .modal .links2 button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--blue); }
  .modal .links2 button:hover { text-decoration: underline; }
  .modal .links2 .sep { color: var(--faint); }
  .modal .foot2 { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--faint); }
  @media (max-width: 640px) { .who .nm { display: none; } .pillbtn .lbl { display: none; } .pillbtn { padding: 0 11px; } }
  .who, .pillbtn { white-space: nowrap; }
  @media (max-width: 1500px) { body.authed .clock { display: none; } }
  .clock .d { white-space: nowrap; }
  @media (max-width: 1000px) { .who .nm { display: none; } }
  .app .tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
  .ssotag { font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: #e3f6ee; color: #0e8a5f; }
  :root[data-theme="dark"] .ssotag { background: #123a2c; color: #5fd3a6; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ssotag { background: #123a2c; color: #5fd3a6; } }
  .viewas { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
            padding: 10px 24px; background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); color: #3b2500; font-size: 14px; }
  .viewas span { display: inline-flex; align-items: center; gap: 8px; }
  .viewas svg { width: 18px; height: 18px; flex: none; }
  .viewas form { margin: 0; }
  .viewas button { border: 0; cursor: pointer; border-radius: 10px; padding: 8px 14px; font: 600 13px/1 "Poppins", sans-serif; background: #14254f; color: #fff; }
  .viewas button:hover { background: #2455d6; }
  /* Logo with the site name underneath it, tools on the right */
  .topbar { align-items: flex-start; }
  .brandcol { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
  .hero h1.sitename { margin: 0; font-size: clamp(17px, 2vw, 24px); line-height: 1.25; letter-spacing: .01em; white-space: nowrap; }
  .tools { padding-top: 10px; }
  .hero-body { padding-top: 28px; }
  @media (max-width: 640px) {
    .hero h1.sitename { white-space: normal; font-size: 17px; }
    .tools { padding-top: 4px; }
  }
