/* ---------- The account menu (22 October 2026, README 122) ----------
   The person's menu in the portal and the admin (prototype/app/account-menu.js). Janne: "You really have to clean up those
   settings ... It's very not good-looking at the moment."

   One scale, the side menu's (README 80): text 14/20, icons 18, rows 36, 8 corners; from 1024 it opens inside the side menu, so
   its zoom draws it a step larger (README 119), as the menu itself. On phones and touch the rows are 44 and the text stays 14
   (no font-size in a query). Parts, top to bottom: the head (her photo round as the identity mark, her name 16 Bold, the company
   and Business ID 14 ink-2, Switch company as the small chip button); on phones only the pages the tab bar has no room for; Profile
   details, Show me around, Help and contact; the language as a compact segmented control (README 105's look); Log out, ink, after
   a hairline; the prototype's band. Groups are told apart by hairlines that run edge to edge, nothing else.

   Selectors start at html#v8 body so they win over the older .pmenu rules in styles.css and soft.css (pill buttons, 16 type) and
   over the side menu's own rules when the menu opens inside it */

html#v8 body .v8-acct { position: fixed; z-index: 70; box-sizing: border-box; width: 296px; max-width: calc(100vw - 16px); padding: 8px; overflow-y: auto; overscroll-behavior: contain;
  border: 0 !important; border-radius: var(--v8-r) !important; background: var(--v8-white) !important; box-shadow: var(--v8-shadow-pop) !important;
  color: var(--v8-ink); font-size: var(--v8-fs-14) !important; line-height: var(--v8-lh-14) !important; font-weight: 400; text-align: left; white-space: normal; }
html#v8 body .v8-acct[hidden] { display: none; }
html#v8 body .v8-acct :is(ul, p) { margin: 0; padding: 0; list-style: none; }
html#v8 body .v8-acct :is(span, b, a, button, p) { font-size: inherit !important; line-height: inherit !important; }

/* The head: who she is and the company */
html#v8 body .v8-acct .am-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 8px 12px; }
html#v8 body .v8-acct .am-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--v8-mint); color: var(--v8-deep); font-weight: 700; }
html#v8 body .v8-acct .am-who { display: grid; min-width: 0; color: var(--v8-ink-2); overflow-wrap: anywhere; }
html#v8 body .v8-acct .am-who .am-name { color: var(--v8-ink); font-size: var(--v8-fs-16) !important; line-height: var(--v8-lh-16) !important; font-weight: 700 !important; }
/* Switch company, the chip button (README 108, 112) at the menu's scale: white, the light green stroke, green words */
html#v8 body .v8-acct .am-switch { position: relative; justify-self: start; display: inline-flex; width: auto !important; min-height: 0 !important; align-items: center; height: 32px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--fennia-primary-30, #B8EABB) !important;
  border-radius: var(--v8-r-sm) !important; background: var(--v8-white) !important; color: var(--v8-green-t) !important; font: inherit; font-weight: 400 !important; cursor: pointer; transition: background-color .16s ease-out, border-color .16s ease-out; }
