/* What the account site adds to the Actuaria.io design system (../actuaria/, vendored unchanged): layout, the
   sign-in block, the account menu, the empty state and the buying pages. Colours, spacing, borders and type come from
   its tokens; the exceptions are the reading widths (420 to 860px) and the menu's 280px panel. Light theme only: an
   app picks one theme and stays in it (brand book, "Colour"). */

body { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: var(--action); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: var(--border-width-focus) solid var(--focus); outline-offset: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.acc-skip { position: absolute; left: var(--space-16); top: -100px; padding: var(--space-8) var(--space-12); background: var(--surface); color: var(--text); border: var(--border-width-strong) solid var(--border-strong); z-index: 10; }
.acc-skip:focus { top: var(--space-16); }

.acc-container { max-width: var(--container-max); margin: 0 auto; padding-inline: var(--space-48); }
.acc-page { padding-block: var(--space-40) var(--space-64); }
.acc-stack { display: flex; flex-direction: column; gap: var(--space-12); }
.acc-stack--lg { gap: var(--space-32); }
.acc-muted { color: var(--text-muted); }
.acc-break { overflow-wrap: anywhere; }
.acc-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: center; }
.acc-notice { padding: var(--space-12) var(--space-16); background: var(--action-soft); border-left: 3px solid var(--action); }

/* The nav: lockup, links, one action. Below the md breakpoint the links go; the menu holds them. */
.acc-nav { padding-inline: var(--space-48); }
.acc-nav__links { display: flex; gap: var(--space-4); }

/* The account menu: a disclosure, so it works with no script. Its button and items are 44px targets. */
.acc-menu { position: relative; }
.acc-menu__button { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--control-md); max-width: 260px; padding: 0 var(--space-12) 0 var(--space-6); border: var(--border-width-strong) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; list-style: none; }
.acc-menu__button::-webkit-details-marker { display: none; }
.acc-menu__button svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; }
.acc-menu[open] .acc-menu__button svg { transform: rotate(180deg); }
.acc-menu__initial { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; background: var(--action); color: var(--on-action); font-weight: 600; }
.acc-menu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-menu__panel { position: absolute; right: 0; top: calc(100% + var(--space-8)); z-index: 20; display: flex; flex-direction: column; width: 280px; max-width: calc(100vw - 32px); padding: var(--space-8); background: var(--surface); border: var(--border-width-strong) solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-hard-sm); }
.acc-menu__who { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-8) var(--space-8) var(--space-12); border-bottom: var(--border-width-hairline) solid var(--border); margin-bottom: var(--space-4); }
.acc-menu__item { display: flex; align-items: center; gap: var(--space-10); width: 100%; min-height: var(--control-md); padding: 0 var(--space-8); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.acc-menu__item:hover { background: var(--action-soft); }
.acc-menu__item svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; }
.acc-menu form { margin: 0; }

/* Sign-in: the intro beside the block, stacked on phones. */
.acc-split { display: flex; flex-wrap: wrap; gap: var(--space-40) var(--space-64); align-items: flex-start; }
.acc-intro { flex: 1 1 360px; max-width: 560px; }
.acc-signin { flex: 0 1 440px; width: 100%; max-width: 440px; gap: var(--space-16); }
.acc-signin__form { display: flex; flex-direction: column; gap: var(--space-12); margin: 0; }
.acc-signin__create { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); margin: 0; padding-top: var(--space-16); border-top: var(--border-width-hairline) solid var(--border); }
.acc-google .acc-google__mark { width: 18px; height: 18px; }
.acc-google:hover .acc-google__mark, .acc-google:focus-visible .acc-google__mark { animation: none; }
.acc-or { display: flex; align-items: center; gap: var(--space-12); color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* My account */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-24); }
.acc-card-title { display: flex; align-items: center; gap: var(--space-10); }
.acc-card-title svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; color: var(--action); }
.acc-facts { display: flex; flex-direction: column; gap: var(--space-12); }
.acc-facts dt { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.acc-facts dd { font-size: 16px; }
.acc-org { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.acc-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acc-link { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--control-md); font-weight: 500; text-decoration: none; }
.acc-link:hover { text-decoration: underline; }
.acc-link svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; }
.acc-link svg:last-child { width: 14px; height: 14px; }

