:root {
  color-scheme: light;
  --ink: #172523;
  --muted: #566762;
  --line: #e0e7e3;
  --canvas: #f4f7f5;
  --paper: #fff;
  --rail: #152d28;
  --accent: #175641;
  --accent-light: #e5f2ea;
  --radius: 12px;
  --sidebar-width: 238px;
  color: var(--ink);
  background: var(--canvas);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }
svg { width: 18px; height: 18px; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 3vw, 32px); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 16px; line-height: 1.4; }
strong, h1, h2, h3 { font-weight: 650; }
.muted { color: var(--muted); font-size: 13px; }
:focus-visible { outline: 3px solid #4c9c78; outline-offset: 2px; }

button, input, textarea, select {
  min-height: 39px;
  border: 1px solid #d5dfd8;
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--ink);
  background: var(--paper);
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 550;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: #88aa97; background: #f4f9f5; }
button:disabled { opacity: .55; cursor: default; }
.primary, .primary:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #103f30; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 25px 16px;
  background: var(--rail);
  color: #f2fcf7;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 690; }
.brand svg { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: #b9ecd0; color: #123b2d; }
.sidebar .brand { padding-inline: 7px; }
.project-switcher { display: grid; gap: 7px; margin-block: 32px 28px; padding-inline: 5px; }
.project-switcher label, .nav-section > span { font-size: 11px; letter-spacing: .07em; color: #a6c4b8; }
.project-switcher label { padding-inline: 3px; }
.project-switcher select {
  width: 100%;
  min-width: 0;
  border-color: #456359;
  background: #233e36;
  color: #f0fbf5;
  font-weight: 600;
  text-overflow: ellipsis;
  cursor: pointer;
}
.project-switcher select:disabled { appearance: none; opacity: 1; cursor: default; }
.project-switcher option { color: var(--ink); background: var(--paper); }
.workspace-nav { display: grid; gap: 23px; }
.nav-section { display: grid; gap: 4px; }
.nav-section > span { padding: 0 11px 3px; }
.nav-section a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 8px;
  color: #e0ede6;
  text-decoration: none;
}
.nav-section a:hover { background: #294940; }
.nav-section a[aria-current='page'] { background: #c4eed7; color: #12392c; font-weight: 650; }

.signed-in .shell { margin-left: var(--sidebar-width); }
.topbar {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: center;
  min-height: 61px;
  gap: 12px;
  justify-content: space-between;
  padding: 8px clamp(18px, 3vw, 38px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs, .account-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumbs svg { color: #7a8b84; width: 13px; }
.breadcrumbs #project-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#breadcrumb-page { font-weight: 650; white-space: nowrap; }
#account { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button { display: none; padding-inline: 8px; }
main { margin-inline: auto; max-width: 1520px; padding: 32px clamp(18px, 3vw, 38px) 64px; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
}
.page-heading p { margin-top: 8px; color: var(--muted); }
.heading-actions { display: flex; flex-shrink: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 61px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line);
}
.text-link, .retidal-link { text-underline-offset: .18em; font-weight: 600; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 21px;
}
.metric {
  display: grid;
  align-content: start;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px 13px;
  color: var(--muted);
  background: var(--paper);
}
.metric svg { color: var(--accent); }
.metric strong {
  grid-column: 1 / -1;
  line-height: 1;
  padding-block: 3px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.overview-board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.board { display: grid; align-items: start; gap: 18px; }
.board.has-editor { grid-template-columns: minmax(205px, .72fr) minmax(300px, 1.28fr); }
.board .preview { grid-column: 2; }
.schedule { min-width: 0; }
.activities { list-style: none; margin: 0; padding: 0; }
.activities li + li { border-top: 1px solid var(--line); }
.entry {
  min-width: 0;
  display: grid;
  gap: 3px;
  width: 100%;
  align-items: center;
  justify-content: stretch;
  padding: 14px 19px;
  border: 0;
  border-radius: 0;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
}
.entry strong { overflow-wrap: anywhere; }
.entry span { display: block; color: var(--muted); font-size: 13px; }
.entry:hover, .entry[aria-current='true'] { background: #eff7f1; }
#board:not(.has-editor) .entry { grid-template-columns: minmax(200px, 1.2fr) minmax(230px, 1.25fr) auto; gap: 12px; }
.entry .activity-state { justify-self: start; padding: 3px 8px; border-radius: 6px; background: #edf1ee; color: #45584e; font-size: 12px; }
.entry .activity-state[data-state='published'] { color: #164f39; background: var(--accent-light); }
.empty-state { display: grid; justify-items: start; gap: 10px; padding: 27px 19px; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
#pagination, #feedback-pagination { padding: 11px 19px; border-top: 1px solid var(--line); }
.growth-panel .status { border-radius: 20px; background: var(--accent-light); color: var(--accent); padding: 3px 9px; font-size: 12px; }
.growth-summary { padding: 16px 19px; color: var(--muted); }
.growth-panel .activities { border-top: 1px solid var(--line); }
.growth-panel .entry { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.growth-panel .entry strong { color: var(--ink); font-size: 14px; }

.editor form { padding: 18px 19px; }
form:not([hidden]):not(.controls), fieldset { display: grid; gap: 13px; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
form label { display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 550; }
form input, textarea { width: 100%; min-width: 0; font-weight: 400; }
textarea { resize: vertical; }
.dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.controls, #pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.timezone, .feedback-note { font-weight: 400; }
.preview { min-width: 0; padding: 16px 19px; border-radius: var(--radius); border: 1px dashed #9cb7a8; background: #edf4ef; }
.preview h2 { color: var(--accent); margin-bottom: 12px; }
.preview-body { overflow-wrap: anywhere; }
.preview-body h3 { margin-bottom: 7px; }
.preview-body p { white-space: pre-wrap; margin-bottom: 10px; }
.preview-body span { display: inline-block; padding: 5px 10px; border-radius: 7px; color: #fff; background: var(--accent); }
#revision { align-self: center; color: var(--muted); font-size: 13px; }
.notice, .warning {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid #d3eadb;
  border-radius: 8px;
  background: #e9f6ec;
  color: #184937;
}
.notice[data-error='true'], .warning { border-color: #eedab4; background: #fff3dc; color: #6a4410; }
.loading { padding: 18px 0; color: var(--muted); }
.login { max-width: 406px; padding: 27px; margin: min(13vh, 110px) auto 0; }
.login .brand { margin-bottom: 23px; color: var(--ink); font-size: 16px; }
.login h1 { margin-bottom: 23px; font-size: 25px; }
.feishu-login { width: 100%; }
dialog { width: min(470px, calc(100% - 36px)); max-height: calc(100% - 36px); padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
dialog::backdrop { background: rgba(12, 34, 27, .48); }
dialog dl { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 8px; }
dialog dt { color: var(--muted); }
dialog dd { margin: 0; overflow-wrap: anywhere; }
dialog .controls { justify-content: flex-end; }

@media (max-width: 1140px) {
  .board.has-editor { grid-template-columns: minmax(178px, .65fr) minmax(265px, 1.35fr); }
  .metric { padding-inline: 12px; }
}
@media (max-width: 900px) {
  .sidebar { visibility: hidden; top: 60px; box-shadow: 0 10px 35px #142e2740; }
  .menu-open .sidebar { visibility: visible; }
  .signed-in .shell { margin-left: 0; }
  .icon-button { display: inline-flex; }
  .breadcrumbs { margin-right: auto; }
}
@media (max-width: 650px) {
  .topbar { padding-inline: 12px; gap: 8px; }
  .breadcrumbs, .account-controls { gap: 6px; }
  #account, .breadcrumbs svg, #breadcrumb-page { display: none; }
  main { padding: 23px 13px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .overview-board, .board.has-editor { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .board .preview { grid-column: auto; }
  .board.has-editor .schedule { display: none; }
  #board:not(.has-editor) .entry { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 9px; }
  #board:not(.has-editor) .entry strong { grid-column: 1 / -1; }
  .dates { grid-template-columns: minmax(0, 1fr); }
  button, input, textarea, select { min-height: 44px; }
}
