:root {
  color-scheme: light;
  --bg: #eef3ee;
  --surface: #ffffff;
  --surface-2: #f6f8f4;
  --ink: #111713;
  --muted: #637068;
  --line: #dbe3dc;
  --teal: #0f6b5f;
  --teal-dark: #0a4f47;
  --amber: #e1ae32;
  --rust: #d65a38;
  --mint: #dff1e7;
  --focus: #222d29;
  --shadow: 0 18px 50px rgba(18, 31, 23, 0.18);
  --nav-bg: #f7f9f6;
  --radius: 8px;
  --nav-h: 76px;
  --safe-bottom: env(safe-area-inset-bottom);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111815;
  --surface: #18211d;
  --surface-2: #202b26;
  --ink: #edf4ef;
  --muted: #9eb0a6;
  --line: #2d3b34;
  --teal: #55c7b6;
  --teal-dark: #b7efe5;
  --amber: #f0bf48;
  --rust: #f37a55;
  --mint: #15362f;
  --focus: #edf4ef;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --nav-bg: #111815;
}

* {
  box-sizing: border-box;
}

html,
body {
  background-color: var(--bg);
  height: 100%;
  height: -webkit-fill-available;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: none;
  overflow-x: hidden;
  touch-action: pan-y;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(225, 174, 50, 0.18), transparent 26rem),
    linear-gradient(145deg, #e5eee7, #f7f9f6 45%, #dfe9e3);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% 8%, rgba(85, 199, 182, 0.16), transparent 24rem),
    linear-gradient(145deg, #0b100e, #121a16 45%, #1c2722);
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 16px;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input,
select,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

.app-shell {
  width: min(100%, 440px);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-width: 100vw;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  background: rgba(238, 243, 238, 0.92);
  border-bottom: 1px solid rgba(219, 227, 220, 0.9);
  backdrop-filter: blur(18px);
}

.topbar > div {
  min-width: 0;
  flex: 1 1 auto;
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .bottom-nav {
  background: var(--nav-bg);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--teal);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.58rem;
  line-height: 1.05;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.2;
}

.icon-button,
.nav-button,
.seg,
.primary,
.secondary {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 0;
  line-height: 1;
}

svg {
  display: block;
}

.icon-button svg,
.nav-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#headerSettingsButton svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: none;
}

.screens {
  min-height: calc(100vh - var(--nav-h));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(var(--nav-h) + var(--safe-bottom) + 32px);
}

.screen {
  display: none;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.screen.active {
  display: grid;
}

.metric-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
}

.metric-band > div,
.result-card,
.tool-panel,
.mini-result,
.room-item,
.capacity-row {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}

.metric-band > div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  overflow: hidden;
}

.metric-band strong {
  font-size: 1.42rem;
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
}

.result-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tool-panel {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.panel-heading .segmented {
  flex: 1 1 100%;
}

.compact-heading {
  justify-content: flex-start;
}

.home-hero {
  background: linear-gradient(135deg, var(--surface), var(--mint));
}

.home-current {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.home-current strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.home-current p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-card {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  padding: 13px;
  text-align: left;
  cursor: pointer;
}

.home-card svg {
  width: 30px;
  height: 30px;
  color: var(--teal);
  fill: currentColor;
}

.home-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.home-card span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.quick-tool-row .home-card {
  min-height: 112px;
  padding: 11px;
}

.quick-tool-row .home-card svg {
  width: 26px;
  height: 26px;
}

.tool-category {
  display: grid;
  gap: 8px;
}

.tool-list {
  display: grid;
  gap: 8px;
}

.tool-link {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
}

.tool-link strong {
  font-size: 0.92rem;
  line-height: 1.15;
}

.tool-link span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bend-mode-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: var(--radius);
}

.bend-mode-tabs .seg {
  border-radius: 6px;
}

.seg {
  min-height: 32px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.seg.active {
  background: var(--teal);
  color: #fff;
}

.grid-2,
.grid-3,
.switch-grid,
.result-grid {
  display: grid;
  gap: 10px;
}

.grid-2,
.switch-grid,
.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.single-field {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

label,
.mini-result span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
}

input,
input[type="search"],
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  box-shadow: 0 0 0 3px rgba(15, 107, 95, 0.22);
  border-color: var(--teal);
}

textarea {
  resize: vertical;
  min-height: 86px;
  padding: 11px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--teal) 50%),
    linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.switch-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.switch-row input {
  width: 46px;
  min-height: 28px;
  height: 28px;
  appearance: none;
  border-radius: 999px;
  padding: 0;
  background: #cbd5ce;
  position: relative;
  transition: background 0.16s ease;
}

