/* TitanX public sites: the shared base (TitanX Store, Careers, Tenders).
   The same family as the main app (static/css/titanx.css + base_bootstrap.html):
   SF-like system type, a grey canvas with white cards, soft large radii, subtle
   shadows, one Apple blue for actions, a frosted top bar, quiet motion and 44px
   targets. Light and dark by token only: no rule below hard-codes a colour.
   No framework and no web fonts: the system stack is the font. */
:root {
  color-scheme: light dark;
  /* Fills (buttons, marks) use the vivid blue; text and links use the AA tone. */
  --brand: #0071e3; --brand-rgb: 0, 113, 227; --brand-strong: #0064cc; --brand-soft: #e8f1fd;
  --bg: #f5f5f7; --surface: #fff; --surface-2: #fbfbfd; --ink: #1d1d1f; --ink-2: #6e6e73; --line: #d2d2d7;
  --ok: #157347; --ok-soft: #e9f6ef; --warn: #8a5300; --warn-soft: #fff5e0; --bad: #c62828; --bad-soft: #fdecec;
  --on-brand: #fff;
  /* Button fill: white on it clears AA in both themes (the vivid dark blue does not). */
  --fill: #0071e3; --fill-hover: #0064cc;
  --bar: rgba(255, 255, 255, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .08);
  --r-sm: .5rem; --r-md: .75rem; --r-lg: 1.125rem; --radius: .75rem; --gap: 1rem;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #0a84ff; --brand-rgb: 10, 132, 255; --brand-strong: #4da3ff; --brand-soft: #0f2742;
    --bg: #000; --surface: #1c1c1e; --surface-2: #232326; --ink: #f5f5f7; --ink-2: #98989d; --line: #38383a;
    --ok: #3ddc97; --ok-soft: #0d2a1d; --warn: #f5c542; --warn-soft: #2d2410; --bad: #ff6b78; --bad-soft: #3a1418;
    --on-brand: #fff;
    --bar: rgba(28, 28, 30, .72);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .5);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .6);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 var(--font); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.3rem; font-weight: 650; } h3 { font-size: 1.05rem; font-weight: 600; }
@media (min-width: 760px) { h1 { font-size: 2.25rem; } }
p { margin: 0 0 .75rem; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
/* A link inside running text is underlined so it is not told apart by colour alone. */
p a:not(.btn), .help a, .legal a { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .45); border-radius: var(--r-sm); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 99; border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; }
.muted { color: var(--ink-2); } .small { font-size: .875rem; } .right { text-align: right; }

/* Header: a frosted bar floating over the canvas. The blur sits on a pseudo
   element so nothing inside becomes trapped by backdrop-filter. */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.top-in { max-width: 72rem; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 650; font-size: 1.05rem; margin-right: auto; min-height: 44px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .tx-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--fill); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.nav { display: flex; gap: .15rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); padding: .5rem .8rem; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: background-color .15s var(--ease); }
.nav a:hover { background: rgba(127, 127, 127, .12); text-decoration: none; }
.nav a[aria-current] { color: var(--brand-strong); background: var(--brand-soft); }

/* Notices */
.notice { padding: .7rem 1rem; font-size: .9rem; background: var(--warn-soft); color: var(--warn); text-align: center; }
.notice.inline { border-radius: var(--r-md); margin: 0 0 1rem; text-align: left; }
.notice.ok { background: var(--ok-soft); color: var(--ok); } .notice.bad { background: var(--bad-soft); color: var(--bad); }

/* Controls */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .65rem .85rem; min-height: 44px; width: 100%;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .25); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--bad); }
input[type=file] { padding: .5rem; }
textarea { min-height: 6rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3rem; }
.field { margin-bottom: 1rem; }
.help { font-size: .85rem; color: var(--ink-2); margin-top: .25rem; }
.err { color: var(--bad); font-size: .875rem; margin-top: .25rem; }
.err:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .6rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--fill); color: var(--on-brand); font: inherit; font-weight: 600; font-size: .98rem; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), transform .1s var(--ease); }
.btn:hover { background: var(--fill-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--brand-strong); border-color: var(--line); }
.btn.ghost:hover { background: var(--brand-soft); border-color: transparent; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; } legend { font-weight: 650; padding: 0; margin-bottom: .6rem; font-size: 1.05rem; }

/* Pieces */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); vertical-align: middle; }
.badge.neutral { background: var(--brand-soft); color: var(--brand-strong); }
.badge.out { background: var(--bad-soft); color: var(--bad); }
.chip { flex: none; padding: .5rem 1rem; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 500;
  box-shadow: var(--shadow); transition: box-shadow .15s var(--ease); }
.chip:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.chip[aria-current] { background: var(--ink); color: var(--bg); }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .panel, .chip { box-shadow: none; border: 1px solid var(--line); } }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: .875rem; }
.foot-in { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 2rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; }
.foot a { color: var(--ink-2); padding: .5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--ink); }
.foot .grow { flex: 1 1 100%; }
.foot .tx-by { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 600; }
.foot .tx-by img { width: 22px; height: 22px; border-radius: 6px; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.legal { max-width: 44rem; white-space: pre-wrap; }
.legal.rich { white-space: normal; }
@media (pointer: coarse) { .nav a, .chip, .btn { min-height: 48px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
