:root { --dim: #586b78; --line: #dce5e9; --bad: #ac3030; --good: #18724d; --accent: #a65c13; --primary: #17665e; }
* { box-sizing: border-box; }
body { margin: 0; background: #f3f6f8; color: #213440; font: 15px/1.6 system-ui, -apple-system, sans-serif; }
a { color: var(--primary); text-underline-offset: 3px; }
.app-header { background: #fff; border-bottom: 1px solid var(--line); padding: 18px max(24px, calc((100vw - 1240px)/2)); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: #213440; font-size: 20px; font-weight: 750; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--primary); color: white; border-radius: 10px; margin-right: 10px; }
.brand-ai { color: var(--primary); }
.app-caption, .sub { color: var(--dim); font-size: 14px; }
.workspace { max-width: 1288px; margin: 0 auto; padding: 28px 24px 64px; }
.page-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.page-nav a { padding: 9px 14px; text-decoration: none; border-radius: 9px; }
.page-nav a:hover { background: #e4eeed; }
.page-nav a[aria-current] { background: var(--primary); color: white; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 8px; }
h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.025em; margin: 8px 0 12px; }
h2 { font-size: 20px; font-weight: 650; margin: 28px 0 12px; }
.panel h2:first-child { margin-top: 0; }
.intro { color: var(--dim); margin: 0 0 24px; max-width: 780px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0 32px; }
.card, .panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 3px 12px #21344004; }
.panel { position: relative; margin-bottom: 24px; overflow-x: auto; }
.card.primary { background: #eaf5f1; border-color: #b5d8cc; }
.card-title { font-size: 14px; font-weight: 600; color: var(--dim); }
.card-value { font-size: 38px; line-height: 1.2; font-weight: 750; margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.card-sub, .legend, .term { font-size: 12px; color: var(--dim); }
.term { display: block; font-weight: 400; }
.card.warn, .panel.warn { border-color: #d6a56e; background: #fff8eb; }
.card.warn .card-value { color: var(--accent); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; background: #edf4f2; color: var(--primary); font-size: 12px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-size: 12px; font-weight: 600; background: #f7f9fa; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f8fbfa; }
tr.today td { background: #fff8eb; }
table.reasons td { padding: 10px 12px; }
table.reasons td:nth-child(2) { white-space: nowrap; font-weight: 600; }
form.inline { display: inline; white-space: nowrap; font-size: 13px; color: var(--dim); }
input, select, button { font: inherit; }
input:not([type=hidden]):not([type=checkbox]), select { padding: 10px 12px; border: 1px solid #aabcc6; border-radius: 8px; background: white; color: inherit; max-width: 100%; min-height: 44px; }
input[type=number] { width: 150px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
button { padding: 10px 18px; border: 1px solid var(--primary); border-radius: 9px; background: var(--primary); color: white; cursor: pointer; min-height: 44px; font-weight: 600; }
button:hover { background: #104c46; }
form.inline button { background: white; color: var(--primary); border-color: var(--line); }
:focus-visible { outline: 3px solid #398dce; outline-offset: 3px; }
label { font-weight: 550; }
.empty { color: var(--dim); padding: 18px 0; }
.bad { color: var(--bad); }
.good { color: var(--good); }
.errorlist { margin: 6px 0; padding-left: 20px; color: var(--bad); }
summary { cursor: pointer; color: var(--primary); padding: 8px 0; }
canvas { max-width: 100%; }
.login-panel { max-width: 430px; margin: 7vh auto; padding: 32px; }
.login-panel input:not([type=hidden]), .login-panel button { width: 100%; }
.skip-link { position: absolute; left: 16px; top: -80px; background: white; padding: 10px; z-index: 10; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .workspace { padding: 20px 14px 40px; }
  .app-header { padding: 14px; }
  .app-caption { display: none; }
  .top { align-items: flex-start; flex-direction: column; gap: 0; }
  .top form { align-self: flex-end; }
  .panel { padding: 14px; }
  .cards { grid-template-columns: 1fr; }
  .page-nav a { padding: 8px 10px; font-size: 13px; }
  th, td { padding: 10px; }
  .login-panel { margin-top: 24px; }
  .form-fields, .form-fields tbody, .form-fields tr, .form-fields td { display: block; width: 100%; }
  .form-fields td { border: 0; padding: 6px 0; }
  .form-fields tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .form-fields input:not([type=checkbox]), .form-fields select { width: 100%; min-width: 0; }
}
