@font-face {
  font-family: Atkinson;
  src: url("../assets/fonts/atkinson-hyperlegible-next-variable.ttf")
    format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #153e3e;
  --sub: #4b6266;
  --ground: #eef4f5;
  --sheet: #fff;
  --line: #c4d4d5;
  --accent: #246049;
  --soft: #d2e8da;
  --error: #9b283d;
  --focus: #7551b3;
  --shadow: 0 5px 22px #153e3e0c;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
select,
summary {
  font: inherit;
}
button,
select,
summary,
.file-label {
  cursor: pointer;
}
button,
input,
select {
  min-height: 42px;
  border: 1px solid #789795;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
input,
select {
  padding: 8px 10px;
  width: 100%;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
button {
  padding: 8px 13px;
  font-weight: 650;
}
button:hover {
  background: #e3efeb;
}
button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:hover {
  background: #184b38;
}
.danger {
  color: var(--error);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
::selection {
  background: #bde2cb;
  color: #153e3e;
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: #e7eff0;
}
::-webkit-scrollbar-thumb {
  background: #91b0aa;
  border: 3px solid #e7eff0;
  border-radius: 10px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 16px;
  top: -90px;
  background: #fff;
  padding: 10px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1500px;
  margin: auto;
  padding: 25px 30px 21px;
}
.masthead h1 {
  font-family: Atkinson, sans-serif;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}
.masthead p {
  margin: 6px 0 0;
  color: var(--sub);
  font-size: 15px;
}
.masthead > a {
  font-size: 13px;
  font-weight: 650;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 0 30px;
}
.toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.session-note {
  font-size: 12px;
  color: var(--sub);
  margin-left: auto;
  max-width: 245px;
}
.file-menu {
  position: relative;
}
.file-menu > summary {
  padding: 8px 10px;
  border-radius: 5px;
  min-height: 42px;
  display: list-item;
  margin-left: 18px;
}
.file-menu[open] {
  z-index: 4;
}
.file-actions {
  position: absolute;
  top: 48px;
  left: -15px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 14px;
  width: 290px;
  display: grid;
  gap: 8px;
}
.file-label {
  font-size: 13px;
  font-weight: 650;
}
.file-label input {
  font-size: 12px;
  margin-top: 6px;
  max-width: 100%;
}
#notice {
  font-size: 13px;
  padding: 12px 0;
  color: var(--sub);
  min-height: 43px;
}
.workspace {
  display: grid;
  grid-template-columns: 305px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}
.inspector {
  background: #fff;
  border: 1px solid var(--line);
  padding: 19px;
}
.section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2 {
  font-size: 19px;
  margin: 0;
  font-family: Atkinson, sans-serif;
}
#bed-tag {
  color: var(--sub);
  font-size: 12px;
}
.form-help {
  font-size: 12px;
  line-height: 1.45;
  color: var(--sub);
  margin: 10px 0 15px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 620;
}
form > label {
  margin-top: 11px;
}
label + input {
  margin-top: 4px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.fields input {
  margin-top: 4px;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 20px 0 12px;
}
legend {
  font-weight: 700;
  font-size: 14px;
  padding: 0;
}
fieldset > label {
  margin-top: 10px;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.form-actions .primary {
  width: 100%;
}
.form-actions button:not(.primary) {
  font-size: 12px;
  flex: 1;
  padding: 6px;
}
.draft-note {
  font-size: 12px;
  min-height: 18px;
  color: #685121;
  margin: 11px 0 0;
}
.error {
  background: #fff0f2;
  color: var(--error);
  padding: 10px;
  border: 1px solid #efc5cd;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.terrain {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
}
.terrain summary {
  font-size: 14px;
  font-weight: 700;
  padding: 3px;
}
.terrain form > button {
  margin-top: 13px;
  width: 100%;
}
.drawing {
  min-width: 0;
}
.drawing-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
  padding: 0 0 12px;
}
.drawing-heading h2 {
  font-family: Atkinson, sans-serif;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}
.drawing-heading p {
  font-size: 13px;
  color: var(--sub);
  margin: 6px 0 0;
}
.zoom-label {
  font-size: 11px;
  min-width: 165px;
}
.zoom-label select {
  min-height: 35px;
  font-size: 12px;
  padding: 5px 7px;
  margin-top: 2px;
}
.plan-scroll {
  width: 100%;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  scrollbar-color: #91b0aa #e7eff0;
}
.plan-scroll #plan-canvas {
  width: 100%;
}
#plan-canvas svg {
  width: 100%;
  height: auto;
  display: block;
  min-height: calc(330px * var(--zoom, 1));
  max-height: calc(540px * var(--zoom, 1));
}
#plan-canvas svg [data-bed-id] {
  cursor: pointer;
  outline: none;
}
#plan-canvas svg [data-bed-id].selected > rect {
  stroke: #153e3e;
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}
#plan-canvas svg [data-bed-id]:focus-visible > rect {
  stroke: #7551b3;
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}
.map-help {
  font-size: 12px;
  color: var(--sub);
  margin: 9px 0 13px;
}
.plan-summary {
  font-size: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
  font-variant-numeric: tabular-nums;
}
.drawing h3 {
  font-size: 16px;
  margin: 0 0 9px;
}
.bed-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.bed-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: transparent;
  padding: 12px 9px;
  font-weight: 450;
  min-height: 67px;
}
.bed-row[aria-pressed="true"] {
  background: #dcebe4;
}
.bed-row strong,
.bed-row small {
  display: block;
  overflow-wrap: anywhere;
}
.bed-row small {
  font-size: 12px;
  color: var(--sub);
  font-weight: 400;
}
.bed-row .count {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.swatch {
  height: 13px;
  width: 13px;
  border: 1px solid #153e3e60;
  border-radius: 2px;
}
.swatch.leaf {
  background: #d2e8da;
}
.swatch.plum {
  background: #e5d9ec;
}
.swatch.sun {
  background: #f4e1a2;
}
.swatch.sky {
  background: #cbe3ee;
}
.swatch.clay {
  background: #edc7b6;
}
.swatch.slate {
  background: #dae0e6;
}
.review-panel {
  margin: 0 0 18px;
  background: #e0ece7;
  border: 1px solid #8daf9e;
  padding: 18px;
}
.review-panel h2 {
  font-family: Atkinson, sans-serif;
  font-size: 21px;
  margin: 0;
}
.review-panel p {
  font-size: 14px;
  max-width: 80ch;
  margin: 8px 0 12px;
}
.review-panel button {
  margin-right: 7px;
}
.method {
  margin: 38px 0 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 30px;
}
.method h2 {
  font-family: Atkinson, sans-serif;
  font-size: 24px;
  max-width: 30ch;
  line-height: 1.2;
  margin: 0;
  grid-row: span 3;
}
.method p {
  font-size: 13px;
  color: var(--sub);
  margin: 0;
  max-width: 75ch;
}
footer {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px 30px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 15px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sub);
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .masthead {
    align-items: start;
    padding: 21px 17px 17px;
  }
  .masthead > a {
    max-width: 110px;
    font-size: 11px;
  }
  .masthead p {
    font-size: 13px;
    max-width: 30ch;
  }
  main {
    padding: 0 17px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar > button {
    font-size: 12px;
    padding: 7px 10px;
  }
  .file-menu > summary {
    font-size: 12px;
  }
  .session-note {
    max-width: none;
    width: 100%;
    margin: 3px 0 0;
    font-size: 11px;
  }
  .file-menu {
    position: static;
  }
  .file-actions {
    top: 100%;
    left: 0;
    right: auto;
    width: min(290px, 100%);
    z-index: 4;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .drawing {
    order: 0;
    width: 100%;
  }
  .inspector {
    order: 1;
    width: 100%;
    padding: 18px;
  }
  .drawing-heading {
    gap: 9px;
    flex-wrap: wrap;
  }
  .drawing-heading h2 {
    font-size: 23px;
  }
  .zoom-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    font-weight: 500;
  }
  .zoom-label select {
    width: auto;
    margin: 0;
  }
  .plan-scroll #plan-canvas svg {
    min-height: calc(260px * var(--zoom, 1));
    max-height: calc(420px * var(--zoom, 1));
  }
  .bed-row {
    min-height: 65px;
  }
  .method {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }
  .method h2 {
    font-size: 24px;
    grid-row: auto;
    max-width: 29ch;
  }
  .method p {
    font-size: 13px;
  }
  footer {
    padding: 17px;
    flex-direction: column;
    gap: 7px;
  }
  .review-panel button {
    margin-bottom: 8px;
  }
  #notice {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
