:root {
  color-scheme: light;
  font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
  color: #173733;
  background: #f1f6f4;
  --muted: #46635d;
  --border: #d4e3dd;
  --dark: #103c37;
  --green: #cbe88b;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #25816b; outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--border); }
.top-inner, .section-head, .actions, .footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.top-inner { min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--green); background: var(--dark); }
nav { display: flex; gap: 28px; }
nav a { font-size: .9375rem; color: var(--muted); text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(28px, 5vw, 58px);
  margin-block: 32px 24px;
  border-radius: 26px;
  color: white;
  background:
    linear-gradient(90deg, #103c37 15%, #103c3790 75%),
    repeating-linear-gradient(90deg, transparent 0 31px, #baded72a 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 31px, #baded72a 31px 32px),
    #195447;
}
.eyebrow { margin: 0 0 12px; color: var(--green); font-weight: 700; font-size: .875rem; letter-spacing: .05em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.3rem, 5.9vw, 4.4rem); line-height: 1; letter-spacing: -.065em; margin-bottom: 18px; }
.intro { max-width: 40ch; color: #deede8; margin-bottom: 26px; }
button, .button {
  display: inline-flex; justify-content: center; align-items: center;
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
  padding: 9px 15px; min-height: 43px; color: var(--dark);
  font-weight: 700; font-size: .9375rem; text-decoration: none;
}
button:hover { background: #e7f3ed; }
.primary { background: var(--green); border-color: var(--green); }
.primary:hover { background: #d8f1a7; }
.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.dark:hover { background: #215b50; }
.progress-card { padding: clamp(19px, 3vw, 30px); background: #f6faf1; color: var(--dark); border-radius: 16px; }
.progress-card h2 { font-size: 1rem; margin-bottom: 14px; }
.progress-numbers { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; justify-content: space-between; }
.progress-numbers strong { font-size: 2.8rem; line-height: 1; letter-spacing: -.06em; }
.progress-numbers span, #findings { color: var(--muted); font-size: .9375rem; }
#findings { margin: 11px 0 0; }
progress { display: block; width: 100%; height: 10px; appearance: none; border: 0; border-radius: 10px; overflow: hidden; margin-top: 18px; background: #dce9de; }
progress::-webkit-progress-bar { background: #dce9de; }
progress::-webkit-progress-value { background: #2b785e; }
progress::-moz-progress-bar { background: #2b785e; }
.panel, .group { background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.identity { padding: 25px; }
.section-head h2 { letter-spacing: -.035em; font-size: 1.65rem; margin-bottom: 2px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
#save-status { background: #e9f3ee; color: #325d50; padding: 5px 10px; border-radius: 6px; font-size: .875rem; }
.filters { display: grid; gap: 16px; grid-template-columns: 2fr 1fr 1fr; margin-block: 18px 12px; }
label { display: grid; min-width: 0; gap: 6px; font-size: .9375rem; font-weight: 650; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #bacfc6; border-radius: 8px; color: #173733; background: #fff; padding: 9px 11px; min-height: 43px; font-weight: 400; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #46635d 50%), linear-gradient(135deg, #46635d 50%, transparent 50%); background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
.checklist { margin-top: 34px; scroll-margin-top: 20px; }
.actions { gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.result { margin-bottom: 12px; font-size: .875rem; color: var(--muted); }
.group { margin-bottom: 14px; overflow: hidden; }
.item + .item { border-top: 1px solid var(--border); }
.reset-wrap { display: flex; justify-content: flex-end; margin-block: 22px 32px; }
.reset { color: #843c32; }
.footer { padding-block: 19px 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
[hidden], .print-value { display: none; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 24px; }
.identity-grid h3 { margin-bottom: 10px; font-size: 1.0625rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.wide { grid-column: 1 / -1; }
.building-details { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 14px; }
.building-details .form-grid { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; }
.category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.category-nav a { border: 1px solid var(--border); border-radius: 7px; padding: 6px 10px; background: #fff; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block: 10px 15px; }
.result-line .result { margin: 0; }
.result-line button { min-height: 36px; padding-block: 5px; }
.catalog-section { scroll-margin-top: 16px; margin-bottom: 26px; }
.catalog-title { font-size: 1.28rem; margin-bottom: 10px; }
.group > summary { padding: 11px 16px; background: #e6f0eb; border-radius: 15px; }
.group[open] > summary { border-radius: 15px 15px 0 0; border-bottom: 1px solid var(--border); }
.item { display: block; padding: 0; }
.item > summary { padding: 11px 16px; }
.item[open] > summary { background: #f5faf7; }
.item-title { margin-right: 9px; font-size: .975rem; font-weight: 650; }
.item-status { float: right; font-size: .8125rem; font-weight: 650; border-radius: 6px; margin-left: 8px; padding: 1px 7px; color: #39564e; background: #edf3ef; }
.item-status[data-state="issue"] { color: #883f20; background: #fff0e7; }
.item-status[data-state="filled"] { color: #245b38; background: #edf8e9; }
.item-body { padding: 14px 16px 16px; border-top: 1px solid var(--border); }
.inspection-reference { margin: 0 0 10px; padding: 8px 10px; background: #eef5f0; color: #234941; }
.applicable { display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; margin-bottom: 12px; }
.applicable input { appearance: auto; min-height: 0; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--dark); }
.sample { padding: 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; }
.sample h4 { margin: 0 0 9px; }
.photo-field { display: grid; align-items: start; justify-items: start; gap: 6px; }
.photo-field label { width: 100%; }
.photo-feedback { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.photo-preview { display: block; max-width: 100%; max-height: 230px; border-radius: 7px; }
.photo-preview[hidden] { display: none; }
.remove-sample { margin-top: 10px; }
.reset-wrap { gap: 8px; flex-wrap: wrap; }
.embedded-checklist .top, .embedded-checklist .footer, .embedded-checklist .hero { display: none; }
.embedded-checklist .shell { width: calc(100% - 26px); }
.embedded-checklist main { padding-top: 12px; }
.item[hidden], .reset-wrap [hidden], .item-body button[hidden] { display: none; }
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .hero { grid-template-columns: 1fr; margin-top: 16px; border-radius: 17px; }
  .top-inner { min-height: 60px; }
  nav { display: none; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters label:first-child { grid-column: 1 / -1; }
  .identity { padding: 16px; }
  .identity-grid { grid-template-columns: 1fr; gap: 16px; }
  .category-nav { display: flex; }
  .item > summary, .item-body, .group > summary { padding-inline: 12px; }
}
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } }
#simak-print-dialog { width: min(850px, calc(100% - 20px)); max-height: 94dvh; padding: 0; color: #111; border: 1px solid #bacfc6; border-radius: 10px; }
#simak-print-dialog::backdrop { background: #142d26b0; }
.simak-preview-actions { position: sticky; top: 0; z-index: 1; display: flex; gap: 8px; justify-content: flex-end; padding: 9px 12px; background: #eff5f0; border-bottom: 1px solid #d6e1da; }
#simak-paper { padding: clamp(8px, 4vw, 34px); }
@page { size: 215mm 330mm; margin: 15mm 16mm; }
@media print {
  html, body { background: white; }
  body > :not(#simak-print-dialog), .simak-preview-actions { display: none !important; }
  #simak-print-dialog::backdrop { display: none; }
  #simak-print-dialog { display: block !important; position: static; width: 100%; max-width: none; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; margin: 0; }
  #simak-paper { padding: 0; }
}
