/* Control's layout on @trgs/ui-publiso: placement only, in the foundation's tokens.
   Colours, type, radii, shadows and components all come from the foundation. */

/* Spacing comes from layout gaps, never from browser default margins. Keys in one group
   stand the foundation's action-row gap apart (publiso-actions), groups one group gap apart. */
:root { --control-key-gap: var(--publiso-space-2); --control-group-gap: var(--publiso-space-5); }
body { margin: 0; }
/* hidden always hides, whatever display a component gives the element. */
.publiso-root [hidden] { display: none !important; }
:where(.publiso-root) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre, form) { margin: 0; }
/* A value's one note, such as a check's result under its time, sits on its own line; several notes stay inline. */
.publiso-dl dd small { color: var(--publiso-text-2); font-size: var(--publiso-size-meta); }
.publiso-dl dd > small:only-of-type { display: block; }

/* ---------- Shell: the sidebar of places beside the workspace ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: var(--publiso-space-6); padding: var(--publiso-space-6) var(--publiso-space-4); background: var(--publiso-bg-2); }
.brand { display: grid; justify-items: start; gap: var(--publiso-space-1); padding: var(--publiso-space-2) var(--publiso-space-3); color: var(--publiso-text-2); text-decoration: none; }
.brand-wordmark { display: block; width: 152px; max-width: 100%; height: auto; }
:root[data-theme="light"] .brand-wordmark--night, :root:not([data-theme="light"]) .brand-wordmark--paper { display: none; }
.sidebar-foot { display: grid; gap: var(--publiso-space-2); margin-top: auto; padding: 0 var(--publiso-space-3); }
.workspace { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--publiso-space-3) var(--publiso-space-4); min-height: 76px; padding: var(--publiso-space-3) var(--publiso-space-6); }
.crumb { min-width: 0; overflow-wrap: anywhere; }
.main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--publiso-space-4) var(--publiso-space-6) var(--publiso-space-6); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--publiso-space-2) var(--publiso-space-5); margin-top: var(--publiso-space-8); }

/* Signed out: the wordmark and language above the page. */
.topbar--public { max-width: 1240px; width: 100%; margin: 0 auto; }
.topbar--public .brand { padding: 0; }
/* The language picker on one line, where it is not the page's subject. */
.language-inline .language-field { display: flex; align-items: center; gap: var(--publiso-space-3); }
.language-inline publiso-select { min-width: 13em; }

/* Live updates, when they pause or fall behind: one line at the foot of the window,
   its words in the warning colour. While updates run it is only for screen readers. */
.live-update { position: sticky; bottom: 0; z-index: 10; margin: 0; padding: var(--publiso-space-2) var(--publiso-space-5); background: var(--publiso-bg-2); color: var(--publiso-text-2); font-size: var(--publiso-size-meta); }
.live-update:is([data-connection="paused"], [data-connection="stale"]) { color: var(--publiso-warn); }
.live-update[data-connection="stale"]::after { content: " Displayed status may be stale."; font-weight: 600; }

/* ---------- Account menu ---------- */
.account-trigger { max-width: min(320px, 52vw); padding-inline: var(--publiso-space-2) var(--publiso-space-4); }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--publiso-tile-2); color: var(--publiso-text); font-family: var(--publiso-serif); line-height: 1; }
.account-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { display: grid; gap: var(--publiso-form-gap); width: min(300px, calc(100vw - 72px)); }
/* Until its element upgrades (or without scripts) the menu stays closed: the foundation's own rule sits in :where(), which the grid above would beat. */
publiso-popover:not(:defined) > .account-menu { display: none; }

