/* AstroSong Studio, lane 118 (founder, 28/10): the look of Shopify's admin (its new look, as on the founder's screen), rebuilt by
   hand from his screenshots: a dark menu, white panels, Inter, Shopify's real text sizes on a computer (13 px), 16 px fields on a
   phone, Shopify's greys, black primary buttons and blue links. No Shopify or Polaris code, icon, font file or name is used.
   This one file is served as is to the sign-in page (/studio/assets) and imported by the Studio layouts; it styles the Studio only
   (the member space and the site have their own styles). Fonts and images are local files listed in src/lib/studio/host.ts, so
   the Studio's Content-Security-Policy is unchanged. Text sizes: 12 px at the smallest (tests/studio/design-105.test.ts). */
@font-face { font-family: "Inter"; src: url("/studio-inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  /* The frame. */
  --s-frame: #0A0A0A;
  --s-nav-text: #E3E3E3;
  --s-nav-strong: #FFFFFF;
  --s-nav-muted: #A3A3A3;
  --s-nav-hover: #1C1C1C;
  --s-nav-active: #262626;
  --s-nav-field: #303030;
  --s-nav-count: #474747;
  /* Surfaces and text. */
  --s-surface: #FFFFFF;
  --s-surface-2: #F7F7F7;
  --s-surface-hover: #F7F7F7;
  --s-surface-selected: #F1F1F1;
  --s-page: #F1F1F1;
  --s-text: #101010;
  --s-text-2: #5C5C5C;
  --s-text-3: #8A8A8A;
  --s-text-done: #707070;
  --s-border: #EBEBEB;
  --s-border-2: #E3E3E3;
  --s-border-field: #D4D4D4;
  --s-border-strong: #8A8A8A;
  --s-rule: #F1F1F1;
  --s-link: #005BD3;
  --s-link-hover: #004299;
  --s-focus: #005BD3;
  --s-primary: #1A1A1A;
  --s-primary-hover: #000000;
  --s-critical: #C70A24;
  --s-critical-hover: #A30A1E;
  /* Badge tones: text on background (contrast AA at 12 px). */
  --s-neutral-bg: #F2F2F2; --s-neutral: #303030; --s-neutral-dot: #4A4A4A;
  --s-info-bg: #E0F0FF; --s-info: #00527C;
  --s-success-bg: #CDFEE1; --s-success: #0C5132;
  --s-attention-bg: #FFE45C; --s-attention: #4F4700;
  --s-warning-bg: #FFD6A4; --s-warning: #5E4200;
  --s-critical-bg: #FEDAD9; --s-critical-text: #8E1F0B;
  /* Lane 118C: one colour per order status (Shopify's magic tone, a dark grey, a strong red). */
  --s-magic-bg: #ECE3FF; --s-magic: #5700D1;
  --s-neutral-strong-bg: #616161; --s-critical-strong-bg: #8E1F0B;
  /* Shapes. */
  --s-radius-card: 12px;
  --s-radius-field: 8px;
  --s-radius-badge: 6px;
  --s-shadow-card: 0 1px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02);
  --s-shadow-button: 0 1px 0 rgba(0, 0, 0, 0.06);
  --s-shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --s-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  /* Older names still read by a few Studio modules. */
  --studio-border: var(--s-border);
  --studio-text: var(--s-text);
  --studio-ink: var(--s-text);
  --studio-ink-2: var(--s-text-2);
  --studio-surface: var(--s-surface);
  --studio-font: 450 13px/20px var(--s-font);
}
* { box-sizing: border-box; }
html { background: var(--s-surface); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--s-surface); color: var(--s-text); font: 450 13px/20px var(--s-font); font-feature-settings: "cv11"; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
main { min-width: 0; }
h1, h2, h3, h4 { color: var(--s-text); overflow-wrap: anywhere; font-weight: 650; }
h1 { font-size: 20px; line-height: 28px; letter-spacing: -0.01em; margin: 0 0 4px; }
h2 { font-size: 14px; line-height: 20px; margin: 24px 0 8px; }
h3 { font-size: 13px; line-height: 20px; margin: 16px 0 4px; }
h4 { font-size: 13px; line-height: 20px; font-weight: 550; margin: 12px 0 4px; }
p { margin: 4px 0 8px; }
/* The sentence under each page title says what the page is for. */
h1 + p, .toolbar:has(> h1) + p { max-width: 80ch; color: var(--s-text-2); margin: 0 0 16px; }
a { color: var(--s-link); text-decoration: none; }
a:hover { color: var(--s-link-hover); text-decoration: underline; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--s-focus); outline-offset: 1px; }
ul, ol { padding-left: 20px; margin: 4px 0 8px; }
li { margin: 2px 0; }
hr { border: 0; border-top: 1px solid var(--s-border); margin: 16px 0; }
strong, b { font-weight: 650; }

