/* Shared by the editor shell, account pages and sign-in. Article previews have their own document. */
:root {
  --ui-paper: #f6f6f0;
  --ui-ink: #1c302b;
  --ui-accent: #216653;
  --ui-tint: #e5f1e9;
  --ui-line: #d6dfd6;
  --ui-muted: #53665d;
  --ui-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ui-serif: "Source Han Serif SC", "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --ui-nav-height: 48px;
}

body { accent-color: var(--ui-accent); }

.workspace-bar {
  box-sizing: border-box;
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(22px, 4vw, 64px);
  position: sticky;
  top: 0;
  z-index: 70;
  min-width: 0;
  padding: 12px 24px;
  background: #193b32;
  color: white;
  font-family: var(--ui-sans);
}

.workspace-bar .apphead {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  color: #f5f6ea;
}

/* Paper with a folded corner, drawn at interface size. */
.workspace-bar .apphead::before {
  content: "";
  width: 27px;
  height: 31px;
  background:
    linear-gradient(45deg, #a1c3ad 50%, transparent 51%) top right / 8px 8px,
    linear-gradient(#396752 0 0) 6px 10px / 10px 2px,
    linear-gradient(#396752 0 0) 6px 16px / 15px 2px,
    linear-gradient(#396752 0 0) 6px 21px / 11px 2px,
    #e4eddb;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  border-radius: 2px;
}

.workspace-bar .apphead-title {
  font: 650 20px/1.4 var(--ui-serif);
  letter-spacing: .06em;
}

.workspace-bar .appnav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  padding: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: transparent;
  border: 0;
}
.workspace-bar .appnav::-webkit-scrollbar { display: none; }
.workspace-bar .appnav button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #e3eee7;
  font: 550 14px/1.4 var(--ui-sans);
  white-space: nowrap;
  cursor: pointer;
}
.workspace-bar .appnav button:hover { background: #2f5045; color: white; }
.workspace-bar .appnav button[aria-selected="true"] {
  background: #e1ecdb;
  color: #193b32;
  font-weight: 700;
}
.workspace-bar .appnav button:focus-visible {
  outline: 2px solid #e9c979;
  outline-offset: -3px;
}
.workspace-bar .appnav .ui-ico { width: 16px; height: 16px; stroke-width: 1.8; }
.workspace-bar .nav-badge {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: #d4e4d4;
  color: #1c4034;
  font: 650 11px/17px var(--ui-sans);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.workspace-bar [aria-selected="true"] .nav-badge { background: #305c48; color: white; }
.workspace-bar .nav-badge[hidden] { display: none; }
.workspace-bar [data-view="interfaces"] { margin-inline-start: auto; }
.workspace-bar .appnav :is([data-view="interfaces"], [data-view="accounts"]) { font-size: 13px; }

@media (max-width: 1179px) {
  .workspace-bar { height: var(--ui-nav-height); padding: 0 6px; }
  .workspace-bar .apphead { display: none; }
  .workspace-bar .appnav { gap: 2px; }
  .workspace-bar .appnav button { flex: 1 0 auto; min-height: 44px; padding: 0 7px; gap: 4px; }
}
@media (max-width: 600px) {
  .workspace-bar .appnav button { font-size: 13px; }
  .workspace-bar .appnav:has([data-view="accounts"]) .ui-ico { display: none; }
  .workspace-bar .appnav:has([data-view="accounts"]) button { padding-inline: 5px; }
}