/* ---------- Welcome ---------- */
.signin { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; }
.signin-story { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: var(--publiso-space-8); padding: var(--publiso-space-7) 9%; color: var(--publiso-paper); background: var(--publiso-night); }
.signin-story::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/assets/brand/architecture.webp") 66% center / cover no-repeat; opacity: .85; }
.signin-story::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--publiso-night) 92%, transparent), color-mix(in srgb, var(--publiso-night) 36%, transparent)), linear-gradient(0deg, color-mix(in srgb, var(--publiso-night) 70%, transparent), transparent 50%); }
.signin-story .brand { padding: 0; color: color-mix(in srgb, var(--publiso-paper) 78%, transparent); }
.signin-story h2 { max-width: 12em; margin-bottom: var(--publiso-space-4); font-family: var(--publiso-serif); font-size: min(var(--publiso-size-display), 4.6vw); font-weight: 400; line-height: 1.05; letter-spacing: 0; text-wrap: balance; }
.signin-story p { max-width: 36ch; color: color-mix(in srgb, var(--publiso-paper) 86%, transparent); font-size: var(--publiso-size-lede); }
.story-graphic { display: grid; max-width: 380px; margin-top: var(--publiso-space-7); }
.story-node { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--publiso-space-1) var(--publiso-space-4); padding: var(--publiso-space-4) var(--publiso-space-5); border-radius: var(--publiso-radius-panel); background: color-mix(in srgb, var(--publiso-paper) 9%, transparent); }
.story-node small { color: color-mix(in srgb, var(--publiso-paper) 74%, transparent); font-size: var(--publiso-size-hint); }
.story-line { width: 2px; height: 28px; margin-left: var(--publiso-space-6); background: var(--publiso-slate-lit); }
.signin-story > small { color: color-mix(in srgb, var(--publiso-paper) 74%, transparent); font-size: var(--publiso-size-meta); }
.signin-form { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: var(--publiso-space-6); padding: var(--publiso-space-5) var(--publiso-space-6) var(--publiso-space-7); }
.signin-language { justify-self: end; }
.signin-inner { align-self: center; display: grid; gap: var(--publiso-space-5); width: 100%; max-width: 420px; }
.google-g { font-weight: 700; }

/* ---------- Page header (the foundation's), placed above the page ---------- */
/* Every page head is the foundation's page header, and each page's content starts the same distance below it.
   On the sign-in page the header sits in the sign-in column, whose own gap spaces it. */
.main > .publiso-page-header { margin-bottom: var(--publiso-space-6); }
/* A link back to the parent page sits in the title block, where the foundation puts breadcrumbs. */
.publiso-page-header-title > .publiso-link--back { justify-self: start; }

/* ---------- Your websites: views and cards ---------- */
.archive-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--publiso-space-2) var(--publiso-space-4); margin-bottom: var(--publiso-space-5); }
.next-page { margin-bottom: var(--publiso-space-5); }
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--publiso-space-5); }
.site-card { display: flex; flex-direction: column; gap: var(--publiso-space-4); min-width: 0; }
.site-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--publiso-space-2) var(--publiso-space-4); }
.site-card-title { display: grid; gap: var(--publiso-space-1); min-width: 0; }
.site-card-title h3 { overflow-wrap: anywhere; }
.site-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--publiso-space-2) var(--publiso-space-4); margin-top: auto; padding-top: var(--publiso-space-2); }
.site-card-version { display: grid; margin-right: auto; }

/* ---------- Pages ---------- */
/* Owner access: the website, its title and the card, 24px apart like any form page. */
.owner-setup { display: grid; gap: var(--publiso-space-5); max-width: 760px; }
.form-width { display: grid; gap: var(--publiso-space-5); max-width: 760px; }
.page-panel { display: grid; gap: var(--publiso-space-5); }
.diagnosis-links { display: flex; flex-wrap: wrap; gap: var(--control-key-gap); }
.error-page { display: grid; gap: var(--publiso-space-4); max-width: 600px; }
.error-code { font-family: var(--publiso-serif); font-size: var(--publiso-size-display); line-height: 1; color: var(--publiso-text-3); }
/* ---------- Flow inside plain panels and sections: space between, never margins from the browser ---------- */
.main :where([class="publiso-panel"], .owner-setup-card, .email-panel, .installation-section, .history-detail, .domain-observation, .update-technical) > * + * { margin-top: var(--publiso-space-4); }
/* The flow outranks the foundation's own margins (publiso-dl, publiso-hint); this line keeps details apart in panels it does not list. */
:where(.main) :where([class="publiso-panel"], .email-panel, .installation-section, .history-detail, .domain-observation, .update-technical) > .publiso-dl:not(:first-child) { margin-top: var(--publiso-space-4); }
:where(.main) h3:not([class]) { font-size: var(--publiso-size-lede); font-weight: 600; line-height: 1.4; }

