/* The editor is a working surface; the Letter sheet remains the visual anchor. */
.plot-page {
  padding-top: 20px;
}
.plot-heading {
  margin-bottom: 16px;
  gap: 24px;
}
.plot-heading h1 {
  font-size: clamp(27px, 3vw, 36px);
}
.plot-heading > div:first-child > p:last-child {
  max-width: 690px;
  line-height: 1.5;
}
.plot-toolbar {
  padding-block: 8px;
}
.plot-toolbar button {
  min-height: 40px;
}
.plot-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
}
.plot-controls {
  padding-right: 20px;
}
.plot-controls section + section {
  padding-top: 18px;
  margin-top: 18px;
}
.plot-controls h2 {
  font-size: 15px;
  margin-bottom: 12px;
}
.plot-controls .field {
  margin-bottom: 10px;
}
.plot-controls .note {
  margin-block: 10px;
  line-height: 1.5;
}
.plot-starter-preview {
  width: 100%;
  aspect-ratio: 11/8.5;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}
.plot-starter-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.plot-preset-actions {
  display: grid;
  gap: 6px;
}
.plot-preset-actions button {
  width: 100%;
  text-align: center;
}
.plot-page #plot-new {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-size: 12px;
}
.plot-reset-filters {
  margin: 0 0 10px;
  padding: 5px 0 !important;
  border: 0;
  background: none;
  color: var(--accent);
  min-height: 30px !important;
}
.plot-palette {
  max-height: 280px;
}
.plot-name-field {
  margin-bottom: 12px;
}
.plot-name-field input {
  font-size: 20px;
  min-height: 40px;
  padding-block: 6px;
}
.plot-section-heading {
  gap: 10px;
  margin-bottom: 8px;
}
.plot-counts {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.plot-selection-slot {
  height: 46px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  min-width: 0;
}
.plot-selection-slot > #plot-selection-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.plot-selection-slot .plot-selection-actions {
  margin: 0;
  width: 100%;
  height: 42px;
}
.plot-selection-slot .plot-selection-actions[hidden] {
  display: none !important;
}
.plot-selection-actions input {
  border-color: var(--line);
}
.plot-dialog {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  max-height: 88svh;
  width: min(940px, calc(100% - 40px));
  overflow: auto;
}
.plot-dialog::backdrop {
  background: #19191970;
}
.plot-dialog h2 {
  font-size: 28px;
  margin: 0;
}
.plot-dialog > .note {
  margin: 14px 0 20px;
}
.plot-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.plot-dialog-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 8px;
}
.plot-dialog-heading button {
  min-width: 70px;
}
.plot-preset-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.plot-preset-gallery h3 {
  grid-column: 1/-1;
  font-size: 15px;
  letter-spacing: 0;
  margin: 14px 0 0;
}
.plot-page .plot-preset-gallery button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}
.plot-preset-gallery button:hover {
  border-color: var(--accent);
}
.plot-preset-gallery img {
  aspect-ratio: 11/8.5;
  object-fit: contain;
  background: #fff;
  width: 100%;
  height: auto;
}
.plot-preset-gallery strong {
  font-size: 14px;
}
.plot-preset-gallery span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.plot-replace-dialog {
  max-width: 560px;
}
.plot-replace-dialog > p {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
}
.plot-replace-dialog .form-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plot-replace-dialog button {
  flex: 1 1 150px;
}
.plot-replace-dialog #plot-confirm-preset {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@media (max-width: 1000px) {
  .plot-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
  }
  .plot-controls {
    padding-right: 14px;
  }
  .plot-account {
    max-width: 260px;
    padding-left: 16px;
  }
}
@media (max-width: 700px) {
  .plot-page {
    padding-top: 16px;
  }
  .plot-heading h1 {
    font-size: 28px;
  }
  .plot-heading > div:first-child > p:last-child {
    font-size: 13px;
  }
  .plot-heading {
    margin-bottom: 12px;
  }
  .plot-account {
    max-width: none;
    padding: 0;
  }
  .plot-toolbar {
    gap: 5px;
  }
  .plot-toolbar button {
    min-height: 40px;
  }
  .plot-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .plot-controls,
  .plot-work {
    display: contents;
  }
  .plot-controls > section:first-child {
    order: 0;
    display: block;
  }
  .plot-work > section:first-child {
    order: 1;
  }
  .plot-controls > .plot-equipment-section {
    order: 2;
  }
  .plot-controls #plot-inspector {
    order: 3;
  }
  .plot-controls > .plot-show-details {
    order: 4;
  }
  .plot-work > .plot-input-section {
    order: 5;
  }
  .plot-work > .plot-output-section {
    order: 6;
  }
  .plot-work > .plot-notes {
    order: 7;
  }
  .plot-controls > section:last-child {
    order: 8;
  }
  .plot-starter-preview {
    display: none;
  }
  .plot-preset-actions {
    grid-template-columns: 1fr 1fr;
  }
  .plot-controls > section:first-child .field {
    margin-bottom: 8px;
  }
  .plot-controls > section:first-child .note {
    margin: 8px 0;
  }
  .plot-controls > section:first-child > .plot-guide-link {
    display: none;
  }
  .plot-jumps {
    position: static;
    margin: 10px 0 16px;
    padding: 11px 0;
  }
  .plot-section-heading > .note {
    display: none;
  }
  .plot-section-heading .plot-counts {
    margin-left: auto;
    font-size: 10px;
  }
  .plot-paper-label {
    font-size: 9px;
    padding-left: 8px;
  }
  .plot-selection-slot {
    height: 42px;
  }
  .plot-selection-slot > #plot-selection-empty {
    font-size: 10px;
  }
  .plot-page .plot-selection-actions button {
    min-height: 34px;
  }
  .plot-palette {
    max-height: 235px;
  }
  .plot-dialog {
    padding: 18px;
    width: calc(100% - 24px);
    max-height: 92svh;
  }
  .plot-dialog h2 {
    font-size: 22px;
  }
  .plot-preset-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .plot-page .plot-preset-gallery button {
    padding: 8px;
    min-height: 44px;
  }
  .plot-preset-gallery strong {
    font-size: 12px;
  }
  .plot-preset-gallery span {
    font-size: 10px;
  }
  .plot-replace-dialog .form-actions {
    flex-direction: column;
  }
  .plot-replace-dialog button {
    flex: auto;
    width: 100%;
  }
}
@media print {
  .plot-dialog {
    display: none !important;
  }
}
/* An optional focused view gives the page back to the drawing. */
body.plot-focus .site-header,
body.plot-focus > .skip,
.plot-focus .plot-heading,
.plot-focus .plot-learn,
.plot-focus footer {
  display: none;
}
.plot-focus .plot-page {
  padding-top: 10px;
}
.plot-focus .plot-work > .plot-input-section,
.plot-focus .plot-work > .plot-output-section,
.plot-focus .plot-work > .plot-notes,
.plot-focus .plot-print-help {
  display: none;
}
.plot-focus .plot-toolbar {
  top: 0;
}
.plot-focus .plot-layout {
  align-items: start;
}
.plot-focus .plot-work > section:first-child {
  max-width: min(100%, calc((100svh - 220px) * 1.294117647));
  margin-inline: auto;
}
.plot-focus #plot-focus {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
@media (min-width: 701px) {
  .plot-focus .plot-controls {
    max-height: calc(100svh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (max-width: 700px) {
  .plot-focus .plot-work > section:first-child {
    max-width: 100%;
    width: 100%;
  }
  .plot-focus .plot-controls > section:first-child {
    order: 2;
  }
  .plot-focus .plot-work > section:first-child {
    order: 0;
  }
  .plot-focus .plot-controls > .plot-equipment-section {
    order: 1;
  }
  .plot-focus .plot-jumps {
    display: none;
  }
}
.plot-requested-preset {
  padding: 12px;
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  background: #b8342508;
}
.plot-requested-preset p {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.plot-requested-preset button {
  margin: 4px 0;
  width: 100%;
}
@media (max-width: 700px) {
  .plot-controls > section.plot-equipment-section {
    order: 2;
  }
  .plot-focus .plot-controls > section.plot-equipment-section {
    order: 1;
  }
}