/* Buttons: white with a thin border (secondary) by default, black for the one main action (.primary), red for actions that
   replace or remove something (.critical), link-like (.plain). */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 12px; border: 1px solid var(--s-border-2); border-radius: 999px; background: var(--s-surface); color: var(--s-text); font: inherit; font-weight: 550; line-height: 18px; text-align: center; text-decoration: none; cursor: pointer; box-shadow: var(--s-shadow-button); white-space: nowrap; }
button:hover, .button:hover { background: var(--s-surface-hover); border-color: #D4D4D4; color: var(--s-text); text-decoration: none; }
button:active, .button:active { background: var(--s-surface-selected); box-shadow: none; }
button.primary, .button.primary { background: var(--s-primary); border-color: var(--s-primary); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 0 rgba(0, 0, 0, 0.2); }
button.primary:hover, .button.primary:hover { background: var(--s-primary-hover); border-color: var(--s-primary-hover); color: #FFFFFF; }
button.critical, .button.critical { background: var(--s-critical); border-color: var(--s-critical); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
button.critical:hover, .button.critical:hover { background: var(--s-critical-hover); border-color: var(--s-critical-hover); color: #FFFFFF; }
button.plain, .button.plain { min-height: 0; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--s-link); box-shadow: none; font-weight: 450; }
button.plain:hover, .button.plain:hover { background: none; color: var(--s-link-hover); text-decoration: underline; }
button:disabled, button[aria-disabled="true"] { background: var(--s-surface-selected); border-color: var(--s-surface-selected); color: var(--s-text-3); box-shadow: none; cursor: not-allowed; }
.ghost, button.ghost { background: var(--s-surface); }

/* Forms: label above, 32 px fields, 8 px corners, a blue focus ring. */
label { display: block; margin: 12px 0 4px; font-weight: 450; color: var(--s-text); }
input, select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 32px; margin-top: 4px; padding: 5px 12px; border: 1px solid var(--s-border-field); border-radius: var(--s-radius-field); background: var(--s-surface); color: var(--s-text); font: inherit; font-weight: 450; }
input::placeholder, textarea::placeholder { color: var(--s-text-3); }
input:hover, select:hover, textarea:hover { border-color: #B5B5B5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--s-focus); outline-offset: 0; border-color: var(--s-focus); }
textarea { min-height: 80px; resize: vertical; }
select { padding-right: 28px; }
input[type=checkbox], input[type=radio] { display: inline-block; width: 16px; height: 16px; min-height: 16px; margin: 0 8px 0 0; padding: 0; vertical-align: -3px; accent-color: var(--s-primary); }
input[type=file] { padding: 4px; }
input:disabled, select:disabled, textarea:disabled { background: var(--s-surface-2); color: var(--s-text-3); }
fieldset { min-width: 0; margin: 16px 0; padding: 16px; border: 1px solid var(--s-border); border-radius: var(--s-radius-card); background: var(--s-surface); box-shadow: var(--s-shadow-card); }
/* The legend reads as the card's title, inside the card (floated legends sit inside their fieldset). */
legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 650; color: var(--s-text); }
fieldset > legend + * { clear: both; }
form > button, fieldset > button, form > .button { margin-top: 12px; }
form { margin: 0; }

/* Cards: white, a thin border, 12 px corners. */
.panel, section.card { min-width: 0; margin: 16px 0; padding: 16px; border: 1px solid var(--s-border); border-radius: var(--s-radius-card); background: var(--s-surface); box-shadow: var(--s-shadow-card); }
.panel > :first-child, section.card > :first-child, fieldset > legend + * { margin-top: 0; }
.panel > :last-child, section.card > :last-child { margin-bottom: 0; }
.grid, .studio-order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin: 16px 0; align-items: start; }
.grid > *, .studio-order-grid > * { margin-top: 0; margin-bottom: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.toolbar > h1 { margin: 0; flex: 1 1 auto; }
.toolbar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.toolbar form > button { margin-top: 0; }
.toolbar form label { margin: 0; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
/* Tab rows built from plain links (older order lists, customer requests): Shopify's views. */
nav.toolbar > a, .toolbar > a:not(.button) { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 8px; color: var(--s-text-2); font-weight: 550; text-decoration: none; }
nav.toolbar > a:hover, .toolbar > a:not(.button):hover { background: var(--s-surface-hover); color: var(--s-text); }
nav.toolbar > a[aria-current=page] { background: var(--s-surface-selected); color: var(--s-text); }
nav.toolbar > span { color: var(--s-text-2); }

/* The older order search: fields side by side on a computer, stacked on a phone. */
.order-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 12px; align-items: end; }
.order-filters > label:first-of-type { grid-column: 1 / -1; margin-top: 0; }
.order-filters > button { justify-self: start; }

/* Tables: Shopify's index table. Inside their box, never wider than the page; on a phone, rows become cards when cells carry a label. */
table { width: 100%; border-collapse: collapse; background: var(--s-surface); }
caption { text-align: left; font-weight: 650; margin-bottom: 8px; }
th, td { padding: 6px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--s-rule); font-size: 13px; line-height: 20px; overflow-wrap: break-word; }
th { background: var(--s-surface-2); color: var(--s-text-2); font-size: 12px; font-weight: 550; }
tbody tr:hover td { background: var(--s-surface-hover); }
tbody tr:last-child td { border-bottom: 0; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--s-border); border-radius: var(--s-radius-card); background: var(--s-surface); }
dl { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 4px 16px; margin: 8px 0 12px; }
dt { font-weight: 450; color: var(--s-text-2); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Small things. */
small, caption, kbd { font-size: 12px; }
code, pre { font-family: var(--s-mono); font-size: 12px; }
code { padding: 1px 4px; border-radius: 4px; background: var(--s-surface-selected); color: var(--s-text); overflow-wrap: anywhere; }
pre { max-height: 560px; overflow: auto; padding: 12px; border: 1px solid var(--s-border); border-radius: var(--s-radius-field); background: var(--s-surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
pre code { padding: 0; background: none; }
details { margin: 8px 0; }
summary { min-height: 28px; padding: 4px 0; cursor: pointer; font-weight: 550; color: var(--s-text); }
summary:hover { color: var(--s-link-hover); }
.pass { color: var(--s-success); }
.warn { color: var(--s-warning); }
.fail, [role=alert] { color: var(--s-critical-text); }
/* Message boxes (Shopify's banners); an empty live region stays in place but shows nothing. */
p[role=alert]:not(:empty), p[role=status]:not(:empty), p[role=note]:not(:empty) { padding: 8px 12px; border-radius: var(--s-radius-field); border: 1px solid transparent; }
p[role=alert]:not(:empty) { background: var(--s-critical-bg); border-color: #FDB7B1; }
p[role=status]:not(:empty) { background: var(--s-info-bg); border-color: #B8DDFF; color: var(--s-info); }
p[role=note]:not(:empty) { background: #FFF1E3; border-color: #FFD6A4; color: var(--s-warning); }
p[role=status]:empty, p[role=alert]:empty { margin: 0; }
.difference { background: #FFF1E3; }
/* Order flags shown next to a status: needs attention, express delivery. */
.attention-flag, .express-flag { display: inline-flex; align-items: center; margin: 2px 0 2px 6px; padding: 0 8px; min-height: 20px; border-radius: var(--s-radius-badge); font-size: 12px; font-weight: 550; line-height: 16px; }
.attention-flag { background: var(--s-warning-bg); color: var(--s-warning); }
.express-flag { background: var(--s-neutral-bg); color: var(--s-neutral); }
td .attention-flag, td .express-flag { margin-left: 0; }
.muted { color: var(--s-text-2); }
audio, video, object, img { max-width: 100%; }
audio { display: block; width: 100%; max-width: 420px; height: 36px; margin: 6px 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Pages that are not part of the signed-in Studio: sign-in, confirmation, errors. One white card on a light grey page. */
.studio-document { min-height: 100vh; background: var(--s-page); }
.studio-document-main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; max-width: none; padding: 32px 16px; }
.sign-in-card, .studio-document-card { width: min(100%, 400px); padding: 32px; border: 1px solid var(--s-border); border-radius: 16px; background: var(--s-surface); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.06); }
.studio-document-card { width: min(100%, 720px); }
.sign-in-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--s-text); text-decoration: none; }
.sign-in-brand:hover { text-decoration: none; color: var(--s-text); }
.sign-in-brand img { display: block; height: 26px; width: auto; filter: invert(1); }
.sign-in-brand span, .studio-label { display: inline-block; color: var(--s-text-2); font-weight: 550; font-size: 13px; }
.sign-in-card h1 { font-size: 20px; line-height: 28px; margin-bottom: 4px; }
.sign-in-card h1 + p { margin-bottom: 16px; }
.sign-in-card h1 + .sign-in-key, .sign-in-card h1 + .sign-in-message { margin-top: 16px; }
.sign-in-card label { font-weight: 550; }
.sign-in-card input { min-height: 36px; }
.sign-in-card form > button { width: 100%; min-height: 36px; margin-top: 12px; background: var(--s-primary); border-color: var(--s-primary); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 0 rgba(0, 0, 0, 0.2); }
.sign-in-card form > button:hover { background: var(--s-primary-hover); border-color: var(--s-primary-hover); color: #FFFFFF; }
.sign-in-card .button { width: 100%; min-height: 36px; margin-top: 16px; background: var(--s-primary); border-color: var(--s-primary); color: #FFFFFF; }
.sign-in-card .sign-in-help { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--s-border); color: var(--s-text-2); }
.sign-in-card .sign-in-message { margin: 0 0 12px; }
.sign-in-card details { margin: 16px 0 0; }
.sign-in-card details > p { color: var(--s-text-2); }
.sign-in-code { font-size: 20px; font-weight: 650; letter-spacing: 0.35em; text-align: center; }
.sign-in-card .sign-in-switch { margin: 16px 0 0; text-align: center; }
/* Lane 106 pass 3: the one key button, then the email form. v1.6.34: each under the heading that names who it is for. */
.sign-in-card .sign-in-key > button { margin-top: 0; }
.sign-in-card .sign-in-team + .sign-in-key { margin-top: 12px; }
.sign-in-card .sign-in-key .sign-in-message { margin: 12px 0 0; }
.sign-in-card .sign-in-team { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; color: var(--s-text-2); font-size: 12px; font-weight: 550; }
.sign-in-card .sign-in-team::before, .sign-in-card .sign-in-team::after { content: ""; flex: 1; border-top: 1px solid var(--s-border); }
.sign-in-card .sign-in-team + form > label { margin-top: 8px; }

/* On a phone: fields at 16 px (iOS Safari zooms into smaller fields), tap targets of 44 px, cards for labelled table rows. */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; min-height: 44px; }
  input[type=checkbox], input[type=radio] { min-height: 16px; }
  button, .button { min-height: 44px; padding: 8px 16px; }
  button.plain, .button.plain { min-height: 0; padding: 0; }
  h1 { font-size: 18px; line-height: 24px; }
  .grid, .studio-order-grid { grid-template-columns: 1fr; gap: 12px; }
  fieldset, .panel, section.card { padding: 16px; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: 8px; }
  .toolbar input, .toolbar select { width: 100%; }
  .toolbar form, .toolbar form label, form.toolbar > label { width: 100%; }
  form.toolbar > label > input, form.toolbar > label > select { width: 100%; }
  /* A table whose cells carry a label becomes one card per row; other tables scroll inside their own box. */
  .table-scroll { border: 0; border-radius: 0; overflow: visible; background: none; }
  .table-scroll table, .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; width: 100%; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-scroll tr { margin: 0 0 12px; padding: 4px 0; border: 1px solid var(--s-border); border-radius: var(--s-radius-card); background: var(--s-surface); box-shadow: var(--s-shadow-card); }
  .table-scroll td { padding: 8px 12px; border-bottom: 1px solid var(--s-rule); }
  .table-scroll td:last-child { border-bottom: 0; }
  .table-scroll td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--s-text-2); font-size: 12px; font-weight: 550; }
  main table:not(.table-scroll table):not([role=table]) { display: block; max-width: 100%; overflow-x: auto; }
  object { height: 420px; }
  .sign-in-card { padding: 24px 20px; }
  .sign-in-card input { min-height: 44px; }
  .sign-in-card form > button, .sign-in-card .button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Compact Studio controls; the established frame and colour tokens are unchanged. */
.studio-picker { display: grid; gap: 16px; min-width: 0; }
.studio-picker-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 520px; }
.studio-picker-label select { flex: 1; min-width: 0; }
.studio-picker [hidden] { display: none !important; }
.studio-pages { display: inline-flex; align-items: center; gap: 12px; padding: 6px 10px; margin: 12px 0; border: 1px solid var(--s-border); border-radius: 24px; background: var(--s-surface); }
.studio-none { margin: 0; padding: 8px 12px; color: var(--s-text-2); }
main > section, main > [data-paged-list] > section { margin-bottom: 20px; }
main, main section, main article, main form, main fieldset { min-width: 0; }
main p, main dd, main pre, main code { overflow-wrap: anywhere; }
main pre { white-space: pre-wrap; }
.studio-health { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(140px, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--s-rule); }
.studio-health:last-child { border-bottom: 0; }
.studio-health > details[open] { grid-column: 1 / -1; }
.studio-health-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #b98900; }
.studio-health-dot[data-tone=success] { background: #198754; }
.studio-health-dot[data-tone=critical] { background: #c52828; }
.studio-health details > summary { color: var(--s-link); cursor: pointer; }
.studio-health .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 768px) { .studio-health { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .studio-health > details { grid-column: 1 / -1; } }
