/* ==========================================================================
   Bad Pixels — Design Tokens & Base Styles
   Palette sampled directly from the Bad Pixels mark (cream ground, near-black
   glyph, orange "broken pixel" chips). Deeper/paler steps are the same hue
   family, adjusted only for accessible contrast on light and dark surfaces.
   ========================================================================== */

:root {
  --cream:        #F5F1EA;
  --white:        #FFFFFF;
  --ink:          #111318;
  --ink-soft:     #55534A;
  --ink-faint:    #8C8977;
  --line:         #E5DFD1;
  --line-strong:  #D8CEBA;

  --orange:       #F5A46B;
  --orange-pale:  #F5CEB0;
  --orange-deep:  #D9773A;
  --orange-text:  #9C4E14;

  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(17,19,24,0.04), 0 6px 20px rgba(17,19,24,0.06);
  --shadow-lg: 0 4px 10px rgba(17,19,24,0.06), 0 20px 40px rgba(17,19,24,0.10);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }

p { margin: 0 0 1em 0; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-text);
  display: inline-block;
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: #26282F; }
.btn-primary:disabled { background: var(--line-strong); color: var(--ink-faint); cursor: not-allowed; }

.btn-accent {
  background: var(--orange);
  color: var(--ink);
}
.btn-accent:hover { background: #F2934F; }

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); }
.section-dark .btn-outline { color: var(--cream); border-color: #3A3C44; }
.section-dark .btn-outline:hover { border-color: var(--cream); }

/* Coming-soon teaser */
.teaser-section { position: relative; overflow: hidden; }
.teaser-section::before {
  content: "";
  position: absolute;
  top: -45%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 540px;
  max-width: 120vw;
  background: radial-gradient(circle, rgba(230,140,60,0.20), transparent 62%);
  pointer-events: none;
}
.teaser-inner { position: relative; z-index: 1; }
@keyframes teaserShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.teaser-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.teaser-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-pale);
  border: 1px solid #3A3C44;
  border-radius: 20px;
  padding: 6px 14px;
}
.teaser-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: teaserPulse 1.6s ease-in-out infinite;
}
@keyframes teaserPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .teaser-pill::before, .teaser-logo { animation: none; }
}
.teaser-logo {
  display: block;
  width: 128px;
  height: 128px;
  margin: 30px auto 26px;
  border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 22px 50px rgba(0, 0, 0, 0.5);
  animation: teaserFloat 4.5s ease-in-out infinite;
}
@keyframes teaserFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.teaser-logos { display: flex; gap: 26px; justify-content: center; align-items: center; flex-wrap: wrap; }
.teaser-logos .teaser-logo { margin: 30px 0 26px; }
.teaser-logos .teaser-logo:nth-child(2) { animation-delay: 1.1s; }

/* Delivery tracker (interactive hero widget) */
.tracker {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.tracker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tracker-title { font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.tracker-count { font-size: 0.78rem; font-weight: 700; color: var(--orange-text); white-space: nowrap; }
.tracker-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 16px; }
.tracker-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--orange), #F2934F);
  width: 16.66%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.tracker-steps { list-style: none; margin: 0; padding: 0; }
.tracker-node {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 7px 8px;
  border-radius: 10px;
  font: inherit;
  transition: background 0.15s ease;
}
.tracker-node:hover { background: var(--cream); }
.tracker-node:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.tracker-dot {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--line-strong);
  background: var(--white);
  color: var(--ink-faint);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dot-check { display: none; }
