.seed-drawer-skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-150%);
  padding: 0.5rem 0.75rem;
  background: Canvas;
  color: CanvasText;
  z-index: 100000;
}

.seed-drawer-skip-link:focus {
  transform: translateY(0);
}

.seed-drawer-shell {
  box-sizing: border-box;
  background-color: Canvas;
  color: CanvasText;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.seed-drawer-public-nav ul,
.seed-drawer-app-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.seed-drawer-shell a:any-link {
  color: LinkText;
}
.seed-drawer-shell label {
  color: CanvasText;
}

.seed-drawer-public-nav a,
.seed-drawer-app-nav a,
.seed-drawer-secondary-nav a,
.seed-drawer-entry-note a,
.seed-drawer-shell nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 1.5rem;
  text-underline-offset: 0.18em;
}

.seed-drawer-public-nav a:focus-visible,
.seed-drawer-app-nav a:focus-visible,
.seed-drawer-secondary-nav a:focus-visible,
.seed-drawer-entry-note a:focus-visible,
.seed-drawer-shell nav a:focus-visible,
.seed-drawer-skip-link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.seed-drawer-secondary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-block: 0 1rem;
}

.seed-drawer-nav-unavailable,
.seed-drawer-development-status {
  color: CanvasText;
}

.seed-drawer-route-state {
  font-size: 0.875em;
}

.seed-drawer-development-status,
.seed-drawer-entry-note {
  border: 1px solid currentColor;
  padding: 0.75rem 1rem;
  margin-block: 1rem;
}

.seed-drawer-app-mount {
  min-width: 0;
}
.seed-drawer-app-mount :is(button, input:not([type="checkbox"]):not([type="radio"]), select) {
  min-block-size: 2.75rem;
}
.seed-drawer-article-search :is(input, button) {
  min-block-size: 2.75rem;
  max-width: 100%;
}
.seed-drawer-shell :is(a, button, input, select, textarea, [tabindex]):focus {
  scroll-margin-block: 1rem;
}
#seed-drawer-route-content:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.seed-drawer-authored-content > :first-child {
  margin-top: 0;
}

@media (max-width: 36rem) {
  .seed-drawer-public-nav ul,
  .seed-drawer-app-nav ul,
  .seed-drawer-secondary-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Prompt 13 functional phase: neutral Collection controls and narrow-screen safety. */
.sd-collection { min-width: 0; overflow-wrap: anywhere; }
.sd-collection *, .sd-collection *::before, .sd-collection *::after { box-sizing: border-box; }
.sd-collection .sd-collection-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.sd-collection button, .sd-collection input, .sd-collection textarea, .sd-collection select {
  font: inherit; max-width: 100%; color: CanvasText; background: Canvas;
}
.sd-collection button { border: 1px solid currentColor; border-radius: .25rem; padding: .4rem .75rem; cursor: pointer; }
.sd-collection button[aria-pressed="true"] { border-width: 3px; font-weight: 700; }
.sd-collection button:disabled, .sd-collection select:disabled { cursor: not-allowed; opacity: .6; }
.sd-collection :is(button, input, textarea, select):focus-visible {
  outline: 3px solid currentColor; outline-offset: 3px;
}
.sd-collection .sd-collection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .75rem; list-style: none; padding: 0; }
.sd-collection .sd-collection-card, .sd-collection .sd-collection-detail, .sd-collection .sd-collection-editor {
  min-width: 0; border: 1px solid currentColor; padding: .75rem; margin-block: 1rem;
}
.sd-collection h4, .sd-collection p, .sd-collection dd { overflow-wrap: anywhere; }
.sd-collection .sd-collection-facts { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr); gap: .4rem 1rem; }
.sd-collection dt { font-weight: 700; }
.sd-collection dd { min-width: 0; margin: 0; white-space: pre-wrap; }
.sd-collection fieldset { min-width: 0; max-width: 100%; border: 1px solid currentColor; padding: .75rem; }
.sd-collection .sd-collection-field { min-width: 0; margin-block: .75rem; }
.sd-collection label { display: block; font-weight: 700; margin-block-end: .25rem; }
.sd-collection :is(input, textarea, select) { display: block; width: 100%; min-width: 0; padding: .4rem; border: 1px solid currentColor; border-radius: .2rem; }
.sd-collection textarea { resize: vertical; white-space: pre-wrap; }
.sd-collection .sd-collection-field-error { display: block; }
.sd-collection .sd-collection-field-error:not(:empty), .sd-collection .sd-collection-confirm,
.sd-collection .sd-collection-form-message:not(:empty) { border-inline-start: 3px solid currentColor; padding: .5rem; margin-block: .5rem; }
.sd-collection .sd-collection-suggestions { min-width: 0; }
.sd-collection .sd-collection-suggestions button { margin: .15rem; }
@media (max-width: 36rem) {
  .sd-collection .sd-collection-facts { display: block; }
  .sd-collection dt { margin-block-start: .6rem; }
  .sd-collection dd { margin-inline-start: .5rem; }
  .sd-collection .sd-collection-actions { align-items: stretch; flex-direction: column; }
  .sd-collection .sd-collection-actions button { width: 100%; }
}


