:root {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color: #172238; background: #fff; font-synthesis: none;
  --navy: #10213f; --blue: #3159d9; --blue-soft: #edf2ff;
  --line: #dce2ec; --muted: #667187; --sidebar-width: 252px;
}
* { box-sizing: border-box; }
body { margin: 0; }
[v-cloak] { display: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 7px; background: var(--blue); color: #fff; padding: 11px 18px; min-height: 44px; font-size: 15px; font-weight: 600; line-height: 1.5; }
button:hover:not(:disabled) { filter: brightness(.95); }
button:disabled { opacity: .55; cursor: not-allowed; }
button, a, input, select, textarea, summary { outline-offset: 3px; }
:focus-visible { outline: 3px solid #708ef5; }
.secondary { background: #fff; color: #24334f; border-color: #b7c2d6; }
.quiet { color: var(--blue); background: transparent; padding: 8px 10px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 10px 13px; border: 1px solid #bac4d5; border-radius: 6px; color: #1b263b; background: #fff; font-size: 16px; line-height: 1.5; }
input:disabled, select:disabled, textarea:disabled { background: #f3f5f9; color: #566175; }
input[type=checkbox] { flex: 0 0 auto; accent-color: var(--blue); width: 20px; height: 20px; margin: 2px 9px 0 0; }
textarea { resize: vertical; }
label { display: block; font-size: 15px; line-height: 1.6; font-weight: 600; }
label input, label select, label textarea { margin-top: 8px; }
label input[type=checkbox] { margin-top: 2px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 32px; line-height: 1.4; letter-spacing: -.5px; }
h2 { font-size: 24px; line-height: 1.5; margin: 0 0 18px; }
h3 { font-size: 17px; margin: 24px 0 12px; }
p { line-height: 1.75; margin: 10px 0; }
a { color: var(--blue); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.7; }
.muted, .help, .small-label { color: var(--muted); }
.help { font-size: 13px; line-height: 1.75; margin: 6px 0 10px; }
.small-label { font-size: 12px; }
.wordmark { color: inherit; font-size: 29px; font-weight: 750; letter-spacing: .5px; text-decoration: none; }
.icon, .icon-button img { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: transparent; }
.mobile-only { display: none !important; }
.mode { display: inline-block; width: fit-content; padding: 4px 9px; border-radius: 5px; background: #e9eef8; color: #526484; font-size: 12px; font-weight: 400; line-height: 1.6; }
.app-shell { min-height: 100vh; padding-left: var(--sidebar-width); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); overflow-y: auto; padding: 23px 14px 30px; background: var(--navy); color: #eef3ff; z-index: 60; scrollbar-width: thin; scrollbar-color: #486084 var(--navy); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; margin-bottom: 9px; }
.sidebar > .mode { background: #354867; color: #dbe6ff; margin-left: 14px; }
.main-navigation { display: grid; gap: 6px; padding: 26px 0 24px; border-bottom: 1px solid #43516a; }
.main-navigation button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; background: transparent; color: #eef3ff; border-radius: 6px; font-size: 16px; text-align: left; }
.main-navigation img { width: 22px; height: 22px; filter: invert(1); }
.main-navigation .active, .chapter-navigation .active { background: #2852c8; color: #fff; }
.chapter-navigation { padding-top: 22px; }
.chapter-navigation h2 { font-size: 14px; padding: 0 12px; margin: 0 0 18px; }
.chapter-navigation h2 span { font-size: 12px; color: #b4c2dc; font-weight: 400; margin-left: 7px; }
.chapter-navigation button, .chapter-group summary { width: 100%; text-align: left; background: transparent; color: #e0e8f7; font-size: 13px; line-height: 1.65; font-weight: 400; border-radius: 5px; }
.chapter-button, .chapter-group summary { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; min-height: 40px; }
.chapter-button > span:first-child, .chapter-group summary > span:first-child { flex: 0 0 18px; }
.chapter-group summary > span:nth-child(2) { flex: 1; }
.chapter-group summary img { width: 14px; height: 20px; filter: invert(1); }
.chapter-group:not([open]) summary img { transform: rotate(-90deg); }
.chapter-group button { display: block; padding: 9px 12px 9px 43px; min-height: 40px; }
.chapter-navigation button:hover, .chapter-group summary:hover { background: #21395c; }
.chapter-navigation button.active:hover { background: #2852c8; }
summary { cursor: pointer; font-weight: 600; line-height: 1.6; }
.chapter-group summary, .actions > summary { list-style: none; }
.chapter-group summary::-webkit-details-marker, .actions > summary::-webkit-details-marker { display: none; }
.app-header { min-height: 76px; position: sticky; top: 0; display: flex; align-items: center; gap: 22px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: #fbfcff; z-index: 30; }
.header-project { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.header-project label { white-space: nowrap; }
.header-project select { width: 220px; max-width: 240px; height: 44px; min-height: 44px; padding: 6px 12px; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-period { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.header-period b { font-size: 15px; font-weight: 650; }
.header-period span { font-size: 12px; color: #55637a; white-space: nowrap; }
.header-period button { font-size: 12px; padding: 5px; min-height: 32px; }
.header-project-kind { font-size: 13px; }
.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; flex: 0 0 auto; font-size: 14px; white-space: nowrap; }
.switch-role { font-size: 14px; padding: 8px 0 8px 14px; }
.workspace { max-width: 1440px; margin: 0 auto; padding: 32px 36px 100px; min-width: 0; }
.workspace.has-report { padding-bottom: 150px; }
.message-stack:empty { display: none; }
.notice-bar, .toast { margin: 0; padding: 12px 28px; background: #fff5dc; color: #76571c; font-size: 14px; line-height: 1.7; border-bottom: 1px solid #eed9aa; }
.toast { background: #fff0ed; border-color: #edc4be; }
.error { color: #a22e25; }
.overview { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.overview p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.new-report { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.new-report label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.new-report input { width: 72px; margin: 0; }
.report-picker { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report-list { display: flex; flex-wrap: wrap; gap: 12px; }
.report-list button { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; color: #24344f; background: #fff; border-color: #cbd4e3; min-width: 210px; padding: 16px 20px; text-align: left; }
.report-list button.selected { border-color: var(--blue); background: var(--blue-soft); }
.report-list span, .report-list small { font-size: 12px; font-weight: 400; }
.editor-grid, .editor { min-width: 0; }
.editor-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 22px; }
.editor-heading h1 { font-size: 31px; }
.editor-heading p { flex: 1; color: #5e6a7d; font-size: 15px; margin: 0; }
.toolbar { margin: 0 0 20px; font-size: 12px; color: var(--muted); }
.read-only, .restore { margin: 16px 0 20px; padding: 13px 16px; background: #fff6df; border: 1px solid #f0deaa; border-radius: 6px; color: #775e2f; font-size: 14px; line-height: 1.7; }
.restore button { margin: 6px 8px 4px 0; }
.field-group { margin: 0 0 28px; padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.field-group:first-child { padding-top: 7px; }
.group-title, .group-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 0 0 25px; padding: 0 0 0 18px; border: 0; border-left: 6px solid var(--blue); border-radius: 0; background: transparent; color: #142238; font-size: 24px; font-weight: 700; line-height: 1.4; text-align: left; min-height: 32px; }
.group-toggle { min-height: 44px; }
.group-toggle img { width: 22px; height: 22px; opacity: .65; }
.group-toggle img.collapsed { transform: rotate(-90deg); }
.field-group:has(.group-toggle[aria-expanded=false]) { padding-top: 8px; padding-bottom: 8px; }
.group-toggle[aria-expanded=false] { margin-bottom: 0; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 30px; }
.field { min-width: 0; margin: 0; }
.field > label { margin-bottom: 8px; }
.field-wide { grid-column: 1 / -1; }
.checkbox-field { padding: 16px 18px; border-radius: 7px; background: #f0f4fd; margin-top: 3px; }
.checkbox-field label { display: flex; align-items: flex-start; margin: 0; line-height: 1.7; }
.reference { margin: 16px 0; padding: 14px 17px; font-size: 14px; border: 1px solid #dbe4f4; background: #f6f8fd; border-radius: 6px; }
.reference p { white-space: pre-wrap; }
.reference select { margin-bottom: 12px; }
.reference summary { min-height: 28px; }
.reference[open] summary { margin-bottom: 12px; }
.form-footer { position: fixed; bottom: 0; right: 0; left: var(--sidebar-width); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 36px max(16px, env(safe-area-inset-bottom)); background: #fbfcff; border-top: 1px solid var(--line); z-index: 40; }
.footer-buttons { display: flex; gap: 14px; flex: 0 0 auto; }
.footer-buttons button { min-width: 140px; min-height: 46px; }
.save-status { display: flex; gap: 8px; align-items: center; font-size: 13px; line-height: 1.7; color: #5d6c82; }
.save-status .icon { width: 18px; height: 18px; opacity: .55; }
.save-status.pending { color: #87621c; }
.actions { margin: 30px 0 0; border: 1px solid var(--line); border-radius: 7px; background: #f9faff; }
.actions > summary { display: flex; align-items: center; gap: 16px; padding: 17px 20px; font-size: 18px; color: #20304b; }
.actions > summary span { flex: 1; color: var(--muted); font-size: 13px; font-weight: 400; }
.actions > summary img { width: 20px; height: 20px; }
.actions:not([open]) > summary img { transform: rotate(-90deg); }
.actions-body { padding: 0 22px 24px; }
.actions-body > button { margin: 6px 10px 6px 0; }
.actions p, .actions label { font-size: 14px; }
.whole-review-feedback { margin: 8px 0 12px; padding: 10px 14px; border: 1px solid #cbd8f1; border-radius: 6px; background: #edf3ff; }
.whole-review-feedback p { margin: 0; line-height: 1.7; }
.whole-review-feedback .whole-review-receipt { color: var(--muted); font-size: 12px; }
.whole-review-result { color: #20304b; font-weight: 600; }
.whole-review-feedback button { margin-top: 8px; }
.form-footer .whole-review-short { min-height: 44px; padding: 4px 8px; color: #3159d9; }
.actions textarea { max-width: 640px; }
.actions article { padding: 15px 0; border-top: 1px solid var(--line); }
.chapter-checks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 8px; margin: 16px 0; }
.chapter-checks label { display: flex; align-items: center; min-height: 44px; }
.table-scroll { max-width: 100%; overflow: auto; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 9px; border: 1px solid var(--line); text-align: left; }
th { background: #f0f4fb; min-width: 120px; font-weight: 600; }
td input { min-width: 110px !important; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.photos article { padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.photos a { display: block; margin-bottom: 10px; }
.photos input { margin: 12px 0; }
.photos label { display: flex; align-items: center; }
.panel { min-width: 0; padding: 8px 0 24px; }
.panel h1 { margin-bottom: 26px; }
.appointment-panel { padding-bottom: 112px; }
.appointment-panel h1 { margin-bottom: 8px; }
.appointment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.appointment-block { margin: 10px 0; border: 1px solid var(--line); border-radius: 7px; padding: 0 14px; scroll-margin-top: 170px; }
.appointment-block summary { min-height: 44px; padding: 10px 0; overflow-wrap: anywhere; }
.appointment-block[open] { padding-bottom: 12px; }
.appointment-attention { color: #76571c; }
.appointment-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 4px 12px; min-inline-size: 0; margin: 0; padding: 4px 0 0; border: 0; }
.appointment-options legend { padding: 0; font-weight: 600; }
.appointment-options label { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.appointment-panel .form-footer .save-status { min-width: 0; }
.task, .version { padding: 22px 0; border-top: 1px solid var(--line); line-height: 1.8; }
.version { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.task-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; max-width: 840px; margin: 0 0 28px; }
.task-form label:has(textarea), .task-form button { grid-column: 1 / -1; }
.task-form > button { justify-self: start; }
.task textarea { max-width: 840px; margin: 10px 0; }
.task button { margin: 8px 10px 0 0; }
.task form > label { display: flex; align-items: center; }
.issues { margin: 26px 0; }
.issues h3 { margin-top: 0; }
.issues article { border: 1px solid #ead5a7; border-radius: 6px; background: #fffaf0; padding: 14px 16px; margin: 12px 0; }
.issues article > span { color: #805b16; font-size: 13px; }
.issues p { margin: 8px 0; }
.empty { padding: 22px 0; font-size: 14px; color: var(--muted); }
.login { max-width: 1100px; margin: 6vh auto; padding: 40px; display: grid; grid-template-columns: 1fr 460px; gap: 80px; align-items: start; }
.login-intro { padding: 35px 0; }
.login-intro .wordmark { color: var(--navy); }
.login-intro h1 { margin: 65px 0 22px; color: var(--navy); font-size: 46px; line-height: 1.35; }
.login-intro p { max-width: 320px; color: #61718a; }
.login-card { border: 1px solid #dce3ef; border-radius: 12px; padding: 30px; background: #fff; box-shadow: 0 12px 50px #10213f0d; }
.login-card h2 { margin-top: 16px; }
.login-card > label { margin: 20px 0; }
.login-card > button { width: 100%; }
.role-options { display: grid; gap: 10px; margin-top: 24px; }
.role-options .role-option { width: 100%; padding: 12px 15px; text-align: left; }
.role-option strong, .role-option span { display: block; }
.role-option strong { color: #243a62; font-size: 15px; }
.role-option span { margin-top: 4px; color: #5d6c83; font-size: 12px; line-height: 1.7; font-weight: 400; }
@media (max-width: 1250px) {
  :root { --sidebar-width: 224px; }
  .app-header { flex-wrap: wrap; gap: 10px 16px; padding: 12px 24px; }
  .header-project select { width: 160px; }
  .header-period { padding-left: 16px; }
  .header-period span { display: none; }
  .workspace { padding: 28px 28px 100px; }
  .editor-heading { display: block; }
  .editor-heading p { margin-top: 8px; }
  .editor-heading h1 { font-size: 28px; }
  .chapter-checks { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .overview { align-items: flex-start; flex-direction: column; }
  .login { gap: 40px; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .header-project-kind, .header-right .identity { display: none; }
  .header-period { gap: 6px; }
  .group-title, .group-toggle { font-size: 21px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 0px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .app-shell { padding-left: 0; }
  .sidebar { width: min(320px, calc(100vw - 42px)); z-index: 90; visibility: hidden; transform: translateX(-100%); padding-top: 18px; transition: transform .18s ease, visibility .18s; }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .sidebar .wordmark { font-size: 25px; }
  .sidebar-nav-link { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 6px; color: #dbe7ff; text-decoration: none; font-size: 14px; font-weight: 500; }
  .sidebar-nav-link:hover { background: #21395c; color: #fff; }
  .sidebar-brand .icon-button img { filter: invert(1); }
  .chapter-navigation button, .chapter-group summary { min-height: 44px; font-size: 14px; }
  .nav-scrim { position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: #0b172d80; z-index: 80; touch-action: none; }
  .app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; padding: 0; position: static; min-height: 0; background: #fff; }
  .mobile-brand { grid-column: 1 / -1; grid-row: 1; align-items: center; gap: 5px; padding: 8px 96px 8px 8px; min-height: 62px; background: var(--navy); color: #fff; }
  .mobile-brand .wordmark { font-size: 22px; white-space: nowrap; letter-spacing: 0; }
  .mobile-brand .mode { font-size: 10px; padding: 2px 5px; background: #354867; color: #d7e3fc; margin-left: 3px; }
  .mobile-brand img { filter: invert(1); width: 25px; height: 25px; }
  .header-project { grid-column: 1; grid-row: 2; padding: 12px 10px 12px 16px; }
  .header-project select { width: 100%; max-width: 220px; height: 44px; min-height: 44px; font-size: 15px; padding: 9px 11px; }
  .header-right { display: contents; }
  .header-right .identity { display: block; grid-column: 2; grid-row: 2; align-self: center; padding: 0 16px 0 8px; font-size: 13px; max-width: 150px; overflow-wrap: anywhere; white-space: normal; }
  .switch-role { grid-column: 2; grid-row: 1; z-index: 1; padding: 8px 16px 8px 6px; color: #b4c9ff; font-size: 14px; align-self: center; }
  .header-period { grid-column: 1 / -1; grid-row: 3; border: 0; border-top: 1px solid var(--line); padding: 12px 16px; gap: 4px 10px; background: #f8faff; }
  .header-period b { font-size: 14px; }
  .header-period span { display: block; font-size: 11px; }
  .header-period button { min-height: 28px; margin-left: auto; padding: 2px 0; font-size: 12px; }
  .header-project-kind { display: none; }
  .workspace { padding: 22px 16px 56px; }
  .workspace.has-report { padding-bottom: 168px; }
  h1 { font-size: 25px; }
  h2 { font-size: 21px; }
  .overview { gap: 18px; margin-bottom: 20px; }
  .overview p { font-size: 13px; }
  .new-report { flex-wrap: wrap; gap: 10px; }
  .new-report label { font-size: 14px; }
  .new-report input { width: 64px; }
  .report-list { display: grid; grid-template-columns: 1fr; }
  .report-list button { min-width: 0; }
  .report-picker { margin-bottom: 18px; }
  .editor-heading { margin-bottom: 22px; }
  .mobile-chapter-selector { display: flex; gap: 10px; align-items: stretch; }
  .mobile-chapter-selector select { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; padding: 10px; }
  .mobile-chapter-selector button { display: flex; gap: 5px; align-items: center; padding: 10px 12px; white-space: nowrap; }
  .mobile-chapter-selector .icon { width: 19px; }
  .editor-heading p { font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
  .toolbar { margin-bottom: 16px; }
  .field-group { padding-top: 12px; padding-bottom: 24px; margin-bottom: 18px; }
  .group-title, .group-toggle { font-size: 21px; border-left-width: 5px; padding-left: 12px; margin-bottom: 23px; }
  .fields-grid { grid-template-columns: minmax(0,1fr); gap: 23px; }
  .field > label { font-size: 15px; margin-bottom: 8px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; min-height: 46px; }
  .checkbox-field { padding: 14px 12px; }
  .checkbox-field label { font-size: 14px; line-height: 1.8; }
  .form-footer { left: 0; display: block; padding: 11px 16px max(14px, env(safe-area-inset-bottom)); }
  .appointment-panel { padding-bottom: 142px; }
  .appointment-panel .form-footer > button { width: 100%; margin-top: 6px; }
  .save-status { font-size: 12px; margin-bottom: 10px; line-height: 1.6; }
  .save-status .icon { width: 16px; height: 16px; }
  .footer-buttons { display: flex; gap: 10px; }
  .footer-buttons button { min-width: 0; flex: 1; min-height: 48px; font-size: 16px; }
  .footer-buttons .primary-save { flex: 1.25; }
  .editor .footer-buttons { gap: 8px; }
  .editor .footer-buttons button { flex: 1; padding-inline: 2px; font-size: 14px; }
  .mobile-whole-review { align-items: center; justify-content: center; }
  .read-only, .restore { font-size: 13px; padding: 12px; }
  .restore button { width: 100%; margin: 5px 0; }
  .reference { padding: 12px; }
  .actions { margin-top: 24px; }
  .actions > summary { flex-wrap: wrap; gap: 5px 10px; padding: 14px; font-size: 17px; }
  .actions > summary span { font-size: 12px; }
  .actions-body { padding: 0 14px 18px; }
  .actions-body > button { width: 100%; margin: 6px 0; }
  .chapter-checks { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
  .photos { grid-template-columns: minmax(0,1fr); }
  .task-form { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .task-form > button { width: 100%; }
  .task button { margin-right: 6px; }
  .version { display: block; }
  .version > * { display: block; margin-bottom: 8px; }
  .notice-bar, .toast { padding: 12px 16px; font-size: 13px; }
  .login { display: block; max-width: 480px; margin: 0 auto; padding: 22px 18px; }
  .login-intro { padding: 5px 4px 22px; }
  .login-intro .wordmark { font-size: 25px; }
  .login-intro h1 { font-size: 29px; margin: 20px 0 12px; }
  .login-intro p { font-size: 13px; }
  .login-card { padding: 23px 20px; }
}
@media (max-width: 360px) {
  .mobile-brand .mode { display: none; }
  .mobile-brand .wordmark { font-size: 20px; }
  .header-right .identity { max-width: 126px; font-size: 12px; }
  .mobile-chapter-selector button { padding: 10px 8px; }
  .mobile-chapter-selector select { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Approved round-two refinements. Keep both selected visual directions. */
.chapter-button small,.chapter-group summary small{display:block;font-size:11px;color:#b6c9e8;font-weight:400;margin-top:3px}
.manager-summary{grid-column:1/-1;position:sticky;top:110px;z-index:25;display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 18px;background:#edf3ff;border:1px solid #cbd8f1;border-radius:10px}
.manager-summary button{margin-left:auto}.chapter-scope{background:#f4f7fd;padding:16px;border-radius:8px;margin:16px 0}.chapter-scope p{font-size:13px;margin:6px 0}
.is-highlighted{outline:3px solid #91b2ff;outline-offset:4px;scroll-margin:190px 0 140px}.field{scroll-margin-top:190px}.actions{scroll-margin-top:190px}
.issues article,.appeals article{padding:16px;border:1px solid #dce3ef;border-radius:8px;margin:12px 0}.issues blockquote{border-left:3px solid #92a7cd;padding-left:12px;margin:12px 0;white-space:pre-wrap}.issues article.exempted{background:#f3f7f4}.issue-buttons{display:flex;gap:8px;flex-wrap:wrap}.appeals textarea,.issues textarea{width:100%;margin:12px 0}
.resume-entry{background:#f3f6fc;padding:18px;margin:18px 0;border-radius:10px}.filter-row{display:flex;align-items:end;gap:16px;flex-wrap:wrap}.filter-row input{width:90px}.version-preview{border-top:5px solid #3159d9;margin-top:24px;padding-top:16px;scroll-margin-top:96px}.version-preview p{white-space:pre-wrap}.preview-field{border-bottom:1px solid #e1e6ef;padding:12px 0}.version-preview>button{float:right}.return-to-issue{margin:12px 0}.restore pre{max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.header-period{flex-wrap:wrap}.header-period span{font-size:12px}.logout-modal-backdrop{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(16,33,63,.45)}.logout-modal{width:min(480px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;margin:0;padding:24px;background:#fff;border-radius:10px;box-shadow:0 18px 42px rgba(16,33,63,.28)}.logout-modal h3{margin:0 0 10px}.logout-modal label{margin:14px 0}.logout-modal-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
@media(max-width:760px){
 .mobile-brand .mode{display:inline-flex!important;white-space:nowrap}.mobile-brand .wordmark{font-size:20px}.header-right{max-width:190px}.switch-role{font-size:12px;min-height:44px}
 .editor-heading{display:contents}.mobile-chapter-selector{position:sticky;top:0;z-index:45;background:#f7f9fd;margin:-8px -16px 18px;padding:10px 16px;border-bottom:1px solid #d6dfed;display:flex;flex-wrap:wrap;box-shadow:0 3px 9px #172b4410}.chapter-strip-top{width:100%;display:flex;align-items:center;justify-content:space-between;gap:7px}.chapter-strip-top span{font-size:12px;white-space:nowrap}.chapter-strip-top small{display:block;color:#405576}.chapter-strip-top button{min-height:44px;font-size:13px;padding:8px}.mobile-chapter-selector select{font-size:15px;min-height:44px;width:calc(100% - 78px)}
 .manager-summary{position:static;font-size:13px;padding:12px}.chapter-scope{padding:12px}.field{scroll-margin-top:150px}.is-highlighted{scroll-margin-top:150px}.form-footer{z-index:44}.issues article{padding:12px}.header-period span{font-size:11px}.version-preview>button{float:none}.workspace.has-report{padding-bottom:190px}
}
@media(max-width:360px){.header-right .identity{max-width:115px}.mobile-brand{gap:5px}.mobile-brand .wordmark{font-size:17px}.mobile-chapter-selector{padding-left:10px;padding-right:10px}.chapter-strip-top button{font-size:12px}}
@media (max-width: 360px) {
  .editor .footer-buttons button { font-size: 13px; }
}
@media(max-height:500px) and (max-width:760px){.form-footer{position:static;padding:12px 0}.workspace.has-report{padding-bottom:30px}}
@media (max-height: 500px) and (max-width: 760px) {
  html:has(.editor .form-footer) { scroll-padding-bottom: 160px; }
  .workspace.has-report:has(.editor .form-footer) { padding-bottom: 160px; }
  .editor .form-footer { position: fixed; padding: 5px 16px max(8px, env(safe-area-inset-bottom)); }
  .editor .form-footer .issue-buttons { gap: 2px 6px; }
  .editor .form-footer .save-status { margin-bottom: 0; }
}

.current-block-name{display:none}@media(max-width:360px){.mobile-chapter-selector .current-block-name{display:block;flex:0 0 100%;width:100%;margin:0;font-size:13px;font-weight:700;line-height:1.5;color:#243c60;white-space:normal}}

@media (max-width: 760px) {
  /* Keep the navigation's place in the document while freeing the typing area. */
  .editor.keyboard-open .mobile-chapter-selector { position: static; }
  .editor.keyboard-open .field { scroll-margin-top: 8px; }
}
.history-entry { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.field-review { padding: 10px 12px; margin: 8px 0; border-left: 3px solid #b47521; background: #fff8e8; }
.field-review p { margin: 4px 0; overflow-wrap: anywhere; }
.field-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.field-voice > textarea, .field-voice > label, .field-voice > div { flex-basis: 100%; }
.field.speaking > textarea { background: #eaf4ff; border-color: #295cc2; outline: 2px solid #295cc2; }
.checkbox-field .help { display: block; }
@media (max-width: 760px) {
  .app-header .history-entry { grid-column: 1 / -1; grid-row: 4; padding: 4px 16px; background: #fff; }
}

@media (min-width: 320px) and (max-width: 760px) {
  .fields-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 10px; }
  .fields-grid > .field { min-width: 0; grid-column: 1 / -1; }
  .fields-grid > .compact-field { grid-column: span 1; }
  .compact-field input, .compact-field select { min-width: 0; max-width: 100%; width: 100%; }
}

.attachment-preview { display: block; min-width: 0; }
.attachment-preview img { display: block; max-width: 100%; max-height: 55vh; object-fit: contain; margin: .4rem 0; }

.upload-status progress { display:block; width:100%; margin:.35rem 0; }
.precheck-issue-links { padding-inline-start:1.25rem; }

.footer-buttons .primary-save.save-complete:disabled { color: #385246; background: #edf4ef; border-color: #c7d9cd; opacity: 1; }

/* Accepted phone layouts for report entry, manager approval and company receipts. */
.company-cards { display: none; }
.period-details summary, .manager-return summary { cursor: pointer; }
.period-details[open] span { display: block; }
.manager-summary { position: static; display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; background: #fff; }
.manager-summary h1, .manager-summary h2, .manager-summary p { margin: 0; }
.manager-summary button { margin: 0; }
.manager-scope-card, .manager-facts { padding: 14px; border: 1px solid #cfdbde; border-radius: 10px; }
.manager-scope-card { border-left: 4px solid #116958; background: #f3f8f5; }
.manager-scope-card h2, .manager-facts h2 { font-size: 19px; }
.manager-return summary { min-height: 44px; padding: 10px; }
@media (max-width: 760px) {
  .phone-report { --navy:#153a44; --blue:#116958; --blue-soft:#e7f3ec; --line:#cfdbde; --muted:#506775; color:#182d3d; background:#f8faf9; }
  .phone-report .mobile-brand { min-height: 46px; padding-block: 2px; }
  .phone-report .header-project, .phone-report .header-period { padding-block: 4px; }
  .phone-report .header-period { background:#fff; }
  .phone-report .header-period .period-details { font-size: 13px; }
  .phone-report .header-period button, .phone-report .header-period summary { min-height:44px; align-content:center; }
  .phone-report .app-header { grid-template-columns:minmax(0,1fr) auto auto; }
  .phone-report .header-project { grid-column:1 / 3; }
  .phone-report .header-right .identity, .phone-report .switch-role { grid-column:3; }
  .phone-report .header-right .switch-role { color: #e0f1ea; }
  .phone-report .app-header .history-entry { grid-row: 1; grid-column: 2; justify-self: end; margin-right: 4px; padding: 0 4px; width: auto; color: white; background: transparent; z-index: 1; }
  .phone-report .mobile-brand .mode { display:none!important; }
  .phone-report .workspace { padding:12px 12px 56px; }
  .phone-report .workspace.has-report { padding-bottom:190px; }
  .phone-report .editor-heading > p, .phone-report .editor .issues:empty { display:none; }
  .phone-report .group-title { margin-bottom:12px; }
  .phone-report .field-group { padding:14px; border:1px solid var(--line); border-radius:12px; background:white; margin-bottom:12px; }
  .phone-report .mobile-chapter-selector { margin-inline:-12px; background:#f8faf9; padding:6px 12px; gap:4px; margin-bottom:8px; }
  .phone-report .chapter-strip-top small { display:none; }
  .phone-report .footer-buttons { flex-wrap:wrap; }
  .phone-report .editor .form-footer { position:fixed; bottom:0; padding:6px max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); background:white; }
  .phone-report .editor .footer-buttons button { min-height:46px; white-space:normal; min-width:72px; }
  .phone-report .footer-buttons button:first-child { background:var(--blue); border-color:var(--blue); color:white; }
  .phone-report .editor-grid:has(.manager-summary) .form-footer { position:static; }
  .phone-report .manager-summary { gap:8px; padding:12px; border-color:var(--line); }
  .phone-report .manager-summary h1 { font-size:24px; }
  .phone-report .manager-summary .chapter-scope { margin:0; background:#f2f7f4; }
  .manager-return summary { border:1px solid var(--line); border-radius:8px; font-weight:600; }
  .company-overview > .table-scroll { display:none; }
  .company-cards { display:grid; gap:12px; margin-top:14px; }
  .inbox-card { border:1px solid var(--line); border-radius:12px; padding:14px; background:white; }
  .inbox-card h2 { font-size:18px; margin:0; }
  .inbox-card p { margin:4px 0; color:var(--muted); }
  .inbox-actions { display:flex; flex-wrap:wrap; gap:6px; padding-top:9px; margin-top:10px; border-top:1px solid var(--line); }
  .inbox-actions button { padding:7px 9px; }
}

.carry-item{border-top:1px solid currentColor;margin-top:.75rem;padding-top:.75rem}
.carry-item dl{margin:.5rem 0}
.carry-item dd{margin:0 0 .5rem;white-space:pre-wrap;overflow-wrap:anywhere}
.carry-item button{margin:0 .4rem .35rem 0}
