/* Shared refinement: calm emerald, clearer hierarchy, practical touch targets. */
:root {
  --bg: #f3f6f7;
  --ink: #243737;
  --muted: #647777;
  --accent: #117c66;
  --accent-hover: #096452;
  --accent-soft: #eaf6f1;
  --line: #e1e9e7;
  --radius: 12px;
  --shadow-sm: 0 3px 15px rgba(29, 63, 55, .035);
}
body { font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; line-height: 1.65; }
.topbar { border-bottom-color: #e5ecea; box-shadow: none; }
.brand { letter-spacing: .3px; }
.brand-mark { border-radius: 11px; box-shadow: none; }
.sidebar { background: #203a35; border-right: 0; padding-top: 26px; }
.sidebar a { border-radius: 9px; color: #c9d9d4; transition: background .15s, color .15s; }
.sidebar a:hover { background: #2b4841; color: #fff; }
.sidebar a.active { background: #35574e; color: #fff; }
.content { padding: 32px 36px 44px; }
.page-head { margin-bottom: 26px; gap: 18px; }
.page-head h1 { font-size: 27px; letter-spacing: -.6px; font-weight: 700; }
.page-head p { margin-top: 8px; color: var(--muted); }
.breadcrumbs { font-size: 12px; margin-bottom: 9px; }
.section, .form-panel, .table-wrap, .filter-collapse { border-radius: 13px; }
.section, .form-panel { box-shadow: var(--shadow-sm); }
.section h2, .form-panel h2 { font-size: 17px; }
.section-head { gap: 16px; flex-wrap: wrap; }
.button { border-radius: 8px; min-height: 40px; transition: background .15s, border-color .15s; }
.button-primary { box-shadow: 0 3px 8px #117c6618; }
.button-danger { color: #b44444; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
  border-radius: 8px; border-color: #d6e2dd; background-color: #fcfefd;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid #117c6618; outline-offset: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid #73bbaa; outline-offset: 3px; }
textarea { line-height: 1.8; resize: vertical; }
th { background: #f7faf9; color: #526a62; font-weight: 600; font-size: 12px; }
td { border-bottom-color: #edf1ef; }
.status { border-radius: 6px; padding: 3px 9px; font-size: 12px; }
.table-subtitle { line-height: 1.7; margin-top: 5px; }
.form-errors, .errorlist { border-radius: 8px; }
.site-footer { background: transparent; border-top-color: #e5ecea; }
.weight-summary-bar { align-items: stretch; padding: 24px; border-top: 3px solid var(--accent); }
.section-eyebrow { display: block; font-size: 11px; letter-spacing: 1px; color: var(--accent); font-weight: 600; margin-bottom: 7px; }
.weight-summary-bar h2 { font-size: 22px; margin: 0 0 7px; }
.weight-summary-bar .section-description { max-width: 700px; line-height: 1.8; }
.category-progress { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.weight-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: #256951; font-size: 12px; font-weight: 500; }
.weight-chip.is-off { color: #916018; background: #fff4dd; }
.weight-total { display: flex; flex-direction: column; justify-content: center; min-width: 160px; padding: 16px 20px; text-align: center; border-radius: 11px; border: 0; background: #f2f6f4; }
.weight-total small { display: block; font-size: 11px; font-weight: 500; }
.weight-total strong { font-size: 32px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.weight-total div > span { margin-left: 3px; font-size: 15px; }
.goal-rows { gap: 18px; }
.goal-row { padding: 24px; border-radius: 13px; border-color: #dfe8e3; }
.goal-row-head { grid-template-columns: 34px minmax(130px, 1fr) 110px 110px auto; align-items: end; padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid #edf2ef; }
.goal-row .goal-row-head .field { margin: 0; }
.goal-index { border-radius: 9px; width: 32px; height: 32px; }
.goal-row label { color: #466055; font-size: 12px; font-weight: 600; }
.goal-row textarea { min-height: 105px; }
.goal-remove { font-size: 12px; min-height: 38px; padding: 7px 12px; background: #fff; }
.goal-actions .button { width: 100%; border: 1px dashed #b6cec2; background: #f4faf6; color: var(--accent); min-height: 48px; }
.score-comment { margin-top: 24px; padding: 26px; }
.field label .summary-weight { margin-left: 8px; color: var(--accent); font-size: 12px; font-weight: 600; background: var(--accent-soft); padding: 3px 9px; border-radius: 5px; }
.score-comment .form-actions { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e5ece8; }
.review-context { margin-bottom: 20px; padding: 24px; }
.review-context h2 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.review-context .notes-content { white-space: normal; line-height: 1.9; overflow-wrap: anywhere; }
.previous-comment { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.previous-comment h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.sync-section + .sync-section { margin-top: 28px; }
.sync-section .section-head p { max-width: 680px; }
@media (min-width: 1500px) { .content { max-width: 1520px; margin: 0 auto; width: 100%; } }
@media (max-width: 1100px) { .content { padding: 26px 22px; } .goal-row-head { grid-template-columns: 32px minmax(100px, 1fr) 88px 88px auto; gap: 9px; } }
@media (max-width: 900px) {
  .sidebar { top: 0; background: #edf3f0; padding: 10px 14px; border-bottom: 1px solid #dce6e0; }
  .sidebar a { background: transparent; color: #426056; border-color: transparent; }
  .sidebar a.active { background: var(--accent); color: #fff; }
  .sidebar a:hover { background: #dcebe3; color: #184f3e; }
  .sidebar::after { background: linear-gradient(to right, transparent, #edf3f0); }
}
@media (max-width: 760px) {
  .content { padding: 20px 14px 28px; }
  .page-head h1 { font-size: 23px; }
  .page-head p { font-size: 12px; }
  .weight-summary-bar { padding: 19px; gap: 17px; }
  .weight-total { width: 100%; flex-direction: row; align-items: center; gap: 14px; justify-content: space-between; padding: 10px 13px; min-width: 0; }
  .weight-total strong { font-size: 25px; }
  .weight-total small { font-size: 10px; white-space: normal; }
  .goal-row { padding: 18px; }
  .goal-row-head { grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 3px; }
  .goal-index { grid-column: 1; grid-row: 1; }
  .goal-remove { grid-column: 2; grid-row: 1; width: auto; justify-self: end; }
  .goal-category { grid-column: 1 / -1; }
  .goal-row .goal-row-head .field { margin: 0; }
  .score-comment, .review-context { padding: 19px; }
  .score-comment .form-actions { display: flex; gap: 10px; }
  .score-comment .form-actions .button { flex: 1; }
  .button { min-height: 44px; }
  .process-rail { overflow-x: auto; }
  .score-table { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .score-table table, .score-table tbody { display: block; width: 100%; min-width: 0; }
  .score-table thead { display: none; }
  .score-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 7px; padding: 16px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .score-table tbody td { display: block; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .score-table tbody td:nth-child(-n+2) { grid-column: 1 / -1; }
  .score-table tbody td:first-child:empty { display: none; }
  .score-table tbody td[data-label] { background: #f3f8f5; border-radius: 5px; text-align: center; padding: 8px 3px; font-size: 12px; }
  .score-table tbody td[data-label]::before { content: attr(data-label); display: block; color: #657b70; font-size: 10px; margin-bottom: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
