/*
 * SEATURTLE.ORG lightweight UI system
 * Version 0.7
 *
 * Shared interface primitives only. Application layout and domain-specific
 * presentation should remain in each application's own stylesheet.
 *
 * Usage: place .sto-ui on the application/content root. Shared classes are
 * prefixed sto- to reduce the risk of collisions with legacy site CSS.
 */

.sto-ui,
.sto-ui *,
.sto-ui *::before,
.sto-ui *::after {
  box-sizing: border-box;
}

.sto-ui {
  --sto-font: Arial, Helvetica, sans-serif;
  --sto-text: #20252a;
  --sto-muted: #59635e;
  --sto-subtle: #69736e;
  --sto-link: #176b45;
  --sto-link-hover: #0f5133;
  --sto-surface: #ffffff;
  --sto-surface-soft: #f7f9f8;
  --sto-surface-tint: #f4f6f5;
  --sto-border: #ccd3cf;
  --sto-border-light: #e1e5e3;
  --sto-control-border: #aeb8b2;
  --sto-primary: #176b45;
  --sto-primary-hover: #125a3a;
  --sto-success: #2d6a35;
  --sto-success-bg: #f1f8f2;
  --sto-success-border: #9fc3a5;
  --sto-warning: #715b12;
  --sto-warning-bg: #fff9e8;
  --sto-warning-border: #d8c37a;
  --sto-error: #8b1e1e;
  --sto-error-bg: #fff4f4;
  --sto-error-border: #c88;
  --sto-info-bg: #f5f7f6;
  --sto-info-border: #d4dad7;
  --sto-radius: 5px;
  --sto-radius-sm: 4px;
  --sto-space-1: 4px;
  --sto-space-2: 8px;
  --sto-space-3: 12px;
  --sto-space-4: 16px;
  --sto-space-5: 24px;
  --sto-space-6: 32px;
  color: var(--sto-text);
  font-family: var(--sto-font);
  font-size: 16px;
  line-height: 1.45;
}

.sto-ui a { color: var(--sto-link); text-decoration: underline; text-underline-offset: .12em; }
.sto-ui a:hover { color: var(--sto-link-hover); }
.sto-ui img { max-width: 100%; }
.sto-ui button,
.sto-ui input,
.sto-ui select,
.sto-ui textarea { font: inherit; }

.sto-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.sto-page-wide {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.sto-section { margin: 0 0 var(--sto-space-5); }
.sto-section + .sto-section { padding-top: 0; }

.sto-page-title {
  margin: 0 0 var(--sto-space-2);
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.15;
}

.sto-section-title {
  margin: 0 0 var(--sto-space-3);
  padding-bottom: var(--sto-space-2);
  border-bottom: 1px solid var(--sto-border);
  font-size: 1.15rem;
  line-height: 1.25;
}

.sto-subsection-title {
  margin: 0 0 var(--sto-space-2);
  font-size: 1rem;
  line-height: 1.3;
}

.sto-lead { margin: 0; color: var(--sto-muted); font-size: 1rem; }
.sto-help { margin: var(--sto-space-1) 0 0; color: var(--sto-muted); font-size: .84rem; line-height: 1.4; }

.sto-help-disclosure {
  position: relative;
  display: inline-block;
  color: var(--sto-muted);
  font-size: .84rem;
  line-height: 1.4;
}

.sto-help-disclosure summary {
  display: inline-grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  margin-left: 4px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--sto-link);
  cursor: pointer;
  font-size: .78em;
  font-weight: 700;
  line-height: 1;
  list-style: none;
  vertical-align: .08em;
}

.sto-help-disclosure summary::-webkit-details-marker {
  display: none;
}

.sto-help-disclosure summary::before {
  content: "?";
}

.sto-help-disclosure summary:hover,
.sto-help-disclosure summary:focus-visible {
  color: var(--sto-link-hover);
}

.sto-help-disclosure[open] > :not(summary) {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  max-width: min(32rem, calc(100vw - 40px));
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--sto-border);
  border-radius: var(--sto-radius);
  background: var(--sto-surface);
  color: var(--sto-text);
  box-shadow: 0 3px 10px rgb(0 0 0 / 14%);
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.4;
}

