:root {
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body {
  margin: 0;
  font:
    14px system-ui,
    sans-serif;
}
img {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

.propbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  margin-right: 6px;
  border-radius: 15px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.propbtn:active {
  opacity: 0.6;
}
[data-theme="dark"] .propbtn {
  background: rgba(10, 132, 255, 0.2);
  color: #0a84ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .propbtn {
    background: rgba(10, 132, 255, 0.2);
    color: #0a84ff;
  }
}
@media (max-width: 420px) {
  .propbtn span {
    display: none;
  }
  .propbtn {
    padding: 0 9px;
  }
}

/* Layout: iOS-style grouped lists, phase segmented control and step bar on the left; preview pane on the right, full-screen sheet on phones, true-to-scale form preview on the right; stacks on phone */

:root {
  --bg: #f2f2f7;
  --group: #ffffff;
  --fg: #000000;
  --muted: #6e6e73;
  --sep: rgba(60, 60, 67, 0.18);
  --fill: rgba(118, 118, 128, 0.12);
  --fill2: #ffffff;
  --accent: #007aff;
  --accent-fg: #ffffff;
  --tint: rgba(0, 122, 255, 0.12);
  --green: #34c759;
  --orange: #ff9500;
  --orange-bg: rgba(255, 149, 0, 0.14);
  --ok: #248a3d;
  --ok-bg: rgba(52, 199, 89, 0.16);
  --red: #ff3b30;
  --menu: rgba(250, 250, 252, 0.9);
  --menu-hover: rgba(0, 0, 0, 0.06);
  --bar: rgba(249, 249, 249, 0.82);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  --sheet: 0 4px 18px rgba(0, 0, 0, 0.14);
  --switch-off: rgba(120, 120, 128, 0.16);
  --ui:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "IN", "Helvetica Neue", "Segoe UI", "ML", Roboto, Arial,
    sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --group: #1c1c1e;
    --fg: #ffffff;
    --muted: #98989f;
    --sep: rgba(84, 84, 88, 0.65);
    --fill: rgba(118, 118, 128, 0.24);
    --fill2: #636366;
    --accent: #0a84ff;
    --accent-fg: #ffffff;
    --tint: rgba(10, 132, 255, 0.22);
    --green: #30d158;
    --orange: #ff9f0a;
    --orange-bg: rgba(255, 159, 10, 0.2);
    --ok: #30d158;
    --ok-bg: rgba(48, 209, 88, 0.2);
    --red: #ff453a;
    --menu: rgba(40, 40, 44, 0.9);
    --menu-hover: rgba(255, 255, 255, 0.1);
    --bar: rgba(22, 22, 24, 0.82);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    --sheet: 0 4px 18px rgba(0, 0, 0, 0.6);
    --switch-off: rgba(120, 120, 128, 0.32);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --group: #1c1c1e;
  --fg: #ffffff;
  --muted: #98989f;
  --sep: rgba(84, 84, 88, 0.65);
  --fill: rgba(118, 118, 128, 0.24);
  --fill2: #636366;
  --accent: #0a84ff;
  --accent-fg: #ffffff;
  --tint: rgba(10, 132, 255, 0.22);
  --green: #30d158;
  --orange: #ff9f0a;
  --orange-bg: rgba(255, 159, 10, 0.2);
  --ok: #30d158;
  --ok-bg: rgba(48, 209, 88, 0.2);
  --red: #ff453a;
  --menu: rgba(40, 40, 44, 0.9);
  --menu-hover: rgba(255, 255, 255, 0.1);
  --bar: rgba(22, 22, 24, 0.82);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  --sheet: 0 4px 18px rgba(0, 0, 0, 0.6);
  --switch-off: rgba(120, 120, 128, 0.32);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
html {
  scrollbar-width: none;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  padding-block: 0 110px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bar);
}
.gut {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
/* nav bar */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 6;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
  padding-block: 8px;
}
.bar-in {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
}
.who {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who img {
  height: 34px;
  width: 34px;
  flex: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.hdr-r {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fsbtn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  padding: 0;
  border-radius: 9px;
  background: var(--fill);
  color: var(--fg);
}
.fsbtn svg {
  width: 17px;
  height: 17px;
}
.fsbtn .fs-out {
  display: none;
}
:root.is-fs .fsbtn .fs-in {
  display: none;
}
:root.is-fs .fsbtn .fs-out {
  display: inline;
}
.theme {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 2px;
  background: var(--fill);
  padding: 2px;
  border-radius: 9px;
}
.theme button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
}
.theme button svg {
  width: 16px;
  height: 16px;
}
.theme button[aria-pressed="true"] {
  background: var(--fill2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.custbar {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.custbar .pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fill);
  border-radius: 10px;
  padding: 0 10px;
}
.custbar .pick > span {
  font-size: 13px;
  color: var(--muted);
  flex: none;
}
.custbar select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0;
  -webkit-appearance: none;
  appearance: none;
}
button {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: 980px;
  padding: 8px 15px;
  cursor: pointer;
  border: 0;
  background: var(--tint);
  color: var(--accent);
}
button.pri {
  background: var(--accent);
  color: var(--accent-fg);
}
button.plain {
  background: transparent;
  padding-inline: 8px;
}
button.red {
  color: var(--red);
}
button:active {
  opacity: 0.7;
}
button:disabled {
  opacity: 0.45;
  cursor: progress;
}
:focus-visible {
  outline: 3px solid var(--tint);
  outline-offset: 1px;
}
/* page */
.wrap {
  margin: 0;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 44%);
  gap: 28px;
  align-items: start;
}
@media (max-width: 1060px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (min-width: 1600px) {
  .main .list,
  .main details.doc {
    font-size: 17px;
  }
}
.main {
  min-width: 0;
}
.large {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.37px;
  line-height: 1.12;
  margin: 18px 0 4px;
  text-wrap: balance;
}
.lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}
.seg {
  display: grid;
  gap: 2px;
  background: var(--fill);
  padding: 2px;
  border-radius: 9px;
}
.seg button {
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 4px;
  line-height: 1.2;
}
.seg button small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 11.5px;
}
.seg button[aria-pressed="true"],
.seg button[aria-current="step"] {
  background: var(--fill2);
  font-weight: 600;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 3px 1px rgba(0, 0, 0, 0.04);
}
.phase {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}
.phase button {
  padding: 8px 4px;
  font-size: 15px;
}
.stepbar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0 0 22px;
}
.stepbar::-webkit-scrollbar {
  display: none;
}
.stepbar button {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}
.stepbar .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--muted);
  font-size: 12px;
}
.stepbar button[aria-current="step"] {
  color: var(--accent);
  background: var(--tint);
}
.stepbar button[aria-current="step"] .n {
  background: var(--accent);
  color: var(--accent-fg);
}
.stepbar button.done .n {
  background: var(--green);
  color: #fff;
}
.stepbar small {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .stepbar small {
    display: none;
  }
  .stepbar button {
    font-size: 13px;
    padding: 8px 4px;
    gap: 5px;
  }
}
@media (max-width: 560px) {
  .stepbar {
    gap: 4px;
  }
  .stepbar button {
    flex-direction: column;
    gap: 4px;
    padding: 7px 2px;
    font-size: 12px;
    border-radius: 12px;
  }
  .stepbar .n {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 520px) {
  .large {
    font-size: 30px;
  }
  .custbar .pick > span {
    display: none;
  }
  .who img {
    height: 30px;
    width: 30px;
  }
}
body[data-phase="1"] [data-ph]:not([data-ph~="1"]),
body[data-phase="2"] [data-ph]:not([data-ph~="2"]) {
  display: none !important;
}
.step[hidden] {
  display: none !important;
}
.step h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}
.step .intro {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
}
/* grouped lists */
.grp {
  margin: 0 0 26px;
}
.grp > h3 {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 7px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.grp > h3 button {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  padding: 4px 10px;
}
.list {
  background: var(--group);
  border-radius: 12px;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  position: relative;
  cursor: text;
}
.row + .row::before,
.list > .row ~ *::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: 0.5px solid var(--sep);
}
.row > span {
  flex: none;
  max-width: 52%;
  font-size: 16px;
}
.row > span.grow {
  flex: 1;
  max-width: none;
}
.row > span i {
  font-style: normal;
  color: var(--muted);
}
.row input,
.row select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  text-align: right;
  padding: 12px 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.row input:focus {
  color: var(--fg);
  outline: none;
}
.row select {
  color: var(--accent);
  cursor: pointer;
  text-align-last: right;
}
.row select:focus,
.row textarea:focus {
  outline: none;
}
.row input[type="date"] {
  color: var(--accent);
  min-height: 44px;
}
.row input::placeholder,
.row textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}
.row.stack {
  display: block;
  padding: 10px 16px 4px;
  cursor: text;
}
.row.stack > span {
  display: block;
  max-width: none;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.row textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  padding: 2px 0 8px;
  resize: vertical;
  min-height: 46px;
}
.row.miss {
  background: var(--orange-bg);
}
.foot {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 16px 0;
}
.sw {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
}
.sw input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.sw i {
  position: absolute;
  inset: 0;
  border-radius: 31px;
  background: var(--switch-off);
  transition: background 0.2s;
}
.sw i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.15),
    0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}
