  :root {
    --navy: #08152E;
    --navy-2: #0B1B35;
    --line: rgba(255,255,255,.08);
    --text: #FFFFFF;
    --muted: rgba(255,255,255,.6);
    --faint: rgba(255,255,255,.4);
    --orange: #E9511B;
    --red: #E41A41;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--navy); color: var(--text); font-family: 'Jost', 'Century Gothic', sans-serif; -webkit-font-smoothing: antialiased; }
  a { color: inherit; text-decoration: none; }

  header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line); background: var(--navy-2); position: sticky; top: 0; z-index: 2; }
  header img { height: 28px; display: block; }
  .brand { display: flex; align-items: center; gap: 14px; }
  .brand span { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }
  .who { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); min-width: 0; }
  .who b { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .who a { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.18); padding: 8px 12px; color: rgba(255,255,255,.75); white-space: nowrap; }
  .who a:hover { border-color: var(--orange); color: var(--orange); }
  .who a.me { display: inline-flex; align-items: center; gap: 10px; border: none; padding: 0; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); min-width: 0; }
  .who a.me:hover b { color: var(--orange); }
  .who a.me:hover .avatar { box-shadow: 0 0 0 2px var(--orange); }

  main { max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px) 80px; }
  h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
  h1 em { font-style: normal; background: linear-gradient(90deg, var(--orange), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .lede { color: var(--muted); font-size: 16px; margin: 0 0 28px; max-width: 60ch; line-height: 1.5; }

  .tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 36px; }
  .search { flex: 1 1 260px; font: inherit; font-size: 15px; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); padding: 12px 14px; outline: none; }
  .search:focus { border-color: var(--orange); }
  .search::placeholder { color: rgba(255,255,255,.32); }
  .toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
  .toggle input { accent-color: var(--orange); width: 16px; height: 16px; }

  section { margin-bottom: 44px; }
  .sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
  h2 { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin: 0; }
  .sec-blurb { color: var(--faint); font-size: 14px; margin: 0 0 16px; }

  .badge { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 3px 8px; border: 1px solid currentColor; }
  .badge.staff { color: #7FB3FF; }
  .badge.public { color: #6BD39B; }
  .badge.admin { color: var(--orange); }
  .badge.legacy { color: var(--faint); }

  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease, background .2s ease; min-width: 0; }
  .card:hover { transform: translateY(-2px); border-color: rgba(233,81,27,.6); background: rgba(255,255,255,.06); }
  .card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--orange), var(--red)); opacity: 0; transition: opacity .2s ease; }
  .card:hover::before { opacity: 1; }
  .card.legacy { opacity: .62; }
  .card h3 { margin: 0; font-size: 17px; font-weight: 500; }
  .card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
  .card .path { font-size: 11px; color: var(--faint); overflow-wrap: anywhere; margin-top: auto; padding-top: 8px; }
  .card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .copy { font: inherit; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: transparent; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.18); padding: 5px 9px; cursor: pointer; white-space: nowrap; flex: none; position: relative; z-index: 1; }
  .copy:hover { border-color: var(--orange); color: var(--orange); }

  .empty { color: var(--faint); font-size: 14px; }
  footer { color: var(--faint); font-size: 12px; text-align: center; padding: 0 16px 32px; }
  @media (max-width: 560px) { .brand span { display: none; } .who > span, .who b { display: none; } .who { gap: 8px; } .who a { padding: 7px 9px; } .who a.me { padding: 0; } .wide-only { display: none !important; } }

  /* Shared app pieces (sign-in, admin pages). */
  .btn { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border: none; cursor: pointer; background: linear-gradient(90deg, var(--orange), var(--red)); color: #fff; padding: 12px 20px; }
  .btn:hover { box-shadow: 0 10px 26px rgba(233,81,27,.35); }
  .btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
  .btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.8); }
  .btn.ghost:hover { border-color: var(--orange); color: var(--orange); box-shadow: none; }
  .btn.small { padding: 7px 11px; font-size: 10px; }
  .btn.danger:hover { border-color: var(--red); color: var(--red); }
  .field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
  .field input, .field select, select.inline { font: inherit; font-size: 15px; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); padding: 11px 12px; outline: none; }
  .field input:focus, .field select:focus, select.inline:focus { border-color: var(--orange); }
  select option { background: var(--navy-2); color: var(--text); }
  select.inline { font-size: 13px; padding: 6px 8px; }
  .panel { background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 22px; }
  .msg { font-size: 14px; padding: 12px 14px; border-left: 3px solid var(--orange); background: rgba(233,81,27,.08); margin: 0 0 16px; }
  .msg.ok { border-color: #6BD39B; background: rgba(107,211,155,.08); }
  .msg[hidden] { display: none; }
  .secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .06em; background: rgba(0,0,0,.25); padding: 8px 12px; display: inline-block; margin: 6px 0; user-select: all; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
  td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  td .sub { display: block; font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
  .table-wrap { overflow-x: auto; }
  .actions { display: flex; gap: 6px; flex-wrap: wrap; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.16); }
  .chip.lead { border-color: var(--orange); }
  .chip button { font: inherit; background: none; border: none; color: var(--faint); cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
  .chip button:hover { color: var(--red); }
  .tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
  .tabs button { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: 12px 14px; cursor: pointer; }
  .tabs button[aria-selected="true"] { color: var(--text); border-color: var(--orange); }
  .soon { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
  .card.disabled { pointer-events: none; opacity: .55; }
  .center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
  .narrow { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
  .narrow img { height: 34px; align-self: flex-start; }
  .chip.lead button:first-child { color: var(--orange); }
  /* The hidden attribute always wins over layout rules like display:flex. */
  [hidden] { display: none !important; }
  .avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--orange), var(--red)); color: #fff; font-weight: 600; letter-spacing: .02em; }
  .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .person { display: flex; align-items: center; gap: 12px; min-width: 0; }
  dialog.editor { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--navy-2); color: var(--text); border: 1px solid rgba(255,255,255,.14); padding: 24px; font-family: inherit; }
  dialog.editor::backdrop { background: rgba(4,10,24,.75); }
  dialog.editor h2 { margin: 0 0 18px; }
  .editor-section { margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
  .photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .team-pick { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; align-items: center; font-size: 14px; }
  .team-pick label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; cursor: pointer; }
  .team-pick input { accent-color: var(--orange); width: 16px; height: 16px; }
  .editor-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }

  /* Library */
  .lib-admin-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -16px 0 24px; }
  .lib-folder { border: 1px solid var(--line); background: rgba(255,255,255,.02); margin-bottom: 10px; }
  .lib-folder .lib-folder { margin: 0 0 10px; border-left: 2px solid rgba(233,81,27,.35); }
  .lib-folder-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 12px; }
  .lib-head { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; background: none; border: none; color: var(--text); font: inherit; text-align: left; padding: 16px 18px; cursor: pointer; min-width: 0; }
  .lib-head:hover .lib-name { color: var(--orange); }
  .lib-chevron { display: inline-block; color: var(--orange); transition: transform .15s ease; font-size: 12px; }
  .lib-head[aria-expanded="true"] .lib-chevron { transform: rotate(90deg); }
  .lib-name { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
  .lib-folder .lib-folder .lib-name { font-size: 15px; }
  .lib-count { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
  .lib-folder-tools { padding: 0 0 8px 18px; }
  .lib-body { padding: 0 16px 6px 34px; }
  .lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 4px 0 14px; }
  .lib-card { display: flex; flex-direction: column; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; transition: border-color .2s ease, transform .2s ease; }
  .lib-card:hover { border-color: rgba(233,81,27,.6); transform: translateY(-2px); }
  .lib-card.retired { opacity: .55; }
  .lib-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 14px; flex: 1; }
  .lib-card h3 { margin: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
  .lib-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lib-meta, .lib-path { font-size: 11px; color: var(--faint); }
  .lib-path { color: var(--orange); letter-spacing: .04em; }
  .lib-preview { aspect-ratio: 4 / 3; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
  .lib-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
  .lib-preview.small { width: 160px; flex: none; border: 1px solid var(--line); }
  .lib-tile { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--tile), color-mix(in srgb, var(--tile) 55%, #08152E)); }
  .lib-tile span { font-size: 15px; font-weight: 700; letter-spacing: .18em; color: #fff; text-transform: uppercase; text-align: center; padding: 0 8px; }
  @media (max-width: 560px) { .lib-body { padding: 0 10px 6px 14px; } .lib-folder-tools { padding-left: 10px; } }

  /* Office screens editor */
  .scr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
  .scr-side { position: sticky; top: 90px; }
  .scr-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
  .scr-status strong { display: block; font-size: 18px; font-weight: 500; }
  .scr-status .sub { display: block; font-size: 12px; color: var(--faint); }
  .scr-person { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; padding: 14px; margin-bottom: 10px; align-items: start; }
  .scr-person-photo { display: flex; flex-direction: column; gap: 8px; }
  .scr-photo { width: 110px; aspect-ratio: 3 / 4; background: rgba(255,255,255,.05); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font-size: 11px; color: var(--faint); }
  .scr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .scr-person-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .scr-person-fields .field input, .scr-person-fields .field select { font-size: 14px; padding: 9px 10px; }
  .scr-person-order { display: flex; flex-direction: column; gap: 6px; align-items: center; }
  .scr-num { font-size: 12px; font-weight: 700; color: var(--orange); }
  .scr-preview-wrap { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); background: #050b18; }
  .scr-preview-wrap iframe { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
  #screen-fields:empty { display: none; }
  @media (max-width: 980px) { .scr-layout { grid-template-columns: 1fr; } .scr-side { position: static; order: -1; } }
  @media (max-width: 560px) { .scr-person { grid-template-columns: 80px minmax(0, 1fr); } .scr-photo { width: 80px; } .scr-person-order { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; } }