@media (hover: hover) { html#v8 body .v8-acct .am-switch:hover { background: var(--v8-hover) !important; border-color: var(--fennia-primary-40, #8ADC94) !important; } }
html#v8 body .v8-acct .am-switch:active { background: var(--v8-pressed) !important; }

/* The groups, a hairline between each, edge to edge */
html#v8 body .v8-acct :is(.am-list, .am-lang) { margin: 0 -8px !important; padding: 8px !important; border-top: 1px solid var(--v8-line); }
html#v8 body .v8-acct .am-places { display: none; }
html#v8 body .v8-acct .am-places.am-places-on { display: block; }
@media (max-width: 639px) { html#v8 body .v8-acct .am-places { display: block; } }

/* An item: an icon and its words, the green wash on hover at 8 corners (README 112) */
html#v8 body .v8-acct .am-item { display: flex !important; align-items: center; gap: 12px; width: 100%; min-height: 36px; margin: 0; padding: 0 8px !important; border: 0 !important; border-radius: var(--v8-r-sm) !important;
  background: none !important; box-shadow: none !important; color: var(--v8-ink) !important; font: inherit; font-weight: 400 !important; text-align: left; text-decoration: none !important; cursor: pointer; }
html#v8 body .v8-acct .am-item svg.i { flex: none; width: 18px !important; height: 18px !important; color: var(--v8-ink) !important; }
@media (hover: hover) { html#v8 body .v8-acct .am-item:hover { background: var(--v8-hover) !important; } }
html#v8 body .v8-acct .am-item:active { background: var(--v8-pressed) !important; }
html#v8 body .v8-acct .am-item[aria-current] { background: rgba(0, 76, 7, .08) !important; color: var(--v8-deep) !important; }
html#v8 body .v8-acct .am-item[aria-current] svg.i { color: var(--v8-deep) !important; }

/* The language: its name, then the compact segmented control (README 105's .v8-cek-seg at the menu's scale): a gray track with a
   hairline, three equal curved squares; the current one Fennia's selected green with a 1 px green edge and a check, so it never
   rests on colour alone. Links, as a language switch is: lang and hreflang on each, aria-current on the one in use */
html#v8 body .v8-acct .am-lang { padding: 12px 16px !important; }
html#v8 body .v8-acct .am-lang-l { display: block; margin-bottom: 8px; color: var(--v8-ink-2); }
html#v8 body .v8-acct .am-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--v8-r-sm); background: var(--v8-gray); box-shadow: inset 0 0 0 1px var(--v8-line); }
html#v8 body .v8-acct .am-seg a { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 32px; padding: 0 4px; border-radius: var(--v8-r-tag); color: var(--v8-ink) !important;
  text-decoration: none !important; white-space: nowrap; transition: background-color .16s ease-out, box-shadow .16s ease-out; }
html#v8 body .v8-acct .am-seg a svg.i { flex: none; width: 14px !important; height: 14px !important; color: var(--v8-green-t) !important; }
@media (hover: hover) { html#v8 body .v8-acct .am-seg a:not([aria-current]):hover { background: var(--v8-hover); } }
html#v8 body .v8-acct .am-seg a[aria-current] { background: var(--v8-sel, #E6FAE7); box-shadow: inset 0 0 0 1px var(--v8-green); cursor: default; }

/* The prototype's band: a tool for people trying the prototype, not part of the portal, so it stands apart on gray at the foot,
   with the green dot of the Prototype screens pill. "View the portal as" opens the people in place */
html#v8 body .v8-acct .am-proto { margin: 0 -8px -8px !important; padding: 8px !important; border-top: 1px solid var(--v8-line); background: var(--v8-gray); }
html#v8 body .v8-acct .am-proto-t { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 0 8px; border: 0 !important; border-radius: var(--v8-r-sm) !important; background: none !important;
  color: var(--v8-ink) !important; font: inherit; font-weight: 400 !important; text-align: left; cursor: pointer; }
html#v8 body .v8-acct .am-proto-t i { flex: none; width: 8px; height: 8px; margin: 0 5px; border-radius: 50%; background: var(--v8-green); }
html#v8 body .v8-acct .am-proto-t svg.i { flex: none; width: 18px !important; height: 18px !important; margin-left: auto; color: var(--v8-ink-2) !important; transition: transform .2s var(--v8-ease, ease-out); }
html#v8 body .v8-acct .am-proto-t[aria-expanded="true"] svg.i { transform: rotate(180deg); }
@media (hover: hover) { html#v8 body .v8-acct .am-proto-t:hover { background: var(--v8-hover) !important; } }
html#v8 body .v8-acct .am-proto-l[hidden] { display: none; }
html#v8 body .v8-acct .am-proto-l p { padding: 4px 8px 8px 38px; color: var(--v8-ink-2); }
html#v8 body .v8-acct .am-pp { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 8px; border: 0 !important; border-radius: var(--v8-r-sm) !important; background: none !important;
  color: var(--v8-ink) !important; font: inherit; font-weight: 400 !important; text-align: left; cursor: pointer; }
html#v8 body .v8-acct .am-pp > :is(img, .am-pp-i) { flex: none; width: 28px; height: 28px; margin: 0 -5px 0 -5px; border-radius: 50%; object-fit: cover; }
html#v8 body .v8-acct .am-pp > .am-pp-i { display: grid; place-items: center; background: var(--v8-mint); color: var(--v8-deep); font-size: var(--v8-fs-14) !important; line-height: 1 !important; font-weight: 700 !important; }
html#v8 body .v8-acct .am-pp > span:not(.am-pp-i) { display: grid; min-width: 0; flex: 1; }
html#v8 body .v8-acct .am-pp b { font-weight: 700; }   /* names Bold, the role in ink-2, as the boxed list's rows (README 108) */
html#v8 body .v8-acct .am-pp b + span { color: var(--v8-ink-2); }
html#v8 body .v8-acct .am-pp > svg.i { flex: none; width: 18px !important; height: 18px !important; color: var(--v8-green-t) !important; }
@media (hover: hover) { html#v8 body .v8-acct .am-pp:hover { background: var(--v8-hover) !important; } }
html#v8 body .v8-acct .am-pp[aria-current] { background: var(--v8-sel, #E6FAE7) !important; }

/* Keyboard focus on everything in it: the system's ring, inset so the scrolling box never clips it */
html#v8 body .v8-acct :is(a, button):focus-visible { outline: var(--v8-focus) !important; outline-offset: -2px !important; box-shadow: var(--v8-focus-glow-in) !important; }
html#v8 body .v8-acct .am-switch:focus-visible { outline-offset: 2px !important; }

/* Touch and the phone's top bar: 44 rows for the thumb, the type unchanged */
@media (pointer: coarse), (max-width: 1023px) {
  html#v8 body .v8-acct :is(.am-item, .am-proto-t) { min-height: 44px; }
  html#v8 body .v8-acct .am-seg a { height: 40px; }
  html#v8 body .v8-acct .am-switch { height: 36px; }
  html#v8 body .v8-acct .am-switch::before { content: ""; position: absolute; inset: -4px 0; }
}
@media (prefers-reduced-motion: reduce) { html#v8 body .v8-acct :is(.am-switch, .am-seg a, .am-proto-t svg.i) { transition: none; } }
@media (forced-colors: active) {
  html#v8 body .v8-acct { border: 1px solid CanvasText !important; }
  html#v8 body .v8-acct .am-seg a[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; }
}