.sto-muted { color: var(--sto-muted); }
.sto-small { font-size: .84rem; }
.sto-meta { color: var(--sto-subtle); font-size: .78rem; }

.sto-stack > * { margin-block: 0; }
.sto-stack-tight > * { margin-block: 0; }

.sto-stack { display: grid; gap: var(--sto-space-3); }
.sto-stack-tight { display: grid; gap: var(--sto-space-2); }
.sto-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sto-space-2); }
.sto-cluster-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sto-space-3); }

/* Resource identity and local navigation */
.sto-resource-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sto-space-2) var(--sto-space-4);
}

.sto-resource-title {
  color: var(--sto-text);
  font-size: 1.15rem;
  font-weight: 700;
}

.sto-resource-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sto-space-2) var(--sto-space-3);
  font-size: .95rem;
  font-weight: 600;
}

.sto-grid-2,
.sto-grid-3 {
  display: grid;
  gap: var(--sto-space-4);
}
.sto-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sto-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Panels and cards */
.sto-panel,
.sto-card {
  border: 1px solid var(--sto-border);
  border-radius: var(--sto-radius);
  background: var(--sto-surface);
}
.sto-panel { padding: var(--sto-space-4); }
.sto-card { padding: var(--sto-space-3); }
.sto-panel-soft { background: var(--sto-surface-soft); }
.sto-card-title { margin: 0; font-size: 1rem; }
.sto-card-body { margin-top: var(--sto-space-2); }

/* Buttons */
.sto-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--sto-control-border);
  border-radius: var(--sto-radius-sm);
  background: #f4f4f4;
  color: var(--sto-text);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.sto-button:hover,