.sw input:checked + i {
  background: var(--green);
}
.sw input:checked + i::after {
  transform: translateX(20px);
}
.sw input:focus-visible + i {
  outline: 3px solid var(--tint);
}
/* document disclosure groups */
details.doc {
  background: var(--group);
  border-radius: 12px;
  margin: 0 0 12px;
  overflow: hidden;
}
details.doc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  min-height: 60px;
}
details.doc > summary::-webkit-details-marker {
  display: none;
}
.tile {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
details.doc .tx {
  flex: 1;
  min-width: 0;
}
details.doc .tx b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
details.doc .tx small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.chev {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.6;
  transition: transform 0.2s;
}
details.doc[open] > summary .chev {
  transform: rotate(45deg);
}
details.doc .inner {
  border-top: 0.5px solid var(--sep);
}
details.doc .inner .list {
  border-radius: 0;
}
details.doc .inner h4 {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding: 16px 16px 7px;
  background: var(--bg);
}
.chip {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 980px;
  padding: 3px 9px;
  white-space: nowrap;
}
.chip.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.chip.wn {
  background: var(--orange-bg);
  color: var(--orange);
}
/* download */
.dl .row {
  min-height: 64px;
  cursor: default;
  align-items: center;
}
.dl .row input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  padding: 0;
  -webkit-appearance: checkbox;
  appearance: auto;
  margin: 0;
}
.dl .tx {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
}
.dl .tx b {
  display: block;
  font-weight: 600;
  font-size: 16px;
}
.dl .tx small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.miss-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.miss-list button {
  font-size: 12px;
  padding: 3px 9px;
  background: var(--orange-bg);
  color: var(--orange);
}
.dl-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 4px 0;
}
.dl-sum p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.sigrow {
  gap: 8px;
  min-height: 62px;
  cursor: default;
  flex-wrap: wrap;
  padding-block: 8px;
}
.sigrow .grow small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.sigrow button {
  font-size: 14px;
  padding: 6px 12px;
}
.sigprev {
  flex: none;
  width: 96px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  border: 0.5px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sigprev:empty {
  display: none;
}
.sigprev img {
  max-width: 90%;
  max-height: 85%;
}
.sigsheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.sigsheet[hidden] {
  display: none;
}
.sig-card {
  width: min(720px, 100%);
  background: var(--group);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: mpop 0.18s ease-out;
}
.sig-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px;
  border-bottom: 0.5px solid var(--sep);
}
.sig-hd b {
  font-size: 16px;
}
.sig-pad {
  position: relative;
  margin: 14px;
  height: min(46vh, 300px);
  background: #fff;
  border-radius: 12px;
  border: 0.5px solid var(--sep);
  touch-action: none;
}
.sig-pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  border-radius: 12px;
}
.sig-line {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 26%;
  border-top: 1.5px solid #c7c7cc;
  pointer-events: none;
}
.sig-x {
  position: absolute;
  left: 8%;
  bottom: calc(26% + 6px);
  color: #a1a1a6;
  font-size: 20px;
  pointer-events: none;
}
.sig-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10%;
  text-align: center;
  color: #a1a1a6;
  font-size: 13px;
  pointer-events: none;
}
.sig-ft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}
.sig-ft p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.improw {
  gap: 12px;
  min-height: 64px;
  cursor: default;
}
.improw .tile {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.improw .grow small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.imp-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  margin: 0 14px 12px;
  border-radius: 12px;
  background: var(--bg);
}
.imp-list .row {
  min-height: 52px;
  cursor: pointer;
}
.imp-list .row input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  -webkit-appearance: checkbox;
  appearance: auto;
  margin: 0;
  padding: 0;
}
.imp-list .row .k {
  flex: none;
  width: 118px;
  color: var(--muted);
  font-size: 14px;
}
.imp-list .row .v {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: pre-line;
  overflow-wrap: anywhere;
  padding: 8px 0;
}
.imp-note {
  margin: 0 16px 12px;
  font-size: 13px;
  color: var(--muted);
}
.imp-ft {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0 14px 14px;
}
button.wa {
  background: rgba(37, 211, 102, 0.16);
  color: #128c4a;
}
:root[data-theme="dark"] button.wa {
  color: #3ddc84;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) button.wa {
    color: #3ddc84;
  }
}
.pane-act {
  flex-wrap: wrap;
}
.cln-pad {
  position: relative;
  margin: 14px;
  height: min(38vh, 260px);
  border-radius: 12px;
  border: 0.5px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e6e6ea 25%, transparent 25%),
    linear-gradient(-45deg, #e6e6ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e6ea 75%),
    linear-gradient(-45deg, transparent 75%, #e6e6ea 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    0 9px,
    9px -9px,
    -9px 0;
}
.cln-empty {
  position: absolute;
  inset: auto 0 12px;
  text-align: center;
  color: #6e6e73;
  font-size: 13px;
}
.cln-ctl {
  padding: 0 16px 14px;
  display: grid;
  gap: 12px;
}
.cln-row {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.cln-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.cln-ends {
  display: flex;
  justify-content: space-between;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.cln-ends i {
  font-style: normal;
}
.cln-ink {
  grid-template-columns: repeat(3, 1fr);
}
.cln-foot {
  grid-template-columns: 1fr auto;
  align-items: center;
  font-weight: 400;
}
.cln-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
/* toolbar */
.tool {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
  padding-block: 9px calc(9px + env(safe-area-inset-bottom, 0px));
}
.tool-in {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool .sp {
  flex: 1;
}
.tool .pv {
  display: none;
}
@media (max-width: 1060px) {
  .tool .pv {
    display: inline-block;
  }
}
/* preview */
.pane {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top, 0px));
  margin-top: 18px;
  min-width: 0;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  background: var(--group);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pane-hd {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 0.5px solid var(--sep);
}
.pane-act {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pane-act button {
  flex: none;
  font-size: 15px;
  padding: 7px 14px;
}
.pane-hd .pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--fill);
  border-radius: 9px;
  padding: 0 10px;
}
.pane-hd select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 7px 0;
  -webkit-appearance: none;
  appearance: none;
}
.pane-hd .x {
  display: none;
}
.pvtabs {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pvtabs::-webkit-scrollbar {
  display: none;
}
.pvtabs button {
  flex: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 13px;
  background: var(--fill);
  color: var(--fg);
}
.pvtabs button[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-fg);
}
select option {
  background: var(--group);
  color: var(--fg);
}
.nsel {
  position: absolute !important;
  opacity: 0;
  pointer-events: none;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0;
  right: 0;
  bottom: 0;
}
.pick {
  position: relative;
}
.msel {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  background: transparent;
  color: var(--accent);
  font-weight: 400;
  font-size: 16px;
  padding: 12px 0;
  border-radius: 6px;
  text-align: right;
}
.msel span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msel svg {
  flex: none;
  width: 9px;
  height: 14px;
  opacity: 0.75;
}
.pick .msel {
  justify-content: space-between;
  color: var(--fg);
  font-weight: 600;
  padding: 8px 0;
  text-align: left;
}
.msel[aria-expanded="true"] {
  opacity: 0.6;
}
#menu {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  max-height: min(62vh, 440px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--menu);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border-radius: 14px;
  box-shadow:
    0 12px 44px rgba(0, 0, 0, 0.28),
    0 0 0 0.5px var(--sep);
  padding: 5px 0;
  transform-origin: top right;
  animation: mpop 0.16s ease-out;
}
#menu[hidden] {
  display: none;
}
@keyframes mpop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#menu .mi {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--fg);
  font-weight: 400;
  font-size: 16px;
  padding: 10px 18px 10px 12px;
  border-radius: 0;
  position: relative;
}
#menu .mi + .mi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 38px;
  right: 0;
  border-top: 0.5px solid var(--sep);
}
#menu .mi:hover,
#menu .mi:focus-visible {
  background: var(--menu-hover);
  outline: none;
}
#menu .mi svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
#menu .mi.act {
  color: var(--accent);
}
#menu .gap {
  height: 7px;
  background: var(--sep);
  opacity: 0.5;
  margin: 2px 0;
}
@media (prefers-reduced-motion: reduce) {
  #menu {
    animation: none;
  }
}
.pane-meta {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pages {
  overflow: auto;
  padding: 14px 14px 16px;
  display: grid;
  gap: 14px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.pg {
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--sheet);
  background: #fff;
}
.pg .sheet {
  transform-origin: 0 0;
}
@media (max-width: 1060px) {
  .pane {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20;
    max-height: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .pane.open {
    display: flex;
  }
  .pane-hd {
    background: var(--bar);
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .pane-hd .x {
    display: inline-block;
  }
  .pages {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--bar);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--fg);
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  transition: 0.2s;
  max-width: calc(100% - 32px);
  z-index: 30;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.err {
  color: var(--red);
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
#capture {
  position: fixed;
  left: -20000px;
  top: 0;
}
#printArea {
  display: none;
}
@page {
  size: A4;
  margin: 0;
}
@media print {
  :root {
    padding: 0 !important;
  }
  html,
  body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  body::before {
    display: none !important;
  }
  body > *:not(#printArea) {
    display: none !important;
  }
  #printArea {
    display: block !important;
  }
  #printArea .pp {
    height: 296mm;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
  }
  #printArea .pp:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  #printArea .pp img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: top center;
  }
}