/* ---------- Website overview ---------- */
/* One section shows per tab, right below the page header; its heading is for screen readers. */
.installation-section > .publiso-visually-hidden:first-child + * { margin-top: 0; }
.observation-head, .domain-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--publiso-space-3) var(--publiso-space-5); }
.observation-head > div { display: grid; gap: var(--publiso-space-2); }
.observation-checks { display: grid; gap: var(--publiso-space-2); padding-left: var(--publiso-space-5); }
.observation-checks small { display: block; color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.settings-access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--publiso-space-5); margin-top: var(--publiso-space-5); }
.settings-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; gap: var(--publiso-space-5); margin-top: var(--publiso-space-5); }
/* Side-by-side settings keep their actions on one line, however the text above wraps. */
.settings-access-grid > * { display: flex; flex-direction: column; align-items: flex-start; gap: var(--publiso-space-4); }
.settings-access-grid > * > * { margin-top: 0; }
.settings-access-grid > * > :last-child { margin-top: auto; }
/* A website's plan (administrators only): one select per feature, side by side where they fit. */
.site-plan { margin-top: var(--publiso-space-5); }
.site-plan > * + *, .site-plan > form > * + * { margin-top: var(--publiso-space-4); }
.plan-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--publiso-space-4) var(--publiso-space-5); }
#domain-setup code, .dns-records code { white-space: normal; overflow-wrap: anywhere; }
.dns-records td { min-width: 9em; }
.domain-action, .domain-action form { display: grid; gap: var(--publiso-space-3); justify-items: start; }

