/*
 * Account pages: what base.css does not already give every page.
 *
 * base.css owns the spacing scale, buttons, fields, cards, badges, dialogs
 * and the status line. This file adds only the account shell's own pieces:
 * the identity area of the header, the page tabs, record lists and the
 * one-time secret box. All spacing uses base.css variables, so buttons here
 * keep the same separation from each other and from text as everywhere else.
 */

/* `hidden` must win over the display values set by base.css and below. */
[hidden] { display: none !important; }

/* The Owner dashboard's type on every account and company page (Jason, 2026-11-23: "styled like the
   [Operations] pages"): Geist text, 16 px on 26.4 px lines, regular weight for controls and labels and a
   middle weight for names in bold (apps/operations/calm.css; the numbers are shared/brand.css --ops-*). */
@font-face { font-family:CompanyGeist; src:url('../operations/fonts/geist-1.ttf') format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:CompanyGeist; src:url('../operations/fonts/geist-2.ttf') format('truetype'); font-weight:500; font-display:swap; }
@font-face { font-family:CompanyGeist; src:url('../operations/fonts/geist-3.ttf') format('truetype'); font-weight:600; font-display:swap; }
html { font: 400 16px/var(--ops-line) var(--ops-sans); }
body :is(button, .button, input, select, textarea) { font-family: inherit; font-weight: 400; }
body :is(button.primary, .button.primary) { font-weight: 500; }
body :is(strong, b, th, dt, h3) { font-weight: 500; }
body :is(label, .field > span, .field label) { font-weight: 400; }
/* Fields and drop-downs read at 15 px with 12 px sides (base.css sizes their height). A phone keeps 16 px, so
   choosing a field never zooms the page. */
body :is(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea) { font-size: var(--ops-input-size); padding-inline: var(--ops-input-pad); }
@media (max-width: 600px) { body :is(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea) { font-size: 16px; } }

.skip-link { position: absolute; left: var(--gap-3); top: -4rem; z-index: 60; padding: var(--gap-2) var(--gap-4); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 0; }
.skip-link:focus { top: var(--gap-3); }
main:focus { outline: none; }

.identity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-2) var(--gap-3); font-size: .9375rem; min-width: 0; }
.identity .who { overflow-wrap: anywhere; }

/* Narrow reading column for sign-in and other single-task pages. */
.narrow { max-width: 30rem; margin-inline: auto; }
.page-title { margin-bottom: var(--gap-4); }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
/* An account page's title is the Owner dashboard's serif title; the help box follows it 24 px below. A
   section's own heading is the dashboard's smaller serif heading (finish.css rules the line under it).
   (My quotes draws its title without the class: it is the first heading beside the menu.) */
:is(h1.page-title, main > .workspace-navigation + div > h1:first-child) { margin: 0 0 var(--ops-gap); font: 400 var(--ops-title-size)/var(--ops-title-line) var(--ops-serif); letter-spacing: var(--ops-title-spacing); overflow-wrap: anywhere; }
.card > h2:first-child { font: 400 var(--ops-heading-size)/var(--ops-title-line) var(--ops-serif); letter-spacing: var(--ops-title-spacing); }
@media (max-width: 40rem) { main .card { padding: var(--ops-card-pad-phone); } }
.card form + form, .card form + .actions, .card form + h3, .card .records + h3 { margin-top: var(--gap-5); }
.section + .section { margin-top: var(--gap-5); padding-top: var(--gap-5); border-top: 1px solid var(--line); }

/* A row of choices that behave like tabs but are plain buttons or links. */
.choices { display: flex; flex-wrap: wrap; gap: var(--gap-2); margin: 0 0 var(--gap-4); }
/* One weight, chosen or not, so choosing never changes a choice's size. */
.choices button { font-weight: 500; }
.choices button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
/* On a signed-in page (beside the menu) they look like the Owner dashboard's tabs: 40 px, the chosen one
   filled gold, the same size either way. The sign-in screen keeps the underline above: there the filled
   gold look belongs to its one button, which has the same words as the first choice. */