/* ---------- Checklist pages (English, Letter / A4) ---------- */
.sheet.ck {
  font-family: "OS", sans-serif;
  font-weight: 700;
  color: #000;
}
.sheet.ck .ctitle {
  font-size: 14.5px;
  line-height: 21px;
  text-align: center;
}
.sheet.ck table {
  position: absolute;
  border-collapse: collapse;
  table-layout: fixed;
}
.sheet.ck td {
  border: 1.3px solid #1a1a1a;
  font-family: "OS", sans-serif;
  font-size: 11.5px;
  line-height: 15px;
  padding: 2px 3px;
  vertical-align: middle;
  font-weight: 700;
}
.sheet.ck td.v {
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 11.5px;
  line-height: 15px;
  padding: 2px 6px;
}
.sheet.ck td.v.r {
  font-weight: 400;
}
.sheet.ck td.p {
  vertical-align: top;
  padding: 4px 3px;
}
.sheet.ck ul {
  margin: 0;
  padding-left: 20px;
}
.sheet.ck .t {
  position: absolute;
  font-size: 11.5px;
  line-height: 15px;
}
/* ---------- Letterhead documents (A4) ---------- */
.sheet.lh {
  font-family: "IN", "OS", sans-serif;
  color: #1b1b1b;
}
.sheet.lh .gst {
  left: 540px;
  top: 69px;
  color: #1f5fa6;
  font-size: 9.4px;
  line-height: 16px;
  letter-spacing: 0.1px;
}
.sheet.lh .gst b {
  font-size: 10.5px;
  font-weight: 700;
}
.sheet.lh .rule {
  left: 48px;
  top: 159px;
  width: 697px;
  border-top: 2px solid #24589e;
}
.sheet.lh .foot {
  left: 29px;
  top: 1071px;
  color: #1f5fa6;
  font-size: 10.3px;
  line-height: 15.5px;
}
.sheet.lh .pin {
  left: 15px;
  top: 1074px;
  width: 9px;
}
.sheet.lh .pno {
  left: 740px;
  width: 40px;
  text-align: center;
  top: 1098px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}
