/* The shared navigation bars (lane portalux, 2026-10-13): one bar on every client page, one on
   every operator page (the server writes the markup). Served at /app/nav.css and
   /ops/nav.css. No script: the menus are <details>. Kept free of the words the client wording
   check refuses, because it is served beside client pages. */
.sitebar {
  --sb-bg: #ffffff; --sb-ink: #1b2420; --sb-muted: #5c6862; --sb-line: #d8ddd8; --sb-soft: #eef1ec;
  --sb-accent: #1d6b5a; --sb-accent-ink: #ffffff;
}
.sitebar.ops { --sb-accent: #1f5fae; --sb-soft: #eaf0f8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sitebar {
    --sb-bg: #19201d; --sb-ink: #e3e9e5; --sb-muted: #98a59e; --sb-line: #2c3631; --sb-soft: #1f2824;
    --sb-accent: #4fbf9f; --sb-accent-ink: #08130f;
  }
  :root:not([data-theme="light"]) .sitebar.ops { --sb-accent: #6ea8ff; --sb-soft: #1d2533; }
}
:root[data-theme="dark"] .sitebar {
  --sb-bg: #19201d; --sb-ink: #e3e9e5; --sb-muted: #98a59e; --sb-line: #2c3631; --sb-soft: #1f2824;
  --sb-accent: #4fbf9f; --sb-accent-ink: #08130f;
}
:root[data-theme="dark"] .sitebar.ops { --sb-accent: #6ea8ff; --sb-soft: #1d2533; }

header.sitebar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0;
  padding: 8px 16px; background: var(--sb-bg); color: var(--sb-ink);
  border-bottom: 1px solid var(--sb-line); position: relative; z-index: 1000;
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; box-sizing: border-box;
  max-width: 100%;
}
header.sitebar * { box-sizing: border-box; }
header.sitebar a { color: inherit; text-decoration: none; }
.sitebar .sb-brand { font-weight: 650; font-size: 17px; display: inline-flex; align-items: baseline;
  gap: 8px; white-space: nowrap; }
.sitebar .sb-sub { color: var(--sb-muted); font-weight: 400; font-size: 13px; }
.sitebar .sb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0;
  padding: 0; flex: 1 1 auto; min-width: 0; background: none; border: 0; }
.sitebar .sb-nav > a, .sitebar summary {
  display: inline-block; padding: 7px 12px; border-radius: 6px; color: var(--sb-muted);
  font-weight: 550; font-size: 14.5px; cursor: pointer; white-space: nowrap; line-height: 1.3;
  border: 0; background: none;
}
.sitebar .sb-nav > a:hover, .sitebar summary:hover { background: var(--sb-soft); color: var(--sb-ink); }
.sitebar .sb-nav > a[aria-current="page"], .sitebar summary.here {
  background: var(--sb-soft); color: var(--sb-ink); box-shadow: inset 0 -2px 0 var(--sb-accent);
}
.sitebar a:focus-visible, .sitebar summary:focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 1px; }
.sitebar summary { list-style: none; }
.sitebar summary::-webkit-details-marker { display: none; }
.sitebar summary::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom-width: 0; }
.sitebar details { position: relative; }
.sitebar .sb-pop {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; z-index: 1001;
  display: flex; flex-direction: column; padding: 6px; background: var(--sb-bg);
  border: 1px solid var(--sb-line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
}
.sitebar .sb-pop a { padding: 8px 10px; border-radius: 6px; font-size: 14.5px; white-space: nowrap; }
.sitebar .sb-pop a:hover { background: var(--sb-soft); }
.sitebar .sb-pop a[aria-current="page"] { font-weight: 650; box-shadow: inset 3px 0 0 var(--sb-accent); }
.sitebar .sb-end { display: flex; align-items: center; gap: 6px 10px; margin-left: auto; flex-wrap: wrap; }
.sitebar .sb-end .sb-pop { left: auto; right: 0; }
.sitebar .sb-who { color: var(--sb-muted); font-size: 13px; overflow-wrap: anywhere; }
.sitebar .sb-signout, .sitebar .sb-out { font-size: 14px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--sb-line); }
.sitebar .sb-cta { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 6px;
  background: var(--sb-accent); color: var(--sb-accent-ink); }
header.sitebar a.sb-cta { color: var(--sb-accent-ink); }
#sb-name { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom; }

/* who sees what: a signed-out visitor sees Sign in and Request access; a demo account sees
   Get an account; everyone else the account menu. The page's script sets the body class. */
.sitebar .sb-out, .sitebar .sb-demo { display: none; }
body.signed-out .sitebar .sb-out { display: inline-block; }
body.signed-out .sitebar .sb-in { display: none; }
body.demo .sitebar .sb-demo { display: inline-block; }
body.demo .sitebar [data-nav="new"], body.demo .sitebar [data-nav="billing"],
body.demo .sitebar [data-nav="keys"] { display: none; }

/* phones: the brand and the account menu on the first row, the items on the second */
@media (max-width: 720px) {
  header.sitebar { padding: 6px 10px; gap: 4px 8px; }
  .sitebar .sb-sub { display: none; }
  .sitebar .sb-nav { order: 3; flex: 1 1 100%; }
  .sitebar .sb-nav > a, .sitebar summary { padding: 7px 9px; font-size: 14px; }
  .sitebar .sb-pop { min-width: 200px; max-width: calc(100vw - 24px); }
  .sitebar .sb-nav details:nth-last-of-type(-n+2) .sb-pop { left: auto; right: 0; }
  .sitebar .sb-who { display: none; }
  #sb-name { max-width: 14ch; }
}

/* A page's own title line under the bar (the operator pages kept theirs). */
.page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 10px; }
.page-title h1 { margin: 0; }

/* The public landing page at / (lane portalux). */
body.landing { margin: 0; background: #f4f5f2; color: #1b2420;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.landing { background: #111614; color: #e3e9e5; }
}
:root[data-theme="dark"] body.landing { background: #111614; color: #e3e9e5; }
.landing main { max-width: 980px; margin: 0 auto; padding: 28px 16px 60px; }
.landing .hero h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; }
.landing .hero p { font-size: 17px; max-width: 62ch; margin: 0 0 18px; }
.landing .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.landing .actions a { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600;
  text-decoration: none; border: 1px solid #1d6b5a; color: #1d6b5a; }
.landing .actions a.primary { background: #1d6b5a; color: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .landing .actions a { border-color: #4fbf9f; color: #4fbf9f; }
  :root:not([data-theme="light"]) .landing .actions a.primary { background: #4fbf9f; color: #08130f; }
}
.landing .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
  padding: 0; margin: 0 0 28px; list-style: none; }
.landing .steps li { background: rgba(127, 127, 127, .08); border: 1px solid rgba(127, 127, 127, .25);
  border-radius: 10px; padding: 14px 16px; }
.landing .steps strong { display: block; margin-bottom: 4px; }
.landing footer { border-top: 1px solid rgba(127, 127, 127, .3); margin-top: 30px; padding-top: 14px;
  font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.landing a { color: inherit; }

/* signed out: only Help of the main items; the others need an account */
body.signed-out .sitebar .sb-nav [data-nav="surveys"], body.signed-out .sitebar .sb-nav [data-nav="new"],
body.signed-out .sitebar .sb-nav [data-nav="billing"] { display: none; }

.sitebar [hidden] { display: none !important; }

/* Help and policy pages run no script, so their bar cannot tell who is visiting (audit repair
   2026-10-13, fix 3): it carries only links right for everyone (sitenav who=any). */
.sitebar.any .sb-any { display: inline-block; }