/* Progress of a delivery, publication or build: a tile with the elapsed time, the bar and the steps. */
.delivery-progress { display: grid; gap: var(--publiso-space-3); padding: var(--publiso-space-5); border-radius: var(--publiso-radius-panel); background: var(--publiso-tile); }
.delivery-progress-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--publiso-space-2) var(--publiso-space-4); }
.delivery-elapsed, .delivery-progress-caption { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.delivery-estimate { display: grid; gap: var(--publiso-space-1); }
.delivery-estimate > span { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.delivery-estimate.delayed > strong { color: var(--publiso-warn); }

/* History: rows separated by tone; each opens to its details. */
.operation-history { display: grid; padding: 0; list-style: none; border-radius: var(--publiso-radius-panel); overflow: hidden; }
.operation-history > li:nth-child(odd) { background: var(--publiso-tile); }
.operation-history summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; align-items: center; gap: var(--publiso-space-2) var(--publiso-space-4); min-height: var(--publiso-row-h); padding: var(--publiso-row-pad); }
.operation-history summary > span:first-child { display: grid; }
.operation-history summary small, .history-site, .operation-history time { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.history-detail { padding: 0 var(--publiso-space-5) var(--publiso-space-5); }

/* Publiso email: totals, then the recent messages. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--publiso-space-4); }
.publiso-page-header + .stats, .archive-tools + .stats { margin-bottom: var(--publiso-space-5); }
.stat { display: grid; gap: var(--publiso-space-1); }
.stat > span, .stat > small { color: var(--publiso-text-2); font-size: var(--publiso-size-meta); }
.stat > strong { font-family: var(--publiso-serif); font-size: var(--publiso-size-title); font-weight: 400; line-height: 1.1; }
.email-messages > .publiso-list-item { display: grid; gap: var(--publiso-space-1); }
.email-message-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--publiso-space-2) var(--publiso-space-4); }
.email-message-head > span:first-child { display: grid; min-width: 0; }
/* In a list of rows, each row's tag and time stand in the same columns. */
@media (min-width: 761px) { .email-messages .email-message-head { display: grid; grid-auto-flow: column; grid-template-columns: minmax(0, 1fr); grid-auto-columns: auto; } }
.email-message-head small, .email-message-head time { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); overflow-wrap: anywhere; }

/* ---------- Website updates: one status, what's new, technical details ---------- */
.updates-page { display: grid; gap: var(--publiso-space-5); max-width: 880px; }
.update-site { color: var(--publiso-text-2); overflow-wrap: anywhere; }
/* One panel: the icon on the left; the version, what's new, the one primary and its reassurance in one column. */
.update-status { --_tone: var(--publiso-text-2); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--publiso-space-4) var(--publiso-space-5); }
.update-status > :not(.update-icon) { grid-column: 2; }
.update-status[data-tone="ready"] { --_tone: var(--publiso-info); }
.update-status[data-tone="running"] { --_tone: var(--publiso-warn); }
.update-status[data-tone="done"] { --_tone: var(--publiso-ok); }
.update-status[data-tone="attention"] { --_tone: var(--publiso-bad); }
.update-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--_tone); background: color-mix(in srgb, var(--_tone) 16%, transparent); }
.update-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.update-status[data-tone="running"] .update-icon svg { animation: control-update-turn 1.2s linear infinite; }
@keyframes control-update-turn { to { transform: rotate(360deg); } }
.update-status-text { display: grid; gap: var(--publiso-space-2); min-width: 0; }
.update-current, .update-elapsed { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.update-current strong, .update-elapsed strong { color: var(--_tone); font-variant-numeric: tabular-nums; }
.update-status-action { justify-self: start; }
.update-assurance { margin-top: calc(var(--publiso-space-2) * -1); color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.update-notes { display: grid; gap: var(--publiso-space-2); }
.update-notes-list { display: grid; gap: var(--publiso-space-2); padding-left: var(--publiso-space-5); }
.update-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--publiso-space-4) var(--publiso-space-5); }
.update-facts > div { display: grid; gap: var(--publiso-space-2); min-width: 0; }
.update-technical ol, .update-technical ul { display: grid; gap: var(--publiso-space-1); padding-left: var(--publiso-space-5); color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }

/* ---------- Forms: the foundation's form layout (.publiso-form, .publiso-form-actions) ---------- */
.publiso-field > span:first-child:not([class]) { font-weight: 500; }
/* A fieldset that only groups fields (checks use the foundation's .publiso-choice-group) never shows the browser's grooved frame. */
:where(.publiso-root) fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
/* A form not yet on the foundation's form layout (a single check and its key) keeps the form gap between its parts. */
.main form:not(.publiso-form) :where(.publiso-field, .publiso-check, .publiso-alert, .publiso-hint, .publiso-actions, .action-block, p) + :where(.publiso-field, .publiso-check, .publiso-alert, .publiso-actions, .action-block, p, .publiso-key) { margin-top: var(--publiso-form-gap); }
/* A select too narrow for its choice ends in an ellipsis instead of cutting a word. */
.publiso-well > select { text-overflow: ellipsis; }
.language-default { font-weight: 500; }
/* A form's own actions share the text baseline, so Cancel lines up with the key beside it. */
:where(.main form) :where(.publiso-actions, .publiso-form-actions) { align-items: baseline; }

