/* mira base: the page sheet every mira page wears, in the preview and in the baked flat HTML.
   Linked after the DEVOPS www sheets and before the coat (styles/<env>.css), so a coat can still
   change anything here. The flat-HTML export must copy this file next to each page and link it the same way. */

/* no fake line break at the top: the page's first child, and the first thing down a chain of
   first-child divs ({{div:...}} wrappers), keep no top margin (it would collapse through the wrapper) */
#browserWindow > :first-child,
#browserWindow > div:first-child > :first-child,
#browserWindow > div:first-child > div:first-child > :first-child,
#browserWindow > div:first-child > div:first-child > div:first-child > :first-child { margin-top: 0; }

/* <list:> subtitles (subtitle: in a page's front matter, a folder's home page or a rosedoc): a quieter
   line under the title in a list, a quieter note after it in an inline list. Restyle .sky-sub freely. */
:where(.sky-list) .sky-sub { font-size: 0.85em; opacity: 0.75; }
:where(ul.sky-list) .sky-sub { display: block; margin-bottom: 0.2em; }

/* <list:> section: headings: a plain heading above each named group. Restyle freely. */
:where(.sky-list-heading) { font-size: 1em; font-weight: 600; margin: 1.1em 0 0.35em; }

/* Platform auth / report inserts (<insert: login|signup|report>) — stacked fields that inherit
   the page's fonts/colors; Kitten can restyle these hooks in style.viz. */
form.be-login, form.be-signup, form.be-report,
form.be-report-form { display: flex; flex-direction: column; gap: 0.7em; max-width: 26rem; margin: 0.6em 0 1em; }
.be-field { display: flex; flex-direction: column; gap: 0.25em; }
.be-field input, .be-field select, .be-field textarea {
  width: 100%; max-width: 100%; box-sizing: border-box; padding: 0.4em 0.5em;
  font: inherit; color: inherit; background: transparent; border: 1px solid currentColor;
}
.be-err, .bi-err { color: #e85d5d; margin: 0.4em 0; }
.be-note, .bi-note { margin: 0.4em 0; }
.be-go, button.be-go { font: inherit; cursor: pointer; padding: 0.4em 0.9em; }
.be-forgot { margin-left: 0.5em; }
.be-auth-links { margin-top: 1em; opacity: 0.85; font-size: 0.92em; }
.be-report-done { max-width: 26rem; }
.be-login.be-signed-in, .be-signup.be-signed-in { display: block; }
form.be-forgot, form.be-forgot-form { display: flex; flex-direction: column; gap: 0.7em; max-width: 26rem; margin: 0.6em 0 1em; }
.be-forgot-done { max-width: 26rem; margin: 1rem 0; }
.be-report-done { margin: 1rem 0; }

/* Code blocks read like mira's preview: plain monospace, no box (CRUMBS 13 Nov 2026). Restyle freely in style.viz. */
pre.code {
  font-family: "Courier New", Courier, monospace; font-size: 0.9em; font-style: normal;
  white-space: pre; margin: 0.8em 0; overflow-x: auto;
}
/* Readable ascii / mono plates on platform help / any Sky page (works on dark & royal-blue shells) */
pre.ascii, pre.mono-card {
  overflow-x: auto; padding: 0.75em 1em; margin: 0.8em 0;
  border: 1px solid currentColor; border-radius: 4px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; line-height: 1.45;
}
pre.code code, pre.ascii code, pre.mono-card code { background: none; padding: 0; border: 0; font: inherit; }
code {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.92em;
  padding: 0.1em 0.35em; border-radius: 3px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

img.pic { max-width: 100%; height: auto; vertical-align: middle; }
a.pic-zoom { display: inline-block; max-width: 100%; }
a.pic-zoom img.pic { display: block; }

/* Starter packs: self-contained cards, readable on light paper or dark platform shells. */
.be-tpl-field { min-width: 0; padding: 0; margin: 8px 0; border: 0; }
.be-tpl-field legend { margin-bottom: 8px; font: inherit; }
.be-tpl-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; width: 100%; }
.be-tpl-picker .be-tpl-card { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 9px; border: 1px solid currentColor; border-radius: 5px; color: inherit; background: color-mix(in srgb, currentColor 4%, transparent); font: 13px/1.4 sans-serif; cursor: pointer; }
.be-tpl-card img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 2px; }
.be-tpl-card input[type=radio] { position: absolute; top: 14px; left: 14px; width: 18px; height: 18px; accent-color: #4d7cff; }
.be-tpl-card:has(input:checked), .be-tpl-card[aria-pressed=true] { outline: 3px solid #4d7cff; outline-offset: 2px; background: color-mix(in srgb, #4d7cff 14%, transparent); }
.be-tpl-card:focus-within, .be-tpl-card:focus-visible { outline: 3px solid #4d7cff; outline-offset: 2px; }
.be-tpl-card small { font-size: 11px; opacity: .8; }
.be-tpl-card a { font-size: 11px; margin-top: auto; }
@media (max-width: 480px) { .be-tpl-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .be-tpl-picker .be-tpl-card { padding: 6px; font-size: 12px; } }
@media (max-width: 320px) { .be-tpl-picker { grid-template-columns: 1fr; } }