.tracker-name { display: block; font-weight: 600; font-size: 0.95rem; color: var(--ink); line-height: 1.2; }
.tracker-sub { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-top: 2px; }
.tracker-step.done .tracker-dot { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.tracker-step.done .dot-num { display: none; }
.tracker-step.done .dot-check { display: inline; }
.tracker-step.current .tracker-dot { background: var(--orange-pale); border-color: var(--orange); color: var(--orange-text); box-shadow: 0 0 0 4px var(--orange-pale); }
.tracker-step.upcoming .tracker-dot { opacity: 0.75; }
.tracker-step.upcoming .tracker-name { color: var(--ink-soft); font-weight: 500; }
.tracker-desc {
  margin: 12px 2px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
  min-height: 46px;
}

/* Application-stage tracker (read-only, no click-to-preview) — a compact
   horizontal cousin of .tracker-* above, used on my-applications.html and in
   admin.html's application detail panel so both sides see the same stages. */
.app-tracker-steps { display: flex; align-items: flex-start; list-style: none; margin: 0; padding: 0; }
.app-tracker-step { flex: 1; text-align: center; position: relative; }
.app-tracker-step:not(:last-child)::after {
  content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px;
  background: var(--line-strong); z-index: 0;
}
.app-tracker-step.done:not(:last-child)::after { background: var(--orange); }
.app-tracker-dot {
  position: relative; z-index: 1;
  width: 30px; height: 30px; margin: 0 auto 8px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  border: 2px solid var(--line-strong); background: var(--white); color: var(--ink-faint);
}
.app-tracker-step.done .app-tracker-dot { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.app-tracker-step.current .app-tracker-dot { background: var(--orange-pale); border-color: var(--orange); color: var(--orange-text); box-shadow: 0 0 0 4px var(--orange-pale); }
/* A stage the application never reached because it was rejected before
   getting there (e.g. rejected straight from Reviewing, no interview) —
   distinct from "upcoming" (simply not reached yet, still possible). */
.app-tracker-step.skipped .app-tracker-dot { background: #F1DDD7; border-color: #E8A88F; color: #9A4A2C; }
.app-tracker-step.skipped .app-tracker-label { color: #9A4A2C; }
.app-tracker-label { font-size: 0.76rem; font-weight: 600; color: var(--ink-faint); }
.app-tracker-step.done .app-tracker-label, .app-tracker-step.current .app-tracker-label { color: var(--ink); }
.app-tracker-rejected {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: #F1DDD7; color: #9A4A2C; font-weight: 600; font-size: 0.88rem;
}

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

.link {
  color: var(--orange-text);
  font-weight: 600;
  text-underline-offset: 3px;
}
.link:hover { text-decoration: underline; }

/* Header / nav */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,241,234,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Full-width header (AIBY-style): logo hugs the left edge, actions the right,
     with responsive side padding instead of a centered max-width cap. */
  padding: 3px clamp(20px, 4vw, 44px);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand-mark {
  width: 94px;
  height: 94px;
  flex-shrink: 0;
  object-fit: contain;
}
/* Hover: the logo does a little two-step — tips onto its lower-right edge,
   bounces over to its lower-left edge, then settles flat. On brand theme:
   "Choreographing Digital Chaos". Origin switches corners at the 0deg cross
   so the pivot looks continuous with no jump. */
.brand:hover .brand-mark { animation: brandDance 0.9s ease; }
@keyframes brandDance {
  0%   { transform-origin: 100% 100%; transform: rotate(0deg)   translateY(0); }
  12%  { transform-origin: 100% 100%; transform: rotate(11deg)  translateY(-3px); }
  28%  { transform-origin: 100% 100%; transform: rotate(11deg)  translateY(0); }
  44%  { transform-origin: 100% 100%; transform: rotate(0deg)   translateY(-2px); }
  45%  { transform-origin: 0% 100%;   transform: rotate(0deg)   translateY(-2px); }
  57%  { transform-origin: 0% 100%;   transform: rotate(-11deg) translateY(-3px); }
  73%  { transform-origin: 0% 100%;   transform: rotate(-11deg) translateY(0); }
  100% { transform-origin: 0% 100%;   transform: rotate(0deg)   translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .brand:hover .brand-mark { animation: none; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  border-color: var(--orange);
}
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-login { display: inline-flex; }
.nav-login-mobile { display: none; font-size: 0.92rem; font-weight: 600; }
.nav-login:hover { color: var(--ink); }

/* Logged-in user menu: avatar (first-initial circle) + dropdown, injected by
   js/main.js. Sits to the right of "Start a project" and pushes the whole
   nav-actions group left, since the group right-aligns via .nav's
   space-between layout. */
.nav-user { position: relative; display: inline-flex; align-items: center; margin-left: 4px; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  border: none; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-weight: 700; font-size: 0.9rem;
}
.nav-avatar:hover { background: var(--orange-deep); }
.nav-user-menu {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--white); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17,19,24,0.14);
  min-width: 300px; max-width: 380px; padding: 8px; z-index: 60;
}
.nav-user-menu.open { display: block; }
.nav-user-email {
  padding: 8px 10px; font-size: 0.78rem; color: var(--ink-faint);
  border-bottom: 1px solid var(--line); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  background: none; border: none; cursor: pointer; font-family: var(--font);
}
.nav-user-item:hover { background: var(--cream); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-login { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.open a.nav-login-mobile { display: block; }
}

/* Sections */
section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-dark {
  background: var(--ink);
  color: var(--cream);
}
.section-dark h2, .section-dark h1, .section-dark h3 { color: var(--white); }
.section-dark p { color: #B8B6AC; }
.section-panel { background: var(--white); }

.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.section-dark .card { background: #1B1D24; border-color: #2B2D35; }

.grid {
  display: grid;
  gap: 22px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.hero-grid { grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .hero-grid { grid-template-columns: 1fr; }
}

/* Icon tiles (Notion-style colored glyph tiles) */
.icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-bottom: 14px;
}
.icon-tile.dark { background: var(--ink); }

/* Preview / mockup panels (static — no fabricated live metrics) */
.preview {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.preview-title {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.preview-row:first-child { border-top: none; }
.preview-row .num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); flex-shrink: 0;
}
.preview-row .label { flex-grow: 1; color: var(--ink); font-weight: 500; }
.preview-row .status {
  font-size: 0.72rem; font-weight: 650; padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.status.done { background: var(--orange-pale); color: var(--orange-text); }
.status.progress { background: #EFEAE0; color: var(--ink-soft); }
.status.wait { background: transparent; color: var(--ink-faint); border: 1px dashed var(--line-strong); }

.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chip {
  aspect-ratio: 1; border-radius: 10px; background: var(--cream);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
}
.chip.on {
  background: linear-gradient(135deg, var(--orange-pale), var(--orange) 55%, var(--orange-deep));
  color: var(--ink);
  border-color: var(--orange-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(217, 119, 58, 0.18);
}

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.bar-chart .bar { flex: 1; background: var(--cream); border: 1px solid var(--line); border-radius: 6px 6px 0 0; position: relative; }
.bar-chart .bar.hi { background: var(--orange); border-color: var(--orange); }
.bar-chart-labels { display: flex; gap: 10px; margin-top: 8px; }
.bar-chart-labels span { flex: 1; text-align: center; font-size: 0.68rem; color: var(--ink-faint); }

/* Footer */
footer.site {
  background: var(--white);
  color: var(--ink-soft);
  padding: 64px 0 28px 0;
  border-top: 1px solid var(--line);
}
footer.site a { color: var(--ink-soft); }
footer.site a:hover { color: var(--ink); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  gap: 20px;
}
/* Social icons row sits above the legal links, both centered (AIBY-style). */
.footer-bottom .footer-social { order: -1; }
.footer-social { display: flex; gap: 28px; align-items: center; justify-content: center; }
.footer-social a { position: relative; color: var(--ink-soft); display: inline-flex; transition: color 0.15s ease; }
/* On hover, each social icon lights up in its own brand color. */
.footer-social a:hover { color: var(--orange-text); }
.footer-social a[aria-label="LinkedIn"]:hover  { color: #0A66C2; }
.footer-social a[aria-label="Facebook"]:hover   { color: #1877F2; }
.footer-social a[aria-label="Instagram"]:hover  { color: #E4405F; }
.footer-social a[aria-label="X"]:hover          { color: #000000; }
.footer-social svg { display: block; width: 26px; height: 26px; }
/* X has no real profile yet — clicking it (see js/main.js) shows this note
   instead of navigating, rather than a dead "#" link with no feedback. */
.social-coming-soon {
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--ink); color: var(--white);
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  padding: 5px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.social-coming-soon.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }
.footer-legal { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.footer-legal p { font-size: 0.72rem; color: var(--ink-faint); line-height: 1.5; margin: 0 auto 8px auto; max-width: 820px; }
.footer-legal p:last-child { margin-bottom: 0; }
.footer-legal .copyright { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 12px; }

/* Forms */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 7px;
  color: var(--ink);
}
.field .hint { font-size: 0.8rem; color: var(--ink-faint); margin-top: 5px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,19,24,0.07);
}
input[type="search"] {
  padding-top: 14.4px;
  padding-bottom: 14.4px;
}
textarea { resize: vertical; min-height: 110px; }
/* Show/hide toggle for password fields — used on every "enter your password
   to confirm" gate site-wide (account deletion, admin user/role writes,
   application status changes), not just account.html's own password-change
   form. Wiring (per-page) toggles the input's type and this class on click. */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--ink-faint); line-height: 0;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle .eye-off { display: none; }
.pw-toggle.showing .eye-on { display: none; }
.pw-toggle.showing .eye-off { display: inline; }
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  font-size: 0.85rem;
  background: var(--cream);
  max-width: 100%;
}
/* The [hidden] attribute alone loses to the `display: inline-flex` above
   (same specificity, this rule comes later in the cascade) — without this,
   wireFileChip()'s chip (name + remove "X") stays visible even with no file
   chosen. */
.file-chip[hidden] { display: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button {
  width: auto;
  padding: 2px 6px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.file-chip button:hover { background: var(--line); color: var(--ink); }
.combobox { position: relative; }
.combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(17,19,24,0.14);
}
.combobox-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.combobox-list li:hover, .combobox-list li.active { background: var(--orange-pale); }
.combobox-list .combobox-empty { color: var(--ink-faint); cursor: default; }
.combobox-list .combobox-empty:hover { background: none; }
fieldset { border: none; padding: 0; margin: 0 0 20px 0; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}
.check-row input { width: auto; margin-top: 3px; }
.check-row label { font-weight: 500; font-size: 0.88rem; color: var(--ink-soft); }

.form-msg {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 18px;
}
.form-msg.success {
  display: block;
  background: var(--orange-pale);
  color: #6B3608;
  border: 1px solid var(--orange);
}
.form-msg.error {
  display: block;
  background: #FBEAE5;
  color: #9C2B0E;
  border: 1px solid #E8A88F;
}
.form-msg.warning {
  display: block;
  background: #FCEBD3;
  color: #9A6415;
  border: 1px solid #E8C48A;
}

input:disabled, select:disabled, textarea:disabled {
  background: var(--cream);
  color: var(--ink-soft);
  cursor: not-allowed;
}

/* Danger zone (account deletion) */
.danger-zone {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid #E8A88F;
  border-radius: var(--radius);
  background: #FBEAE5;
}
.danger-zone h3 { color: #9C2B0E; }
.btn-danger { background: #9C2B0E; color: var(--white); }
.btn-danger:hover { background: #7E2309; }
.btn-danger:disabled { background: var(--line-strong); color: var(--ink-faint); cursor: not-allowed; }

/* Simple centered confirmation modal, built by page scripts as needed. */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(17,19,24,0.5);
  align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 28px;
  max-width: 420px; width: 100%;
}
.modal-card .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Utility */
.text-center { text-align: center; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.tag.orange { background: var(--orange-pale); border-color: var(--orange-pale); color: var(--orange-text); }

/* Services grid */
.service-grid { gap: 16px; }
.service-card { padding: 22px; position: relative; overflow: hidden; }
.service-card h3 { font-size: 1.05rem; margin: 0 0 6px; }
.service-card p { font-size: 0.9rem; margin: 0; color: var(--ink-soft); }
.service-card .icon-tile { margin-bottom: 14px; transition: transform 0.2s ease, background 0.2s ease; }
.service-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}
.service-card:hover::after { transform: scaleY(1); }
.service-card:hover .icon-tile { transform: translateY(-2px); background: var(--orange); }

/* Use-case cards */
.usecase-card { display: flex; flex-direction: column; }
.usecase-card h3 { margin: 0 0 8px; }
.usecase-card > p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: var(--orange-pale);
  color: var(--orange-text);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.usecase-card .link { margin-top: auto; }

/* Solutions page */
.solution-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.solution-jump a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.solution-jump a:hover {
  border-color: var(--orange);
  color: var(--ink);
  background: var(--orange-pale);
}
.solution-tagrow { display: flex; align-items: center; gap: 12px; }
.solution-num {
  color: var(--orange-text);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* App Store / Google Play compatibility badges — not download links (we
   ship apps under each client's own listing, not ours), just a quick visual
   "we build for both platforms" signal under the iOS & Android check-list. */
.platform-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 22px; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.platform-badge svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Careers — open role cards */
.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.job-card h3 { margin: 0; }
.job-card .btn { flex-shrink: 0; }
@media (max-width: 640px) {
  .job-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .job-card .btn { width: 100%; text-align: center; }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 18px 28px;
  display: none;
  align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(17,19,24,0.18);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { color: #C7C4B8; margin: 0; font-size: 0.86rem; max-width: 640px; }
.cookie-banner .actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner a.link { color: var(--orange-pale); }

/* Auth shell */
.auth-wrap { max-width: 420px; margin: 0 auto; }
.auth-tabs { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 4px; margin-bottom: 28px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; padding: 10px; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--ink-soft);
}
.auth-tabs button.active { background: var(--ink); color: var(--cream); }

/* Legal pages */
.prose h2 { margin-top: 2em; font-size: 1.3rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.02rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 22px; line-height: 1.9; }
.prose { max-width: 760px; }

/* 404 */
.error-mark { font-size: 5.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0; }

/* ==========================================================================
   Responsive — small-screen refinements
   Tighten the generous desktop spacing on phones and guard against any
   fixed-width element forcing horizontal scroll.
   ========================================================================== */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .section-tight { padding: 40px 0; }
  .container { padding: 0 20px; }
  .section-head { margin-bottom: 32px; }
  .card { padding: 22px; }
  .cookie-banner { padding: 16px 20px; }
  .error-mark { font-size: 4rem; }
}