/* ---------- Diagnostics: outcome, stages, the event log and the evidence ---------- */
:where(.main) :where(.diagnosis-summary, #diagnostic-stages, #diagnostic-events, .diagnosis-evidence) > * + * { margin-top: var(--publiso-space-4); }
/* Blocks stacked straight in the page, as on Diagnostics, stand 24px apart unless they set their own space. */
:where(.main) > :where(section, details, .delivery-progress, nav.publiso-actions) { margin-top: var(--publiso-space-5); }
.diagnosis-outcome { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--publiso-space-3) var(--publiso-space-5); }
.diagnosis-outcome > div { display: grid; gap: var(--publiso-space-2); min-width: 0; }
.diagnosis-summary.failed .diagnosis-outcome h2, .diagnosis-summary.attention .diagnosis-outcome h2 { color: var(--publiso-bad); }
.diagnosis-next { display: grid; gap: var(--publiso-space-1); }
.diagnosis-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--publiso-space-3) var(--publiso-space-5); }
.diagnosis-fields > div { display: grid; gap: var(--publiso-space-1); min-width: 0; }
.diagnosis-fields dt { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.diagnosis-fields dd { overflow-wrap: anywhere; }
.diagnosis-stages { display: grid; gap: var(--publiso-space-2); padding: 0; list-style: none; }
.diagnosis-stages > li { display: grid; gap: var(--publiso-space-1); padding: var(--publiso-row-pad); border-radius: var(--publiso-radius-tile); background: var(--publiso-tile); }
.diagnosis-stages > li > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--publiso-space-1) var(--publiso-space-4); }
.diagnosis-stages > li > div > span { color: var(--publiso-text-2); }
.diagnosis-stages > li.complete > div > span { color: var(--publiso-ok); }
.diagnosis-stages > li:is(.failed, .problem) > div > span { color: var(--publiso-bad); }
.diagnosis-stages > li:is(.running, .current, .waiting) > div > span { color: var(--publiso-info); }
.diagnosis-stages small, .diagnosis-steps { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.diagnosis-steps { display: grid; gap: var(--publiso-space-1); padding-left: var(--publiso-space-5); }
.log-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: end; gap: var(--publiso-space-4); }
.log-controls > .publiso-key, .log-controls > button { justify-self: start; }
.log-controls [data-log-feedback] { color: var(--publiso-text-2); font-size: var(--publiso-size-hint); }
.diagnosis-events { display: grid; padding: 0; list-style: none; border-radius: var(--publiso-radius-panel); overflow: hidden; }
.diagnosis-events > li:nth-child(odd) { background: var(--publiso-tile); }
.diagnosis-events summary { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: baseline; gap: var(--publiso-space-2) var(--publiso-space-3); padding: var(--publiso-space-2) var(--publiso-space-4); font-weight: 400; }
.diagnosis-events time, .log-level, .log-stage, .diagnosis-count { font-family: var(--publiso-mono); font-size: var(--publiso-size-meta); color: var(--publiso-text-2); }
.diagnosis-event.failed .log-level { color: var(--publiso-bad); }
/* An event's stage, words and count wrap as whole pieces, never mid-piece in mixed type. */
.log-message { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--publiso-space-2); overflow-wrap: anywhere; }
.diagnosis-event-body { display: grid; gap: var(--publiso-space-2); padding: 0 var(--publiso-space-4) var(--publiso-space-4); }
.diagnostic-switcher { display: flex; flex-wrap: wrap; align-items: end; gap: var(--publiso-space-3); margin-bottom: var(--publiso-space-2); }
.diagnostic-switcher .publiso-field { flex: 1 1 320px; max-width: 640px; }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .topbar, .main { padding-inline: var(--publiso-space-5); }
}
/* Between phone and desktop, a History row keeps its website under the operation, so a long name never squeezes into a narrow column. */
@media (min-width: 761px) and (max-width: 1050px) {
  .operation-history summary { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title time mark" "site time mark"; }
  .operation-history summary > span:first-child { grid-area: title; }
  .operation-history summary > .history-site { grid-area: site; }
  .operation-history summary > time { grid-area: time; }
  .operation-history summary::after { grid-area: mark; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--publiso-space-3); padding: var(--publiso-space-4); }
  .brand { padding: 0; }
  .brand-wordmark { width: 128px; }
  .sidebar > publiso-sidenav { flex: 1 1 100%; }
  .sidebar-foot { display: none; }
  .topbar { min-height: 0; padding: var(--publiso-space-3) var(--publiso-space-4); }
  .main { padding: var(--publiso-space-4) var(--publiso-space-4) var(--publiso-space-6); }
  .footer { margin-top: var(--publiso-space-7); }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-story { gap: var(--publiso-space-6); padding: var(--publiso-space-6) var(--publiso-space-5); }
  .signin-story h2 { font-size: var(--publiso-size-title); }
  .story-graphic, .signin-story > small { display: none; }
  .signin-form { padding: var(--publiso-space-5) var(--publiso-space-5) var(--publiso-space-7); }
  .signin-inner { align-self: start; }
  /* DNS values wrap, with Copy under each value, so the table never scrolls sideways. */
  .dns-records td { min-width: 0; }
  .dns-records td > code { display: block; margin-bottom: var(--publiso-space-1); }
  #domain-setup .dns-records td:first-child > code, .dns-records td:first-child > code { white-space: nowrap; overflow-wrap: normal; }
  .update-status > :not(.update-icon):not(.update-status-text) { grid-column: 1 / -1; }
  .update-status-action, .update-status-action .publiso-key { width: 100%; }
  .update-facts { grid-template-columns: minmax(0, 1fr); }
  .operation-history summary { grid-template-columns: minmax(0, 1fr); }
  /* An event's time and level share a line when they fit, its words take their own line, and the chevron stays top right. */
  .diagnosis-events summary { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--publiso-space-3); position: relative; padding-right: calc(var(--publiso-space-4) + 24px); }
  .diagnosis-events summary > .log-message { flex-basis: 100%; }
  .diagnosis-events summary::after { position: absolute; top: 18px; right: var(--publiso-space-4); margin: 0; }
  .diagnosis-events details[open] > summary::after { margin: 0; }
}