.sheet.lh .guide {
  left: 0;
  right: 0;
  top: 1015px;
  text-align: center;
  font-size: 13.3px;
  line-height: 20px;
}
.sheet.lh .guide b {
  font-weight: 700;
}
.sheet.lh .body {
  left: 58px;
  width: 678px;
  font-size: 12.4px;
  line-height: 33px;
  text-align: justify;
  hyphens: none;
}
.sheet.lh .body p {
  margin: 0;
}
.sheet.lh .body b {
  font-weight: 700;
}
.sheet.lh .dl {
  display: inline-block;
  border-bottom: 1.6px dotted #555;
  line-height: 17px;
  padding: 0 4px;
  vertical-align: baseline;
  text-align: center;
  font-weight: 700;
  font-size: 12.6px;
  white-space: nowrap;
}
.sheet.lh h4 {
  margin: 0;
  font-size: 12.4px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sheet.lh ol,
.sheet.lh ul.bl {
  margin: 0;
  padding-left: 22px;
}
.sheet.lh ol li {
  padding-left: 4px;
}
.sheet.lh .wc {
  font-weight: 600;
}
.sheet.lh .wc .k {
  position: absolute;
  font-size: 13.4px;
}
.sheet.lh .wc .v {
  position: absolute;
  font-size: 14.6px;
  line-height: 18px;
}
.sheet.lh .hd {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 600;
}
.sheet.lh .sp {
  position: absolute;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
}
.sheet.lh .sp b {
  font-weight: 700;
}
.sheet.lh .ltr {
  left: 85px;
  top: 78px;
  width: 640px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
}
.sheet.lh .ltr p {
  margin: 0 0 20px;
}
.sheet.lh .vfl {
  margin: 0;
  padding-left: 25px;
  font-size: 14.6px;
  line-height: 24px;
}
.sheet.lh .vfl li {
  margin-bottom: 9px;
  padding-left: 1px;
}
.sheet.lh .vfl b {
  font-weight: 700;
}
/* ---------- Net metering agreement (A4, plain) ---------- */
.sheet.nm {
  font-family: "AR", Arial, sans-serif;
  color: #111;
}
.sheet.nm .ar {
  font-family: "AR", Arial, sans-serif;
  font-size: 14.6px;
  line-height: 22px;
}
.sheet.nm .os {
  font-family: "OS", sans-serif;
  font-size: 14.4px;
  line-height: 22px;
}
.sheet.nm p {
  margin: 0;
}
.sheet.nm .j {
  text-align: justify;
}
.sheet.nm ol {
  margin: 0;
  padding-left: 27px;
}
.sheet.nm ol li {
  padding-left: 3px;
}
.sheet.nm s {
  text-decoration: line-through;
  text-decoration-thickness: 1.4px;
}
.sheet.nm .fv {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
}
.sheet.nm .fv em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
/* ---------- The form sheet: always paper white, independent of theme ---------- */
.sheet {
  position: relative;
  width: 1241px;
  height: 1755px;
  background: #ffffff;
  color: #111111;
  font-family: "OS", "ML", sans-serif;
  overflow: hidden;
}
.sheet .a {
  position: absolute;
}
.sheet .logo1 {
  left: 107px;
  top: 51px;
  width: 200px;
}
.sheet .kseb {
  left: 951px;
  top: 53px;
  width: 149px;
}
.sheet .annex {
  left: 951px;
  top: 124px;
  width: 151px;
  text-align: center;
  font-family: "ML", sans-serif;
  font-size: 17px;
  border-bottom: 1.4px solid #333;
  padding-bottom: 5px;
}
.sheet .title {
  left: 0;
  right: 0;
  text-align: center;
  font-family: "ML", sans-serif;
  font-weight: 700;
  font-size: 23px;
}
.sheet .title span {
  display: inline-block;
  border-bottom: 1.4px solid #333;
  padding: 0 5px 4px;
}
.sheet .sub {
  left: 0;
  right: 0;
  text-align: center;
  font-family: "ML", sans-serif;
  font-size: 16.5px;
  line-height: 32px;
}
.sheet table {
  position: absolute;
  border-collapse: collapse;
  table-layout: fixed;
}
.sheet td {
  border: 1.4px solid #333;
  vertical-align: middle;
  font-family: "ML", sans-serif;
  font-size: 20px;
  line-height: 28px;
}
.sheet td.n {
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
}
.sheet td.d {
  padding: 5px 13px;
}
.sheet td.v {
  text-align: center;
  font-family: "OS", sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 30px;
  padding: 5px 10px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.sheet .place {
  font-family: "ML", sans-serif;
  font-size: 18.5px;
  line-height: 33px;
}
.sheet .place b {
  font-family: "OS", sans-serif;
  font-weight: 700;
}
.sheet .siglbl {
  font-family: "ML", sans-serif;
  font-size: 18.5px;
}
.sheet .dash {
  border-top: 2px dashed #333;
}
.sheet .rtitle {
  left: 0;
  right: 0;
  text-align: center;
  font-family: "ML", sans-serif;
  font-weight: 700;
  font-size: 20px;
}
.sheet .rsub {
  font-family: "ML", sans-serif;
  font-size: 17.5px;
}
.sheet .rf {
  display: flex;
  align-items: flex-end;
  font-family: "ML", sans-serif;
  font-size: 18px;
  white-space: nowrap;
}
.sheet .rf span {
  flex: none;
}
.sheet .rf i {
  display: block;
  flex: 1;
  border-bottom: 2px dotted #444;
  height: 1px;
  margin: 0 0 6px 6px;
}
