:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #24323d;
  background: #edf0f2;
  font-synthesis: none;
  --primary: #b64a1d;
  --primary-hover: #963b17;
  --dark: #18232b;
  --ink: #24323d;
  --steel: #405b6e;
  --muted: #5c6d7a;
  --border: #d4dce2;
  --paper: #fff;
  --accent: #ffac70;
  --surface: #f6f8fa;
  --signal-soft: #fff0e5;
  --drawing-grid: #dfe6eb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
button {
  border: 0;
}
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.sidebar {
  width: 250px;
  position: fixed;
  inset: 0 auto 0 0;
  background: linear-gradient(180deg, #1c2a35, #141e26);
  color: #e3eaf0;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 0;
  z-index: 10;
  border-right: 1px solid #31414d;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  letter-spacing: -0.7px;
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 42px;
  background: var(--primary);
  border-radius: 6px;
  color: #fff;
}
.brand-mark .icon {
  width: 28px;
  height: 28px;
}
.brand-light {
  font-weight: 400;
  color: #c6d0d7;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #9bafbd;
  margin-top: 6px;
}
.sidebar nav {
  margin-top: 32px;
}

nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 14px 12px;
  background: transparent;
  border-radius: 5px;
  font-size: 12px;
  color: #c0cbd3;
  width: 100%;
  white-space: nowrap;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  background: #2c3d4a;
}
.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 var(--accent);
}
.nav-item b {
  font-size: 11px;
  border-radius: 4px;
  background: #334653;
  padding: 3px 5px;
  margin-left: auto;
  color: #dae3e9;
}
.nav-item.active b {
  background: #ffffff24;
  color: #fff;
}
.sidebar-note {
  margin: 40px 8px 22px;
  padding: 19px 14px;
  background: linear-gradient(140deg, #2b3b47, #1d2c36);
  border: 1px solid #425561;
  border-radius: 6px;
  border-top: 2px solid #cf6938;
}
.note-symbol {
  background: #b64a1d26;
  color: var(--accent);
  border-radius: 4px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.sidebar-note strong {
  font-size: 12px;
  font-weight: 500;
}
.sidebar-note p {
  color: #b2c0ca;
  font-size: 11px;
  line-height: 1.8;
  margin: 9px 0 17px;
}
.sidebar-note button {
  font-size: 11px;
  color: var(--accent);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.sidebar-note button .icon {
  width: 14px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-bottom: 20px;
}
.sidebar-bottom > button {
  display: flex;
  gap: 11px;
  width: 100%;
  background: transparent;
  text-align: left;
  color: #b3c1ca;
  padding: 12px 10px;
  font-size: 11px;
}
.sidebar-bottom > button:hover {
  color: white;
}
.sidebar-bottom > button .icon {
  width: 17px;
  height: 17px;
}

main {
  margin-left: 250px;
  min-height: 100vh;
}
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 39px;
  gap: 15px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}
.breadcrumb .icon {
  width: 12px;
  height: 12px;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 22px;
}
.local-badge {
  font-size: 11px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #356448;
}
.local-badge.save-error {
  color: #a34433;
}
.local-badge.save-error i {
  background: #a34433;
}
.local-badge i,
.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: #38845a;
  border-radius: 50%;
}
.top-date {
  font-size: 11px;
  color: #879087;
}
.icon-button {
  background: transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
}
.icon-button:hover {
  background: #eaedf0;
  color: var(--primary);
}
.page {
  padding: 34px 39px 0;
  max-width: 1620px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--steel);
  font-weight: 600;
  margin-bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 1.25;
  font-family: 'Bahnschrift', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 39px;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  transform: translateY(-1px);
}
.button .icon {
  width: 16px;
  height: 16px;
}
.primary {
  background: var(--primary);
  color: #fff;
}
.primary:hover {
  background: var(--primary-hover);
}
.dark {
  background: #2b4050;
  color: #fff;
}
.dark:hover {
  background: #1c2e3b;
}
.secondary {
  background: #fff;
  border-color: #cbd5dd;
  color: #334b5d;
}
.secondary:hover {
  background: #edf2f5;
}
.button-group {
  display: flex;
  align-items: center;
  gap: 9px;
}
.full {
  width: 100%;
}
.hero {
  display: flex;
  background: #223340;
  border: 1px solid #344c5d;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 23px;
  min-height: 300px;
  color: #f3f6f8;
}
.hero-copy {
  width: 53%;
  padding: 32px;
  position: relative;
  z-index: 1;
}
.tag {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.tag:before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
}
.hero h2 {
  font-size: clamp(28px, 2.6vw, 38px);
  letter-spacing: -0.9px;
  line-height: 1.22;
  font-weight: 650;
  margin: 14px 0 13px;
}
.hero h2 span {
  color: var(--accent);
}
.hero p {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.7;
  color: #c0cdd6;
  margin-bottom: 20px;
}
.hero .button {
  font-size: 12px;
  min-height: 42px;
  background: var(--primary);
}
.hero .button:hover {
  background: var(--primary-hover);
}
input[type='checkbox'] {
  accent-color: var(--primary);
}
.hero-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 19px;
  font-size: 11px;
  color: #afc1cd;
}
.hero-foot .icon {
  width: 12px;
  height: 12px;
}
.hero-foot > span {
  margin: 0 7px;
}
.hero-visual {
  width: 47%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at center, #3f5a6c55 0, transparent 75%);
}
.roof-art {
  width: 100%;
  max-width: 470px;
  overflow: visible;
  mix-blend-mode: normal;
}
.drawing-label {
  color: #b1c4d1;
  font-size: 10px;
  letter-spacing: 1.4px;
  position: absolute;
  bottom: 21px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 31px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 18px 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 2px 0 #1b314509;
}
.stat-icon {
  width: 41px;
  height: 41px;
  background: #eaf0f4;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: var(--steel);
}
.stat small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}
.stat strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.stat em {
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 8px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 15px;
  letter-spacing: -0.35px;
  font-weight: 600;
  margin: 0;
}
.section-heading > span {
  color: var(--muted);
  font-size: 11px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 31px;
}
.module-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 21px;
  text-align: left;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
  box-shadow: 0 2px 0 #1b314509;
  border-top: 3px solid #90a3b0;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: #bf5d2e;
  box-shadow: 0 8px 24px #1b314514;
}
.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}
.module-icon {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}
.module-icon .icon {
  width: 23px;
  height: 23px;
}
.mint {
  background: #e8eff4;
  color: #405f73;
}
.peach {
  background: var(--signal-soft);
  color: #a74a23;
}
.lavender {
  background: #edf0f3;
  color: #526473;
}
.module-number {
  font-size: 11px;
  color: #526c7d;
  font-family: monospace;
  align-self: flex-start;
  padding-top: 5px;
}
.module-card h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.25px;
  margin-bottom: 10px;
}
.module-card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  min-height: 37px;
  margin-bottom: 19px;
  max-width: 260px;
}
.module-bottom {
  border-top: 1px solid #edeff1;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #516579;
  font-size: 11px;
  font-weight: 550;
}
.module-bottom .icon {
  width: 16px;
  height: 16px;
}
.recent {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
}
.recent > .section-heading {
  padding: 21px 22px;
  margin: 0;
  border-bottom: 1px solid #eaecef;
}
.count {
  margin-left: 6px;
  font-size: 11px;
  color: var(--muted);
  background: #e9ecef;
  border-radius: 4px;
  padding: 3px 5px;
  vertical-align: middle;
}
.text-button {
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  cursor: pointer;
}
.text-button:hover {
  color: var(--primary);
}
.text-button .icon {
  width: 14px;
  height: 14px;
}
.empty-inline {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 27px 24px;
}
.empty-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: #f0f2f4;
  border-radius: 8px;
  color: var(--muted);
}
.empty-inline strong {
  font-size: 11px;
  font-weight: 500;
}
.empty-inline p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.empty-inline .button {
  margin-left: auto;
  font-size: 11px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 27px;
  padding: 0 0 23px;
  font-size: 11px;
  color: var(--muted);
}
.page-footer span span {
  margin: 0 7px;
}
.page-footer .icon {
  width: 12px;
  height: 12px;
}
.draft-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ebeef0;
  border: 1px solid #dbdfe3;
  padding: 12px 17px;
  border-radius: 7px;
  margin-top: 17px;
  font-size: 11px;
  color: var(--muted);
}
.draft-banner .text-button {
  margin-left: auto;
}
.draft-banner .icon {
  width: 15px;
  height: 15px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 11px;
}
th {
  background: #f9fafa;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 13px 20px;
  white-space: nowrap;
}
td {
  padding: 15px 20px;
  border-top: 1px solid #eaecef;
  font-size: 11px;
}
td strong {
  font-weight: 550;
}
.table-scroll {
  overflow: auto;
}
.project-link {
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  text-align: left;
  padding: 0;
}
.project-link strong {
  display: block;
  color: #384553;
  font-size: 11px;
}
.project-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.project-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #ebeef0;
  color: var(--muted);
  border-radius: 6px;
}
.project-icon .icon {
  width: 17px;
  height: 17px;
}
.source-badge {
  font-size: 11px;
  border: 1px solid #e0e3e7;
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--muted);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
.danger {
  color: #b27562;
}
.danger:hover {
  color: #a34433;
}
.compact h1 {
  font-size: 25px;
}
.compact {
  margin-bottom: 24px;
}
.editor-page {
  max-width: 1900px;
  padding: 27px 26px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 255px minmax(260px, 1fr) 240px;
  gap: 18px;
  align-items: start;
}
.editor-controls,
.canvas-card,
.schedule-card,
.results-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.editor-controls {
  max-height: calc(100vh - 235px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0d6db transparent;
}
.control-section {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}
.control-section:last-child {
  border: 0;
}
.control-section h3 {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  font-weight: 600;
}
.control-section h3 > span {
  font-size: 11px;
  background: #eaedf0;
  padding: 4px 5px;
  color: var(--muted);
  border-radius: 4px;
  font-family: monospace;
}
.control-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.control-title h3 {
  margin: 0;
}
.field {
  display: block;
  margin-bottom: 13px;
}
.field > span {
  display: block;
  font-size: 11px;
  color: #4a5e6e;
  margin-bottom: 7px;
  font-weight: 550;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #dce0e4;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
  border-color: #bdcbd5;
}
.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #b64a1d15;
}
.input-wrap input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  padding: 10px;
  font-size: 12px;
  color: var(--ink);
}
.input-wrap input:focus-visible {
  outline: none;
}
.input-wrap > span {
  color: var(--muted);
  font-size: 11px;
  padding-right: 10px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field select {
  background: #fff;
  border: 1px solid #dce0e4;
  border-radius: 5px;
  width: 100%;
  padding: 10px;
  font-size: 12px;
  color: var(--ink);
  border-color: #bdcbd5;
}
.profile-disclaimer {
  background: #fff7ed;
  border: 1px solid #eee8d5;
  padding: 10px;
  border-radius: 6px;
  color: #785231;
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 15px;
  border-color: #e9d0b6;
}
.profile-disclaimer .icon {
  width: 13px;
  height: 13px;
  float: left;
  margin: 2px 5px 0 0;
}
.plane-tabs {
  display: grid;
  gap: 5px;
  margin: 0 0 17px;
}
.plane-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 9px;
  background: #f5f6f7;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
}
.plane-tab.selected {
  border-color: #cf774d;
  background: var(--signal-soft);
}
.plane-tab {
  border-left: 3px solid var(--plane-color, var(--border));
}
.plane-tab.selected {
  border-left-color: var(--plane-color, var(--primary));
}
.plane-color-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 3px;
  background: var(--plane-color);
  border: 1px solid #0002;
  vertical-align: middle;
  margin-right: 7px;
}
.plane-tab > span {
  font-size: 11px;
  color: var(--plane-color, var(--muted));
}
.plane-tab > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.plane-tab small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.plane-tab > .icon {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--muted);
}
.segmented {
  display: flex;
  gap: 3px;
  background: #e9ecef;
  border-radius: 5px;
  padding: 3px;
}
.segmented button {
  background: transparent;
  border-radius: 3px;
  color: var(--muted);
  padding: 8px 10px;
  flex: 1;
  font-size: 11px;
  white-space: nowrap;
}
.segmented button.active {
  background: #334c5e;
  color: #fff;
  box-shadow: 0 1px 4px #2e394412;
}
.canvas-toolbar {
  min-height: 50px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.canvas-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.canvas-toolbar strong {
  font-size: 11px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 7px;
}
.subtle-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-left: 4px;
}
.canvas-content {
  height: 370px;
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface);
  background-image:
    linear-gradient(#dfe6eb66 1px, transparent 1px),
    linear-gradient(90deg, #dfe6eb66 1px, transparent 1px);
  background-size: 24px 24px;
}
.roof-svg {
  width: 100%;
  height: 100%;
  max-height: 420px;
}
.canvas-legend {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  font-size: 11px;
  color: #4b6476;
  padding: 12px 17px;
  border-top: 1px solid var(--border);
}
.canvas-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.canvas-legend > span:last-child {
  margin-left: auto;
}
.shape-metrics {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 17px;
  border-top: 1px solid var(--border);
  color: var(--steel);
  font-size: 12px;
}
.shape-metrics[hidden] {
  display: none;
}
.shape-metrics strong {
  color: var(--ink);
  white-space: nowrap;
}
.legend-fill {
  width: 9px;
  height: 9px;
  background: #bdcbd6;
  border-radius: 2px;
}
.legend-line {
  width: 14px;
  height: 2px;
  background: var(--steel);
  display: inline-block;
}
.calculation-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 13px 3px 18px;
}
.calculation-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}
.schedule-card .section-heading {
  padding: 18px;
  margin: 0;
}
.schedule-card .section-heading h2 {
  font-size: 12px;
}
.schedule-card .section-heading > span {
  font-size: 11px;
}
.schedule-card th,
.schedule-card td {
  padding: 12px 15px;
}
.schedule-card tfoot {
  background: #edf0f2;
  font-weight: 600;
}
.helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.schedule-note {
  margin: 12px 15px;
}
.results-heading {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 20px 17px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.results-heading .icon {
  width: 17px;
  height: 17px;
}
.results-heading > span {
  font-size: 10px;
  color: #465f72;
  letter-spacing: 0.6px;
  margin: 3px 0 0 24px;
}
.primary-result {
  padding: 24px 18px 20px;
  background: #243947;
  border-bottom: 3px solid #d76a34;
  color: #fff;
}
.primary-result > small {
  font-size: 11px;
  color: #d0dde5;
}
.primary-result > strong {
  display: block;
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 8px 0;
}
.primary-result > strong span {
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
}
.result-caption {
  font-size: 11px;
  color: #beced9;
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #eef0f2;
  font-size: 11px;
  gap: 8px;
}
.result-row > span {
  color: var(--muted);
}
.result-row strong {
  font-weight: 550;
  white-space: nowrap;
}
.waste-result {
  margin: 18px;
  padding: 13px 12px;
  background: #faf6ef;
  border: 1px solid #f1e8d7;
  border-radius: 6px;
}
.waste-result > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #a18b68;
  align-items: center;
  gap: 5px;
}
.waste-result strong {
  font-size: 15px;
  font-weight: 500;
}
.waste-track {
  height: 4px;
  background: #eee6d7;
  border-radius: 5px;
  margin: 12px 0 9px;
  overflow: hidden;
}
.waste-track i {
  display: block;
  background: #caa16d;
  height: 100%;
  border-radius: 5px;
}
.waste-result small {
  font-size: 11px;
  color: #b3a186;
}
.current-plane-summary {
  margin: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.current-plane-summary small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
.current-plane-summary strong {
  display: block;
  font-size: 11px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.current-plane-summary > span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.results-bottom {
  border-top: 1px solid var(--border);
  padding: 15px 17px;
}
.results-bottom p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 16px;
}
.results-bottom p .icon {
  width: 12px;
  height: 12px;
  float: left;
  margin: 2px 5px 0 0;
}
.results-bottom .button {
  font-size: 11px;
  margin-bottom: 9px;
}
.results-bottom .button:last-child {
  margin: 0;
}
.validation-message {
  text-align: center;
  max-width: 300px;
  padding: 20px;
  color: #a58e65;
}
.validation-message > .icon {
  width: 35px;
  height: 35px;
  margin-bottom: 14px;
}
.validation-message strong {
  display: block;
  font-size: 16px;
}
.validation-message p {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 12px;
}
.error-text {
  padding: 20px;
  font-size: 11px;
  line-height: 1.7;
  color: #ae7762;
}
.history-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.search-input {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  padding: 10px 13px;
  gap: 10px;
  border-radius: 6px;
  min-width: 200px;
  max-width: 360px;
  flex: 1;
}
.search-input .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-input input {
  border: 0;
  outline: none;
  width: 100%;
  font-size: 11px;
  background: transparent;
  color: #495b6d;
}
.search-input:focus-within {
  outline: 2px solid #9fafbf;
}
.search-input input::placeholder {
  color: var(--muted);
}
.history-toolbar > .muted {
  font-size: 11px;
}
.history-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.empty-state {
  text-align: center;
  padding: 75px 20px;
}
.empty-state > .icon {
  width: 40px;
  height: 40px;
  color: var(--muted);
  margin-bottom: 20px;
}
.empty-state h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 500;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.local-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.local-notice .icon {
  width: 15px;
  height: 15px;
}
.image-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 25px;
  margin-bottom: 30px;
  align-items: start;
}
.image-preview-rail {
  min-width: 0;
}
.image-instructions {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 22px;
}
.contour-editor {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 20px;
  margin-bottom: 22px;
  min-width: 0;
}
.l-shape-guide {
  display: block;
  width: 100%;
  max-width: 240px;
  height: 165px;
  margin: 0 auto 15px;
}
.quad-orientation {
  margin: 15px 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.quad-orientation summary {
  cursor: pointer;
  font-size: 11px;
  margin-bottom: 15px;
}
.l-shape-shortcut {
  padding: 14px;
  border: 1px solid #c2ccd6;
  background: #edf0f2;
  border-radius: 8px;
  margin-bottom: 16px;
}
.l-shape-shortcut p {
  font-size: 12px;
  margin: 0 0 10px;
}
.contour-editor .section-heading {
  margin-bottom: 14px;
}
.contour-editor h2 {
  font-size: 17px;
  margin: 0;
}
.contour-editor h3 {
  font-size: 14px;
  margin-top: 0;
}
.contour-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.contour-drawing,
.contour-data {
  min-width: 0;
}
.contour-drawing {
  container-type: inline-size;
}
.contour-data {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafa;
}
.contour-data > .button {
  margin: 8px 8px 0 0;
}
.contour-grid-settings {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 12px;
}
.contour-grid-settings > label {
  flex: 1 1 95px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.contour-editor input[type='number'],
.contour-editor select {
  border: 1px solid #d9dee3;
  border-radius: 5px;
  background: white;
  color: #28313b;
  padding: 8px;
  font-size: 12px;
  width: 100%;
  min-width: 75px;
  box-sizing: border-box;
}
.contour-grid-settings .contour-snap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 35px;
}
.contour-stage {
  border: 1px solid #dbdfe3;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  overflow: hidden;
  border-color: #c5d1da;
}
#contour-canvas {
  display: block;
  width: 100%;
  height: 390px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.contour-handle {
  cursor: grab;
  outline: none;
}
.contour-handle:focus > circle:last-of-type {
  stroke: #e3844f;
  fill: #fff1db;
}
.contour-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 5px 7px;
  border: 1px solid #dbdfe3;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #eff1f3;
}
.contour-tool-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.contour-tool-group:empty {
  display: none;
}
.contour-tool-group + .contour-tool-group {
  border-left: 1px solid #d3d8de;
  padding-left: 8px;
}
.contour-tool-group-end {
  margin-left: auto;
}
.contour-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #495b6d;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  transition:
    background 120ms,
    color 120ms;
}
.contour-tool:hover:not(:disabled) {
  background: #dde2e6;
  color: #2d3843;
}
.contour-tool:focus-visible {
  outline: 2px solid #4d6074;
  outline-offset: 1px;
}
.contour-tool:disabled {
  opacity: 0.32;
  cursor: default;
}
.contour-tool-primary {
  background: var(--signal-soft);
  color: #9c411d;
}
.contour-tool-danger {
  color: #a45b47;
}
.contour-tool-danger:hover:not(:disabled) {
  background: #f3e2d8;
  color: #963e2d;
}
.contour-tool-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
@container (max-width: 370px) {
  .contour-tool-label {
    display: none;
  }
}
.contour-gap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #c89b78;
  border-radius: 7px;
  background: #fff8f1;
  font-size: 12px;
}
.contour-status {
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
  background: #edf3f7;
  border-radius: 6px;
  color: #354f61;
}
.contour-status.error-text {
  background: #fbf1e9;
}
.contour-segment-table input[aria-invalid='true'] {
  border-color: #b06a42;
  background: #fff7ef;
}
.contour-segment-table th:first-child {
  width: 55px;
}
.contour-segment-table .text-button {
  white-space: nowrap;
  font-size: 11px;
}
.contour-data th,
.contour-data td {
  padding: 8px 5px;
}
.contour-data .table-scroll {
  margin: 12px 0 16px;
}
.contour-data td label {
  display: flex;
  align-items: center;
  gap: 5px;
}
@media (min-width: 1650px) {
  .contour-body {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  }
}
@media (max-width: 650px) {
  .contour-editor {
    padding: 14px;
  }
  #contour-canvas {
    height: 300px;
  }
  .contour-tool-label {
    display: none;
  }
  .contour-toolbar {
    gap: 5px;
    padding: 4px;
  }
  .contour-tool {
    min-width: 40px;
    height: 40px;
  }
  .contour-tool-group + .contour-tool-group {
    padding-left: 5px;
  }
}
.plan-kind {
  margin-bottom: 24px;
}
.pdf-face-mode {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid #dbdfe3;
  border-bottom: 1px solid #dbdfe3;
}
.pdf-face-mode h3,
.manual-tracing > h3 {
  font-size: 13px;
  margin-bottom: 12px;
}
.plan-kind h3 {
  font-size: 13px;
  margin: 0 0 12px;
}
.plan-kind-options {
  display: grid;
  gap: 10px;
}
.plan-kind-option {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafa;
  text-align: left;
  color: #28313b;
}
.plan-kind-option strong {
  font-size: 12px;
}
.plan-kind-option span {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.plan-kind-option.selected {
  background: var(--signal-soft);
  border-color: var(--primary);
  box-shadow: inset 3px 0 #5b7289;
}
.plan-kind-option:disabled {
  cursor: default;
  opacity: 0.7;
}
.plan-kind-option:disabled.selected {
  opacity: 1;
}
.manual-tracing {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 16px;
}
.manual-tracing summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 14px;
}
.manual-tracing > .button {
  margin: 12px 0 20px;
}
.manual-tracing > .button-group {
  margin: 12px 0;
}
.projection-fields {
  border: 1px solid #dfd7be;
  border-radius: 8px;
  background: #f0f4f7;
  padding: 14px;
  margin: 16px 0;
  border-color: #ccd8e1;
}
.projection-fields > strong {
  font-size: 12px;
}
.history-toolbar .segmented {
  flex-wrap: wrap;
}
.step-item {
  display: flex;
  gap: 12px;
  margin-bottom: 21px;
}
.step-item > span {
  font-size: 11px;
  background: #eef0f3;
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.step-item.active > span {
  background: var(--primary);
  color: #fff;
}
.step-item h3 {
  font-size: 12px;
  margin: 5px 0 8px;
  font-weight: 550;
}
.step-item p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.image-instructions > .button {
  margin-bottom: 22px;
}
.image-instructions > .button-group {
  margin: 12px 0;
}
.image-instructions > .button-group .button {
  flex: 1;
}
.image-status {
  font-size: 11px;
  line-height: 1.8;
  color: #354f61;
  background: #edf3f7;
  padding: 12px;
  border-radius: 6px;
}
.image-warning {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  font-size: 11px;
  line-height: 1.8;
  color: #a29275;
}
.image-warning .icon {
  width: 14px;
  height: 14px;
  float: left;
  margin: 2px 6px 0 0;
}
.image-upload-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.image-workspace {
  background: #f0f2f4;
  min-height: 485px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  transition: background 0.2s;
}
.image-workspace.dragging {
  background: #d7dce0;
}
.legend-used-region {
  display: inline-block;
  width: 13px;
  height: 10px;
  border: 1px solid #435464;
  border-radius: 2px;
  background: #43546444;
}
.upload-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 445px;
  border: 1px dashed #b6c2ce;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.upload-target > span {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: #e0e3e7;
  color: var(--muted);
  border-radius: 14px;
  margin-bottom: 22px;
}
.upload-target > span .icon {
  width: 26px;
  height: 26px;
}
.upload-target h2 {
  font-weight: 500;
  font-size: 23px;
  letter-spacing: -0.7px;
  margin-bottom: 14px;
}
.upload-target p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 22px;
}
.upload-target small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}
#trace-canvas {
  width: 100%;
  max-height: 600px;
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}
.traced-list {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 15px;
  display: grid;
  gap: 11px;
  font-size: 11px;
}
.traced-list strong {
  font-weight: 500;
}
.traced-plane > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.traced-list .icon {
  width: 13px;
  height: 13px;
}
.traced-plane {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.traced-plane.editing {
  border-left: 3px solid var(--primary, #435464);
  padding-left: 8px;
}
.traced-plane > span {
  overflow-wrap: anywhere;
}
.traced-plane-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.traced-plane-actions .text-button {
  font-size: 11px;
}
.image-edit-controls > .button {
  margin-top: 8px;
}
.image-measurement-mode {
  margin: 15px 0 20px;
}
.image-measurement-mode > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}
.image-measurement-mode .segmented {
  display: grid;
  grid-template-columns: 1fr;
}
.image-measurement-mode .segmented button {
  white-space: normal;
}
.image-dimensions {
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.image-dimension-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.image-dimension-fields .field {
  min-width: 0;
  margin: 0;
}
.image-dimension-fields input {
  min-width: 0;
}
#image-measurement-summary {
  margin-top: 12px;
}
.measurement-hint {
  display: block;
  color: #485a6c;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 4px;
}
.measurement-calculated {
  background-color: #f2f4f6;
}
.additional-measurements {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.additional-measurements summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.measurement-suggestions {
  background: #fff8e9;
  border: 1px solid #e5d9bc;
  border-radius: 7px;
  padding: 12px;
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.5;
}
.measurement-suggestions .text-button {
  display: block;
  text-align: left;
  font-size: 11px;
  white-space: normal;
}
.roof-distance-controls {
  border: 1px solid #d0d6dc;
  background: #f6f7f8;
  border-radius: 7px;
  padding: 12px;
  margin-bottom: 14px;
}
.roof-distance-toggle {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
}
.secondary-ridges {
  margin-top: 8px;
}
.secondary-ridges summary {
  padding: 4px 0;
  font-size: 12px;
  color: var(--steel);
  cursor: pointer;
}
.secondary-ridges .helper {
  margin: 6px 0;
}
.ridge-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ridge-segments label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: white;
  font-size: 12px;
  cursor: pointer;
}
.ridge-segments label:has(input:checked) {
  border-color: #b33f72;
  background: #b33f720a;
}
.ridge-segments input {
  accent-color: #b33f72;
  margin: 0;
}
.ridge-segments small {
  font-size: 11px;
  color: var(--muted);
}
.ridge-segments label:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}
.image-trace-handle {
  cursor: grab;
  touch-action: none;
}
.image-trace-handle:focus circle {
  stroke: #222b34;
  stroke-width: 4px;
}
.image-trace-handle:active {
  cursor: grabbing;
}
dialog {
  border: 1px solid #d6dbe0;
  border-radius: 14px;
  background: #fffefb;
  box-shadow: 0 25px 100px #1e252d38;
  padding: 35px;
  width: min(490px, calc(100vw - 32px));
  max-height: 85vh;
  overflow-y: auto;
  color: #323e4a;
}
dialog::backdrop {
  background: #191f264d;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
  font-weight: 550;
  margin: 10px 0 14px;
}
dialog > p.muted {
  font-size: 12px;
  line-height: 1.7;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.new-options {
  display: grid;
  gap: 13px;
  margin: 26px 0;
}
.new-options > button {
  background: #f2f3f5;
  border: 1px solid #dbdfe3;
  border-radius: 9px;
  padding: 20px;
  display: grid;
  grid-template-columns: 27px 1fr 20px;
  gap: 8px 12px;
  text-align: left;
}
.new-options > button:hover {
  background: #e5e8eb;
}
.new-options > button > .icon:first-child {
  grid-row: 1/3;
  margin-top: 4px;
  color: var(--muted);
}
.new-options > button > .icon:last-child {
  grid-column: 3;
  grid-row: 1/3;
  align-self: center;
  color: var(--muted);
}
.new-options strong {
  font-size: 13px;
  font-weight: 500;
}
.new-options span {
  font-size: 11px;
  color: var(--muted);
}
.help-steps {
  padding-left: 19px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.help-steps li {
  padding-left: 6px;
  margin-bottom: 15px;
}
.help-steps strong {
  color: #445566;
}
.export-options {
  display: grid;
  gap: 14px;
  margin-top: 25px;
}
.export-options .button {
  padding: 15px;
  justify-content: flex-start;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 90px);
  transform: translate(-50%, 20px);
  background: #2e3945;
  color: white;
  border-radius: 8px;
  padding: 14px 22px;
  box-shadow: 0 5px 25px #242d3720;
  font-size: 12px;
  max-width: calc(100vw - 32px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  line-height: 1.6;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #a05c46;
}
#print-report {
  display: none;
}
.editor-empty-state {
  max-width: 420px;
  padding: 24px 18px;
}
.editor-empty-state p {
  font-size: 11px;
  line-height: 1.8;
}
.editor-empty-state .button-group {
  justify-content: center;
  flex-wrap: wrap;
}
.pending-result {
  padding: 20px 18px;
  margin: 0;
}
.product-details {
  margin: 0 0 16px;
  font-size: 11px;
  color: var(--muted);
}
.plan-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.plan-steps button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: white;
  border: 1px solid #dbdfe3;
  border-radius: 8px;
  color: #435364;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.plan-steps button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eaedf0;
}
.plan-steps button[aria-current='step'] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.plan-steps button[aria-current='step'] span {
  background: #ffffff26;
}
.plan-steps button:disabled {
  opacity: 0.5;
  cursor: default;
}
.slope-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.slope-controls,
.slope-detail {
  background: white;
  border: 1px solid #dbdfe3;
  border-radius: 10px;
  padding: 24px;
  min-width: 0;
}
.slope-controls h2,
.slope-detail h2 {
  font-size: 18px;
  margin-bottom: 20px;
}
.slope-controls h3 {
  margin: 24px 0 16px;
  font-size: 14px;
}
.slope-controls h2 {
  margin-bottom: 6px;
}
.slope-controls > .helper {
  margin-bottom: 16px;
}
.slope-controls .plane-tab {
  align-items: flex-start;
  padding: 12px 10px;
}
.slope-controls .plane-tab > div {
  flex: 1;
}
.face-dimensions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.face-dimensions > span {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.face-dimensions b {
  font-weight: 500;
  color: var(--ink);
}
.slope-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.slope-detail-heading h2 {
  margin: 0;
}
.slope-detail-heading .button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}
.slope-detail .projection-fields {
  margin: 16px 0;
}
.slope-detail .slope-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.slope-detail .slope-inputs > .field {
  margin: 0;
}
.projection-fields > .helper {
  margin: 8px 0 0;
}
.slope-advanced > summary {
  padding-bottom: 0;
}
.slope-eave-edge,
.slope-edge-dimension[data-action] {
  cursor: pointer;
}
.slope-eave-edge:focus-visible {
  outline: none;
}
.slope-eave-edge:focus-visible line:last-child,
.slope-eave-edge:hover line:last-child {
  stroke: var(--primary);
  stroke-width: 0.5%;
}
.slope-incomplete {
  width: 100%;
  padding: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.slope-incomplete p {
  margin: 8px 0 14px;
  color: var(--muted);
}
.slope-incomplete .button-group {
  margin: 0;
  flex-wrap: wrap;
}
.slope-incomplete .button {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}
.slope-directions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}
.slope-directions .button {
  padding: 8px;
  font-size: 11px;
}
.slope-directions [aria-pressed='true'] {
  background: var(--signal-soft);
  border-color: var(--primary);
}
.slope-previews {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.slope-previews figure,
.slope-real-preview {
  margin: 0;
  border: 1px solid #dbdfe3;
  border-radius: 8px;
  background: #f5f6f8;
  overflow: hidden;
  min-width: 0;
}
.slope-previews figcaption,
.slope-previews .canvas-toolbar {
  padding: 12px;
  font-size: 12px;
  min-height: 60px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.slope-previews figure > svg {
  display: block;
  width: 100%;
  height: 300px;
}
.slope-previews .canvas-content {
  height: 300px;
  min-height: 300px;
}
.slope-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.slope-metrics div {
  padding: 14px;
  background: #edf2f6;
  border-radius: 6px;
  border-left: 2px solid #7892a3;
}
.slope-metrics dt {
  font-size: 11px;
  color: #536a7a;
  margin-bottom: 6px;
}
.slope-metrics dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #243947;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.slope-edge-details summary,
.projection-editor summary {
  margin: 18px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.projection-editor .slope-metrics {
  grid-template-columns: 1fr;
}
.projection-editor .slope-metrics div {
  padding: 10px;
}
.slope-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0;
  color: #435364;
}
@media (max-width: 1100px) {
  .slope-detail .slope-inputs {
    grid-template-columns: minmax(0, 1fr);
  }
  .slope-previews {
    grid-template-columns: minmax(0, 1fr);
  }
  .slope-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .slope-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .plan-steps {
    gap: 6px;
  }
  .plan-steps button {
    padding: 8px;
    font-size: 11px;
  }
  .slope-controls,
  .slope-detail {
    padding: 16px;
  }
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.5;
}
.roof-details {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  min-width: 0;
}
.roof-details h2 {
  font-size: 16px;
}
.detail-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.detail-tabs button {
  background: var(--surface);
  color: var(--steel);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}
.detail-tabs [aria-selected='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.detail-content .button-group {
  margin: 12px 0;
}
.detail-wrap {
  flex-wrap: wrap;
}
.roof-details .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.roof-details .button {
  white-space: normal;
  text-align: center;
}
.detail-outline {
  display: block;
  width: 100%;
  height: 270px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin: 15px 0;
}
[data-detail-action='eave'],
[data-action='choose-eave'] {
  cursor: pointer;
}
[data-hole-canvas] {
  cursor: crosshair;
  touch-action: manipulation;
}
.roof-details input:not([type='checkbox']),
.roof-details select {
  width: 100%;
  padding: 9px;
  min-width: 100px;
  border: 1px solid #bdcbd5;
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.roof-details input:disabled {
  background: var(--surface);
}
.roof-details td,
.roof-details th {
  padding: 9px 10px;
}
.detail-panel-table .field {
  margin: 0;
}
.detail-panel-table .field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.detail-panel-table tr.selected {
  background: var(--signal-soft);
}
.detail-hole {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
}
[data-roof-panel] {
  cursor: pointer;
  outline: none;
}
[data-roof-panel]:focus {
  stroke: var(--primary);
  stroke-width: 0.04;
}
.profile-extra-rules {
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.profile-extra-rules summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.dxf-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.dxf-layout .image-instructions {
  max-height: 80vh;
  overflow: auto;
}
.dxf-viewport {
  height: 660px;
  overflow: auto;
  background: #f7f9fb;
}
.dxf-viewport svg {
  display: block;
  cursor: crosshair;
}
.dxf-expanded {
  position: fixed;
  inset: 18px;
  height: calc(100dvh - 36px);
  z-index: 60;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 40px #18232b80;
}
.dxf-close-expanded {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 61;
  background: white;
}
.dxf-layout details {
  margin: 18px 0;
  font-size: 12px;
}
@media (max-width: 900px) {
  .dxf-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .dxf-layout .image-instructions {
    max-height: none;
  }
  .roof-details {
    padding: 15px;
  }
  .detail-tabs button {
    flex: 1 1 130px;
  }
}
.checkbox-field input {
  width: auto;
  flex: 0 0 auto;
  margin-top: 3px;
}
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.product-tags span {
  padding: 5px 7px;
  border: 1px solid #dbdfe3;
  border-radius: 5px;
  background: #edf2f5;
  color: var(--steel);
  font-size: 11px;
  border-color: #d0dbe3;
}
.product-details summary {
  cursor: pointer;
  color: #4a5c6f;
  line-height: 1.7;
}
.product-details p {
  font-size: 11px;
  line-height: 1.8;
  margin: 10px 0;
}
.product-details dl {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.product-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.product-details dd {
  margin: 0;
  color: #435465;
}
.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 10px;
}
.product-links a {
  color: #3e4e5e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.product-details small {
  font-size: 11px;
}
.pdf-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f4f5f7;
  font-size: 11px;
  color: var(--muted);
}
.pdf-toolbar > span {
  overflow-wrap: anywhere;
}
.pdf-toolbar select {
  margin-left: 5px;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: inherit;
}
.image-workspace.pdf-viewer {
  display: block;
  overflow: auto;
  max-height: 650px;
}
.pdf-review {
  margin-bottom: 30px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
}
.pdf-review h3 {
  font-size: 13px;
  font-weight: 550;
}
.pdf-review-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 20px 0 10px;
}
.pdf-review-settings .field {
  min-width: 230px;
}
.pdf-review-settings .helper {
  flex: 1;
  min-width: 220px;
}
.pdf-face-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.pdf-face-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px;
  background: #f3f4f6;
  border: 1px solid #dce0e5;
  border-radius: 6px;
  cursor: pointer;
}
.pdf-face-option input,
.pdf-confirm input {
  accent-color: var(--primary);
  flex-shrink: 0;
}
.pdf-face-option strong {
  font-size: 12px;
  font-weight: 500;
}
.pdf-face-option small {
  display: block;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 8px;
}
.pdf-confirm {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 20px 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.pdf-takeoff-preview {
  border-top: 1px solid var(--border);
  margin-top: 25px;
  padding-top: 22px;
}
.pdf-takeoff-preview > .button {
  margin-top: 18px;
}
.original-takeoff {
  margin-top: 20px;
  margin-bottom: 20px;
  border-color: #bbc6d1;
}
.takeoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}
@media (max-width: 680px) {
  .pdf-review {
    padding: 18px 14px;
  }
  .pdf-face-grid {
    grid-template-columns: 1fr;
  }
  .pdf-review-settings .field {
    width: 100%;
    min-width: 0;
  }
}
.profile-shortcuts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-copy-note {
  margin: 8px 0 16px;
  font-size: 11px;
}
.profiles-page .page-heading {
  align-items: flex-start;
  flex-wrap: wrap;
}
.profiles-page .button-group {
  flex-wrap: wrap;
}
.producer-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}
.producer-filter select {
  min-width: 150px;
  max-width: 230px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: #364452;
  font-size: 11px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.profile-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  min-width: 0;
}
.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 19px;
}
.profile-card-heading .row-actions {
  margin-left: auto;
}
.default-profile-badge {
  padding: 5px 7px;
  color: #98401d;
  background: var(--signal-soft);
  border-radius: 5px;
  font-size: 11px;
}
.profile-card h2 {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 550;
  overflow-wrap: anywhere;
  letter-spacing: -0.3px;
}
.profile-manufacturer {
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.profile-dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 15px;
  padding: 18px;
  margin: 0 0 17px;
  background: #f3f4f6;
  border-radius: 7px;
}
.profile-dimensions dt {
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
}
.profile-dimensions dd {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #405060;
}
.profile-dimensions dd span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.profile-other-specs {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
}
.profile-other-specs span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.profile-other-specs strong {
  font-weight: 500;
  color: #52667a;
}
.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}
.profile-default-caption {
  font-size: 11px;
  color: var(--muted);
}
.profile-form-error {
  font-size: 11px;
  line-height: 1.7;
  color: #a34433;
}
.profiles-page .local-notice {
  margin-bottom: 30px;
  align-items: flex-start;
}
@media (max-width: 680px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .profile-toolbar .producer-filter {
    flex: 1;
  }
  .profile-toolbar .producer-filter select {
    min-width: 0;
    max-width: 100%;
    flex: 1;
  }
  .profiles-page .page-heading .button-group .button {
    font-size: 11px;
    padding: 9px 11px;
  }
}
@media (min-width: 1600px) {
  .hero {
    min-height: 310px;
  }
  .hero-copy {
    padding: 36px 40px;
  }
  .hero h2 {
    font-size: 39px;
  }
  .hero p {
    font-size: 13px;
    max-width: 440px;
  }
  .hero-foot {
    font-size: 11px;
  }
  .roof-art {
    max-width: 500px;
  }
  .module-card p {
    font-size: 12px;
    max-width: 300px;
  }
  .module-card h3 {
    font-size: 16px;
  }
  .module-bottom {
    font-size: 12px;
  }
  .hero .button {
    font-size: 12px;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .canvas-content {
    height: 445px;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 220px;
    padding: 28px 15px 0;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand-mark {
    width: 33px;
  }
  .brand small {
    font-size: 11px;
  }
  .nav-item {
    font-size: 11px;
    padding: 13px 10px;
    gap: 9px;
  }
  main {
    margin-left: 220px;
  }
  .page {
    padding: 28px 25px 0;
  }
  .topbar {
    padding: 0 25px;
  }
  .hero-copy {
    padding: 25px;
  }
  .hero h2 {
    font-size: 28px;
  }
  .hero p {
    font-size: 11px;
  }
  .hero-foot {
    font-size: 11px;
    gap: 3px;
  }
  .hero-foot > span {
    margin: 0 4px;
  }
  .module-card {
    padding: 17px;
  }
  .module-card h3 {
    font-size: 12px;
  }
  .module-card p {
    font-size: 11px;
  }
  .module-bottom {
    font-size: 11px;
  }
  .stat {
    padding: 17px 15px;
    gap: 10px;
  }
  .stat strong {
    font-size: 22px;
  }
  .stat em {
    font-size: 11px;
  }
  .stat small {
    font-size: 11px;
  }
  .editor-layout {
    grid-template-columns: 235px minmax(230px, 1fr);
    gap: 15px;
  }
  .results-card {
    grid-column: 2;
    grid-row: 2;
  }
  .editor-controls {
    grid-row: 1/3;
    max-height: calc(100vh - 225px);
  }
  .results-card #results {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .results-card .primary-result {
    grid-column: 1/3;
  }
  .results-card .results-heading > span {
    margin: 0 0 0 auto;
  }
  .current-plane-summary {
    margin: 15px;
  }
  .waste-result {
    margin: 15px;
  }
  .results-bottom .button {
    width: auto;
    margin: 0;
  }
  .results-bottom .button + .button {
    margin-left: 8px;
  }
  .canvas-content {
    height: 320px;
  }
  .subtle-label {
    display: none;
  }
  .schedule-card .section-heading > span {
    display: none;
  }
  .image-layout {
    grid-template-columns: 245px 1fr;
    gap: 17px;
  }
  .image-instructions {
    padding: 18px;
  }
  .page-heading .button-group .button {
    font-size: 11px;
    padding: 10px;
  }
  .empty-inline .button {
    padding: 8px;
    font-size: 11px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .compact h1 {
    font-size: 23px;
  }
}
@media (max-width: 950px) {
  .sidebar {
    width: 78px;
    padding: 25px 10px 0;
  }
  .brand > span:last-child,
  .nav-item > span,
  .nav-item > b,
  .sidebar-bottom > button {
    display: none;
  }
  .brand {
    justify-content: center;
  }
  .brand-mark {
    width: 39px;
  }
  .brand small {
    display: none;
  }
  .sidebar nav {
    margin-top: 42px;
    gap: 12px;
  }
  .sidebar-note {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .sidebar-note .note-symbol,
  .sidebar-note strong,
  .sidebar-note p {
    display: none;
  }
  .sidebar-note button {
    justify-content: center;
    width: 100%;
    padding: 15px;
    border-radius: 7px;
    font-size: 0;
    gap: 0;
  }
  .sidebar-note button:hover {
    background: #2e3944;
  }
  .sidebar-note button .icon {
    width: 21px;
    height: 21px;
  }
  .nav-item {
    justify-content: center;
    padding: 15px;
  }
  .nav-item .icon {
    width: 21px;
    height: 21px;
  }
  main {
    margin-left: 78px;
  }
  .topbar {
    height: 65px;
  }
  .page {
    padding: 26px 22px 0;
  }
  .top-date {
    display: none;
  }
  .topbar-end {
    gap: 13px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .hero-copy {
    width: 57%;
    padding: 24px;
  }
  .hero-visual {
    width: 43%;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero {
    min-height: 280px;
  }
  .hero p {
    font-size: 11px;
  }
  .hero-foot {
    font-size: 11px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px 12px;
  }
  .stat-icon {
    width: 33px;
    height: 36px;
  }
  .stat em {
    font-size: 11px;
  }
  .module-grid {
    gap: 12px;
  }
  .module-card {
    padding: 17px 14px;
  }
  .module-card h3 {
    font-size: 12px;
    line-height: 1.6;
  }
  .module-card p {
    font-size: 11px;
    min-height: 54px;
  }
  .section-heading > span {
    font-size: 11px;
  }
  .hero-visual .drawing-label {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .empty-inline {
    gap: 12px;
    padding: 22px 17px;
  }
  .empty-inline p {
    max-width: 230px;
    line-height: 1.7;
  }
  #toast {
    left: calc(50% + 25px);
  }
  .history-toolbar {
    gap: 12px;
  }
  .editor-layout {
    grid-template-columns: 220px minmax(220px, 1fr);
  }
  .control-section {
    padding: 15px;
  }
  .compact {
    align-items: flex-start;
  }
  .compact .button-group {
    flex-direction: column;
    align-items: stretch;
  }
  .results-bottom .button {
    width: 100%;
    margin-bottom: 9px;
  }
  .results-bottom .button + .button {
    margin-left: 0;
  }
  .canvas-legend {
    gap: 7px;
    font-size: 11px;
  }
  .canvas-legend > span:last-child {
    display: none;
  }
  .image-layout {
    grid-template-columns: 220px 1fr;
  }
  .image-workspace {
    padding: 12px;
    min-height: 470px;
  }
  .upload-target h2 {
    font-size: 19px;
  }
  .upload-target p {
    font-size: 11px;
  }
  .canvas-toolbar {
    padding: 12px;
  }
  .canvas-toolbar strong {
    font-size: 11px;
  }
  .image-upload-card .canvas-toolbar {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .sidebar {
    width: auto;
    height: 66px;
    inset: auto 0 0;
    padding: 0 7px;
    background: var(--dark);
    border-top: 1px solid #415161;
    flex-direction: row;
    z-index: 20;
  }
  .sidebar .brand,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    width: 75%;
    gap: 4px;
    align-items: center;
  }
  .sidebar-note {
    width: 25%;
    margin: 0;
    align-self: center;
  }
  .sidebar-note button {
    flex-direction: column-reverse;
    gap: 5px;
    padding: 8px 3px;
    font-size: 11px;
    color: var(--accent);
  }
  .sidebar-note button .icon {
    width: 19px;
    height: 19px;
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 3px;
    border-radius: 6px;
    font-size: 11px;
  }
  .nav-item .icon {
    width: 19px;
    height: 19px;
  }
  .nav-item > span {
    display: block;
  }
  .nav-item.active {
    background: var(--primary);
    color: white;
  }
  .nav-item > span {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  main {
    margin: 0;
    padding-bottom: 66px;
  }
  .topbar {
    height: 57px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 11px;
    gap: 8px;
  }
  .local-badge {
    font-size: 11px;
  }
  .topbar .icon-button {
    width: 22px;
  }
  .page {
    padding: 25px 17px 0;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 24px;
    letter-spacing: -0.8px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.8;
    max-width: 270px;
  }
  .page-heading > .button {
    font-size: 0;
    padding: 10px;
    min-width: 37px;
  }
  .page-heading > .button .icon {
    width: 17px;
    height: 17px;
  }
  .eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
  }
  .hero {
    flex-direction: column;
    position: relative;
    min-height: 390px;
  }
  .hero-copy {
    width: 100%;
    padding: 25px;
    z-index: 1;
  }
  .hero h2 {
    font-size: 30px;
  }
  .hero p {
    font-size: 11px;
    max-width: 285px;
  }
  .hero-visual {
    position: absolute;
    bottom: -5px;
    right: -25px;
    width: 250px;
    height: 145px;
    opacity: 0.55;
    pointer-events: none;
  }
  .roof-art {
    height: 170px;
  }
  .drawing-label {
    display: none;
  }
  .hero .hero-foot {
    position: relative;
    font-size: 11px;
    margin-top: 25px;
    max-width: 190px;
    flex-wrap: wrap;
  }
  .stats {
    gap: 8px;
    margin-bottom: 25px;
  }
  .stat {
    padding: 13px 10px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .stat small {
    font-size: 11px;
    white-space: nowrap;
  }
  .stat strong {
    font-size: 19px;
  }
  .stat em {
    display: block;
    margin: 6px 0 0;
    font-size: 11px;
  }
  .section-heading {
    align-items: center;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .section-heading > span {
    display: none;
  }
  .module-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 25px;
  }
  .module-card {
    padding: 18px 19px;
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 0 15px;
  }
  .module-top {
    grid-row: 1/4;
    display: block;
    margin: 0;
  }
  .module-number {
    display: block;
    text-align: center;
    font-size: 11px;
    margin-top: 9px;
  }
  .module-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .module-card p {
    font-size: 11px;
    min-height: 0;
    max-width: none;
    line-height: 1.7;
    margin-bottom: 12px;
  }
  .module-bottom {
    padding-top: 10px;
    font-size: 11px;
  }
  .module-icon {
    width: 43px;
    height: 43px;
  }
  .empty-inline {
    padding: 25px 18px;
    flex-wrap: wrap;
  }
  .empty-inline > div {
    flex: 1;
  }
  .empty-inline strong {
    font-size: 11px;
    line-height: 1.7;
  }
  .empty-inline p {
    font-size: 11px;
    max-width: none;
  }
  .empty-inline .button {
    margin: 5px 0 0 55px;
    font-size: 11px;
  }
  .recent > .section-heading {
    padding: 17px;
  }
  .recent .text-button {
    font-size: 11px;
  }
  .page-footer {
    font-size: 11px;
    gap: 15px;
    align-items: flex-start;
    line-height: 1.8;
  }
  .page-footer > span:last-child {
    max-width: 130px;
    text-align: right;
  }
  .draft-banner {
    flex-wrap: wrap;
    font-size: 11px;
  }
  .draft-banner strong {
    max-width: 200px;
    overflow-wrap: anywhere;
  }
  .draft-banner .text-button {
    margin-left: 24px;
  }
  .editor-page {
    padding: 24px 15px 0;
  }
  .compact .button-group {
    flex-direction: row;
  }
  .compact {
    flex-direction: column;
    gap: 17px;
  }
  .compact h1 {
    font-size: 23px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-controls {
    max-height: none;
    grid-column: 1;
    grid-row: auto;
  }
  .editor-main {
    grid-row: 1;
  }
  .results-card {
    grid-column: 1;
    grid-row: 2;
  }
  .editor-controls {
    grid-row: 3;
  }
  .control-section {
    padding: 20px;
  }
  .editor-controls .field-row {
    gap: 15px;
  }
  .field > span {
    font-size: 11px;
  }
  .input-wrap input,
  .field select {
    font-size: 13px;
    padding: 12px;
  }
  .canvas-content {
    height: 300px;
  }
  .results-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
  }
  .results-bottom p {
    width: 100%;
    font-size: 11px;
    margin-bottom: 5px;
  }
  .results-bottom .button {
    flex: 1;
    margin: 0;
    font-size: 11px;
    min-width: 145px;
  }
  .results-card .primary-result {
    padding: 20px;
  }
  .results-card .primary-result strong {
    font-size: 32px;
  }
  .results-heading {
    font-size: 12px;
  }
  .result-row {
    font-size: 11px;
  }
  .canvas-toolbar {
    padding: 13px;
  }
  .canvas-toolbar strong {
    font-size: 12px;
  }
  .canvas-legend {
    font-size: 11px;
    padding: 12px 14px;
    gap: 15px;
  }
  .schedule-card .section-heading h2 {
    font-size: 13px;
  }
  .schedule-card td,
  .schedule-card th {
    padding: 12px 10px;
  }
  .calculation-note {
    font-size: 11px;
  }
  .schedule-note {
    font-size: 11px;
  }
  .history-toolbar {
    flex-wrap: wrap;
  }
  .search-input {
    max-width: none;
    min-width: 100%;
    padding: 12px;
  }
  .history-toolbar .segmented {
    flex: 1;
  }
  .history-toolbar > .muted {
    font-size: 11px;
  }
  .history-card .empty-state {
    padding: 50px 20px;
  }
  .empty-state h2 {
    font-size: 21px;
  }
  .local-notice {
    font-size: 11px;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 25px;
  }
  .local-notice .icon {
    margin-top: 3px;
  }
  .image-layout {
    grid-template-columns: 1fr;
  }
  .image-instructions {
    grid-row: 2;
    padding: 21px;
  }
  .image-workspace {
    min-height: 320px;
  }
  .upload-target {
    min-height: 330px;
  }
  .upload-target h2 {
    font-size: 23px;
  }
  .upload-target p {
    font-size: 11px;
  }
  .image-instructions .step-item p {
    font-size: 11px;
  }
  .image-warning {
    font-size: 11px;
  }
  .image-status {
    font-size: 11px;
  }
  .image-upload-card .canvas-toolbar {
    flex-wrap: nowrap;
  }
  .image-upload-card .canvas-toolbar .text-button {
    font-size: 11px;
  }
  .image-upload-card .canvas-toolbar strong {
    font-size: 11px;
  }
  .image-page .button {
    font-size: 11px;
  }
  #toast {
    left: 50%;
    bottom: 83px;
    width: max-content;
    max-width: calc(100vw - 30px);
    font-size: 11px;
  }
  dialog {
    padding: 30px 22px;
  }
  dialog h2 {
    font-size: 23px;
  }
  .new-options > button {
    padding: 18px 13px;
    gap: 8px;
  }
  .help-steps {
    font-size: 11px;
  }
  .compact .button-group .button {
    font-size: 11px;
    padding: 10px 13px;
  }
}
.canvas-toolbar {
  flex-wrap: wrap;
}
.canvas-toolbar .preview-actions,
.preview-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 100%;
}
.preview-controls output {
  min-width: 38px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.preview-controls .icon {
  width: 17px;
  height: 17px;
}
.preview-controls .preview-restore-icon,
.preview-controls .is-expanded .preview-expand-icon {
  display: none;
}
.preview-controls .is-expanded .preview-restore-icon {
  display: block;
}
.canvas-content.has-preview,
.image-workspace.has-preview {
  display: block;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.image-workspace.has-preview {
  height: 485px;
  min-height: 0;
}
.preview-stage {
  display: grid;
  place-items: center;
}
.preview-stage > svg {
  display: block;
  flex-shrink: 0;
}
body.preview-open {
  overflow: hidden;
}
#preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #191f2680;
  backdrop-filter: blur(3px);
}
.preview-maximized {
  position: fixed;
  inset: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: none;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  margin: 0;
  box-shadow: 0 20px 80px #191f2633;
}
.preview-maximized > .canvas-toolbar,
.preview-maximized > .pdf-toolbar,
.preview-maximized > .canvas-legend {
  flex-shrink: 0;
}
.preview-maximized > .canvas-content,
.preview-maximized > .image-workspace {
  flex: 1;
  min-height: 0;
  max-height: none;
  height: 0;
}
@media (max-width: 680px) {
  .image-upload-card .canvas-toolbar {
    flex-wrap: wrap;
  }
  .image-workspace.has-preview {
    height: 360px;
  }
  .preview-maximized {
    inset: 8px;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
  }
  .preview-maximized > .image-workspace {
    height: 0;
  }
  .canvas-toolbar .preview-actions {
    gap: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep the drawing beside the active form while the page scrolls.
   Fullscreen previews retain their viewport positioning and stacking context. */
.editor-details {
  margin-top: 22px;
}
.project-transfer-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.project-transfer-actions .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 11px;
}
.project-transfer-actions .icon {
  width: 16px;
  height: 16px;
}
.project-download-notice {
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid #d9bda6;
  border-radius: 8px;
  background: #fff8f1;
}
.project-download-notice > .icon {
  flex-shrink: 0;
  color: var(--primary);
}
.project-download-notice p {
  margin: 5px 0 0;
  line-height: 1.6;
  font-size: 12px;
  color: var(--muted);
}
.project-download-notice .button {
  flex-shrink: 0;
}
.type-drafts {
  margin: 28px 0;
}
.type-drafts h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
.type-draft-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.type-draft-grid article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  min-width: 0;
}
.type-draft-grid strong {
  overflow-wrap: anywhere;
}
.type-draft-grid small,
.type-draft-grid span {
  color: var(--muted);
  font-size: 11px;
}
.type-draft-grid .button {
  margin-top: auto;
  font-size: 11px;
}
.auto-projects {
  margin-top: 24px;
}
.history-card:empty {
  display: none;
}
.auto-projects .section-heading {
  margin: 0;
  padding: 18px 20px;
}
@media (max-width: 1250px) {
  .project-transfer-actions .text-button span {
    display: none;
  }
}
@media (max-width: 950px) {
  .type-draft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-download-notice {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .type-draft-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-transfer-actions {
    gap: 12px;
  }
}
@media screen and (min-width: 681px) {
  .image-layout > .image-preview-rail {
    align-self: stretch;
    position: relative;
    min-height: 100%;
  }
  .editor-layout > .editor-controls {
    max-height: none;
    overflow: visible;
  }
  .editor-layout > .editor-main:not(:has(.preview-maximized)) {
    position: sticky;
    top: 16px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    min-width: 0;
    scrollbar-width: thin;
  }
  .image-layout .image-upload-card:not(.preview-maximized) {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 32px);
  }
  .image-layout .image-upload-card:not(.preview-maximized) > .image-workspace {
    height: min(485px, calc(100dvh - 180px));
    min-height: 0;
    overflow: auto;
  }
  .image-layout .image-upload-card > .canvas-toolbar,
  .image-layout .image-upload-card > .pdf-toolbar,
  .image-layout .image-upload-card > .canvas-legend {
    flex-shrink: 0;
  }
  .image-layout .image-upload-card .upload-target {
    min-height: min(445px, calc(100dvh - 200px));
  }
}
@media screen and (min-width: 761px) {
  .slope-layout > .slope-detail:not(:has(.preview-maximized)) {
    position: sticky;
    top: 16px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
@media screen and (min-width: 901px) {
  .dxf-layout > .canvas-card:not(:has(.dxf-expanded)) {
    position: sticky;
    top: 16px;
  }
  .dxf-layout > .canvas-card > .dxf-viewport:not(.dxf-expanded) {
    height: min(660px, calc(100dvh - 120px));
  }
  .dxf-layout > .image-instructions {
    max-height: none;
    overflow: visible;
  }
}
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }
  body {
    background: white;
    color: #202831;
    font-family: Arial, sans-serif;
  }
  #app,
  #toast,
  #modal,
  #preview-backdrop {
    display: none !important;
  }
  #print-report {
    display: block;
    font-size: 11px;
  }
  #print-report h1 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  #print-report h2 {
    font-size: 14px;
    margin: 15px 0;
  }
  #print-report p {
    line-height: 1.8;
    font-size: 11px;
  }
  #print-report header {
    border-bottom: 2px solid #465769;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  .print-metrics {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    gap: 15px;
  }
  .print-metrics strong {
    font-size: 11px;
  }
  #print-report table {
    font-size: 11px;
    margin: 10px 0 20px;
  }
  #print-report th,
  #print-report td {
    padding: 7px 10px;
    border: 1px solid #d3d8dd;
  }
  #print-report th {
    background: #ebeef0;
    color: #425262;
  }
  .print-plane {
    break-before: page;
  }
  .print-plane .roof-svg {
    display: block;
    height: 230px;
    max-width: 500px;
    margin: auto;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  tr {
    break-inside: avoid;
  }
  thead {
    display: table-header-group;
  }
}