.sto-button:focus-visible { background: #e8e8e8; color: var(--sto-text); }

.sto-button:focus-visible,
.sto-button-link:focus-visible,
.sto-ui a:focus-visible { outline: 3px solid rgb(23 107 69 / 32%); outline-offset: 2px; }
.sto-button-primary { border-color: var(--sto-primary); background: var(--sto-primary); color: #fff; }
.sto-button-primary:hover,
.sto-button-primary:focus-visible { background: var(--sto-primary-hover); color: #fff; }
.sto-button-secondary { border-color: var(--sto-primary); background: #fff; color: var(--sto-primary); }
.sto-button-secondary:hover,
.sto-button-secondary:focus-visible { background: #f0f5f2; color: var(--sto-primary-hover); }
.sto-button-destructive { border-color: #a55; background: #fff; color: var(--sto-error); }
.sto-button-destructive:hover,
.sto-button-destructive:focus-visible { background: #fff0f0; color: var(--sto-error); }
.sto-button-compact { min-height: 26px; padding: 3px 6px; font-size: .82rem; }
.sto-button-link { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--sto-link); font-weight: 600; }
.sto-button-link:hover,
.sto-button-link:focus-visible { background: transparent; color: var(--sto-link-hover); text-decoration: underline; }
.sto-button:disabled,
.sto-button[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

.sto-icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 5px;
  font-size: 1rem;
  line-height: 1;
}
.sto-icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Forms */
.sto-field { display: grid; width: 100%; min-width: 0; max-width: 100%; align-content: start; gap: var(--sto-space-1); }
.sto-field input[type="file"] { width: 100%; min-width: 0; max-width: 100%; }
.sto-label { font-size: .84rem; font-weight: 600; }
.sto-required { color: var(--sto-error); }
.sto-input,
.sto-select,
.sto-textarea {
  width: 100%;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid var(--sto-control-border);
  border-radius: var(--sto-radius-sm);
  background: #fff;
  color: var(--sto-text);
  font: inherit;
}
.sto-input,
.sto-select {
  height: 28px;
}
.sto-select-list {
  height: auto;
  min-height: 8.5rem;
}
.sto-textarea { min-height: 92px; resize: vertical; }
.sto-input:focus,
.sto-select:focus,
.sto-textarea:focus { border-color: var(--sto-primary); outline: 2px solid rgb(23 107 69 / 18%); outline-offset: 1px; }
.sto-input:disabled,
.sto-select:disabled,
.sto-textarea:disabled { background: #f1f2f1; color: var(--sto-subtle); }
.sto-field-error .sto-input,
.sto-field-error .sto-select,
.sto-field-error .sto-textarea { border-color: var(--sto-error); }
.sto-field-error-text { color: var(--sto-error); font-size: .82rem; }
.sto-check { display: flex; align-items: flex-start; gap: 7px; font-size: .9rem; }
.sto-check input { margin-top: .2em; }
/* Form grids. Two columns remain the default for compatibility; choose 3 or 4 when width and content support it. */
.sto-form-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--sto-space-3) var(--sto-space-4);
}
.sto-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sto-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sto-form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sto-form-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sto-field-span-2 { grid-column: span 2; }
.sto-field-span-all { grid-column: 1 / -1; }
.sto-form-action {
  min-height: 28px;
  align-self: end;
  display: flex;
  align-items: center;
}

/* Intrinsic field widths. Grid cells establish relationships; controls need not fill them. */
.sto-field-xxs { width: min(100%, 6ch); }
.sto-field-xs { width: min(100%, 10ch); }
.sto-field-sm { width: min(100%, 16ch); }
.sto-field-md { width: min(100%, 28ch); }
.sto-field-lg { width: min(100%, 42ch); }
.sto-field-full { width: 100%; }
.sto-field-readonly .sto-input { background: var(--sto-surface-soft); color: var(--sto-muted); }

/* Toolbars and grouped controls */
.sto-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--sto-space-3);
  margin-bottom: var(--sto-space-3);
}
.sto-toolbar-main { flex: 1 1 280px; }
.sto-toolbar-actions { display: flex; flex-wrap: wrap; gap: var(--sto-space-2); }
.sto-segmented { display: inline-flex; flex-wrap: nowrap; }
.sto-segmented .sto-button { margin-left: -1px; border-radius: 0; font-weight: 400; }
.sto-segmented .sto-button:first-child { margin-left: 0; border-radius: var(--sto-radius-sm) 0 0 var(--sto-radius-sm); }
.sto-segmented .sto-button:last-child { border-radius: 0 var(--sto-radius-sm) var(--sto-radius-sm) 0; }
.sto-segmented .sto-button[aria-pressed="true"] { position: relative; z-index: 1; background: #dde3e0; font-weight: 700; }

/* Feedback */
.sto-message {
  padding: 10px 12px;
  border: 1px solid var(--sto-info-border);
  border-radius: var(--sto-radius-sm);
  background: var(--sto-info-bg);
  font-size: .9rem;
}
.sto-message p { margin: 0; }
.sto-message p + p { margin-top: var(--sto-space-1); }
.sto-message-success { border-color: var(--sto-success-border); background: var(--sto-success-bg); }
.sto-message-warning { border-color: var(--sto-warning-border); background: var(--sto-warning-bg); }
.sto-message-error { border-color: var(--sto-error-border); background: var(--sto-error-bg); color: var(--sto-error); }
.sto-status { min-height: 1.3em; color: var(--sto-muted); font-size: .84rem; }
.sto-status-success { color: var(--sto-success); }
.sto-status-error { color: var(--sto-error); }

.sto-badge {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--sto-border);
  border-radius: 999px;
  background: var(--sto-surface-soft);
  color: var(--sto-muted);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.sto-badge-success { border-color: var(--sto-success-border); background: var(--sto-success-bg); color: var(--sto-success); }
.sto-badge-warning { border-color: var(--sto-warning-border); background: var(--sto-warning-bg); color: var(--sto-warning); }
.sto-badge-error { border-color: var(--sto-error-border); background: var(--sto-error-bg); color: var(--sto-error); }

/* Disclosure */
.sto-disclosure {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sto-space-2);
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--sto-text);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}
.sto-disclosure:hover,
.sto-disclosure:focus-visible { color: var(--sto-link); }
.sto-disclosure-marker { width: 12px; color: var(--sto-link); }
.sto-disclosure[aria-expanded="false"] .sto-disclosure-marker::before { content: "▸"; }
.sto-disclosure[aria-expanded="true"] .sto-disclosure-marker::before { content: "▾"; }

/* Metadata */
.sto-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; }
.sto-details dt { font-weight: 700; color: #3e4944; }
.sto-details dd { margin: 0; color: var(--sto-muted); overflow-wrap: anywhere; }

/* Detail content with optional visual preview */
.sto-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: var(--sto-space-5);
  align-items: start;
}

.sto-detail-preview {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  justify-self: end;
  border: 1px solid var(--sto-border);
}

/* Data tables */
.sto-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--sto-border);
  border-radius: var(--sto-radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.sto-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: .88rem;
}
.sto-table th,
.sto-table td { padding: 8px 10px; border-bottom: 1px solid var(--sto-border-light); text-align: left; vertical-align: top; }
.sto-table thead th { background: #f2f4f3; color: #46514c; font-size: .76rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.sto-table tbody tr:last-child th,
.sto-table tbody tr:last-child td { border-bottom: 0; }
.sto-table tbody tr:hover { background: #fafcfb; }
.sto-table .sto-number { text-align: right; font-variant-numeric: tabular-nums; }
.sto-table .sto-nowrap { white-space: nowrap; }
.sto-table .sto-row-summary th,
.sto-table .sto-row-summary td { border-top: 2px solid var(--sto-border); background: var(--sto-surface-soft); font-weight: 700; }
.sto-table .sto-row-muted { color: var(--sto-subtle); background: #fafafa; }
.sto-table-dense { font-size: .76rem; }
.sto-table-dense th,
.sto-table-dense td { padding: 5px 7px; }
.sto-table-dense th { line-height: 1.2; }
.sto-table.sto-table-dense thead th { white-space: normal; font-size: .7rem; }
.sto-table-actions { display: flex; flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
.sto-table-action { color: var(--sto-link); font-size: .74rem; font-weight: 700; text-decoration: none; }
.sto-table-action + .sto-table-action::before { content: "·"; margin-right: 4px; color: var(--sto-subtle); }
.sto-table-dense .sto-nowrap,
.sto-table-dense .sto-table-actions { white-space: nowrap; }

/* Grouped dense data */
.sto-data-group { margin-top: var(--sto-space-3); }
.sto-data-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sto-space-2);
  padding: 7px 8px;
  border: 1px solid var(--sto-border);
  border-bottom: 0;
  border-radius: var(--sto-radius) var(--sto-radius) 0 0;
  background: var(--sto-surface-soft);
}
.sto-data-group-header .sto-button-link { font-size: .82rem; }
.sto-data-group .sto-table-wrap { border-radius: 0 0 var(--sto-radius) var(--sto-radius); }

/* Search/result list */
.sto-result-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.sto-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sto-space-3); padding: 10px 11px; border: 1px solid var(--sto-border-light); border-left: 4px solid #8fa69a; border-radius: var(--sto-radius-sm); background: #fff; }
.sto-result:hover { border-color: var(--sto-border); border-left-color: var(--sto-primary); background: #fbfdfc; }
.sto-result-title { margin: 0; line-height: 1.4; }
.sto-result-actions { display: grid; grid-template-columns: repeat(2, 2.5rem); align-content: start; gap: 5px; padding-left: 10px; border-left: 1px solid var(--sto-border-light); }
.sto-result-action { display: block; padding: 2px 4px; color: var(--sto-link); font-size: .74rem; font-weight: 700; text-align: center; white-space: nowrap; }

/* Pagination */
.sto-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sto-pagination a,
.sto-pagination strong { min-width: 26px; padding: 4px 6px; border: 1px solid var(--sto-border); border-radius: var(--sto-radius-sm); text-align: center; text-decoration: none; }
.sto-pagination strong { border-color: var(--sto-primary); background: var(--sto-primary); color: #fff; }

/* Operational table states */
.sto-row-error > th,
.sto-row-error > td { background: var(--sto-error-bg); }
.sto-row-excluded > th,
.sto-row-excluded > td { background: #f2f2f2; color: var(--sto-subtle); }
.sto-cell-error { background: #ffe2e2 !important; color: var(--sto-error); font-weight: 700; }
.sto-state-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; color: var(--sto-muted); font-size: .78rem; }
.sto-state-key span { display: inline-flex; align-items: center; gap: 5px; }
.sto-state-chip { width: 11px; height: 11px; border: 1px solid var(--sto-border); border-radius: 2px; background: #fff; }
.sto-state-chip-error { border-color: var(--sto-error-border); background: var(--sto-error-bg); }
.sto-state-chip-excluded { background: #f2f2f2; }

/* Image/gallery presentation */
.sto-image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sto-space-3); }
.sto-image-card { min-width: 0; padding: 8px; border: 1px solid var(--sto-border); border-radius: var(--sto-radius); background: #fff; }
.sto-image-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--sto-radius-sm); background: var(--sto-surface-soft); }
.sto-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sto-image-title { margin: 7px 0 2px; font-size: .84rem; font-weight: 700; line-height: 1.3; }
.sto-image-meta { margin: 0; color: var(--sto-muted); font-size: .75rem; }
.sto-image-actions { margin-top: 5px; font-size: .74rem; }


/* Empty and loading states */
.sto-empty-state,
.sto-loading-state {
  display: grid;
  justify-items: start;
  gap: var(--sto-space-2);
  padding: var(--sto-space-4);
  border: 1px dashed var(--sto-border);
  border-radius: var(--sto-radius);
  background: var(--sto-surface-soft);
}
.sto-empty-state p, .sto-loading-state p { margin: 0; }
.sto-loading-inline { display: inline-flex; align-items: center; gap: var(--sto-space-2); color: var(--sto-muted); font-size: .84rem; }

/* Pattern specimens document recommended composition without creating app-specific components. */
.sto-pattern { padding: var(--sto-space-4); border: 1px solid var(--sto-border); border-radius: var(--sto-radius); background: #fff; }
.sto-pattern + .sto-pattern { margin-top: var(--sto-space-4); }
.sto-pattern-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sto-space-2); margin-bottom: var(--sto-space-3); }
.sto-pattern-heading h3, .sto-pattern-heading p { margin: 0; }

/* Gallery-specific helpers are intentionally sto-prefixed so this file can
   serve the gallery without introducing a second stylesheet. */
.sto-gallery-header { margin-bottom: var(--sto-space-6); padding: 28px 0 22px; background: var(--sto-primary); color: #fff; }
.sto-gallery-header .sto-page { display: grid; gap: 6px; }
.sto-gallery-header .sto-lead { color: rgb(255 255 255 / 82%); }
.sto-gallery-nav { position: sticky; top: 0; z-index: 10; margin-bottom: var(--sto-space-5); border-bottom: 1px solid var(--sto-border); background: rgb(255 255 255 / 96%); }
.sto-gallery-nav .sto-page { display: flex; gap: 4px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; }
.sto-gallery-nav a { padding: 5px 8px; border-radius: 4px; color: var(--sto-muted); font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sto-gallery-nav a:hover,
.sto-gallery-nav a:focus-visible { background: var(--sto-surface-tint); color: var(--sto-link); }
.sto-swatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: var(--sto-space-2); }
.sto-swatch { overflow: hidden; border: 1px solid var(--sto-border); border-radius: var(--sto-radius); background: #fff; }
.sto-swatch-color { height: 48px; }
.sto-swatch-label { padding: 7px 8px; font-size: .75rem; }
.sto-swatch-primary { background: var(--sto-primary); }
.sto-swatch-surface { background: var(--sto-surface-tint); }
.sto-swatch-border { background: var(--sto-border); }
.sto-swatch-success { background: var(--sto-success); }
.sto-swatch-warning { background: var(--sto-warning-bg); }
.sto-swatch-error { background: var(--sto-error); }
.sto-specimen { margin-top: var(--sto-space-3); padding: var(--sto-space-4); border: 1px dashed #b9c1bd; border-radius: var(--sto-radius); background: #fff; }
.sto-specimen-label { margin: 0 0 var(--sto-space-3); color: var(--sto-subtle); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.sto-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd8d1;
  border-top-color: var(--sto-primary);
  border-radius: 50%;
  animation: sto-spin .75s linear infinite;
}
@keyframes sto-spin { to { transform: rotate(360deg); } }

.sto-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) and (min-width: 721px) {
  .sto-form-grid-3,
  .sto-form-grid-4,
  .sto-form-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .sto-page,
  .sto-page-wide { width: min(100% - 20px, 1180px); }
  .sto-grid-2,
  .sto-grid-3,
  .sto-form-grid,
  .sto-form-grid-2,
  .sto-form-grid-3,
  .sto-form-grid-4,
  .sto-form-grid-5 { grid-template-columns: 1fr; }
  .sto-field-span-2,
  .sto-field-span-all { grid-column: auto; }
  .sto-toolbar { align-items: stretch; }
  .sto-toolbar-actions { width: 100%; }
  .sto-toolbar-actions > .sto-button { flex: 1 1 auto; }
  .sto-segmented { width: 100%; }
  .sto-segmented .sto-button { flex: 1 1 0; }
  .sto-details { grid-template-columns: 1fr; gap: 1px; }
  .sto-details dd { margin-bottom: 7px; }
  .sto-detail-layout { grid-template-columns: 1fr; }
  .sto-detail-preview { justify-self: start; max-width: 300px; }
  .sto-result { grid-template-columns: 1fr; }
  .sto-result-actions { display: flex; flex-wrap: wrap; padding-left: 0; border-left: 0; }
  .sto-result-action { text-align: left; }
  .sto-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sto-help-disclosure[open] > :not(summary) { max-width: min(22rem, calc(100vw - 32px)); }
}

@media (max-width: 420px) {
  .sto-image-grid { grid-template-columns: 1fr; }
}


/* Site and resource announcements */
.sto-announcement { width:min(1180px,calc(100% - 32px)); margin:12px auto 0; padding:10px 12px; border:1px solid var(--sto-info-border); border-left:4px solid var(--sto-primary); border-radius:var(--sto-radius); background:var(--sto-surface-soft); color:var(--sto-text); font-size:.9rem; }
.sto-announcement-inner { display:flex; align-items:flex-start; gap:var(--sto-space-3); }
.sto-announcement-content { flex:1 1 auto; min-width:0; }
.sto-announcement-title { margin-right:.5em; font-weight:700; }
.sto-announcement-message { color:var(--sto-muted); }
.sto-announcement-link { margin-left:.45em; font-weight:700; white-space:nowrap; }
.sto-announcement-dismiss { flex:0 0 auto; width:28px; height:28px; margin:-4px -4px -4px 0; padding:0; border:0; border-radius:var(--sto-radius-sm); background:transparent; color:var(--sto-muted); cursor:pointer; font:inherit; font-size:1.25rem; line-height:1; }
.sto-announcement-dismiss:hover,.sto-announcement-dismiss:focus-visible { background:var(--sto-border-light); color:var(--sto-text); }
.sto-announcement-dismiss:focus-visible { outline:3px solid rgb(23 107 69 / 32%); outline-offset:2px; }
@media (max-width:720px) {
  .sto-announcement { width:min(100% - 20px,1180px); margin-top:10px; }
  .sto-announcement-link { margin-left:0; white-space:normal; }
}

@media (prefers-reduced-motion: reduce) {
  .sto-spinner { animation: none; }
  .sto-ui { scroll-behavior: auto; }
}


/* Application-shell gallery specimen */
.sto-shell-specimen { overflow: hidden; border: 1px solid var(--sto-border); border-radius: var(--sto-radius); background: #fff; }
.sto-shell-specimen .sto-app-header { position: relative; }
.sto-shell-specimen .sto-shell-inner { width: min(100% - 24px, 1180px); }
.sto-shell-specimen-body { padding: var(--sto-space-4); }
.sto-shell-specimen-body p { margin: 0; }

/* Live shell previews. Each iframe loads the canonical SSI shell in its own
   document so duplicate shell IDs and navigation state cannot collide. */
.sto-shell-preview {
  display: block;
  width: 100%;
  height: 330px;
  border: 0;
  background: #fff;
}
.sto-shell-preview-app { height: 245px; }
@media (max-width: 720px) {
  .sto-shell-preview { height: 390px; }
  .sto-shell-preview-app { height: 285px; }
}