.switch-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease;
}

.switch-row input:checked {
  background: var(--teal);
}

.switch-row input:checked::after {
  transform: translateX(18px);
}

.result-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
  background: var(--mint);
}

.result-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.14rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.heat-result {
  background: linear-gradient(135deg, #dff1e7, #fff7dc);
}

:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .heat-result {
  background: linear-gradient(135deg, #17362f, #2d2615);
  color: var(--ink);
}

:root[data-theme="dark"] .result-card .metric-label,
:root[data-theme="dark"] .result-card .result-subtext {
  color: #c2d2ca;
}

:root[data-theme="dark"] .result-card strong,
:root[data-theme="dark"] .mini-result strong {
  color: #ffffff;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.actions.single {
  grid-template-columns: 1fr;
}

.primary,
.secondary {
  min-height: 48px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 850;
}

.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.primary {
  background: var(--teal);
  color: #fff;
}

.secondary {
  background: #fff;
  color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--line);
}

:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .icon-button {
  background: var(--surface-2);
}

.danger-button {
  width: 100%;
  color: var(--rust);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff2ca;
  color: #73510b;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.pill[data-velocity="high"],
.pill[data-flow="moderate"] {
  background: #ffe6c2;
  color: #7a4400;
}

.pill[data-velocity="very-high"],
.pill[data-flow="high"] {
  background: #ffe0d8;
  color: #913015;
}

.pill[data-flow="efficient"] {
  background: var(--mint);
  color: var(--teal-dark);
}

.room-list,
.job-list,
.capacity-list {
  display: grid;
  gap: 8px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.tool-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.bender-settings {
  display: grid;
  gap: 10px;
}

.job-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.job-tabs::-webkit-scrollbar {
  display: none;
}

.job-tabs .seg {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.bender-size-card {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.custom-bender-fields {
  display: grid;
  gap: 10px;
}

.measure-list-panel {
  display: grid;
  gap: 10px;
}

.measure-list {
  display: grid;
  gap: 8px;
}

.measure-item {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.measure-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.measure-title {
  min-width: 0;
  font-weight: 850;
  font-size: 0.88rem;
}

.info-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.info-field input {
  grid-column: 1 / -1;
}

.info-button {
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
  font-weight: 900;
  background: var(--surface);
}

.section-help-button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 900;
  background: var(--surface-2);
  color: var(--teal-dark);
}

.room-item,
.job-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.room-item h3,
.job-item h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  line-height: 1.2;
}

.room-item p,
.job-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.job-item {
  text-align: left;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

.job-item.active {
  border-color: var(--teal);
  background: var(--mint);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.job-address {
  display: block;
  margin-top: 5px;
}

.room-actions {
  display: flex;
  gap: 6px;
}

.small-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--teal);
  cursor: pointer;
}

.small-icon.danger {
  color: var(--rust);
}

.small-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.hidden {
  display: none !important;
}

.bend-diagram {
  width: 100%;
  min-height: 170px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(15, 107, 95, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 107, 95, 0.09) 1px, transparent 1px),
    #fbfdf9;
  background-size: 30px 30px;
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .bend-diagram,
:root[data-theme="dark"] .report-preview {
  background-color: #111815;
}

.bend-diagram path.pipe {
  fill: none;
  stroke: var(--teal);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bend-diagram path.line {
  fill: none;
  stroke: var(--rust);
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.bend-diagram .obstacle {
  fill: rgba(17, 23, 19, 0.18);
  stroke: var(--rust);
  stroke-width: 2;
}

.bend-diagram text {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.bend-diagram .muted {
  fill: var(--muted);
  font-size: 12px;
}

.mini-result {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  overflow: hidden;
}

.mini-result strong {
  font-size: 1.08rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.capacity-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.capacity-row span,
.capacity-row strong {
  font-size: 0.83rem;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7e0;
}

.bar > i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--rust));
}

.report-preview {
  min-height: 230px;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdf9;
  padding: 12px;
  color: #25302a;
  font-size: 0.82rem;
  line-height: 1.45;
}

:root[data-theme="dark"] .report-preview {
  color: var(--ink);
}

.report-sheet {
  display: grid;
  gap: 12px;
}

.report-sheet h3,
.report-sheet h4,
.report-sheet p {
  margin: 0;
}

.report-sheet h3 {
  font-size: 1.05rem;
}

.report-sheet h4 {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--teal-dark);
}

.report-line,
.record-card {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.record-card {
  display: grid;
  gap: 8px;
}

.gas-record-grid {
  display: grid;
  gap: 10px;
}

.record-group {
  display: grid;
  gap: 8px;
}

.compact-record p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.stopwatch-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--mint), var(--surface));
}

.stopwatch-card strong {
  display: block;
  margin-top: 3px;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--teal-dark);
}

:root[data-theme="dark"] .stopwatch-card {
  background: linear-gradient(135deg, #17362f, var(--surface-2));
}

:root[data-theme="dark"] .stopwatch-card strong {
  color: #ffffff;
}

.record-card img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.7fr;
  gap: 8px;
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .bottom-nav,
  .toast,
  .help-sheet,
  .screen:not(#jobScreen) {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    background: #fff;
  }

  .screens {
    padding: 0;
  }

  #jobScreen {
    display: block;
  }

  #jobScreen > .tool-panel:not(:last-child) {
    display: none;
  }

  #jobScreen > [data-job-section="report"] {
    display: grid !important;
  }

  .report-preview {
    max-height: none;
    border: 0;
    color: #111;
    background: #fff;
  }
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 440px);
  transform: translate3d(-50%, 0, 0);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  min-height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: var(--nav-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  will-change: transform;
  contain: layout paint;
}