/* Prompt 14 functional phase: My Storage reuses Collection's neutral controls. */
.sd-storage .sd-storage-integrity {
  border-width: 2px;
}
.sd-storage .sd-storage-dialog,
.sd-wishlist .sd-storage-dialog,
.sd-collection .sd-storage-dialog {
  max-width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  color: CanvasText;
  background: Canvas;
  border: 2px solid currentColor;
  padding: 1rem;
}
.sd-storage .sd-storage-dialog::backdrop,
.sd-wishlist .sd-storage-dialog::backdrop,
.sd-collection .sd-storage-dialog::backdrop {
  background: rgb(0 0 0 / 45%);
}
.sd-storage .sd-storage-move {
  min-width: 0;
}
.sd-storage .sd-storage-move label {
  display: block;
  font-weight: 700;
  margin-block: .5rem .25rem;
}
.sd-storage [data-lot-id],
.sd-storage [data-container-id] {
  min-width: 0;
}
@media (max-width: 36rem) {
  .sd-storage .sd-storage-dialog,
  .sd-wishlist .sd-storage-dialog,
  .sd-collection .sd-storage-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
  }
}


/* Prompt 16 functional phase: local Seed Finder controls and responsive results. */
.sd-finder { min-width: 0; overflow-wrap: anywhere; }
.sd-finder *, .sd-finder *::before, .sd-finder *::after { box-sizing: border-box; }
.sd-finder .sd-finder-form,
.sd-finder .sd-finder-summary,
.sd-finder .sd-finder-card {
  min-width: 0;
}
.sd-finder fieldset {
  min-width: 0;
  max-width: 100%;
  border: 1px solid currentColor;
  padding: .75rem;
  margin-block: .75rem;
}
.sd-finder label {
  display: block;
  font-weight: 700;
  margin-block: .5rem;
}
.sd-finder :is(input, select, button) {
  font: inherit;
  max-width: 100%;
  color: CanvasText;
  background: Canvas;
}
.sd-finder :is(input, select) {
  display: block;
  width: 100%;
  min-width: 0;
  margin-block-start: .25rem;
  padding: .4rem;
  border: 1px solid currentColor;
  border-radius: .2rem;
}
.sd-finder button {
  border: 1px solid currentColor;
  border-radius: .25rem;
  padding: .4rem .75rem;
  margin: .25rem .25rem .25rem 0;
  cursor: pointer;
}
.sd-finder button:disabled { cursor: not-allowed; opacity: .6; }
.sd-finder :is(button, input, select, a):focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
.sd-finder .sd-finder-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: .75rem;
  list-style: none;
  padding: 0;
}
.sd-finder .sd-finder-card {
  border: 1px solid currentColor;
  padding: .75rem;
}
.sd-finder .sd-finder-card :is(h3, p, a),
.sd-finder .sd-finder-status,
.sd-finder .sd-finder-summary { overflow-wrap: anywhere; }
.sd-finder .sd-finder-pager,
.sd-finder .sd-finder-transfer { margin-block: .75rem; }
@media (max-width: 36rem) {
  .sd-finder button { width: 100%; margin-inline: 0; }
}


