:root { color-scheme: light; --ink: #18342e; --muted: #52665e; --green: #126348; --line: #d9e4df; --paper: #fff; --bg: #f2f6f3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, sans-serif; }
header, main, footer { max-width: 1200px; margin: auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
h1 { font-size: 24px; margin: 2px 0; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 18px; margin-top: 28px; }
p { color: var(--muted); }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
a { color: var(--green); text-underline-offset: 4px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--green); }
.intro { padding: 32px 0; }
.intro h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.4; margin-top: 12px; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.auth-columns { align-items: start; }
.auth-columns > .panel { min-width: 0; }
.panel { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 24px; box-shadow: 0 8px 24px #18342e04; scroll-margin-top: 20px; }
.panel > p { margin-top: 0; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; min-width: 0; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #adbbb4; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
button { border: 1px solid transparent; border-radius: 8px; padding: 11px 18px; color: #fff; background: var(--green); font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(.92); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, button.download { background: #eaf3ed; border-color: var(--line); color: var(--green); }
button.danger { background: #fff; border-color: #e6c4bf; color: #9b3226; }
:focus-visible { outline: 3px solid #bb7300; outline-offset: 3px; }
.hint { font-size: 13px; }
dialog { width: min(94vw, 560px); max-height: 90vh; overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); }
dialog::backdrop { background: #18342e99; }
.mfa-app-link { display: block; padding: 12px; border: 1px solid var(--green); border-radius: 8px; text-align: center; font-weight: 700; }
#mfa-secret { display: block; min-width: 0; overflow-wrap: break-word; overflow-wrap: anywhere; user-select: all; padding: 12px; background: var(--bg); }
#mfa-qr { max-width: 100%; height: auto; }
#mfa-message { color: #8d2c21; }
#mfa-recovery-done { margin-top: 18px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; }
.workspace-heading > div { min-width: 0; max-width: 100%; overflow-wrap: break-word; overflow-wrap: anywhere; }
.workspace-heading p { margin: 0; }
.section-nav { margin-bottom: 24px; }
.monthly-actions { margin-top: 18px; gap: 10px; }
#monthly-summary { overflow-wrap: break-word; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 13px; border-radius: 20px; padding: 3px 10px; background: #eaf3ed; }
.inline-form { grid-template-columns: 1.2fr 1fr auto; align-items: end; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
caption { text-align: left; font-size: 12px; color: var(--muted); padding: 10px 0; }
th { background: #f2f6f3; white-space: nowrap; }
td, th { border-bottom: 1px solid var(--line); padding: 12px; vertical-align: top; }
td { min-width: 100px; overflow-wrap: anywhere; white-space: pre-line; }
td button { white-space: nowrap; font-size: 13px; padding: 8px 12px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
legend { font-size: 12px; color: var(--muted); padding: 0 0 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks label, .check { display: flex; align-items: center; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.req, .opt { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 700; line-height: 20px; vertical-align: 1px; }
.req { background: #fff0ed; color: #8d2c21; border: 1px solid #e6c4bf; }
.label-text { display: block; }
.opt { background: #f2f6f3; color: var(--muted); border: 1px solid var(--line); }
.field-help { margin: 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.steps li { counter-increment: step; position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 16px 16px 60px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbf9; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; }
.steps li.done { border-color: #89b9a1; background: #e5f4eb; }
.steps li.done::before { content: "✓"; }
.steps b { color: var(--ink); }
.steps span { font-size: 13px; color: var(--muted); }
.steps a { font-size: 14px; font-weight: 600; }
.step-state { font-style: normal; font-size: 12px; margin-left: 4px; padding: 1px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.steps li.done .step-state { color: #17432e; border-color: #89b9a1; }
.step-state:empty { display: none; }
.guide h2 { font-size: 18px; }
form { counter-reset: form-step; }
.form-step { counter-increment: form-step; display: grid; gap: 14px; padding: 18px 18px 18px 64px; position: relative; border: 1px solid var(--line); border-radius: 12px; }
.form-step::before { content: counter(form-step); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; }
.step-title { margin: 4px 0 0; font-size: 16px; }
.check-card { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid #adbbb4; border-radius: 10px; background: #fff; cursor: pointer; }
.check-card input[type="checkbox"] { width: 24px; height: 24px; }
.check-card span { display: grid; }
.check-card small { font-size: 12px; font-weight: 400; color: var(--muted); }
.check-card:has(input:checked) { border-color: var(--green); background: #eaf3ed; }
.checks .check-card:has(input:not(:checked)) { border-color: #d69085; background: #fff0ed; }
.checks .check-card:has(input:not(:checked)) small { color: #8d2c21; font-weight: 700; }
.defect-details { display: grid; gap: 14px; padding: 16px; border-left: 4px solid #d69085; background: #fff8f6; border-radius: 0 10px 10px 0; }
.late-entry-fields { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbf9; }
.mini-steps { margin: 0 0 18px; padding-left: 1.4em; color: var(--ink); font-size: 14px; }
.collapsible-panel { padding-top: 18px; padding-bottom: 18px; }
.collapsible-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.collapsible-panel summary::-webkit-details-marker { display: none; }
.collapsible-panel summary h2 { margin: 0; font-size: 18px; }
.collapsible-panel summary h2::before { content: "▶"; display: inline-block; margin-right: 10px; font-size: 12px; color: var(--green); transition: transform .15s; }
.collapsible-panel details[open] summary h2::before { transform: rotate(90deg); }
.collapsible-panel details[open] summary { margin-bottom: 14px; }
.summary-hint { font-size: 12px; color: var(--muted); }
.badge.attention { background: #fff0ed; color: #8d2c21; font-weight: 700; }
#notice { max-height: min(25vh, 9rem); overflow-y: auto; overflow-wrap: break-word; overflow-wrap: anywhere; padding: 14px 18px; border: 1px solid #89b9a1; border-radius: 10px; background: #e5f4eb; color: #17432e; white-space: pre-line; }
#notice.error { background: #fff0ed; border-color: #d69085; color: #8d2c21; }
footer { color: var(--muted); font-size: 12px; }
@media print {
  body { background: #fff; }
  body > header, body > footer, #notice, #auth, #mfa-dialog, #workspace > :not(#monthly) { display: none !important; }
  main { max-width: none; padding: 0; }
  #monthly { margin: 0; padding: 0; border: 0; box-shadow: none; }
  #monthly > p:not(#monthly-summary), #monthly > ol, #monthly-form, .monthly-actions { display: none; }
  #monthly-summary { margin: 0 0 16px; }
  table { font-size: 10px; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  td, th { padding: 5px; }
}
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-columns { grid-template-columns: 1fr; }
}
@media (max-width: 1000px), (pointer: coarse) {
  input:not([type="checkbox"]), select, textarea { min-width: 0; font-size: 16px; }
}
@media (max-width: 760px) {
  header, main, footer { padding: 18px; }
  header, .workspace-heading { align-items: flex-start; flex-direction: column; }
  .columns, .inline-form { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .checks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-step { padding: 16px 14px 16px 58px; }
  .form-step::before { left: 14px; }
  h1 { font-size: 22px; }
}