.project-choice-card,
.profile-edit-card {
  max-width: 900px;
  padding: 28px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.profile-edit-card {
  margin-top: 18px;
}
.profile-edit-card h1,
.project-choice-card h1 {
  font-size: 26px;
}
.profile-edit-card .profile-extra-fields {
  margin-top: 16px;
}
@media (max-width: 600px) {
  .project-choice-card,
  .profile-edit-card {
    padding: 18px;
  }
}

/* Shared roof definition workspace. Geometry comes before sheet configuration. */
.definition-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.definition-layout .editor-controls {
  max-height: none;
  overflow: visible;
}
.definition-layout .editor-main {
  min-width: 0;
}
.definition-layout .canvas-card {
  margin-bottom: 12px;
}
.definition-layout .canvas-content {
  min-height: 360px;
}
.definition-layout .control-title h2 {
  font-size: 15px;
}
.measurement-space h3 {
  font-size: 13px;
  margin: 18px 0 10px;
}
.measurement-space .plan-kind-option {
  padding: 10px;
}
.face-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0;
}
.face-actions .button {
  font-size: 11px;
  min-height: 34px;
  padding: 7px 10px;
}
.other-shapes {
  margin-top: 8px;
}
.other-shapes summary,
.quick-geometry summary,
.slope-advanced summary,
.batch-pitch summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
}
.other-shapes select {
  margin-top: 8px;
}
.quick-geometry {
  margin: 12px 0;
}
.quick-geometry[open] > summary {
  margin-bottom: 10px;
}
.quick-geometry .contour-editor {
  margin-bottom: 0;
}
.eave-prompt {
  background: #edf4f7;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}
.eave-prompt strong {
  font-size: 13px;
}
.eave-prompt p {
  margin-bottom: 0;
}
.batch-pitch {
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.drawing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.drawing-toolbar .button {
  padding: 7px 12px;
  min-height: 32px;
  font-size: 11px;
}
.drawing-toolbar .active {
  background: #e1edf3;
  border-color: #6a8da2;
}
[data-dimension-field],
[data-measure-key],
[data-contour-dimension],
.used-image-region,
[data-used-plane][data-action] {
  cursor: pointer;
}
@media (max-width: 760px) {
  .geometry-preview text {
    font-size: calc(var(--geometry-label-size) * 1.6);
  }
  .shape-edge-dimensions text {
    font-size: calc(var(--edge-label-size) * 2);
  }
  .shape-edge-dimensions .dimension-edge-name {
    display: none;
  }
}
[data-dimension-field]:hover,
text[data-measure-key]:hover,
text[data-contour-dimension]:hover {
  fill: #b64a1d;
  text-decoration: underline;
}
line[data-measure-key]:hover,
line[data-contour-dimension]:hover {
  stroke: #b64a1d;
}
[data-measure-selected='true'] {
  outline: 2px solid #b64a1d;
  outline-offset: 2px;
}
.traced-plane small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.face-source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.face-source-actions > span {
  flex: 1;
  font-size: 12px;
}
@media screen and (min-width: 901px) {
  .definition-layout > .editor-main:not(:has(.preview-maximized)) {
    position: sticky;
    top: 16px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
  }
}
@media (max-width: 900px) {
  .definition-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.definition-shape-preview[hidden] {
  display: none;
}
.source-setup > summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding-bottom: 12px;
}
