
:root {
  color-scheme: light;
  --coal: #242321;
  --paper: #F3F0E9;
  --off-white: #FCFBF7;
  --gold: #BEAF87;
  --clay: #A76745;
  --clay-text: #805039;
  --sage: #6F7467;
  --white: var(--off-white);
  --ink-soft: #625F59;
  --line: #DAD4C8;
  --green: #2F6E52;
  --green-soft: #E5F2EB;
  --amber: #8A5B18;
  --amber-soft: #F8ECD7;
  --blue: #3E6175;
  --blue-dark: #2D4B5D;
  --blue-soft: #E4EEF3;
  --shadow-sm: 0 8px 24px rgba(36, 35, 33, .06);
  --shadow: 0 18px 50px rgba(36, 35, 33, .11);
  --radius: 16px;
  --sidebar: 272px;
  --font-sans: Montserrat, "Avenir Next", "Segoe UI", Arial, sans-serif;
  --font-display: "Playfair Display", Playfair, Georgia, "Times New Roman", serif;
  font-family: var(--font-sans);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); font-size: 16px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; color: var(--coal); background: var(--paper); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
button, input { font: inherit; font-size: 16px; line-height: 1.35; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 17px; height: 17px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.eyebrow { color: var(--clay-text); font-size: 12px; font-weight: 700; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
h1 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; }
h2 { margin-bottom: 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.18; }
h3 { margin-bottom: 7px; font-size: 19px; line-height: 1.25; }
p { line-height: 1.55; }
small { font-size: 12px; line-height: 1.45; }
strong, b { font-weight: 700; }
.muted { color: var(--ink-soft); }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 620px); background: var(--off-white); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100vh; padding: clamp(40px, 7vw, 92px); overflow: hidden; color: var(--off-white); background: var(--coal); }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(190,175,135,.35); border-radius: 50%; }
.login-brand::before { width: 470px; height: 470px; right: -140px; top: -120px; }
.login-brand::after { width: 280px; height: 280px; right: 40px; top: 70px; }
.login-brand .brand-lockup { position: absolute; left: clamp(40px, 7vw, 92px); top: clamp(40px, 6vw, 70px); z-index: 1; }
.login-brand .brand-copy { position: relative; z-index: 1; max-width: 620px; }
.login-brand .eyebrow { color: var(--gold); }
.login-brand h1 { max-width: 650px; font-size: clamp(42px, 6vw, 74px); }
.login-brand p { max-width: 560px; color: #E3DED2; font-size: 17px; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; font-family: var(--font-sans); line-height: 1.2; }
    .brand-mark { display: block; width: 38px; height: 48px; flex: 0 0 38px; border: 0; border-radius: 0; background: transparent; object-fit: contain; object-position: center; }
.brand-text { display: grid; min-width: 0; gap: 3px; }
.brand-text strong { color: var(--off-white); font-size: 14px; font-weight: 700; letter-spacing: .035em; }
.brand-text small { color: var(--gold); font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.3; overflow-wrap: anywhere; text-transform: none; }
.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 32px; background: var(--off-white); }
.login-card { width: min(100%, 460px); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.login-card h2 { margin-top: 9px; }
.login-card label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 700; }
.login-card input[type="text"], .login-card input[type="password"] { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #B8B0A3; border-radius: 10px; color: var(--coal); background: var(--off-white); }
.checkline { display: flex !important; align-items: center; gap: 10px; margin-top: 12px !important; font-weight: 500 !important; }
.checkline input { width: 18px; height: 18px; margin: 0; accent-color: var(--coal); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; margin-top: 22px; padding: 12px 18px; border: 0; border-radius: 10px; color: var(--off-white); background: var(--coal); font-size: 15px; font-weight: 700; cursor: pointer; }
.primary-button:hover { background: #3A3935; }
.error { margin: 16px 0 0; padding: 12px 14px; border-left: 4px solid #A33D32; background: #F9E9E5; color: #762A22; font-weight: 650; }
.warning { margin: 9px 0 0; color: #8A4518; font-weight: 700; }
.login-note { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar); padding: 24px 18px; color: var(--off-white); background: var(--coal); }
.sidebar .brand-lockup { min-height: 58px; padding: 0 6px 20px; border-bottom: 1px solid rgba(255,255,255,.13); }
.navigation { display: grid; gap: 5px; margin-top: 22px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 12px; border-radius: 10px; color: #E8E4DA; text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.35; }
.nav-link:hover { background: rgba(255,255,255,.07); }
.nav-link[aria-current="page"] { color: var(--coal); background: var(--gold); }
.sidebar-foot { margin-top: auto; padding: 18px 6px 2px; border-top: 1px solid rgba(255,255,255,.13); }
.secure-note { display: flex; align-items: center; gap: 9px; color: #D8D2C6; font-size: 12px; line-height: 1.45; }
.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 14px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line); background: rgba(252,251,247,.94); backdrop-filter: blur(12px); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.topbar-title span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.user-area { display: flex; align-items: center; gap: 12px; }
.user-copy { text-align: right; }
.user-copy strong { display: block; font-size: 14px; }
.user-copy span { color: var(--ink-soft); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--coal); background: var(--gold); font-weight: 700; }
.logout { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 600; background: white; }
.menu-button { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--coal); background: white; cursor: pointer; }
.content { width: min(1420px, 100%); margin: 0 auto; padding: clamp(28px, 4vw, 52px); }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 20px; }
.hero-copy, .guardrail { min-height: 250px; padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--off-white); box-shadow: var(--shadow-sm); }
.hero-copy { position: relative; overflow: hidden; }
.hero-copy::after { content: ""; position: absolute; right: -95px; bottom: -155px; width: 320px; height: 320px; border: 1px solid var(--gold); border-radius: 50%; opacity: .55; }
.hero-copy > * { position: relative; z-index: 1; }
.hero-copy p { max-width: 770px; color: var(--ink-soft); font-size: 16px; }
.guardrail { color: var(--off-white); background: var(--coal); box-shadow: none; }
.guardrail .eyebrow { color: var(--gold); }
.guardrail .shield-line { display: flex; align-items: center; gap: 10px; margin: 22px 0 9px; color: var(--gold); }
.guardrail p { color: #DDD7CA; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin: 20px 0 34px; }
.metric { min-height: 124px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--off-white); }
.metric .metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--sage); }
.metric strong { display: block; margin-top: 13px; font-family: var(--font-display); font-size: 32px; font-weight: 500; line-height: 1; }
.metric span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 12px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 0 15px; }
.section-head p { margin-bottom: 0; color: var(--ink-soft); font-size: 13px; }
.section-head .search-box { position: relative; width: min(340px, 100%); }
.search-box .icon { position: absolute; left: 13px; top: 12px; color: var(--sage); }
.search-box input { width: 100%; min-height: 44px; padding: 10px 13px 10px 43px; border: 1px solid var(--line); border-radius: 10px; color: var(--coal); background: var(--off-white); }
.category-grid, .apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.application-launchers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.app-launcher { position: relative; display: flex; min-height: 188px; padding: 24px 16px 20px; align-items: center; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; color: var(--coal); background: linear-gradient(155deg, #fff 0%, var(--off-white) 100%); box-shadow: var(--shadow-sm); text-align: center; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.app-launcher:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 34px rgba(36,35,33,.11); }
.app-launcher.disabled { opacity: .66; cursor: not-allowed; }
.app-launcher.disabled:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow-sm); }
.app-launcher-icon { display: grid; place-items: center; width: 78px; height: 78px; border: 2px solid #C8A25C; border-radius: 50%; color: #1F1F1D; background: #FFF; box-shadow: inset 0 0 0 5px rgba(190,175,135,.08); }
.app-launcher-icon .icon { width: 38px; height: 38px; stroke-width: 1.8; }
.app-launcher h3 { min-height: 48px; margin: 16px 0 4px; font-family: var(--font-sans); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; }
.launcher-version { color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.app-launcher-status { position: absolute; top: 16px; right: 17px; width: 11px; height: 11px; border: 2px solid #FFF; border-radius: 50%; box-shadow: 0 0 0 1px rgba(36,35,33,.05); }
.app-launcher-status.ready { background: #5C8B61; }
.app-launcher-status.partial { background: #C8A25C; }
.app-launcher-status.pilot { background: #55758B; }
.category-card, .app-card, .rule { border: 1px solid var(--line); border-radius: 14px; background: var(--off-white); box-shadow: var(--shadow-sm); }
.category-card { display: block; min-height: 172px; padding: 22px; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.category-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.category-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--coal); background: var(--gold); }
.app-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1.5px solid #C8A25C; border-radius: 50%; color: var(--coal); background: #FFF; }
.app-icon .icon { width: 27px; height: 27px; stroke-width: 1.8; }
.category-card h3 { margin-top: 20px; }
.category-card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.category-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--clay-text); font-size: 12px; font-weight: 700; }
.app-card { min-height: 260px; min-width: 0; padding: 20px; }
.app-card header { display: flex; flex-direction: column; align-items: start; gap: 14px; }
.app-title { display: flex; gap: 13px; min-width: 0; }
.app-title > div { min-width: 0; overflow-wrap: anywhere; }
.app-card header > .tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.app-title h3 { margin: 1px 0 4px; }
.version { color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.tag { flex: none; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; }
.tag.ready { color: var(--green); background: var(--green-soft); }
.tag.partial { color: var(--amber); background: var(--amber-soft); }
.tag.pilot { color: var(--blue); background: var(--blue-soft); }
.tag.green { color: var(--green); background: var(--green-soft); }
.tag.yellow { color: #6D581B; background: #FFF1B8; }
.tag.orange { color: #8A4300; background: #FFE0BF; }
.tag.red { color: #8C2020; background: #FFD6D6; }
.ops-list { display: grid; gap: 12px; }
.ops-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(170px, .8fr) minmax(260px, 2fr); gap: 16px; align-items: start; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.ops-row h3 { margin: 0 0 5px; }
.ops-row p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ops-meta { display: grid; gap: 4px; }
.ops-explain { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--off-white); color: var(--ink-soft); }
.app-card > p { min-height: 66px; margin: 18px 0 13px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.access-level { display: inline-flex; margin-bottom: 12px; padding: 5px 8px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; line-height: 1.3; }
.location { display: flex; align-items: flex-start; gap: 8px; min-height: 48px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.local-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; margin-top: 13px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: #EEEAE2; font-size: 14px; font-weight: 600; cursor: not-allowed; }
.local-button.active { border-color: var(--blue); color: var(--white); background: var(--blue); cursor: pointer; text-decoration: none; }
.local-button.active:hover, .local-button.active:focus-visible { background: var(--blue-dark); }
.empty-state { grid-column: 1 / -1; padding: 35px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--ink-soft); background: var(--off-white); }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rule { padding: 20px; }
.rule .icon { margin-bottom: 14px; color: var(--clay); }
.rule p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.page-intro p { max-width: 740px; margin-bottom: 0; color: var(--ink-soft); }
.private-notice { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 12px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 700; line-height: 1.3; }
.footer { margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.sidebar-overlay { display: none; }
@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-grid, .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .application-launchers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 25; display: block; border: 0; background: rgba(36,35,33,.48); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-button { display: grid; place-items: center; }
  .hero { grid-template-columns: 1fr; }
  .topbar { padding-inline: 18px; }
  .application-launchers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .content { padding: 22px 14px 36px; }
  .topbar-title span, .user-copy, .logout span { display: none; }
  .logout { width: 42px; justify-content: center; padding-inline: 0; }
  .login-panel { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .metrics, .category-grid, .apps, .rules { grid-template-columns: 1fr; }
  .application-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-launcher { min-height: 170px; padding-inline: 10px; }
  .app-launcher-icon { width: 68px; height: 68px; }
  .app-launcher-icon .icon { width: 33px; height: 33px; }
  .app-launcher h3 { min-height: 44px; font-size: 15px; }
  .section-head, .page-intro { align-items: flex-start; flex-direction: column; }
  .ops-row { grid-template-columns: 1fr; }
  .section-head .search-box { width: 100%; }
  .private-notice { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .local-button, .search-box { display: none !important; }
  .main { margin: 0; }
  body { background: white; }
}

/* Collaborator home: one icon and name per available application. */
.collaborator-shell .main { margin-left: 0; }
.collaborator-shell .topbar { gap: 20px; }
.collaborator-shell .content { max-width: 1200px; }
.collaborator-shell .topbar-title { color: inherit; text-decoration: none; }
.collaborator-shell .topbar-title .brand-mark { width: 32px; height: 40px; flex-basis: 32px; }
.collaborator-shell .application-launchers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; }
.collaborator-shell .app-launcher { min-height: 172px; padding: 24px 12px; border: 0; background: transparent; box-shadow: none; }
.collaborator-shell .app-launcher:hover { background: var(--off-white); box-shadow: var(--shadow-sm); }
.collaborator-shell .app-launcher h3 { min-height: 0; margin: 16px 0 0; font-size: 16px; }
.collaborator-shell .app-launcher-icon { width: 80px; height: 80px; }
.site-management-tile { display: flex; flex-direction: column; align-items: stretch; }
.site-collection-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; margin-top: 10px; border: 1px solid var(--gold); border-radius: 9px; color: var(--coal); background: var(--off-white); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; }
.site-collection-link:hover { background: #E8E1D2; }
.site-collection-link:focus-visible { outline: 2px solid var(--coal); outline-offset: 3px; }
.site-collection-link .icon { flex: 0 0 18px; }
.site-management-tile .site-collection-link { margin: 0 6px 8px; padding: 8px; }
.site-management-tile .site-collection-link .icon { display: none; }
.collaborator-shell .empty-state { margin-top: 24px; }
@media (max-width: 600px) {
  .collaborator-shell .topbar { position: static; flex-wrap: wrap; padding: 16px 20px; }
  .collaborator-shell .user-area { width: 100%; justify-content: flex-end; }
  .collaborator-shell .user-copy { display: block; margin-right: auto; text-align: left; }
  .collaborator-shell .application-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .collaborator-shell .app-launcher { padding: 20px 8px; }
}