/* Empty and error states: one illustration above the heading (brand book, "Imagery"). */
.acc-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-12); max-width: 560px; margin: 0 auto; padding: var(--space-40) var(--space-24); text-align: center; border: var(--border-width-hairline) dashed var(--border-strong); background: var(--surface); }
.acc-empty__art { width: 96px; height: 96px; color: var(--text); --ia: var(--action); }
.acc-empty__art svg { width: 96px; height: 96px; }
.acc-empty form { margin-top: var(--space-8); }

/* Buying: the catalogue, the cart, orders, datasets, quotes. Every link and button in a list is a 44px target. */
.acc-narrow { max-width: 860px; }
.acc-stack--sm { gap: var(--space-4); }
.acc-actions--start { justify-content: flex-start; }
.acc-actions form { margin: 0; }
.acc-mono { font-family: var(--font-mono); font-size: 13px; }
.acc-danger { color: var(--danger); }
.acc-prewrap { white-space: pre-line; }
.acc-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.acc-back, .acc-item__link { display: inline-flex; align-items: center; min-height: var(--control-md); color: inherit; text-decoration: none; }
.acc-back { color: var(--action); }
.acc-back:hover, .acc-item__link:hover { text-decoration: underline; }
.acc-alert { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16); background: var(--danger-soft); border-left: 3px solid var(--danger); color: var(--text); }
.acc-note { padding: var(--space-12) var(--space-16); border-left: 3px solid var(--border-strong); background: var(--surface); }
.acc-callout { border-color: var(--warning); background: var(--warning-soft); }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-24); }
.acc-list--single { grid-template-columns: 1fr; }
.acc-item { gap: var(--space-12); }
.acc-item__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8); }
.acc-facts--inline { flex-direction: row; flex-wrap: wrap; gap: var(--space-12) var(--space-24); }
.acc-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--border-width-hairline) solid var(--border); }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); min-height: var(--control-md); padding: var(--space-8) 0; border-bottom: var(--border-width-hairline) solid var(--border); }
.acc-row--item { padding: var(--space-12) 0; }
.acc-row--plain { border-bottom: 0; padding: 0; min-height: 0; }
.acc-row__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); margin-left: auto; }
.acc-row__end form { margin: 0; }
.acc-command { margin: 0; padding: var(--space-12) var(--space-16); overflow-x: auto; background: var(--bg); border: var(--border-width-hairline) solid var(--border); font-family: var(--font-mono); font-size: 13px; line-height: 1.5; white-space: pre; }
.acc-quote { display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-12); border-top: var(--border-width-hairline) solid var(--border); }
.ac-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.acc-footer { border-top: var(--border-width-hairline) solid var(--border); color: var(--text-muted); font-size: 14px; }
.acc-footer__row { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); align-items: center; min-height: var(--control-xl); }
.acc-footer__row span { margin-right: auto; font-weight: 600; color: var(--text); }
.acc-footer a { display: inline-flex; align-items: center; min-height: var(--control-md); color: var(--text-muted); }

/* Five links and the menu need the room: below it the menu holds them. */
@media (max-width: 1120px) {
  .acc-nav__links { display: none; }
}
@media (max-width: 520px) {
  .acc-container, .acc-nav { padding-inline: var(--space-16); }
  .ac-nav__brand { margin-right: var(--space-8); font-size: 16px; }
  /* The name moves into the panel; the button keeps it for screen readers. */
  .acc-menu__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .acc-page { padding-block: var(--space-24) var(--space-48); }
  .acc-signin__create .ac-btn { width: 100%; }
  .acc-empty { padding: var(--space-32) var(--space-16); }
  .acc-item, .ac-card { padding: var(--space-16); }
  .acc-row__end { width: 100%; justify-content: space-between; }
  .acc-actions--start .ac-btn, .acc-actions--start form { flex: 1 1 100%; }
  .acc-actions--start form .ac-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-menu[open] .acc-menu__button svg { transform: none; }
}