/* Prompt 17: local-only Printer screen and tightly scoped native paper projection. */
.sd-printer { min-width: 0; overflow-wrap: anywhere; }
.sd-printer *, .sd-printer *::before, .sd-printer *::after { box-sizing: border-box; }
.sd-printer :is(fieldset, .sd-printer-banner, .sd-printer-preview) {
  min-width: 0; max-width: 100%; margin-block: .75rem; padding: .75rem; border: 1px solid currentColor;
}
.sd-printer .sd-printer-banner:not(:has(*)) { display: none; }
.sd-printer :is(button, select, input) { font: inherit; max-width: 100%; color: CanvasText; background: Canvas; }
.sd-printer button { border: 1px solid currentColor; border-radius: .25rem; padding: .4rem .75rem; cursor: pointer; }
.sd-printer button:disabled { cursor: not-allowed; opacity: .6; }
.sd-printer select { width: min(100%, 24rem); padding: .4rem; border: 1px solid currentColor; }
.sd-printer :is(button, select, input, a):focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.sd-printer .sd-printer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.sd-printer .sd-printer-list { padding-inline-start: 1.5rem; }
.sd-printer .sd-printer-list > li { margin-block: .75rem; padding: .5rem; border: 1px solid currentColor; min-width: 0; }
.sd-printer :is(p, li, h1, h2, h3, h4) { overflow-wrap: anywhere; white-space: normal; }
.sd-printer .sd-printer-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.sd-printer .sd-print-output,
.sd-printer .sd-print-fallback { display: none; }
@media (max-width: 36rem) {
  .sd-printer .sd-printer-actions { display: block; }
  .sd-printer .sd-printer-actions button { width: 100%; margin-block: .25rem; }
}

/*
 * Native print cycles are explicitly gated by a synchronously eligible, frozen
 * prepared snapshot. No visible screen preview or public article becomes a print source.
 * The app uses beforeprint/afterprint plus print-media exit where supported;
 * print() returning is NOT a capture-completion signal.
 */