.nav-button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
}

.nav-button.active {
  background: var(--mint);
  color: var(--teal-dark);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  z-index: 30;
  width: min(88vw, 360px);
  min-height: 42px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--focus);
  color: var(--surface);
  font-size: 0.9rem;
  font-weight: 760;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.help-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  align-items: end;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}

.help-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 23, 19, 0.42);
}

.help-card {
  position: relative;
  z-index: 1;
  width: min(100%, 416px);
  max-height: min(82svh, 620px);
  margin: 0 auto;
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.help-copy {
  display: grid;
  gap: 9px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.help-copy p {
  margin: 0;
}

.help-copy ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.workflow-card {
  display: grid;
  gap: 13px;
  width: 100%;
}

.workflow-step {
  display: none;
  gap: 12px;
}

.workflow-step.active {
  display: grid;
}

@media (max-width: 430px) {
  .screens {
    padding-left: 10px;
    padding-right: 10px;
  }

  .tool-panel {
    padding: 12px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .seg {
    padding: 0 7px;
  }
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100svh - 48px);
    border-radius: 30px;
    border: 8px solid #111713;
  }

  .bottom-nav {
    bottom: 32px;
    border-radius: 0 0 22px 22px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    max-width: none;
    box-shadow: none;
  }

  .topbar,
  .bottom-nav,
  .toast,
  .screens .screen:not(#jobScreen),
  .actions {
    display: none !important;
  }

  .screens {
    padding: 0;
  }

  .screen,
  .screen.active {
    display: block;
  }

  .tool-panel {
    border: 0;
    padding: 0;
  }
}
/* LDM web edition */
@font-face{font-family:Manrope;src:url('/assets/manrope.woff2') format('woff2');font-display:swap}:root{--bg:#f7f6f1;--surface:#fff;--surface-2:#f5f4ed;--ink:#202621;--muted:#6d7369;--line:#dedfd6;--teal:#8c7037;--teal-dark:#202b22;--amber:#c4a15a;--mint:#f1ecdd;--shadow:none;--nav-bg:#fff;--radius:6px;font-family:Manrope,system-ui,sans-serif}body{background:#f7f6f1;user-select:text;-webkit-user-select:text;overscroll-behavior-y:auto}.app-shell{width:min(100%,1180px);box-shadow:none;background:transparent}.hf-sitebar{padding:18px 26px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px}.hf-sitebar img{width:145px;background:#202421;padding:8px}.hf-sitebar nav{display:flex;gap:20px;font-size:12px;flex-wrap:wrap}.hf-sitebar a{color:var(--ink);text-decoration:none}.topbar{background:var(--surface);backdrop-filter:none;padding:22px 26px;position:relative}.topbar .eyebrow{color:#8c7037;letter-spacing:.2em}.topbar h1{font-size:30px;letter-spacing:-.05em}.screens{padding:24px 26px 115px}.tool-panel{border:1px solid var(--line);box-shadow:none;padding:24px;border-radius:6px}.home-hero{background:#202b22;color:#fff;border:0;padding:35px}.home-hero h2,.home-hero p,.home-hero .metric-label,.home-hero strong{color:#fff}.pill{background:#efe7d4;color:#685025}.primary{background:#c4a15a;border-color:#c4a15a;color:#202621}.home-card{background:#fff;border:1px solid var(--line);border-radius:5px;padding:25px 16px}.home-card svg{color:#8c7037}.bottom-nav{width:min(calc(100% - 52px),1128px);max-width:none;left:50%;transform:translateX(-50%);bottom:16px;border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 35px #0001;background:var(--surface)}input,select,textarea{min-width:0;max-width:100%;font:inherit}button{font-family:inherit}.hf-portal{max-width:1050px;margin:55px auto;padding:0 26px 80px}.hf-portal h1{font-size:clamp(36px,6vw,62px);letter-spacing:-.05em;line-height:1.1}.hf-portal p{color:var(--muted);line-height:1.8}.hf-portal .intro{max-width:660px;margin:20px 0 34px}.hf-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.hf-card{background:#fff;border:1px solid var(--line);padding:28px;border-radius:6px}.hf-card h2{font-size:23px;letter-spacing:-.04em}.hf-card p{font-size:14px}.hf-card ul{padding-left:18px;line-height:2;font-size:13px}.hf-button{display:inline-flex;background:#c4a15a;color:#202621!important;border:0;padding:15px 23px;text-decoration:none;font-size:13px;font-weight:800;border-radius:3px;cursor:pointer;margin:12px 0}.hf-secondary{background:#202b22;color:white!important}.hf-form{display:grid;gap:14px;max-width:600px}.hf-form input,.hf-form select{display:block;width:100%;padding:13px;border:1px solid var(--line);background:white;color:var(--ink);margin-top:7px}.hf-form label{font-size:13px}.hf-status{background:#eee8d8;padding:15px 20px;border-left:3px solid #c4a15a;margin:20px 0}.hf-table{overflow:auto;margin:24px 0}.hf-table table{width:100%;border-collapse:collapse;font-size:13px}.hf-table th,.hf-table td{text-align:left;padding:15px;border-bottom:1px solid var(--line)}.hf-card a{color:#8c7037}.hf-portal a:focus-visible{outline:3px solid #8c7037;outline-offset:4px}
@media(min-width:900px){.screen.active{max-width:100%}.quick-tool-row{grid-template-columns:repeat(3,minmax(0,1fr))}.bottom-nav{display:flex;justify-content:center;gap:40px}.bottom-nav .nav-button{max-width:160px;flex:1}.home-current{padding-top:12px}.home-current strong{font-size:28px}}
@media(max-width:700px){.hf-sitebar{padding:14px 18px;gap:12px}.hf-sitebar img{width:115px}.hf-sitebar nav{gap:12px;font-size:11px}.topbar{padding:18px}.screens{padding:18px 16px 110px}.tool-panel{padding:18px}.hf-cards{grid-template-columns:1fr}.hf-portal{margin:35px auto;padding:0 20px 65px}.hf-card{padding:24px}.bottom-nav{width:calc(100% - 24px);bottom:10px}.hf-sitebar nav a:first-child{display:none}}
@media print{.hf-sitebar{display:none!important}.app-shell{width:100%;margin:0}.screens{padding:0}.hf-portal{display:none}}
body{padding:0}.app-shell{border:0;border-radius:0;min-height:100vh}.tool-category h3{color:#8c7037;font-size:13px;text-transform:uppercase;letter-spacing:.13em;margin-bottom:16px}.tool-link{padding:17px 18px;transition:border-color .15s,background .15s}.tool-link:hover{border-color:#c4a15a;background:#f1edde}@media(min-width:900px){#toolsScreen>.tool-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}#toolsScreen>.tool-panel>.panel-heading{grid-column:1/-1;margin-bottom:0}.tool-category{margin-top:0}}
html,body,.app-shell{touch-action:pan-y pinch-zoom}
#toolsScreen .tool-category{display:block;align-self:start}#toolsScreen .tool-list{align-content:start}@media(min-width:900px){#toolsScreen>.tool-panel{align-items:start}}