/* Interim rules for what @trgs/ui-publiso does not cover yet. Each one names the
   foundation request it stands in for and is deleted once a release ships it. */

/* FR-7: the steps of a delivery, publication or build, each a word on a tint for its state. */
.delivery-milestones { display: flex; flex-wrap: wrap; gap: var(--publiso-space-2); padding: 0; list-style: none; }
.delivery-milestones > li { padding: 3px 10px; border-radius: var(--publiso-radius-tile); color: var(--publiso-text-3); background: var(--publiso-tile); font-size: var(--publiso-size-meta); font-weight: 500; line-height: 1.5; }
.delivery-milestones > li.complete { color: var(--publiso-ok); background: color-mix(in srgb, var(--publiso-ok) 14%, transparent); }
.delivery-milestones > li.current { color: var(--publiso-info); background: color-mix(in srgb, var(--publiso-info) 16%, transparent); font-weight: 600; }
.delivery-milestones > li.problem { color: var(--publiso-bad); background: color-mix(in srgb, var(--publiso-bad) 14%, transparent); font-weight: 600; }

/* FR-8: a plain disclosure inside a panel or row, opening in place with a 2px chevron instead of
   the browser's marker. publiso-disclosure is its own tile with a body wrapper, so it fits only
   disclosures that stand alone. */
:where(.publiso-root details:not(.publiso-learn-more):not(.publiso-disclosure)) > summary { display: flex; align-items: center; gap: var(--publiso-space-3); min-height: 40px; cursor: pointer; list-style: none; font-weight: 500; }
:where(.publiso-root details:not(.publiso-learn-more):not(.publiso-disclosure)) > summary::-webkit-details-marker { display: none; }
:where(.publiso-root details:not(.publiso-learn-more):not(.publiso-disclosure)) > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--publiso-duration) var(--publiso-ease-out); }
:where(.publiso-root details:not(.publiso-learn-more):not(.publiso-disclosure)[open]) > summary::after { margin-top: 4px; transform: rotate(-135deg); }

/* FR-12: a tag longer than its container wraps instead of pushing the page sideways. */
.publiso-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