main:has(> .workspace-navigation) .choices button { min-height: var(--ops-tab-min); padding: var(--ops-tab-pad); border: 1px solid var(--line); background: var(--ops-tab-fill); font-size: var(--ops-tab-size); font-weight: var(--ops-tab-weight); line-height: var(--ops-line); }
main:has(> .workspace-navigation) .choices button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); box-shadow: none; color: var(--ops-tab-chosen-ink); font-weight: var(--ops-tab-weight); }
main:has(> .workspace-navigation) .choices button[aria-pressed="true"]:not(:disabled):hover { border-color: var(--focus); background: var(--focus); color: var(--ops-tab-chosen-ink); }
.link-row { display: flex; flex-wrap: wrap; gap: var(--gap-2) var(--gap-4); margin-top: var(--gap-4); }
button.link { min-height: 44px; padding: var(--gap-2) 0; border: 0; background: none; color: var(--accent); text-decoration: underline; }

/* Records: one bordered row each, text first, commands after, never crowded. */
.records { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-3); }
.records > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-3) var(--gap-4); padding: var(--gap-3) var(--gap-4); border: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.records .record-text { flex: 1 1 14rem; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.records .actions { margin-top: 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--gap-2) var(--gap-4); margin: 0 0 var(--gap-4); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* A checkbox with its sentence: the box never shrinks, the words wrap beside it. */
.check { display: flex; align-items: flex-start; gap: var(--gap-3); margin: 0 0 var(--gap-4); max-width: 40rem; }
.check input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; padding: 0; }
.check label { font-weight: 600; }

/* A requested color: a plain sample square, deliberately unlike a catalog swatch control. */
.swatch-sample { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 0; }
input[type="color"] { width: 5rem; padding: var(--gap-1); }
select { appearance: auto; }

/* A secret shown once (the authenticator setup key): easy to read and copy. */
.secret { font: 600 1.125rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; padding: var(--gap-3); border: 1px dashed var(--line); border-radius: 0; background: var(--neutral-bg); overflow-wrap: anywhere; user-select: all; }

.good-note { background: var(--good-bg); color: var(--good); border: 1px solid currentColor; border-radius: 0; padding: var(--gap-3); }

@media (max-width: 40rem) {
  .site-header { padding: var(--gap-3) var(--gap-4); }
  .records > li { align-items: stretch; }
  .records .actions { width: 100%; }
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dd { margin-bottom: var(--gap-2); }
}

