:root {
  color-scheme: light;
  --accent: #247e87;
  --accent-dark: #1d5966;
  --ink: #2d4150;
  --muted: #8495a5;
  --line: #e4ecf1;
  --canvas: #f3f6f8;
  --sidebar: clamp(240px, 17vw, 320px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
  font-synthesis: none;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid #65b8c0; outline-offset: 3px;
}
button:disabled { cursor: default; }
button, select { touch-action: manipulation; }
[hidden] { display: none !important; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.skip-link { position: fixed; top: -80px; left: 20px; background: white; padding: 12px 20px; z-index: 100; border: 1px solid var(--accent); }
.skip-link:focus { top: 10px; }
.loading { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); }
.loading-mark, .brand-mark { display: grid; place-items: center; color: white; background: var(--accent); font-weight: 700; letter-spacing: -.5px; border-radius: 11px; }
.loading-mark { width: 52px; height: 52px; font-size: 23px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #fff;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 23px 20px; flex: 0 0 auto; }
.brand-mark { width: 44px; height: 44px; font-size: 21px; }
.brand-name { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.brand-subtitle { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.sidebar-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #a6b0b6 transparent; padding: 0 7px 24px; }
.home-link, .context-toggle, .module-toggle { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; text-align: left; }
.home-link { min-height: 54px; padding: 12px 20px; border-radius: 6px; font-weight: 600; font-size: 16px; margin: 6px 0 8px; }
.home-link.selected { color: var(--accent-dark); background: #b9c6c8; }
.context-toggle { padding: 18px 20px; color: var(--accent); font-size: 16px; }
.context-toggle .chevron, .module-toggle .chevron { margin-left: auto; width: 17px; height: 17px; }
.context-toggle[aria-expanded="true"] > .chevron, .module-toggle[aria-expanded="true"] > .chevron { transform: rotate(180deg); }
.module-list { background: #f4f7f8; padding: 4px 0 8px; }
.module-toggle { min-height: 59px; padding: 15px 18px 15px 39px; line-height: 1.65; font-size: 15px; }
.module-toggle .icon:first-child { width: 23px; height: 23px; }
.module-toggle .module-name { flex: 1; min-width: 0; }
.module-toggle:hover, .context-toggle:hover { background: #eaf0f2; }
.module-toggle.active { color: var(--accent-dark); }
.module-children { padding: 1px 14px 10px 53px; }
.child-link { display: block; border-left: 2px solid #d9e3e7; padding: 9px 10px 9px 15px; line-height: 1.5; font-size: 13px; color: #637687; }
.child-link:hover, .child-link.current { background: #e5edef; color: var(--accent-dark); border-left-color: var(--accent); }
.module-empty { display: block; padding: 8px 0 8px 15px; color: var(--muted); font-size: 12px; line-height: 1.8; border-left: 2px solid #d9e3e7; }
.workspace { margin-left: var(--sidebar); min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; height: 64px; z-index: 20; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
}
.breadcrumbs { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; margin-right: auto; min-width: 0; }
.breadcrumbs > .brand-crumb, .crumb-slash { color: #a1a6aa; }
.crumb-current { overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.selector { position: relative; display: flex; align-items: center; height: 38px; }
.selector select { width: 190px; height: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 0 36px 0 12px; background: white; color: #455b6c; appearance: none; cursor: pointer; }
.selector > .icon { position: absolute; right: 12px; width: 15px; height: 15px; color: #b5bec4; pointer-events: none; }
.selector.company select { width: 180px; }
.selector.language select { width: 84px; }
.toolbar-action { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; }
.toolbar-action .icon { width: 19px; height: 19px; }
.toolbar-action:hover, .user-button:hover { background: #f2f6f7; }
.user-button { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 3px 0 3px 6px; border-radius: 6px; white-space: nowrap; font-size: 14px; }
.avatar { width: 33px; height: 33px; background: #eaf4f5; color: var(--accent); border-radius: 50%; display: grid; place-items: center; }
.avatar .icon { width: 19px; height: 19px; }
.popover { position: absolute; top: 57px; right: 24px; width: 282px; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 28px #263c4c14; line-height: 1.8; }
.popover p { margin: 5px 0 0; color: #6b7c89; font-size: 13px; }
.popover .popover-label { font-size: 11px; letter-spacing: .8px; color: var(--muted); }
.mobile-menu { display: none; }
.main { padding: 28px; }
.page-heading { margin-bottom: 22px; }
.company-eyebrow { margin: 0 0 5px; color: #909ea8; font-size: 12px; letter-spacing: 1.4px; line-height: 1.4; }
h1 { margin: 0 0 7px; font-size: 25px; line-height: 1.4; letter-spacing: -.4px; font-weight: 700; }
.page-description { margin: 0; color: #8b98a2; font-size: 15px; line-height: 1.6; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: white; padding: 21px 19px 23px; }
.panel-heading { margin: 0 0 14px; font-size: 18px; font-weight: 650; }
.program-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.program-card {
  display: grid; grid-template-columns: 17px minmax(0,1fr) 19px; gap: 11px; align-items: center;
  min-height: 80px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  transition: border-color .15s, background .15s;
}
.program-card:hover { border-color: #85adb2; background: #fcfefe; }
.program-card > .icon:first-child { width: 15px; height: 15px; color: #546978; stroke-width: 1.8; }
.program-card > .icon:last-child { width: 18px; height: 18px; color: #435969; }
.program-copy { min-width: 0; }
.program-name { display: block; font-size: 15px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.program-code { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; letter-spacing: -.15px; }
.scope { display: inline-flex; align-items: center; justify-content: center; background: #f7f8fa; color: #596b7b; border-radius: 4px; padding: 4px 8px; font-size: 11px; line-height: 1.25; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-dark); margin-bottom: 17px; font-size: 14px; }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.program-detail { max-width: 1100px; }
.detail-title-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.detail-title-row h2 { font-size: 20px; margin: 0; }
.entry-note { display: flex; align-items: flex-start; gap: 13px; padding: 22px; background: #f5f8f9; border-radius: 8px; line-height: 1.85; margin-top: 20px; }
.entry-note .icon { color: var(--accent); margin-top: 4px; }
.entry-note h3 { font-size: 16px; margin: 0 0 4px; }
.entry-note p { font-size: 14px; margin: 0; color: #6d7f8d; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.detail-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.search-box { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; max-width: 420px; margin: 20px 0; }
.search-box .icon { width: 18px; height: 18px; color: var(--muted); }
.search-box input { border: 0; width: 100%; min-width: 0; background: transparent; outline-offset: 5px; color: var(--ink); }
.catalog-count { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.catalog-list { display: flex; flex-direction: column; }
.catalog-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(150px,1fr) auto 20px; gap: 14px; padding: 16px 9px; border-top: 1px solid var(--line); align-items: center; font-size: 14px; }
.catalog-row:hover { background: #f5f8f9; }
.catalog-row .program-code { margin: 0; }
.catalog-row .icon { width: 16px; height: 16px; }
.error-panel { max-width: 700px; margin: 12vh auto; text-align: center; line-height: 1.8; padding: 28px; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; border-radius: 6px; padding: 9px 18px; }
.empty-state { color: var(--muted); padding: 30px 10px; text-align: center; }
.workspace-footer { color: #98a4ad; font-size: 11px; line-height: 1.7; padding: 17px 2px 0; }
.nav-backdrop { display: none; }
@media (min-width: 768px) and (max-width: 1799px) {
  .program-card .program-code { max-width: 100%; }
}
@media (min-width: 1800px) {
  :root { font-size: 16px; }
  .program-card { min-height: 80px; padding: 16px; gap: 13px; }
  .program-name { font-size: 16px; }
  .program-code { font-size: 12px; }
  .scope { font-size: 12px; }
  .module-toggle { font-size: 16px; min-height: 60px; }
  .selector select { width: 210px; }
  .selector.company select { width: 210px; }
}
@media (max-width: 1279px) {
  .program-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar { padding: 0 20px; gap: 10px; }
  .selector select { width: 160px; }
  .selector.company select { width: 135px; }
  .user-label { display: none; }
  .main { padding: 24px 20px; }
  .program-card { gap: 9px; padding: 14px 12px; }
}
@media (max-width: 1023px) {
  .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breadcrumbs > .brand-crumb, .crumb-slash { display: none; }
  .selector select { width: 145px; }
  .selector.company select { width: 112px; }
  .toolbar { gap: 7px; }
  .program-code { font-size: 10px; }
}
@media (max-width: 767px) {
  .sidebar { width: min(310px, 85vw); visibility: hidden; transform: translateX(-100%); transition: transform .18s; }
  body.nav-open .sidebar { visibility: visible; transform: translateX(0); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: #233b4b70; border: 0; width: 100%; }
  body.nav-open { overflow: hidden; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid; flex: 0 0 auto; }
  .topbar { height: auto; min-height: 64px; padding: 10px 14px; gap: 6px; flex-wrap: wrap; }
  .breadcrumbs { font-size: 14px; }
  .crumb-current { max-width: 130px; }
  .toolbar { margin-left: auto; gap: 5px; }
  .selector select { width: 135px; font-size: 13px; height: 34px; }
  .selector.company select { width: 105px; }
  .selector.language select { width: 73px; }
  .selector { height: 34px; }
  .toolbar-action { width: 30px; height: 32px; }
  .avatar { width: 30px; height: 30px; }
  .main { padding: 23px 15px; }
  h1 { font-size: 23px; }
  .page-description { font-size: 13px; }
  .panel { padding: 18px 14px; }
  .program-grid { gap: 12px; }
  .program-card { min-height: 80px; }
  .program-name { font-size: 14px; }
  .detail-facts { gap: 15px; }
  .catalog-row { grid-template-columns: 1fr auto 16px; }
  .catalog-row .program-code { grid-column: 1; grid-row: 2; }
  .catalog-row .scope { grid-column: 2; grid-row: 1 / 3; }
  .catalog-row .icon { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 560px) {
  .topbar { column-gap: 4px; }
  .breadcrumbs { flex: 1; }
  .toolbar { width: 100%; padding-left: 2px; gap: 4px; }
  .toolbar > .selector:first-child { flex: 1; min-width: 0; }
  .toolbar > .selector:first-child select { width: 100%; min-width: 0; }
  .selector.company select { width: 84px; }
  .selector.language select { width: 62px; }
  .selector > .icon { right: 8px; width: 13px; }
  .selector select { padding-left: 9px; padding-right: 27px; }
  .toolbar-action { flex: 0 0 27px; width: 27px; }
  .user-button { padding-left: 0; gap: 0; flex: 0 0 30px; }
  .program-grid { grid-template-columns: minmax(0, 1fr); }
  .program-card { min-height: 78px; padding: 15px; gap: 12px; }
  .program-code { font-size: 11px; }
  .program-name { font-size: 15px; }
  .scope { font-size: 11px; }
  .detail-facts { grid-template-columns: 1fr; }
  .popover { top: 104px; right: 14px; max-width: calc(100vw - 28px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.secondary-button { border: 1px solid #d4e1e6; border-radius: 6px; background: white; padding: 9px 14px; color: #46616d; }
.secondary-button:hover { background: #f3f7f8; }
.primary-button:disabled, .secondary-button:disabled { opacity: .55; }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 6px; }
.gov-toolbar, .gov-section-header, .gov-toolbar-actions, .gov-form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gov-toolbar { justify-content: space-between; margin-bottom: 17px; }
.gov-access-status { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--accent-dark); }
.gov-access-status .icon { width: 18px; height: 18px; }
.gov-section { margin-top: 20px; }
.gov-section-header { justify-content: space-between; margin-bottom: 16px; }
.gov-section-header .panel-heading { margin: 0; }
.gov-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
.gov-field > span { font-weight: 600; }
.gov-field input, .gov-field select, .gov-field textarea { width: 100%; border: 1px solid #d8e3e9; border-radius: 6px; background: white; padding: 10px 12px; color: var(--ink); }
.gov-field input[readonly] { background: #f3f6f8; color: #798995; }
.gov-field textarea { resize: vertical; line-height: 1.75; }
.gov-code-editor { min-height: 390px; font-family: Consolas, 'Courier New', monospace; font-size: 13px; tab-size: 2; }
.gov-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.gov-wide { grid-column: 1 / -1; }
.gov-form-actions { margin-top: 18px; }
.gov-file-meta { display: flex; gap: 25px; flex-wrap: wrap; margin: 0 0 20px; }
.gov-file-meta dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.gov-file-meta dd { margin: 0; font-size: 13px; }
.gov-hash { word-break: break-all; max-width: 540px; font-family: Consolas, monospace; }
.gov-small { color: #788b99; font-size: 12px; line-height: 1.8; margin: 9px 0; }
.gov-notice { border: 1px solid #e4cbca; background: #fff4f2; color: #944b43; padding: 12px 15px; margin-bottom: 17px; border-radius: 6px; font-size: 14px; line-height: 1.7; }
.gov-notice.success { background: #edf7f2; border-color: #c8e3d8; color: #2d7054; }
.gov-unlock { max-width: 590px; padding: 28px; }
.gov-unlock-icon { color: var(--accent); }
.gov-unlock-icon .icon { width: 32px; height: 32px; }
.gov-unlock h2 { margin: 12px 0; font-size: 20px; }
.gov-unlock > p { color: #718491; line-height: 1.8; font-size: 14px; }
.gov-unlock form { display: grid; gap: 16px; margin: 23px 0; }
.gov-unlock form button { justify-self: start; }
.gov-history { padding: 0; list-style: none; margin: 0; }
.gov-history li { display: flex; align-items: center; gap: 18px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.gov-table-scroll { overflow-x: auto; }
.gov-table { width: 100%; min-width: 780px; border-collapse: collapse; text-align: left; font-size: 13px; }
.gov-table th { background: #f4f7f9; color: #6a7d8b; font-size: 12px; font-weight: 600; }
.gov-table th, .gov-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.7; }
.gov-table td code { font-family: Consolas, monospace; font-size: 12px; color: #748896; overflow-wrap: anywhere; }
.gov-table .gov-purpose { min-width: 190px; max-width: 320px; }
.gov-table .scope { margin-top: 3px; }
.gov-table strong { font-weight: 600; }
.gov-check-status { padding: 12px 15px; border-radius: 6px; font-size: 14px; }
.gov-check-status.pass { background: #edf7f2; color: #2d7054; }
.gov-check-status.fail { background: #fff4f2; color: #944b43; }
.gov-errors { line-height: 1.8; font-size: 13px; padding-left: 21px; }
.gov-metrics { display: flex; gap: 12px 22px; flex-wrap: wrap; color: #6b8090; font-size: 12px; }
.gov-policy-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.gov-policy-item { padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.gov-policy-item code { font-size: 13px; color: var(--accent-dark); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.gov-policy-item p { margin: 8px 0 0; color: #7b8d9a; font-size: 12px; line-height: 1.7; }
.gov-file-path { border: 1px solid var(--line); border-radius: 6px; padding: 11px 13px; color: #6f8393; font-family: Consolas, monospace; font-size: 13px; margin-bottom: 9px; overflow-wrap: anywhere; }
.gov-file-list { display: flex; flex-direction: column; }
.gov-file-row { border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex; align-items: center; gap: 12px; padding: 11px 8px; text-align: left; }
.gov-file-row:hover { background: #f5f8f9; }
.gov-file-row > span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.gov-file-row > .icon { width: 18px; height: 18px; color: #6d8390; }
.gov-file-row .gov-small { margin: 0; }
.gov-file-preview { margin-top: 18px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.gov-file-preview h3 { background: #f4f7f9; padding: 13px 16px; margin: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.gov-file-preview pre { font-family: Consolas, monospace; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 500px; overflow: auto; padding: 16px; margin: 0; }
.gov-inventory { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
@media(max-width:767px) { .gov-form-grid, .gov-policy-grid { grid-template-columns: 1fr; } .gov-wide { grid-column: 1; } .gov-toolbar-actions { gap: 7px; } .gov-toolbar-actions button { padding: 8px 11px; font-size: 12px; } .gov-code-editor { font-size: 12px; min-height: 340px; } }
.user-role { display: block; font-size: 10px; color: var(--muted); text-align: left; line-height: 1.5; }
.account-logout { width: 100%; margin-top: 15px; }
.login-shell { display: grid; place-items: center; min-height: 100dvh; padding: 38px 24px; background: linear-gradient(155deg, #fafcfd, #eff4f7); }
.login-card { width: min(100%, 670px); background: #fff; border: 1px solid #dce6ed; border-radius: 28px; box-shadow: 0 25px 55px #203f5221; overflow: hidden; }
.login-content { padding: 56px 56px 34px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 4px 0 42px; }
.login-brand .brand-mark { width: 78px; height: 78px; font-size: 37px; border-radius: 21px; flex-shrink: 0; }
.login-brand-name { display: block; font-size: 44px; font-weight: 750; color: #273b4a; letter-spacing: -.8px; line-height: 1.3; }
.login-brand-subtitle { display: block; color: #7f96a8; font-size: 18px; letter-spacing: 1.5px; margin-top: 4px; }
.login-heading { text-align: center; font-size: 28px; font-weight: 650; margin: 0 0 8px; }
.login-description { text-align: center; color: #92a0ad; font-size: 18px; margin: 0; line-height: 1.7; }
.login-language-row { display: flex; justify-content: flex-end; margin: 30px 0 25px; }
.login-language { height: 48px; min-width: 172px; padding: 0 36px 0 16px; background: white; color: var(--ink); border: 1px solid #dce6ed; border-radius: 10px; font-size: 17px; }
.login-form { display: grid; gap: 26px; }
.login-field { display: grid; gap: 12px; font-size: 19px; }
.login-input-wrap { display: flex; align-items: center; border: 1px solid #dbe5ec; border-radius: 14px; min-height: 65px; padding: 0 18px; gap: 15px; background: white; }
.login-input-wrap:focus-within { border-color: #68a4aa; box-shadow: 0 0 0 3px #247e8711; }
.login-input-wrap > .icon { color: #768b9b; width: 22px; height: 22px; }
.login-input-wrap input { min-width: 0; width: 100%; height: 62px; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 18px; outline: none; }
.login-input-wrap input::placeholder { color: #b5bfc8; }
.password-toggle { display: grid; place-items: center; border: 0; background: transparent; color: #8d9ba5; padding: 8px; border-radius: 6px; margin-right: -8px; }
.password-toggle:hover { background: #f3f7f8; }
.password-toggle .icon { width: 23px; height: 23px; }
.login-submit { min-height: 66px; border: 0; background: var(--accent); color: white; border-radius: 13px; font-weight: 650; font-size: 21px; letter-spacing: 4px; box-shadow: 0 12px 24px #247e871b; margin-top: 5px; }
.login-submit:hover { background: #206f78; }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-message { margin: 0; color: #9d4a41; background: #fff3f1; border: 1px solid #eed3ce; padding: 10px 14px; border-radius: 8px; font-size: 14px; line-height: 1.7; }
.login-help { text-align: center; color: #7c91a2; font-size: 16px; line-height: 1.8; margin: 27px 0 0; }
.login-footer { background: #f7f9fb; border-top: 1px solid #dce6ed; color: #8b9fb1; text-align: center; padding: 25px 20px; font-size: 14px; letter-spacing: .5px; }
.users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.users-toolbar .search-box { margin: 0; width: min(100%, 360px); }
.users-count { font-size: 13px; color: var(--muted); margin: 0 0 13px; }
.users-list { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; text-align: left; }
.users-list th { background: #f4f7f9; color: #6a7d8b; font-size: 12px; font-weight: 600; }
.users-list th, .users-list td { padding: 14px 12px; border-bottom: 1px solid var(--line); line-height: 1.65; vertical-align: middle; }
.users-list td:first-child { min-width: 150px; }
.users-username { color: var(--muted); font-size: 12px; margin-top: 3px; }
.users-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.users-actions button { padding: 6px 9px; font-size: 12px; }
.danger-button { border: 1px solid #e2c5c0; border-radius: 6px; background: white; padding: 9px 14px; color: #a0594c; }
.danger-button:hover { background: #fff5f2; }
.danger-button:disabled { opacity: .45; cursor: default; }
.user-status { display: inline-flex; border-radius: 4px; padding: 3px 9px; font-size: 11px; background: #eef7f2; color: #36735a; white-space: nowrap; }
.user-status.inactive { background: #f2f4f6; color: #84909a; }
.users-form-panel { margin-bottom: 22px; scroll-margin-top: 90px; }
.users-form-panel .gov-form-grid { margin-top: 20px; }
.users-form-panel .panel-heading { margin: 0; }
.users-required { color: #b67569; margin-left: 3px; }
.users-self-note { color: var(--muted); font-size: 10px; margin-left: 6px; }
.users-password-wrap { display: flex; align-items: center; position: relative; }
.users-password-wrap input { padding-right: 44px; }
.users-password-wrap .password-toggle { position: absolute; right: 12px; margin: 0; padding: 5px; }
@media(max-width:767px) { .login-shell { padding: 24px 18px; } .login-card { border-radius: 23px; } .login-content { padding: 38px 30px 28px; } .login-brand { gap: 15px; margin-bottom: 32px; } .login-brand-name { font-size: 37px; } .login-brand .brand-mark { width: 67px; height: 67px; font-size: 31px; border-radius: 17px; } .login-heading { font-size: 25px; } .login-brand-subtitle { font-size: 15px; letter-spacing: .5px; } .login-description { font-size: 16px; } .login-help { font-size: 14px; } .login-form { gap: 22px; } .users-toolbar { align-items: stretch; } }
@media(max-width:420px) { .login-shell { padding: 20px 13px; } .login-content { padding: 31px 23px 25px; } .login-brand-name { font-size: 30px; } .login-brand .brand-mark { width: 56px; height: 56px; font-size: 28px; border-radius: 15px; } .login-brand { gap: 13px; margin-bottom: 29px; } .login-brand-subtitle { font-size: 13px; } .login-heading { font-size: 23px; } .login-description { font-size: 15px; } .login-language-row { margin: 23px 0 22px; } .login-language { min-width: 146px; font-size: 15px; height: 44px; } .login-field { font-size: 17px; gap: 10px; } .login-input-wrap { min-height: 57px; border-radius: 11px; padding: 0 14px; gap: 11px; } .login-input-wrap input { height: 54px; font-size: 16px; } .login-submit { min-height: 59px; font-size: 19px; } .login-footer { padding: 21px 12px; font-size: 12px; } }

.auth-mode-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 0 0 26px; padding: 5px; border: 1px solid #dce6ed; border-radius: 12px; background: #f5f8fa; }
.auth-mode-nav button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: #6f8291; padding: 7px 8px; font-size: 14px; line-height: 1.35; }
.auth-mode-nav button:hover { background: #eaf1f3; }
.auth-mode-nav button.current { background: white; color: var(--accent-dark); box-shadow: 0 2px 8px #203f5214; font-weight: 650; }
.login-message.success { color: #2d7054; background: #edf7f2; border-color: #c8e3d8; }
.auth-code-panel { display: grid; gap: 10px; padding: 18px; border: 1px solid #b9d8d3; border-radius: 10px; background: #f0f8f5; }
.auth-code-panel h2, .auth-code-panel h3 { margin: 0; font-size: 16px; }
.auth-code-panel code { display: block; overflow-wrap: anywhere; padding: 12px; border: 1px dashed #87b5ad; border-radius: 7px; background: white; color: #285c55; font: 650 17px/1.6 Consolas, monospace; letter-spacing: .5px; }
.auth-code-panel p { margin: 0; color: #5e7b77; font-size: 13px; line-height: 1.7; }
.auth-code-panel .secondary-button { justify-self: start; }
.auth-form-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; align-items: stretch; }
.auth-form-actions > button { min-height: 58px; margin: 0; }
.auth-form-actions .login-submit { font-size: 17px; letter-spacing: 1px; }
.account-security { max-width: 760px; margin-bottom: 20px; }
.account-security form { display: grid; gap: 18px; max-width: 620px; }
.account-security .auth-code-panel { margin-top: 5px; }
.danger-zone { border-color: #ead5d1; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.requests-panel, .request-detail, .request-form-panel { max-width: 1180px; }
.requests-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.requests-header .panel-heading { margin-bottom: 5px; }
.request-search { width: min(100%,520px); max-width: none; margin: 22px 0 12px; }
.request-filter-fields { align-items: center; }
.request-page-size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.saved-search-controls { min-width: 0; margin: 18px 0 22px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; }
.saved-search-controls legend { padding: 0 7px; font-size: 13px; font-weight: 600; color: #536c7a; }
.saved-search-row { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.saved-search-row .gov-field { flex: 1 1 260px; min-width: 0; max-width: 520px; }
.saved-search-row .gov-field select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; font: inherit; }
.saved-search-row > button { min-height: 42px; }
.request-storage-notice { margin: 9px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.request-storage-notice.warning { color: #925b2f; }
.request-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.request-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.request-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-card-heading h3 { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.request-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.request-card-description { display: -webkit-box; min-height: 3.4em; margin: 14px 0; overflow: hidden; color: #647886; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.request-meta, .request-detail-meta { display: grid; gap: 12px; margin: 0; }
.request-meta { grid-template-columns: minmax(0,1fr) auto; padding-top: 12px; border-top: 1px solid var(--line); }
.request-meta div, .request-detail-meta div { min-width: 0; }
.request-meta dt, .request-detail-meta dt { color: var(--muted); font-size: 11px; }
.request-meta dd, .request-detail-meta dd { margin: 4px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.request-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.request-actions.compact { margin-top: 15px; }
.request-actions.compact button { padding: 7px 10px; font-size: 12px; }
.request-detail .request-back, .request-form-panel .request-back { margin: 0 0 18px; }
.request-detail-meta { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 22px 0; padding: 16px; border-radius: 8px; background: #f5f8f9; }
.request-detail h3 { margin: 22px 0 8px; font-size: 15px; }
.request-full-description { margin: 0; color: #536c7a; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.exchange-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.exchange-controls select, .training-controls input, .training-controls select { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; font: inherit; }
.pagination { justify-content: center; margin: 22px 0; }
.csv-exchange { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.csv-exchange summary { cursor: pointer; font-weight: 600; }
.csv-exchange .gov-field { margin: 18px 0; }
.csv-exchange pre, .integration-output, .training-output { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; max-width: 100%; }
.attachment-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.attachment-row a { overflow-wrap: anywhere; }
#attachment-form { margin-top: 20px; }
.training-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.training-controls .gov-field { flex: 1; min-width: 150px; }
.training-card, .notification-card, .job-card { padding: 18px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.training-card h3, .notification-card h3, .job-card h3 { margin: 0 0 10px; }
.training-list { display: grid; gap: 14px; }
.training-stack { display: grid; gap: 20px; }
.training-stages { display: grid; gap: 12px; padding: 0; list-style: none; }
.training-stage { padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.training-stage strong { display: block; margin-bottom: 8px; }
.training-code { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.training-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.integration-secret { padding: 16px; background: #f4f8f9; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.integration-secret code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.integration-panels { display: grid; gap: 20px; }
.integration-code { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-secret] { overflow-wrap: anywhere; }
.training-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.training-table th, .training-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.training-table-wrap { overflow-x: auto; }
.training-steps { padding-left: 22px; line-height: 1.9; }
.panel progress { max-width: 100%; width: 220px; }
@media(max-width:767px) {
  .exchange-controls > *, .training-controls > * { flex: 1 1 150px; }
  .integration-secret code { font-size: 12px; }
}
.request-form-grid { display: grid; gap: 18px; margin-top: 18px; }
.request-form-panel textarea { width: 100%; min-height: 190px; resize: vertical; font: inherit; }
.request-form-panel .login-message { margin-top: 16px; }
.auth-code-panel code:focus-visible, .request-form-panel textarea:focus-visible { outline: 3px solid #65b8c0; outline-offset: 3px; }

@media(max-width:767px) {
  .auth-mode-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-form-actions { grid-template-columns: 1fr; }
  .auth-form-actions > button { min-height: 52px; }
  .request-grid { grid-template-columns: 1fr; }
  .saved-search-controls { padding: 12px; }
  .saved-search-row > button { flex: 1 1 120px; }
  .saved-search-row .gov-field { max-width: none; }
  .request-page-size { justify-content: space-between; }
  .requests-header { align-items: stretch; }
  .requests-header > .request-actions { width: 100%; }
  .requests-header > .request-actions button { flex: 1 1 135px; min-height: 44px; }
  .request-detail-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .request-detail .request-actions { width: 100%; }
}
@media(max-width:420px) {
  .auth-mode-nav button { font-size: 13px; }
  .auth-code-panel { padding: 14px; }
  .auth-code-panel code { font-size: 15px; }
  .request-card { padding: 15px 13px; }
  .request-detail-meta { grid-template-columns: 1fr; }
  .request-actions { align-items: stretch; }
  .request-actions button { flex: 1 1 auto; min-height: 44px; }
}

/* Requirements planning only: direct entry, chapter tabs and writing checklist. */
.planning-entry.active { background: #e5edef; font-weight: 600; }
.planning-workspace { max-width: 1200px; margin: 0 auto; }
.planning-eyebrow { color: var(--accent-dark); font-size: 12px; letter-spacing: .6px; margin: 0 0 8px; }
.planning-description { color: #637687; line-height: 1.7; margin: 0; }
.planning-guide { display: flex; align-items: flex-start; gap: 12px; padding: 14px 17px; margin-bottom: 20px; border: 1px solid #dbe8e9; border-radius: 9px; background: #edf5f5; color: #48646b; }
.planning-guide .icon { width: 18px; height: 18px; margin-top: 3px; }
.planning-guide p { margin: 0; font-size: 13px; line-height: 1.8; }
.planning-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-bottom: 16px; }
.planning-tab { display: flex; gap: 9px; align-items: center; min-height: 51px; padding: 10px 12px; border: 1px solid #dce6eb; border-radius: 7px; background: #fff; text-align: left; line-height: 1.5; font-size: 14px; }
.planning-tab:hover { border-color: #81b5ba; background: #f5faf9; }
.planning-tab[aria-selected="true"] { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; font-weight: 600; }
.planning-number { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .8; }
.planning-panel { padding: 28px; }
.planning-chapter-heading { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.planning-chapter-number { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px; background: #e9f3f3; color: var(--accent-dark); font-size: 20px; font-weight: 600; }
.planning-chapter-heading h2 { font-size: 22px; margin: 0 0 8px; }
.planning-chapter-heading p { color: #637687; line-height: 1.8; margin: 0; font-size: 14px; }
.planning-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px; margin: 23px 0; }
.planning-workspace h3 { margin: 0 0 12px; font-size: 16px; color: var(--accent-dark); }
.planning-workspace ul { padding-left: 20px; margin: 0; }
.planning-workspace li { padding-left: 3px; margin-bottom: 12px; line-height: 1.85; font-size: 14px; overflow-wrap: anywhere; }
.planning-workspace li:last-child { margin-bottom: 0; }
.planning-workspace li::marker { color: #59979d; }
.planning-outputs { padding: 20px; border-radius: 8px; background: #f4f7f9; }
.planning-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.planning-pager > span { color: #72838e; }
.planning-pager a { color: var(--accent-dark); line-height: 1.7; padding: 6px 0; }
.planning-pager a:last-child { text-align: right; }
.planning-pager a:hover { text-decoration: underline; }
@media(max-width:1200px) { .planning-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:767px) {
  .planning-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .planning-panel { padding: 20px 16px; }
  .planning-sections { grid-template-columns: 1fr; gap: 24px; }
  .planning-chapter-heading { gap: 12px; }
  .planning-chapter-heading h2 { font-size: 20px; }
  .planning-outputs { padding: 16px; }
}

/* Static AI collaboration teaching SOP; no project input or approval storage. */
.planning-sop .planning-sections { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.planning-sop .planning-section + .planning-section { border-left: 1px solid var(--line); padding-left: 22px; }
.planning-sop-summary { display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px; }
.planning-sop-summary p { margin: 0; font-size: 14px; line-height: 1.8; }
.planning-sop-gate { padding: 20px; border: 1px solid #dce9e7; background: #f0f7f5; border-radius: 8px; }
.planning-sop-prompt { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; }
.planning-sop-prompt summary { cursor: pointer; color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.planning-sop-prompt summary:focus-visible { outline: 3px solid #65b8c0; outline-offset: 4px; }
.planning-sop-prompt p { color: #637687; font-size: 13px; line-height: 1.7; }
.planning-sop-prompt pre { font: inherit; font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; background: #f4f7f9; padding: 16px; border-radius: 6px; margin-bottom: 0; user-select: all; }
.planning-sop-decision { margin: 16px 0 0; color: #637687; font-size: 13px; line-height: 1.8; }
@media(max-width:1100px) {
  .planning-sop .planning-sections { grid-template-columns: 1fr; gap: 20px; }
  .planning-sop .planning-section + .planning-section { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
}
@media(max-width:767px) {
  .planning-sop-summary { grid-template-columns: 1fr; }
  .planning-sop-gate, .planning-sop-prompt { padding: 16px; }
}
