:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
  color: #192a21;
  background: #f2f7ee;
  --ink: #192a21;
  --muted: #4d6253;
  --forest: #183928;
  --deep: #112a20;
  --green: #95c84d;
  --lime: #c2e888;
  --line: #dce6d8;
  --pale: #edf5e7;
  --white: #fff;
  --radius: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.5; }
button, input, textarea, a { -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; }
button:disabled { opacity: .62; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, .file-button:focus-within {
  outline: 3px solid #457a37;
  outline-offset: 3px;
}
a { color: #285535; text-underline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 40px, 960px); margin-inline: auto; }
.topbar { background: #fdfefa; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { width: 166px; max-width: 44%; height: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.offline-status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px;
  white-space: nowrap; font-weight: 650; border-radius: 30px; background: #f0f4ec;
  color: #465d4a; padding: 7px 10px;
}
.status-dot { display: inline-block; background: #b58a3d; border-radius: 50%; width: 7px; height: 7px; }
.offline-status[data-ready='true'] { background: #ecf6df; color: #32512b; }
.offline-status[data-ready='true'] .status-dot { background: #3c7425; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  gap: 7px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 650; line-height: 1.25; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.button-small { min-height: 42px; padding: 8px 11px; font-size: 14px; }
.button-outline { background: var(--white); color: var(--forest); border-color: #c9d9c5; }
.button-outline:hover { background: #f5faf0; }
.button-primary { color: var(--deep); background: var(--lime); }
.button-primary:hover { background: #b7e177; }
.button-on-dark { border-color: #728c77; color: #f6fbf0; background: #254834; }
.button-on-dark:hover { background: #30553d; }

.main { padding-top: 28px; padding-bottom: 128px; }
.job-header {
  display: flex; align-items: end; justify-content: space-between; gap: 15px;
  border-radius: 22px; padding: 25px 29px; color: #fbfff8;
  background: radial-gradient(ellipse at 100% 0%, #345740 0%, transparent 55%), var(--forest);
  border-top: 4px solid var(--green);
}
.job-scope { font-size: 14px; color: #cbdfc3; font-weight: 650; }
h1 { font-size: clamp(30px, 5vw, 47px); letter-spacing: -.039em; line-height: 1.09; margin-top: 4px; }
.job-caption { margin-top: 9px; font-size: 15px; color: #dcebd5; overflow-wrap: anywhere; }
.job-header > div { min-width: 0; }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin: 17px 0 13px;
  padding: 4px; background: #e5eee1; border: 1px solid #d9e5d5; border-radius: 13px;
}
.tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center; background: transparent; border: 1px solid transparent; border-radius: 9px;
  min-height: 50px; padding: 7px 5px; font-size: 15px; font-weight: 650; cursor: pointer;
}
.tabs button[aria-selected='true'] { background: white; border-color: #d5e0d1; box-shadow: 0 2px 4px #1b302011; }
.count { font-size: 12px; font-weight: 700; color: #49614b; border-radius: 9px; background: #f0f6eb; padding: 2px 6px; }
.form-panel {
  background: white; border-radius: var(--radius); padding: 25px 28px;
  border: 1px solid var(--line); box-shadow: 0 3px 12px #1b302006;
}
.panel-title { font-size: clamp(23px, 4vw, 31px); line-height: 1.2; letter-spacing: -.025em; margin-bottom: 6px; }
.muted { color: var(--muted); }
.form-intro { color: var(--muted); max-width: 76ch; margin-bottom: 19px; }
.brief-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px 18px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.field-wide { grid-column: 1 / -1; }
.field span, .inline-label { font-weight: 650; font-size: 15px; }
input:not([type='file']), textarea {
  width: 100%; min-width: 0; min-height: 46px; border: 1px solid #b9ccb6; border-radius: 9px;
  padding: 10px 11px; color: var(--ink); background: #fbfdfa; font-size: 16px;
}
input[type='date'] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 78px; }
input::placeholder, textarea::placeholder { color: #607265; opacity: 1; }

.check-group { margin: 11px 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.check-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 10px 12px; background: #edf5e8; cursor: pointer;
  list-style: none; font-size: 16px; font-weight: 690;
}
.check-group > summary::-webkit-details-marker { display: none; }
.summary-right { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.group-count { font-size: 13px; color: var(--muted); }
.chevron { width: 8px; height: 8px; border: solid #45634c; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.check-group[open] .chevron { transform: rotate(45deg) translateY(-2px); }
.check-row { padding: 13px 12px; border-top: 1px solid var(--line); }
.check-row:nth-child(even) { background: #fbfdfa; }
.check-line { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.check-ref { display: inline-flex; flex: 0 0 26px; justify-content: center; font: 700 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: #4a654b; }
.check-title { font-size: 16px; line-height: 1.42; }
.requirement { font-size: 15px; margin: 8px 0 0 36px; color: var(--muted); white-space: pre-line; }
.status-buttons { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.choice {
  border: 1px solid #cbdbc7; border-radius: 8px; min-width: 51px; min-height: 44px;
  padding: 5px 9px; background: #fff; font-size: 14px; font-weight: 650; cursor: pointer;
}
.choice[aria-pressed='true'] { color: #1e4b23; background: #dff1d6; border-color: #81a978; }
.choice[data-value='Fail'][aria-pressed='true'] { color: #772923; background: #fcece7; border-color: #cd9d93; }
.choice[data-value='N/A'][aria-pressed='true'] { color: #425147; background: #eaf0ed; border-color: #9aac9f; }
.note-block { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.note-block h3 { font-size: 19px; margin-bottom: 9px; }
.note-block p { margin-bottom: 10px; }
.battery-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px;
  background: #f1f8eb; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px;
}
.photo-tools { display: grid; grid-template-columns: auto auto minmax(110px, 1fr); gap: 7px; margin-top: 11px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.attachment-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.attachment-list:empty { display: none; }
.attachment { min-width: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: white; }
.attachment img { display: block; width: 100%; height: 84px; object-fit: cover; background: #e7eee6; }
.attachment figcaption { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 8px 0; }
.attachment figure { margin: 0; }
.attachment button { width: 100%; min-height: 43px; font-size: 14px; border: none; background: white; text-decoration: underline; cursor: pointer; color: #703127; }

.brand-footer { margin-top: 18px; border-top: 1px solid var(--line); padding: 17px 0 4px; }
.brand-footer h2 { font-size: 16px; font-weight: 690; margin-bottom: 9px; }
.accreditations { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.mark { display: grid; place-items: center; min-width: 0; min-height: 53px; border-radius: 9px; background: white; padding: 6px; border: 1px solid var(--line); }
.mark img { max-width: 100%; max-height: 53px; object-fit: contain; }
.contact { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 3px 15px; font-size: 13px; color: var(--muted); }
.contact .address { width: 100%; }
.actionbar {
  position: fixed; z-index: 2; bottom: 0; width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px); color: white; background: #173628;
  box-shadow: 0 -3px 17px #172b1b24;
}
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.save-status { color: #e5f1df; font-size: 14px; }
.save-status[data-error='true'] { color: #ffd8ca; }
.actionbar .button { min-width: 142px; }
.toast {
  position: fixed; z-index: 3; bottom: calc(77px + env(safe-area-inset-bottom, 0px)); right: max(14px, calc((100vw - 960px) / 2));
  max-width: min(390px, 92vw); padding: 11px 14px; background: #fdfefa; border: 1px solid #97b38c;
  border-radius: 10px; box-shadow: 0 6px 24px #17332328; font-size: 15px;
}

dialog { max-width: min(91vw, 485px); width: 100%; margin: auto; border: 1px solid var(--line); border-radius: 17px; background: white; padding: 17px; color: var(--ink); }
dialog::backdrop { background: #152b226b; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 12px; }
.dialog-header h2 { font-size: 21px; line-height: 1.25; }
dialog p { margin-bottom: 12px; }
.install-steps dt { font-weight: 700; margin-top: 10px; }
.install-steps dd { color: var(--muted); }
.draft-list { display: grid; gap: 7px; margin-bottom: 13px; }
.draft-button { display: block; width: 100%; min-height: 51px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #f8fbf5; padding: 9px; font-weight: 650; cursor: pointer; overflow-wrap: anywhere; }
.draft-button span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.pdf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.break-text { overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { min-height: 63px; gap: 8px; }
  .brand { width: 144px; max-width: 40%; }
  .topbar-actions { gap: 6px; }
  .main { padding-top: 15px; }
  .job-header { padding: 16px 14px; border-radius: 16px; }
  .job-header .button { padding: 8px 10px; font-size: 14px; }
  .job-caption { margin-top: 6px; }
  .tabs { margin-top: 12px; }
  .tabs button { flex-direction: column; gap: 1px; font-size: 14px; min-height: 54px; }
  .form-panel { padding: 16px 12px; }
  .brief-form { gap: 12px 9px; }
  .check-line { flex-wrap: wrap; gap: 9px; }
  .check-line .status-buttons { margin-left: 36px; }
  .check-label { flex: 1 0 100%; }
  .check-ref { flex-basis: 23px; }
  .photo-tools { grid-template-columns: 1fr 1fr; }
  .photo-tools .photo-ref { grid-column: 1 / -1; }
  .accreditations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 345px) {
  .offline-status { font-size: 12px; padding-inline: 6px; }
  .tabs button { font-size: 13px; }
  .form-panel { padding-inline: 10px; }
}

@media (display-mode: standalone) { #install-button { display: none; } }