/* Subscription choices keep the payment schedule readable on narrow screens. */
.billing-offers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; margin:1.25rem 0; }
.billing-plan { border:1px solid var(--line,#d8dcdb); border-radius:0; padding:1.5rem; background:var(--surface,#fff); }
.billing-plan h4 { margin:0; font-size:1.05rem; }
.billing-price { font-size:clamp(1.5rem,3vw,2.15rem); font-weight:700; letter-spacing:-.035em; margin:.75rem 0; }
.billing-price span { font-size:.95rem; font-weight:400; letter-spacing:0; }
.billing-plan button { width:100%; margin-top:.5rem; }
.billing-state { font-weight:700; font-size:1.15rem; }
@media(max-width:700px) { .billing-offers { grid-template-columns:1fr; } }

/* The same authorized link list lives in the left column on desktop and
   inside a native modal drawer on phones. No duplicate or shortened menus. */
.workspace-navigation { min-width:0; align-self:start; }
.company-nav { min-width:0; background:#202627; border:1px solid var(--line); border-radius:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
/* Rows measure like the Owner dashboard's menu (shared/brand.css --ops-menu-*): 15.2 px words beside a
   30 px tinted box holding the drawing, 54 px rows 2 px apart with no lines between them, a 3 px edge on
   the left that turns gold under the pointer, and the open page's row tinted gold with a gold edge. The
   words keep one weight whether a row is open or not. */
.company-nav .tabs { display:flex; flex-direction:column; gap:2px; margin:0; padding:8px; list-style:none; }
.company-nav li { min-width:0; }
.company-nav .tabs a { display:flex; justify-content:flex-start; align-items:center; gap:var(--ops-menu-gap); width:100%; min-height:var(--ops-menu-min); padding:var(--ops-menu-pad); border:0; border-left:3px solid transparent; border-radius:0; color:var(--muted); background:transparent; font:inherit; font-size:var(--ops-menu-size); font-weight:var(--ops-menu-weight); line-height:var(--ops-menu-line); text-align:left; white-space:normal; text-decoration:none; }
.company-nav .tabs a span { min-width:0; overflow-wrap:anywhere; }
/* A workspace's menu (company-menu.mjs) may have headings: the Account workspace's two. A heading is a
   quiet label above its links, starting where the rows' drawings start. */
.company-nav .nav-heading { padding:16px 12px 6px var(--ops-menu-edge); color:var(--accent); font-size:.68rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; }
.company-nav .tabs a:hover,.company-nav .tabs a:focus-visible { color:var(--ink-strong); background:var(--surface-raised); }
.company-nav .tabs a[aria-current="page"] { color:var(--muted); background:var(--ops-menu-current); box-shadow:inset 3px 0 var(--accent); }
.company-nav .tabs a[aria-current="page"]:hover { color:var(--ink-strong); }
/* Pressed, a row darkens, as on the Owner dashboard and in Company settings. */
.company-nav .tabs a:active { background:var(--page); }
.company-nav svg,.workspace-menu-toggle svg,.workspace-menu .dialog-head svg { display:block; width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
/* A row's drawing is the color of the words beside it, in a faint box of that same color. */
.company-nav .tabs a svg { width:var(--ops-menu-box); height:var(--ops-menu-box); padding:var(--ops-menu-box-pad); background:var(--ops-menu-box-fill); color:inherit; stroke-width:2; }
.workspace-menu-toggle { display:none; }
.dialog.workspace-menu { margin:0; padding:0; width:min(22rem,calc(100vw - 2.5rem)); max-width:none; height:100vh; height:100dvh; max-height:100vh; max-height:100dvh; border-radius:0; overflow:hidden; }
.workspace-menu[open] { display:flex; flex-direction:column; }
.workspace-menu .dialog-head { flex:none; padding:16px; }
.workspace-menu .dialog-head h2 { min-width:0; overflow-wrap:anywhere; }
.workspace-menu .dialog-head button { min-width:44px; flex:none; }
.workspace-menu .company-nav { flex:1 1 auto; min-height:0; border:0; border-radius:0; }
html.workspace-menu-open { overflow:hidden; }
@media screen and (min-width:60.001rem) {
  main:has(> .workspace-navigation),main:has(> .company-pages > .workspace-navigation) { max-width:none; padding:24px; }
  main:has(> .workspace-navigation),.company-pages:has(> .workspace-navigation) { display:grid; grid-template-columns:15rem minmax(0,1fr); grid-template-rows:auto 1fr; gap:24px; align-items:start; }
  /* The first row is only as tall as the notice in it: a page shorter than the menu must not leave a gap under the notice. */
  /* No scroll inside the menu: a menu taller than the window moves with the page until its last link
     shows, then stays put (the height comes from navigation.mjs). */
  .workspace-navigation { grid-column:1; grid-row:1 / span 2; position:sticky; top:24px; }
  main:has(> .workspace-navigation) > :not(.workspace-navigation),.company-pages > .company-notice,.company-pages > .company-page { grid-column:2; min-width:0; }
}
@media screen and (max-width:60rem) {
  .workspace-navigation > .company-nav { display:none; }
  .workspace-navigation { display:contents; }
  .workspace-menu-toggle { display:inline-flex; flex:none; min-height:44px; gap:8px; font-size:.875rem; }
  /* The brand keeps its own width here: shrunk below its logo and "Your account", the words ran under the
     company name beside it (768 px, November 25, 2026). The company name takes the room that is left and
     wraps; the phone rule below puts "Your account" under the logo instead. */
  .site-header:has(> .workspace-menu-toggle) > .brand { flex:none; }
}
@media screen and (max-width:40rem) {
  .site-header:has(> .workspace-menu-toggle) > .brand { flex:1 1 0; flex-wrap:wrap; gap:4px; }
  .site-header:has(> .workspace-menu-toggle) > .brand img { width:156px; max-width:100%; height:auto; }
  .site-header:has(> .workspace-menu-toggle) > .brand span { border:0; padding:0; flex-basis:100%; }
}
@media print {
  .workspace-navigation,.workspace-menu,.workspace-menu-toggle { display:none !important; }
}

/* Three plain questions (tax page and other short forms) */
.tax-simple .answer-tile{display:flex;flex-direction:column;gap:6px;padding:16px 18px;border:1px solid var(--line,#d8d8d8);border-radius:0;margin-bottom:18px}
.tax-simple .answer-tile-label{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;opacity:.7}
/* The light sits beside the answer's first line, also when the answer wraps to two. */
.tax-simple .answer-tile strong{display:flex;align-items:flex-start;gap:10px;font-size:1.3rem}
.tax-simple .answer-tile strong>.light{margin-top:calc((1lh - 12px) / 2)}
.tax-simple .answer-tile small{opacity:.75}
.tax-simple .light{flex:none;width:12px;height:12px;border-radius:50%;background:#e6a13a}
.tax-simple .light[data-state=good]{background:#3fbf6f}
.tax-simple .light[data-state=bad]{background:#e0574f}
.tax-simple ol.questions{margin:0 0 18px;padding-left:1.4em}
.tax-simple ol.questions li{margin-bottom:14px;padding-left:4px}
.tax-simple ol.questions li::marker{font-weight:700;font-size:1.1rem}
.tax-simple details{margin-bottom:18px}
.answer-tiles.tax-simple{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:6px 0 18px}
.answer-tiles.tax-simple .answer-tile{margin-bottom:0}

/* Menu rows are the SAME size with a mouse and on a touch screen. Jason, 2026-11-23, with pictures of both:
   "2 pages still have smaller nav buttons compared to the other ... change it." Tabs are 40 px either way,
   like the Owner dashboard's. The one 34 px rule for controls with a mouse (shared/base.css) must not shrink
   either, so it is answered here. A menu taller than the window moves with the page until its last link
   shows, then stays put. */
@media (pointer:fine) {
  .company-nav .tabs a { min-height:var(--ops-menu-min) !important; padding:var(--ops-menu-pad) !important; }
  :is(main:has(> .workspace-navigation) .choices, .count-tabs, .sd-tabs) > button { min-height:var(--ops-tab-min) !important; padding-block:var(--ops-tab-pad-y) !important; }
}
/* On a touch screen the same tabs are 44 px, like every control there and like the tabs in Company settings. */
@media (pointer:coarse) {
  :is(main:has(> .workspace-navigation) .choices, .count-tabs, .sd-tabs) > button { min-height:44px !important; }
}

/* Header on a narrower computer or tablet (Jason, 2026-11-23: with a long company name, the "Production" tag,
   a long email and two buttons, the header broke onto two lines at about 1145 px). A smaller logo and tighter
   gaps keep it on one line. (No auto margin on the sign-in group: with the logo's own auto margin it would
   push the environment tag to the middle of the header on pages with no company name.) Since November 25,
   2026 the same smaller logo and gaps reach down to the phone width (40 rem), so a tablet does not draw a
   larger logo than a laptop and the menu, logo and company name share the first line at 768 px. */
@media screen and (min-width:40.001rem) and (max-width:90rem) {
  .site-header { gap:8px 14px; padding-left:var(--gap-4); padding-right:var(--gap-4); }
  .site-header .brand { gap:14px; }
  .site-header .brand img { width:150px; height:42px; }
  .site-header .brand span { padding-left:14px; }
  .site-header > .identity { gap:8px; font-size:.875rem; }
  .site-header > .company-context h1 { font-size:.92rem; text-wrap:balance; }
}
