/* Shared chrome: the design tokens (both themes) and the top bar.
   Linked by every page - the SPA, the login card and each server-rendered page - so the bar
   looks the same everywhere WITHOUT dragging the whole SPA stylesheet (and its class names)
   onto pages that have their own.

   TOKENS LIVE HERE, not in styles.css. Editing a --token in styles.css only reaches the SPA and
   the login card; every server-rendered page (/sites, /usage, /accounts, ...) links this file and
   pages.css, and would keep the old value. */
.hidden { display: none !important; } /* the bar hides its role-gated entries with this */

:root {
  --band: #2e7f29;
  --band-light:#71c2b2;
  --band-light2:#49ae43;
  --band-txt: #ffffff;
  --band-line: #067870;
  --bar: #1e233b;
  --logo-box: rgba(255, 255, 255, 0.08);
  --logo-ink: #f3f6f9;
  /* Dark theme (default) */
  --bg: #0a0e27;
  --bg-2: #171c23;
  --surface: rgba(54, 58, 78, 0.3);
  --bg-hi: #0a0e27;
  --page-bg: none; /* the scrim below is opaque - the photo would never show */
  --page-scrim: #0a0e27;
  --ink: #ffffff;
  --ink2: #49ae43;
  --muted: #f9fff9;
  --faint: rgba(255, 255, 255, 0.6);
  --line: #363a4e;
  --line-hover: #3a434f;
  --field: rgba(54, 58, 78, 0.6);
  --field-focus: rgba(54, 58, 78, 0.2);
  --hover: rgba(255, 255, 255, 0.06);
  --skip-bg: #232932;
  --code-ink: #c5ccd6;
  --brand: #2e7f29;
  --brand-600: #49ae43;
  --brand-700: #56c64a;
  --brand-tint: #0a0e27;
  /* Category-card icon plate. Separate from --brand-tint, which also backs the small badges
     (rev-ai, qa-field, file.active) where a solid teal would kill their contrast. */
  --icon-plate: #2e7f29;
  --icon-ink: #ffffff;
  --accent: #e0964b;
  --ok: #4ade80;
  --warn: #d97706;
  --zebra: rgba(255, 255, 255, 0.03);
  --ok-bg: #102a1b;
  --ok-border: #1d4a32;
  --bad: #c2410c;
  --bad-bg: #2a1710;
  --bad-border: #4a2a1a;
  --ring: rgba(46, 127, 41, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.62);
  --biz-overlay: rgba(30, 35, 59, 0.95);
  --biz-overlay-hover: rgba(30, 35, 59, 0.85);
  --biz-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --radius-sm: 11px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="light"] {
  --band: #2e7f29;
  --band-light:#71c2b2;
  --band-light2:#49ae43;
  --band-txt: #eaf6f2;
  --band-line: #067870;
  --bar: #eff2f1;
  --logo-box: #f0f3f4;
  --logo-ink: #182029;
  --bg: rgba(248, 249, 252, 1);
  --bg-2: #efece4;
  --surface: rgba(248, 249, 252, 0.85);
  --bg-hi: #ffffff;
  --page-bg: none;
  --page-scrim: rgba(248, 249, 252, 1);
  --ink: #1b2430;
  --ink2: #49ae43;
  --muted: #4d586a;
  --faint: #6f757d;
  --line: rgba(20, 30, 40, 0.22);
  --line-hover: #d8d2c6;
  --field: #eff2f1;
  --field-focus: #eff2f1;
  --hover: rgba(0, 0, 0, 0.03);
  --skip-bg: #e9e6df;
  --code-ink: #2a3340;
  --brand: #2e7f29;
  --brand-600: #0c7363;
  --brand-700: #2e7f29; /* badge text on --brand-tint */
  --brand-tint: #fff;
  --icon-plate: #2e7f29;
  --icon-ink: #ffffff;
  --accent: #e0964b;
  --ok: #15803d;
  --warn: #b45309;
  --zebra: rgba(16, 28, 43, 0.035);
  --ok-bg: #eaf6ee;
  --ok-border: #c9e7d2;
  --bad: #c2410c;
  --bad-bg: #fcf0e8;
  --bad-border: #f3d6c4;
  --ring: rgba(46, 127, 41, 0.35);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --card-border: rgba(20, 30, 40, 0.22);
  --card-shadow: 0 4px 16px rgba(20, 30, 40, 0.16);
  --card-shadow-hover: 0 12px 30px rgba(20, 30, 40, 0.24);
  --biz-overlay: rgba(248, 249, 252, 0.85);
  --biz-overlay-hover: rgba(248, 249, 252, 0.8);
  --biz-text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(var(--page-scrim), var(--page-scrim)), var(--page-bg) center / cover fixed no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* Top bar - two rows (mockup 2026-08-04): action band on top, logo + nav under, burger on mobile */
.topbar { margin: 0 0 6px; }
.tb-in { max-width: 1280px; margin: 0 auto; padding: 0 26px; display: flex; align-items: center; gap: 14px; }
.tb-band { background: var(--band); color: var(--band-txt); }
.tb-band .tb-in { justify-content: flex-end; align-items: stretch; gap: 0; min-height: 44px; }
.tb-band .theme-icons { background: var(--bar); border-radius: 0; padding: 0 16px; align-self: stretch; }
.tb-band .connectLink, .tb-band .acctName, .tb-band button.logoutBtn { align-self: center; padding-left: 16px; padding-right: 16px; }
.tb-band .connectLink { text-transform: lowercase; }

.tb-band .acctName { padding-right: 0; }
.acctName img { border-radius: 100%; margin-top: 5px; width: auto; height: 30px; }
.tb-band .acctName .acct-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tb-menu-acct .acctName { display: inline-flex; align-items: center; gap: 8px; }

.tb-band a, .tb-band button { color: inherit; }
.connectLink, .acctName { font-size: 13.5px; font-weight: 600; text-decoration: none; }
button.logoutBtn { font-size: 13.5px; font-weight: 600; background: none; border: 0; cursor: pointer; padding: 4px 2px; opacity: 1; color:white; }
@media (max-width: 880px) {
	button.logoutBtn { font-size: 13.5px; font-weight: 600; background: var(--brand); border: 0; border-radius:10px; cursor: pointer; padding: 6px 20px 9px; opacity: 1; color:white }
}

.connectLink:hover, button.logoutBtn:hover { text-decoration: underline; }
.acctName { opacity: 0.85; }
.acctName:empty { display: none; }
.tb-band .guideBtn { display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 700; color: #fff; background: var(--band-light2); border-radius: 0; padding: 0 20px; text-decoration: none; }
.tb-band .guideBtn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
@media (max-width: 880px) {
  .guideBtn:hover { filter: brightness(1.08);  color: var(--ink); }
}

.tb-main { background: var(--bar); box-shadow: 0px 3px 5px rgba(0,0,0,.1); }
.tb-main .tb-in { min-height: 60px; align-items: stretch; }
.tb-main .mainnav, .tb-main .tb-right { align-self: center; }
.brand { display: inline-flex; align-self: stretch; text-decoration: none; }
.brand:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.logo-box { display: inline-flex; align-items: center; gap: 2px; background: var(--logo-box); border-radius: 3px; padding: 0 18px; color: var(--logo-ink); }
.logo-box .logo-svg { display: block; height: 45px; width: auto; }
/* Two logo files, not one tinted silhouette: the mark is two-colour (green accent + navy or white
   wordmark), so currentColor cannot produce both. White rides the dark theme, navy the light one -
   the designer's own pairing. Default (no data-theme) is dark, matching :root above. */
/* Specificity matters here: ".logo-box .logo-svg" above is two classes, so a one-class hide loses
   to it and BOTH logos paint side by side. Match its weight. */
.logo-box .logo-on-light, .logo-mark .logo-on-light { display: none; }
:root[data-theme="light"] .logo-box .logo-on-dark,
:root[data-theme="light"] .logo-mark .logo-on-dark { display: none; }
:root[data-theme="light"] .logo-box .logo-on-light,
:root[data-theme="light"] .logo-mark .logo-on-light { display: block; }
.mainnav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.mainnav a { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 8px 11px; border-radius: 7px; }
.mainnav a:hover { color: var(--brand-700); background: var(--hover); text-decoration:none; }
.tb-right { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.langsel { appearance: auto; background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 2px; width: 45px; text-align: center; }
.langsel:focus { border: 0; box-shadow: none; }
.langsel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; border-radius: 5px; }
.langsel option { color: var(--brand); }
.burger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--band); color: var(--icon-ink); cursor: pointer; padding: 0 10px;}
.burger svg { width: 22px; height: 22px; }
span.theme-icons.tb-mobile-only { display: none; }
.tb-menu { background: var(--bar); border-bottom: 1px solid var(--line); padding: 4px 26px 28px; position: relative; top: -1px;  box-shadow: 0px 3px 5px rgba(0,0,0,.1); }
.tb-menu-acct { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0 16px; border-bottom: 1px solid var(--band-line); border-top: 1px solid var(--band-line); }
.tb-menu-acct .connectLink.pill { background: var(--band); color: #fff; border-radius: 8px; padding: 10px 18px; }
.tb-menu-acct .guideBtn { background: none; color: var(--ink); padding: 0; }

.tb-menu-nav { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.tb-menu-nav a { color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; padding: 6px 2px; }
.tb-menu-nav a:hover { color: var(--ink2); text-decoration: none; }
.tb-menu-nav a::before { content: "\2192\00a0\00a0"; color: var(--brand-700); }
@media (min-width: 881px) {
  .tb-menu { display: none; }
}
@media (max-width: 880px) {
  .tb-band, .mainnav { display: none; }
  .burger { display: inline-flex; }
  span.theme-icons.tb-mobile-only { display: inline-flex; }
  .tb-in { padding: 8px 16px; }
  .brand { align-self: center; }
  .logo-box { padding: 0px 16px; border-radius: 8px; }
}
@media (max-width: 380px) {
  .logo-box {display: inline-block; align-items: center; background: none; border-radius: 3px; padding: 0; color: var(--logo-ink); max-width:100%}
  .logo-box .logo-svg { height: 40px; width: auto; max-width:100%}
  .burger { width: auto; background: none; color: var(--brand-700); padding: 0; }
  .tb-in { padding: 8px 8px; gap: 5px; }
  .tb-right { gap: 0; }
}

.tag {
  font-size: 12.5px; font-weight: 600; color: var(--brand-700);
  background: var(--brand-tint); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap; /* keep each button label on one line */
}
.tag.acct { background: var(--bg-2); color: var(--muted); } /* who's signed in (not a button) */

/* Language flags, by the logo. The active language is full-strength; the other is dimmed. */
.lang-flags { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 0 12px; }
.lang-flags button {
  appearance: none; padding: 0; background: none; line-height: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 4px; opacity: 0.38;
  transition: opacity 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.lang-flags button svg { display: block; width: 23px; height: 15px; border-radius: 3px; }
.lang-flags button:hover { opacity: 0.85; }
.lang-flags button.on { opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 2px var(--ring); }
.lang-flags button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

/* Theme icons (sun/moon): same pattern as the flags - active full-strength, the other dimmed. */
.theme-icons { display: inline-flex; align-items: center; }
.theme-icons button { display: inline-flex; border: 0; background: none; color: var(--muted); opacity: 0.4; cursor: pointer; padding: 4px; border-radius: 6px; }
.theme-icons button svg { display: block; width: 24px; height: 24px; }
.theme-icons button:hover { opacity: 0.85; }
.theme-icons button.on { opacity: 1; color:var(--ink);}
.theme-icons button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
@media (max-width:380px) {
  .theme-icons button { padding: 0; }
}
