html:has(body.seed-page-shell) { overflow-anchor: none; }
.seed-page-shell [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.seed-page { justify-content: flex-start; gap: 0; }
.seed-emblem { background: var(--bt-icon-safeseed); }
.seed-heading { min-width: 0; }
.seed-heading .page-subtitle { text-wrap: pretty; }
.seed-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.seed-modes { display: flex; width: min(400px, 100%); }
.seed-modes button { min-height: 48px; flex: 1; padding: 10px 16px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); font-weight: 700; position: relative; }
.seed-modes button + button { border-left: 0; }
.seed-modes button[aria-pressed="true"] { color: var(--sheet); background: var(--action); }
.seed-modes button[aria-pressed="true"]::after { content: ''; position: absolute; bottom: -1px; left: calc(50% - 7px); width: 14px; height: 7px; background: url('./assets/notch.svg') center/contain no-repeat; }
.seed-local { margin: 0; }
.seed-note:empty { display: none; }
.seed-setup { margin-top: 18px; }
.seed-setup summary { cursor: pointer; width: fit-content; min-height: 44px; display: list-item; padding-block: 10px; font-size: 17px; }
.seed-setup-content { padding: 16px; border: 1px solid #827e6f66; border-radius: 8px; background: var(--paper); }
.seed-setup-content .seed-control { max-width: 280px; }
.seed-setup-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.seed-setup-actions .seed-quiet { min-height: 44px; }
.seed-status:empty { display: none; }
.seed-status { margin: 0 0 16px; padding: 12px 16px; background: var(--paper); border-left: 4px solid var(--ui-accent-neutral, #4A5860); }
.seed-section-heading, .seed-fields-heading, .seed-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.seed-workspace h2 { margin: 0; font-size: clamp(30px, 2.6vw, 44px); line-height: 1.12; font-weight: 900; }
.seed-workspace h3 { margin: 0; font-size: 21px; line-height: 1.3; }
.seed-eyebrow { color: var(--forest); font-size: 16px; font-weight: 600; text-transform: uppercase; margin: 0 0 8px; letter-spacing: .035em; }
.seed-section-heading { margin-bottom: 22px; }
#result-panel .seed-section-heading > div { position: relative; }
.seed-page fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.seed-parameters { display: grid; grid-template-columns: 1.5fr .75fr 2fr; gap: 24px; }
.seed-scenario { min-width: 0; }
.seed-parameters { row-gap: 10px; }
.seed-parameters[data-scenarios="none"] { grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr); }
.seed-parameters > #preset-description { margin: 0; font-size: 16px; }
.seed-parameters > .seed-context { grid-column: 3; }
.seed-context { font-size: 16px; line-height: 1.4; font-weight: 400; }
.seed-context p { margin: 0; }
.seed-context p, .seed-page-shell .nutshell-bubble p { text-wrap: pretty; }
.seed-context p + p { margin-top: 8px; }
.seed-control { display: flex; flex-direction: column; gap: 8px; font-size: 18px; font-weight: 600; min-width: 0; }
.seed-page input, .seed-page select, .seed-dialog input, .seed-dialog select { min-width: 0; max-width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--ink); background: var(--sheet); font: 600 18px/1.3 Barlow, sans-serif; }
.seed-page input[aria-invalid="true"], .seed-dialog input[aria-invalid="true"] { border: 2px solid var(--ui-error, #8D4B5A); }
.seed-note, .seed-footnote { margin: 12px 0 20px; font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.seed-fields-heading { margin-top: 20px; }
.seed-fields-heading span { font-size: 16px; }
.seed-field-actions { display: flex; align-items: center; gap: 16px; }
.seed-fields-heading + .seed-note { margin-top: 4px; margin-bottom: 14px; }
.seed-fields, .seed-included { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.seed-fields li { display: flex; align-items: stretch; background: var(--paper); border: 1px solid #827e6f66; border-radius: 8px; min-width: 0; }
.seed-fields .seed-empty { grid-column: 1 / -1; padding: 14px 16px; }
.seed-field-edit { display: flex; flex-direction: column; text-align: left; flex: 1; min-width: 0; border: 0; border-radius: 8px; padding: 14px 16px; background: none; color: var(--ink); }
.seed-field-edit strong { font: 500 17px/1.4 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.seed-field-edit span { font-size: 16px; line-height: 1.3; margin-top: 4px; text-wrap: pretty; }
.seed-field-edit:hover { background: var(--ui-highlight, #DCE5D8); }
.seed-remove { flex: none; width: 44px; border: 0; border-left: 1px solid #827e6f33; background: none; color: var(--ink); font-size: 25px; border-radius: 0 8px 8px 0; }
.seed-remove:hover { background: var(--ui-highlight, #DCE5D8); }
.seed-quiet { min-height: var(--button-min-height); min-width: 88px; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--button-radius); background: var(--sheet); color: var(--ink); font: 600 var(--button-label-min)/1.3 Barlow, sans-serif; }
.seed-quiet:hover { border-color: var(--ink); background: var(--paper); }
.seed-text-button { min-height: 44px; border: 0; padding: 6px 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; font-size: 17px; }
.seed-action { width: 100%; border: 0; margin-top: 24px; }
.seed-action.button-secondary { border: 1.5px solid var(--ink); background: var(--sheet); }
.seed-action img { width: 28px; height: 28px; object-fit: contain; }
.seed-download { color: var(--sheet); background: var(--forest); }
.seed-download:hover { background: #193e31; }
.seed-download-note { margin: 10px 0 0; }
.seed-footnote { display: flex; align-items: center; gap: 12px; margin-top: 14px; margin-bottom: 10px; }
.seed-help { margin: 12px 0 20px; font-size: 18px; display: block; }
.seed-help > a { text-decoration: none; border-bottom: 1px dotted; }
.seed-boundary { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--ui-highlight, #DCE5D8); border-radius: 6px; margin-top: 24px; }
.seed-boundary img { flex: none; margin-top: 2px; }
.seed-boundary strong { font-size: 18px; line-height: 1.35; }
.seed-boundary p { margin: 5px 0 0; font-size: 17px; line-height: 1.4; }
.seed-boundary .seed-help { display: block; margin: 6px 0 0; }
.seed-safeguards { display: block; margin: 6px 0 0; font-size: 17px; line-height: 1.4; }
.seed-bottom-note { font-size: 16px; margin: 14px 0 0; line-height: 1.4; }
.seed-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0 30px; }
.seed-summary dt { font-size: 18px; margin-bottom: 5px; }
.seed-summary dd { font-size: 32px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.seed-included { margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.seed-included li { background: var(--paper); border-radius: 6px; padding: 14px; text-align: center; font: 500 17px/1.4 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.seed-files { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.seed-file { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px dashed var(--border); border-radius: 8px; min-width: 0; background: var(--paper); }
.seed-file strong { font-size: 24px; }
.seed-file span { font-size: 17px; }
.seed-file input { width: 100%; font-size: 16px; background: var(--sheet); }
.seed-file input::file-selector-button { border: 0; background: var(--paper); color: var(--ink); padding: 8px; margin-right: 8px; border-radius: 4px; font: inherit; }
.seed-error { color: var(--ui-error, #8D4B5A); font-weight: 600; padding: 12px 16px; border-left: 4px solid var(--ui-error, #8D4B5A); background: var(--paper); }
.seed-verdict { padding: 22px; border-left: 5px solid var(--ui-accent-neutral, #4A5860); background: var(--paper); margin: 20px 0; overflow-wrap: anywhere; }
.seed-verdict.is-pass { border-color: var(--forest); background: var(--ui-highlight, #DCE5D8); }
.seed-verdict h3 { font-size: 28px; margin: 0 0 10px; }
.seed-verdict p { margin: 10px 0; }
.seed-verdict code { font-size: 15px; overflow-wrap: anywhere; }
.seed-source-notes { font-size: 17px; }
.seed-source-notes li { margin: 20px 0; }
.seed-reference { width: 100%; font-size: 19px; line-height: 1.55; }
.seed-reference h1 { margin: 28px 0 18px; font-size: clamp(38px, 4vw, 64px); line-height: 1.12; white-space: normal; }
.seed-reference h2 { margin-top: 36px; font-size: 30px; overflow-wrap: anywhere; }
.seed-reference section { border-top: 1px solid #827e6f66; margin-top: 32px; }
.seed-reference p { max-width: 80ch; }
.seed-reference code, .seed-reference pre { font: 15px/1.5 'IBM Plex Mono', monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.seed-reference pre { padding: 20px; background: var(--paper); border-radius: 6px; }
.seed-explanations { font-size: 18px; line-height: 1.5; }
.seed-boundary > div { min-width: 0; flex: 1; }
.seed-page-shell button:disabled { opacity: .45; cursor: not-allowed; }
.seed-dialog { color: var(--ink); background: var(--sheet); border: 1px solid var(--border); border-radius: 8px; padding: 28px; max-width: calc(100vw - 40px); box-shadow: 0 6px 22px #15252b33; }
.seed-dialog::backdrop { background: #15252b60; }
.seed-dialog h2 { font-size: 32px; font-weight: 900; line-height: 1.15; margin: 0; }
.seed-dialog-heading { margin-bottom: 20px; align-items: flex-start; }
.seed-field-dialog { width: 600px; max-height: calc(100svh - 48px); margin: 24px auto; }
.seed-field-dialog .seed-control { margin-top: 18px; }
.seed-assurance { margin-top: 18px; padding: 16px; background: var(--paper); font-size: 17px; line-height: 1.5; }
.seed-assurance strong { text-transform: capitalize; }
.seed-assurance p { margin: 8px 0; }
.seed-inspector { width: calc(100vw - 128px); height: calc(100svh - 128px); max-width: 2000px; max-height: none; padding: 28px 30px 20px; overflow: hidden; }
.seed-inspector[open] { display: flex; flex-direction: column; }
.seed-inspector h2 { display: flex; align-items: center; gap: 12px; font-size: 44px; }
.seed-inspector h2 img { width: 25px; height: auto; }
.seed-inspector .seed-dialog-heading { margin-bottom: 8px; }
.seed-inspector .seed-note { margin: 10px 0 20px; }
.seed-inspector-tools { display: flex; gap: 20px; align-items: center; justify-content: space-between; font-size: 17px; margin-bottom: 16px; }
.seed-inspector-tools label { display: flex; gap: 10px; align-items: center; }
.seed-inspector-tools select { min-height: 44px; }
.seed-inspector-tools p { margin: 0; }
#column-picker { position: relative; }
#column-picker > summary { cursor: pointer; padding: 10px 16px; background: var(--paper); border: 1px solid var(--border); border-radius: 6px; min-height: 44px; }
.seed-column-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 4; width: min(340px, 75vw); max-height: 50svh; overflow-y: auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--sheet); box-shadow: 0 3px 12px #15252b33; }
.seed-column-panel label { display: flex; gap: 10px; align-items: center; padding: 6px 0; overflow-wrap: anywhere; }
.seed-column-panel input { width: 20px; height: 20px; min-height: 20px; flex: none; accent-color: var(--forest); }
.seed-inspector-scroll { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 6px; }
#data-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 500 16px/1.5 'IBM Plex Mono', monospace; }
#data-table th, #data-table td { text-align: left; padding: 16px; min-width: 256px; max-width: 360px; vertical-align: top; overflow-wrap: anywhere; }
#data-table th { position: sticky; top: 0; z-index: 1; background: #eae4d6; font: 600 18px/1.4 Barlow, sans-serif; box-shadow: 0 1px 0 #827e6f55; }
#data-table th:first-child, #data-table td:first-child { min-width: 56px; width: 56px; position: sticky; left: 0; background: var(--sheet); }
#data-table th:first-child { z-index: 2; background: #eae4d6; }
#data-table tbody tr:nth-child(even), #data-table tbody tr:nth-child(even) td:first-child { background: var(--paper); }
.seed-inspector-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 17px; }
.seed-inspector-bottom > div { display: flex; gap: 16px; align-items: center; }
.seed-inspector-bottom p { margin: 0; }
.seed-page-jump { display: flex; align-items: center; gap: 10px; }
.seed-page-jump input { width: 80px; min-height: 44px; }
.seed-inspector-hint { font-size: 15px; margin: 12px 0 0; }
.seed-phone-record, #record-view { display: none; }
body:has(.seed-dialog[open]) { overflow: hidden; }
/* Local control modality; shared Nutshell controls keep their central owner. */
body.seed-page-shell[data-seed-input="pointer"] :is(.seed-control input, .seed-control select, .seed-field-edit, .seed-remove, .seed-quiet, .seed-action, .seed-text-button, .seed-setup > summary, #page-jump, #page-size, #column-picker > summary, .seed-section-heading h2):focus { outline: none; }
/* A desktop column can be narrower than the phone breakpoint. */
.seed-page-shell .nutshell-bubble { container: seed-help / inline-size; }
#main .nutshell-bubble [data-seed-name-character][data-explanation-mark="circle"] { margin-inline: 0; }
/* Bracket the wrapped name's text bounds instead of the card's full width. */
#scenario-help .nutshell-bubble [data-explanation-mark="bracket"][data-explanation-brackets="left right"] { display: inline; margin: 0; padding: 0; }
#scenario-help .nutshell-bubble dd:has(> [data-explanation-mark="bracket"][data-explanation-brackets="left right"]) { padding: 8px; }
@container seed-help (max-width: 540px) {
  :is(#main, #field-editor) .nutshell-bubble :is([data-explanation-cards], [data-explanation-steps], [data-explanation-pipeline]) { grid-template-columns: minmax(0, 1fr); }
  :is(#main, #field-editor) .nutshell-bubble [data-explanation-record] > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  :is(#main, #field-editor) .nutshell-bubble [data-explanation-pipeline] > [data-explanation-arrow] { text-align: center; }
  :is(#main, #field-editor) .nutshell-bubble [data-explanation-pipeline] [data-explanation-arrow] > span { display: inline-block; transform: rotate(90deg); }
}
@media (min-width: 1001px) {
  .seed-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(260px, calc((100% - 24px) / 4))), 1fr)); }
  .seed-fields:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .seed-fields:has(> li:nth-child(6):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(260px, calc((100% - 16px) / 3))), 1fr)); }
  .seed-workspace h2 { font-size: 34px; }
  .seed-eyebrow { font-size: 14px; margin-bottom: 6px; }
  #configure-panel .seed-eyebrow { display: none; }
  .seed-section-heading { margin-bottom: 16px; }
  .seed-note { margin-top: 8px; margin-bottom: 12px; }
  .seed-fields-heading { margin-top: 12px; }
  .seed-fields-heading + .seed-note { margin-bottom: 8px; }
  .seed-fields { gap: 8px; margin-bottom: 0; }
  .seed-field-edit { padding: 10px 14px; }
  .seed-action { margin-top: 16px; }
  .seed-disclosures { display: block; }
  .seed-disclosures .seed-footnote, .seed-disclosures .seed-help { margin: 10px 0 0; }
  .seed-disclosures .seed-help { display: block; width: 100%; }
  .seed-boundary { margin-top: 16px; padding: 14px 18px; }
  .seed-bottom-note { margin-top: 10px; }
  .seed-summary { margin-block: 20px; }
}
@media (max-width: 1400px) {
  .seed-inspector { width: calc(100vw - 64px); height: calc(100svh - 64px); }
  .seed-inspector h2 { font-size: 36px; }
}
@media (max-width: 1000px) {
  .seed-mode-row { flex-wrap: wrap; gap: 12px; }
  .seed-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seed-parameters { gap: 16px; }
  .seed-action { min-height: 52px; font-size: 20px; }
  .seed-files { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .seed-modes { width: 100%; }
  .seed-workspace h2 { font-size: 30px; }
  .seed-section-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
  .seed-parameters, .seed-parameters[data-scenarios="none"] { grid-template-columns: 1fr; gap: 18px; }
  .seed-parameters > #preset-description { grid-row: 2; margin-top: -10px; }
  .seed-parameters > .seed-context { grid-column: 1; margin-top: -8px; }
  .seed-preset, .seed-scenario { grid-column: 1 / -1; }
  .seed-control { font-size: 17px; }
  .seed-fields { grid-template-columns: 1fr; gap: 8px; }
  .seed-fields-heading { flex-wrap: wrap; gap: 8px; }
  .seed-field-actions { gap: 10px; }
  .seed-field-actions .seed-quiet { padding-inline: 12px; }
  .seed-field-edit { padding: 10px 12px; }
  .seed-field-edit strong { font-size: 16px; }
  .seed-field-edit span { font-size: 15px; }
  .seed-summary { grid-template-columns: 1fr 1fr; margin-block: 24px; }
  .seed-summary dd { font-size: 28px; }
  .seed-included { grid-template-columns: 1fr; gap: 8px; }
  .seed-included li { padding: 12px 8px; font-size: 14px; }
  .seed-help { font-size: 17px; display: block; }
  .seed-help .seed-text-button { display: block; margin-top: 12px; }
  .seed-boundary { padding: 16px; gap: 12px; }
  .seed-boundary p, .seed-bottom-note { font-size: 16px; }
  .seed-boundary strong { font-size: 17px; }
  .seed-file { padding: 18px; }
  .seed-field-dialog { max-width: calc(100vw - 24px); padding: 16px; }
  .seed-assurance { padding: 12px; }
  .seed-dialog h2 { font-size: 26px; }
  .seed-inspector { width: 100%; height: 100svh; max-width: none; margin: 0; padding: 16px 20px; border: 0; border-radius: 0; background: var(--paper); }
  .seed-inspector h2 { font-size: 24px; gap: 6px; }
  .seed-inspector h2 img { display: none; }
  .seed-inspector .seed-quiet { padding-inline: 16px; }
  .seed-inspector .seed-note { margin: 12px 0 8px; font-size: 16px; }
  .seed-phone-record { display: block; font-size: 17px; font-weight: 600; margin: 0 0 18px; }
  .seed-inspector-tools, #data-table { display: none; }
  #record-view { display: block; margin: 0; }
  #record-view div { padding: 16px; background: var(--sheet); }
  #record-view div:nth-child(even) { background: var(--paper); }
  #record-view dt { font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
  #record-view dd { margin: 0; font: 500 16px/1.5 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
  .seed-inspector-bottom { display: block; }
  .seed-inspector-bottom > p { display: none; }
  .seed-inspector-bottom > div { display: flex; justify-content: space-between; gap: 12px; }
  .seed-page-jump { font-size: 0; gap: 0; }
  .seed-page-jump input { width: 56px; }
  .seed-inspector-hint { font-size: 14px; line-height: 1.35; }
}
@media (max-width: 359px) {
  .seed-action { font-size: 18px; gap: 8px; }
  .seed-action img { width: 24px; height: 24px; }
  .seed-inspector { padding-inline: 16px; }
  .seed-inspector h2 { font-size: 22px; }
}
/* Short windows and zoom: let the dialog scroll instead of squeezing data away. */
@media (max-height: 600px) {
  .seed-inspector { width: calc(100vw - 24px); height: calc(100svh - 24px); margin: auto; padding: 16px; }
  .seed-inspector[open] { display: block; overflow-y: auto; }
  .seed-inspector-scroll { height: max(220px, 50svh); min-height: 220px; }
  .seed-inspector-tools { flex-wrap: wrap; gap: 12px; }
}