@media print {
  .sd-trash .sd-collection-actions, .sd-trash .sd-storage-dialog,
  .seed-drawer-help nav { display: none !important; }
  @page { margin: 12mm; }
  body.sd-printer-route { margin: 0 !important; overflow: visible !important; }
  body.sd-printer-route * { visibility: hidden !important; }
  .sd-printer .sd-print-output[data-eligible="true"],
  .sd-printer .sd-print-output[data-eligible="true"] *,
  .sd-printer .sd-print-fallback[data-active="true"] {
    visibility: visible !important;
  }
  .sd-printer .sd-print-output[data-eligible="true"],
  .sd-printer .sd-print-fallback[data-active="true"] {
    display: block !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important; padding: 0 !important;
    color: #000 !important; background: #fff !important;
    font: 11pt/1.4 system-ui, sans-serif !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  .sd-printer .sd-print-output h1 { font-size: 18pt; margin: 0 0 .5rem; }
  .sd-printer .sd-print-output h3 { font-size: 13pt; margin: .8rem 0 .3rem; }
  .sd-printer .sd-print-output h4 { font-size: 11pt; margin: .5rem 0 .2rem; }
  .sd-printer .sd-print-output :is(li, p, h1, h3, h4) {
    overflow-wrap: anywhere !important; word-break: normal; white-space: pre-wrap;
    color: #000 !important; background: #fff !important;
  }
  /* A container group may contain many printed pages: allow group fragmentation.
   * Keep individual lot cards together when they fit on a page. */
  .sd-printer .sd-print-output .sd-printer-list > li {
    break-inside: avoid-page; page-break-inside: avoid;
  }
  .sd-printer .sd-print-output .sd-printer-group h3 { break-after: avoid-page; page-break-after: avoid; }
  .sd-printer .sd-print-output .sd-printer-list { padding-inline-start: 1.35rem; }
  .sd-printer .sd-print-output .sd-printer-list > li { padding: .2rem 0; margin: .35rem 0; border: 0; }
  .sd-printer .sd-print-output .sd-printer-notes { white-space: pre-wrap !important; }
}

/* Prompt 18: route-scoped, readable at narrow widths and 200% zoom. */
.sd-backup { min-width: 0; overflow-wrap: anywhere; }
.sd-backup *, .sd-backup *::before, .sd-backup *::after { box-sizing: border-box; }
.sd-backup .sd-backup-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: .75rem; }
.sd-backup button, .sd-backup input[type="file"] { max-width: 100%; font: inherit; }
.sd-backup button { border: 1px solid currentColor; border-radius: .25rem; padding: .45rem .75rem; cursor: pointer; }
.sd-backup button:disabled { opacity: .6; cursor: not-allowed; }
.sd-backup :is(button, input):focus-visible, .sd-backup [tabindex="-1"]:focus { outline: 3px solid currentColor; outline-offset: 3px; }
.sd-backup label { display: block; margin-block: .5rem; font-weight: 700; }
.sd-backup .sd-backup-consent label { display: inline; margin-inline: .4rem; }
.sd-backup .sd-backup-consent button { display: block; margin-block: .7rem; }
.sd-backup [aria-label="Destructive replacement warning"] { border-inline-start: 4px solid currentColor; padding-inline: .8rem; margin-block: 1rem; }
.sd-backup table { border-collapse: collapse; width: 100%; margin-block: .5rem 1rem; }
.sd-backup th, .sd-backup td { border-block-end: 1px solid currentColor; padding: .35rem; text-align: start; }
.sd-backup th { width: 80%; font-weight: 600; }
.sd-backup td { font-variant-numeric: tabular-nums; }
@media (max-width: 36rem) {
  .sd-backup .sd-backup-controls { display: flex; flex-direction: column; }
  .sd-backup .sd-backup-controls button { width: 100%; }
  .sd-backup th { width: auto; }
}

/* Prompt 19 secondary destinations share the established controls and print boundary. */
.seed-drawer-help { min-width: 0; overflow-wrap: anywhere; }
.seed-drawer-help nav ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding-inline-start: 1.5rem; }
.seed-drawer-help section { scroll-margin-top: 1.5rem; margin-block: 1.5rem; }
.seed-drawer-help li { margin-block: .5rem; }
.seed-drawer-help a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.sd-trash .sd-collection-card { min-width: 0; }
.sd-trash .sd-collection-card h2 { font-size: 1.15em; }
.sd-trash .sd-collection-status { min-height: 1.5em; }
.sd-trash .sd-storage-dialog {
  max-width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}
@media (max-width: 36rem) {
  .seed-drawer-help nav ul { display: block; }
  .sd-trash .sd-storage-dialog { width: calc(100vw - 1rem); }
}

/* Prompt 23: preserve orientation and focus without relying on motion. */
@media (prefers-reduced-motion: reduce) {
  .seed-drawer-skip-link,
  .seed-drawer-shell *,
  .seed-drawer-shell *::before,
  .seed-drawer-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Prompt 23: make the active theme's standalone icon controls named by the companion script
   and large enough for the WCAG 2.2 minimum target-size floor. */
.custom-social-icons a,
.search-box a,
.closepop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 1.5rem;
  min-block-size: 1.5rem;
}
.custom-social-icons a:focus-visible,
.search-box a:focus-visible,
.closepop a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
