:root {
  --paper: #f5f7f4;
  --surface: #ffffff;
  --ink: #212c24;
  --muted: #647168;
  --line: #dce4db;
  --accent: #356843;
  --accent-dark: #294f34;
  --focus: #26743e;
  font-family: "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
html { scrollbar-gutter: stable; }
body { color: var(--ink); background: var(--paper); }
header.topbar {
  min-height: 76px; height: auto; padding: 16px max(24px, calc((100vw - 1340px) / 2));
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { gap: 11px; font-size: 21px; letter-spacing: -.6px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); font-size: 25px; }
.brand-sub { font-size: 13px; font-weight: 500; color: var(--muted); }
.brand-divider { margin: 0 10px; }
.account { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.account .account-name { padding-right: 9px; border-right: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.account .text-button { min-height: 34px; font-size: 12px; font-weight: 500; padding: 5px 7px; border-radius: 5px; }
.account a[aria-current="page"] { background: #edf3ed; color: var(--accent-dark); }
.workspace-nav {
  display: flex; gap: 7px; align-items: center; min-height: 60px; padding: 9px max(24px, calc((100vw - 1340px) / 2));
  background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto;
}
.workspace-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 13px; white-space: nowrap; border-radius: 6px; color: var(--muted); font-weight: 550; font-size: 13px; }
.workspace-nav a:hover { background: #f3f6f1; color: var(--ink); }
.workspace-nav a[aria-current="page"] { background: #eaf1e8; color: #2d5e39; }
.primary-button, .secondary-button, .icon-button { min-height: 38px; border-radius: 7px; font-size: 13px; padding: 9px 13px; font-weight: 550; }
.primary-button { background: var(--accent); border-color: var(--accent); }
.primary-button:hover { background: var(--accent-dark); }
.secondary-button { background: white; border-color: #cdd8cc; }
.secondary-button:hover, .icon-button:hover { background: #eff4ed; }
input, select, textarea, button, table { font-variant-numeric: tabular-nums; }
textarea { font-family: inherit; }
input, select, textarea { min-width: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.settings-card { border-color: var(--line); border-radius: 12px; background: white; }
.settings-card h2 { font-weight: 650; }
.error { overflow-wrap: anywhere; }
.checker-page .workspace { grid-template-columns: 310px minmax(0,1fr); min-height: calc(100dvh - 136px); }
.checker-page .sidebar { padding: 27px 24px; background: #fff; gap: 26px; }
.checker-page main { padding: 30px; }
.checker-page .sidebar-top .text-button { min-height: 32px; }
.checker-page .dropzone { background: #f6f9f3; border-color: #b9cbb4; padding: 28px 12px; border-radius: 10px; }
.checker-page .dropzone:hover, .checker-page .dropzone.dragging { background: #edf4e9; border-color: var(--accent); }
.checker-page .history { max-height: 340px; overflow-y: auto; }
.checker-page .history-item.active { background: #edf4e9; border-color: #c7d8c1; }
.checker-page .result-heading { align-items: flex-start; }
.checker-page .result-heading h1 { font-size: 26px; letter-spacing: -.7px; }
.checker-page .empty-state { display: block; max-width: 800px; margin: 24px auto; padding: 32px 36px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.checker-page .intro-copy h1 { font-size: clamp(27px,3vw,38px); font-weight: 650; letter-spacing: -1px; margin: 13px 0 16px; }
.checker-page .intro-copy p { max-width: 660px; font-size: 14px; line-height: 1.8; }
.checker-page .intro-bottom { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 25px; margin-top: 26px; }
.checker-page .intro-bottom>div { align-items: center; color: var(--ink); font-size: 13px; }
.checker-page .intro-bottom b { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); background: #edf4e9; border-radius: 50%; flex: none; }
.checker-page .boundary-note { padding: 15px 0 0; margin-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }
.checker-page .verdict { border-radius: 10px; }
.checker-page .verdict:not(.review):not(.attention) { background: #f1f4f0; }
.checker-page .finding { background: white; border-color: var(--line); border-radius: 9px; }
.checker-page .facts-table th { font-weight: 500; }
.checker-page .label-action { padding: 14px 18px; border-radius: 9px; background: #fff; border: 1px solid var(--line); }
.checker-page .report-nav { gap: 3px; padding-bottom: 7px; }
.checker-page #manual-details, .checker-page #training-details { padding: 20px; }
.login-page .login-layout { max-width: 1120px; padding: 65px 28px; gap: 72px; }
.login-page .login-intro h1 { font-size: clamp(30px,4vw,44px); font-weight: 650; letter-spacing: -1.3px; }
.login-page .login-intro>p { font-size: 14px; }
.login-page .login-card { padding: 30px; border-radius: 14px; }
@media(max-width:1000px) {
  header.topbar { padding: 15px 22px; gap: 12px; }
  .account { gap: 7px; }
  .account .account-name { display: none; }
  .workspace-nav { padding-inline: 22px; }
  .local-state { display: none; }
  .checker-page .workspace { grid-template-columns: 270px minmax(0,1fr); }
  .checker-page .sidebar { padding: 22px 18px; }
  .checker-page main { padding: 24px; }
  .checker-page .result-grid { grid-template-columns: 1fr; }
}
@media(max-width:700px) {
  header.topbar { padding: 14px 16px; }
  .brand-sub, .brand-divider { display: none; }
  .account { gap: 3px; }
  .workspace-nav { padding: 8px 12px; min-height: 54px; gap: 2px; }
  .workspace-nav a { padding: 8px 10px; font-size: 12px; }
  .checker-page .workspace { display: block; }
  .checker-page .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .checker-page main { padding: 20px 14px; }
  .checker-page .empty-state { margin: 4px auto; padding: 25px 22px; }
  .checker-page .result-heading { display: block; }
  .checker-page .report-actions { justify-content: flex-start; margin-top: 16px; }
  .checker-page .verdict { align-items: flex-start; flex-direction: column; }
  .login-page .login-layout { padding: 30px 18px; gap: 20px; }
  .login-page .login-card { padding: 25px 20px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition-duration: .01ms!important; animation-duration: .01ms!important; scroll-behavior: auto!important; } }
@media print { .workspace-nav, #manual-form, #training-form, .checker-page .sidebar, .account { display: none!important; } .checker-page .workspace { display: block; } .checker-page main { padding: 0; } }
