.app {
  --paper: #f1f0e8;
  --border: #d8dacb;
  background: var(--paper);
}
.app .work-bar { background: #f1f0e8; }
.app #rail {
  --rail-ink: #f1f3e8;
  --rail-muted: #b9c7af;
  --rail-line: #485b47;
  color: var(--rail-ink);
  background: #293b30;
  border: 0;
  padding: 20px 12px 14px;
  gap: 16px;
  z-index: 8;
}
.rail-heading { display:flex; align-items:center; gap:4px; justify-content:space-between; }
#rail .rail-brand { margin:0; color:var(--rail-ink); text-decoration:none; }
#rail .brand { margin:0; gap:8px; font-size:19px; }
#rail .brand .icon { width:32px; height:32px; border-radius:9px; padding:5px; }
#rail .brand small { font-size:9px; }
#rail .rail-button {
  padding:5px; min-width:30px; min-height:34px; background:transparent; border:0;
  color:var(--rail-muted);
}
#rail .rail-button:hover { background:#3b5040; }
#rail .rail-button .icon, #rail .rail-caret .icon { filter:invert(1); opacity:.82; }
#rail nav { padding:0; }
#rail nav a { color:#dce5d7; font-weight:500; padding:9px 12px; border-radius:9px; }
#rail nav a .icon { opacity:.84; filter:invert(1); }
#rail nav a.current { background:#d6e5bd; color:#233928; font-weight:700; }
#rail nav a.current .icon { filter:none; opacity:1; }
#rail nav a:hover:not(.current) { color:#fff; background:#354c3c; }
#rail :is(a,summary,button):focus-visible { outline:3px solid #b2cc78; outline-offset:2px; }
.rail-pop { position:relative; }
#rail .rail-pop > summary {
  cursor:pointer; list-style:none; display:flex; align-items:center;
  gap:10px; border-radius:10px; padding:9px; min-height:52px; margin:0;
}
.rail-pop summary::-webkit-details-marker { display:none; }
.company-picker > summary { background:#354b3c; border:1px solid var(--rail-line); }
#rail .rail-pop > summary:hover { background:#3d5441; }
.company-symbol, .profile-avatar {
  display:inline-grid; place-items:center; flex:0 0 34px;
  width:34px; height:34px; overflow:hidden; border-radius:9px;
}
.company-symbol { background:#cedcb9; }
#rail .company-symbol .icon { filter:none; width:19px; height:19px; }
.rail-meta { display:grid; gap:2px; min-width:0; flex:1; line-height:1.2; }
#rail .rail-meta strong, #rail .rail-meta small, .account-info small, .account-info strong {
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#rail .rail-meta small {color:var(--rail-muted); font-size:11px; }
#rail .rail-meta strong { font-weight:650; color:var(--rail-ink); font-size:14px; }
#rail .rail-caret { display:flex; margin-left:auto; }
#rail .rail-caret .icon { width:14px; height:14px; }
.rail-pop[open] .rail-caret { transform:rotate(180deg); }
.rail-popup {
  position:absolute; z-index:14; left:0; top:calc(100% + 6px); min-width:100%; width:max-content;
  max-width:min(285px, calc(100vw - 36px)); background:#fafbf4; color:#253b2e;
  border:1px solid #c7ceba; border-radius:12px; padding:6px;
  box-shadow:0 8px 24px #152b2429;
}
#rail .account-picker { border-top:1px solid var(--rail-line); padding-top:10px; }
#rail .account-picker summary { padding:6px; }
.profile-avatar { border-radius:50%; color:#442e20; background:#e8c8a7; font-size:13px; font-weight:750; }
.profile-avatar img { object-fit:cover; width:100%; height:100%; }
.account-list { top:auto; bottom:calc(100% + 6px); }
.popup-label,.account-info small { color:#536455; font-size:12px; }
.popup-label { padding:4px 9px; margin:0; font-weight:600; }
#rail .rail-popup button {
  width:100%; color:#24382c; background:transparent; box-shadow:none; border:0;
  padding:8px 9px; min-height:38px; text-align:left; border-radius:7px;
  display:flex; align-items:center; justify-content:flex-start; gap:9px;
}
#rail .company-list button { justify-content:space-between; }
#rail .rail-popup button:hover { background:#ecf0e3; }
#rail .company-list button[aria-current] { background:#e2ead7; opacity:1; cursor:default; }
#rail .rail-popup button .icon { filter:none; }
.account-info,.profile-summary > div { display:grid; gap:2px; }
.account-info { padding:6px 9px 10px; border-bottom:1px solid #d5dacb; }
.profile-languages { padding:9px; color:#485d4b; border-block:1px solid #d5dacb; }
.profile-languages > span { display:block; font-size:12px; margin-bottom:6px; font-weight:600; }
.profile-languages > div { display:flex; flex-wrap:wrap; gap:4px; }
.profile-languages a { padding:4px 8px; text-decoration:none; border-radius:5px; font-size:13px; }
.profile-languages a[aria-current] { background:#dfe9d5; font-weight:650; }
.profile-summary { display:flex; align-items:center; gap:12px; }
.profile-summary small,.profile-form label small {color:#566457; font-weight:450;}
.profile-summary .profile-avatar{width:48px;height:48px;flex-basis:48px;}
.profile-form .check-photo { flex-direction:row; display:flex; align-items:center; }
.profile-form .check-photo input { width:auto; }
@media (min-width:721px) {
  html.compact-rail .app { grid-template-columns:72px minmax(0,1fr); }
  .compact-rail #rail { align-items:stretch; padding-inline:10px; }
  .compact-rail .rail-heading { flex-direction:column; gap:6px; }
  .compact-rail #rail .brand span,.compact-rail #rail .rail-meta,.compact-rail #rail .rail-caret,.compact-rail #rail nav a span {display:none;}
  .compact-rail #rail .rail-pop > summary,.compact-rail #rail nav a {justify-content:center; padding-inline:3px;}
  .compact-rail .rail-popup { left:calc(100% + 8px); top:0; min-width:174px; }
  .compact-rail .account-list { bottom:0;top:auto; }
}
@media (max-width:720px) {
  #rail-size { display:none; }
  .rail-open #rail { max-height:calc(100dvh - 55px); }
}

#rail .rail-footer { margin-top:auto; display:grid; gap:8px; flex-shrink:0; }
#rail .rail-pos {
  display:flex; align-items:center; gap:10px; min-height:42px; padding:8px 12px;
  border:1px solid #71866b; border-radius:9px; color:#f3f6ed; background:#354b3b;
  font-weight:650; text-decoration:none;
}
#rail .rail-pos:hover { background:#465f49; }
#rail .rail-pos:focus-visible { outline:2px solid #d6e5bd; outline-offset:2px; }
#rail .rail-pos .icon { filter:invert(1); }
@media (min-width: 921px) {
  .compact-rail #rail .rail-pos { justify-content:center; padding-inline:3px; }
  .compact-rail #rail .rail-pos span { display:none; }
}
