/* Immigration Portal — Custom Theme CSS */

/* Decorative glyphs (→, ▾) sit outside Inter's latin subset. Asking Inter for
   them makes the browser fetch the 83 KB latin-ext subset — which doesn't
   contain them either, so they render from a fallback font regardless. Naming
   that fallback up front skips the download.
   Selector is element+class on purpose: a bare `.glyph` ties with `.btn`'s
   `font-family: inherit` and loses on source order. */
span.glyph {
  font-family: system-ui, "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
}
/* Extracted from mockup v7, Halston/Artisan-inspired dark teal glassmorphism */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Author `display` declarations outrank the UA stylesheet's [hidden] rule. */
[hidden] { display: none !important; }

:root {
  --bg: #f8f5f0;
  --bg-warm: #f0ebe3;
  --bg-cream: #faf7f2;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #777777;
  --accent: #c8a87c;
  --accent-gold: #d4a853;
  --accent-dark: #2d2d2d;
  --teal: #1a3a4a;
  --teal-light: #2a5a6a;
  --border: #e0dbd5;
  --white: #ffffff;
  --error: #d32f2f;
  --success: #2e7d32;

  /* Single source of truth for page width. Content sits in a centred column
     capped at 1440px, with a 48px minimum gutter on narrower viewports.
     Applied as horizontal padding so full-bleed backgrounds still reach the
     screen edges while their content stays aligned across every page. */
  --content-max: 1440px;
  --gutter: 48px;
  --page-px: max(var(--gutter), calc(50% - var(--content-max) / 2));
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--accent); }

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--page-px);
  z-index: 100;
  background: rgba(26, 58, 74, 0.95);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.nav-links .btn-primary {
  padding: 8px 24px;
  background: var(--accent);
  color: var(--white);
  border-bottom: none;
}

.nav-links .btn-primary:hover {
  background: var(--accent-gold);
  color: var(--white);
  border-bottom: none;
}

.menu-btn {
  background: var(--white);
  color: var(--text);
  border: none;
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  display: none;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: all 0.3s ease;
}

.menu-btn span::before, .menu-btn span::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

.menu-btn:hover span, .menu-btn:hover span::before, .menu-btn:hover span::after {
  background: var(--white);
}

.menu-btn:hover { background: var(--accent); color: var(--white); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--teal);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-menu.active { display: flex; }

.mobile-menu-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(200, 168, 124, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.mobile-menu-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 24px;
  line-height: 0;
  cursor: pointer;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover { border-color: var(--accent); color: var(--accent); }

.mobile-menu-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}

.mobile-menu-content .btn {
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 32px;
  width: auto;
}

.mobile-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 28px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 16px 32px;
  display: block;
  transition: all 0.3s ease;
}

.mobile-menu a:hover { color: var(--accent); }

.mobile-menu-divider {
  width: 40px; height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 8px 0;
}

.mobile-menu-lang {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 32px;
}

.mobile-lang-label {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.mobile-lang-options {
  display: flex; gap: 8px;
}

.mobile-lang-options a {
  font-size: 14px !important; letter-spacing: 1px;
  padding: 8px 16px !important;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-lang-options a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-lang-options a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* Language Selector */
.lang-selector { position: relative; }

.lang-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--teal);
  border: 1px solid rgba(255,255,255,0.2);
  min-width: 140px;
  z-index: 300;
}

.lang-dropdown.active { display: block; }

.lang-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--white);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.lang-dropdown a:hover { background: var(--teal-light); }

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  padding: 0;
}

/* Hero background: phones get the 960px variant (48 KB) instead of the
   1920px one (114 KB). The teal fallback paints while the image decodes. */
.hero-image {
  position: absolute; inset: 0;
  background: var(--teal) url('/static/images/hero.webp') center/cover;
}

@media (max-width: 768px) {
  .hero-image { background-image: url('/static/images/hero-mobile.webp'); }
}

.hero-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26, 58, 74, 0.7) 0%, rgba(26, 58, 74, 0.5) 40%, rgba(26, 58, 74, 0.8) 100%);
}

.hero-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--page-px) 60px;
}

.hero-title {
  font-size: clamp(56px, 8vw, 100px);
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  max-width: 800px;
  margin-bottom: 40px;
  letter-spacing: -2px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-divider {
  width: 80px; height: 2px;
  background: var(--accent);
  margin-bottom: 32px;
}

.hero-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  color: var(--white);
}

.hero-column h4 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.hero-column p {
  font-size: 15px;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.hero-column .btn-primary {
  padding: 16px 32px;
}

.hero-column .btn-primary:hover {
  background: var(--accent-gold);
}

/* Sections */
section { padding: 100px var(--page-px); }

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
}

/* Cards (glassmorphism) */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 32px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Forms */
form { max-width: 100%; }

label {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  margin-top: 16px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Repeatable fields — a list of values (phone numbers, email addresses) where
   each row is one value plus its remove control. */
.repeat-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.repeat-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.repeat-row .repeat-input { flex: 1 1 auto; min-width: 0; }
.repeat-remove {
  flex: 0 0 auto;
  padding: 0;
  width: 44px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}
.repeat-remove:hover {
  border-color: var(--error);
  background: transparent;
  color: var(--error);
}
.repeat-add {
  margin-top: 10px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.repeat-add:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
/* The account email: shown in the list it belongs to, but not editable here. */
.repeat-fixed {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.repeat-fixed span { color: var(--text-muted); font-size: 13px; margin-left: 4px; }
.field-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

/* === Button System === */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  line-height: 1;
  transition: all 0.3s ease;
  background: var(--accent);
  color: var(--white);
}

button:hover, .btn:hover {
  background: var(--accent-gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled, .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
button:disabled:hover, .btn:disabled:hover {
  background: var(--accent);
  color: var(--white);
  transform: none;
  box-shadow: none;
}

/* Variants */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-gold);
  color: var(--white);
}

.btn-dark {
  background: var(--accent-dark, #2d2d2d);
  color: var(--white);
  border-color: var(--accent-dark, #2d2d2d);
}
.btn-dark:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--bg-warm);
  color: var(--text);
}

.btn-danger {
  background: #fce4ec;
  color: #c62828;
  border-color: #f5c6cb;
}
.btn-danger:hover {
  background: #f8bbd0;
  color: #c62828;
}

.btn-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c3e6cb;
}
.btn-success:hover {
  background: #c8e6c9;
  color: #2e7d32;
}

/* Sizes */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-lg {
  padding: 16px 48px;
  font-size: 12px;
  letter-spacing: 2px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Auth pages (login, register) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 80px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 48px;
  max-width: 480px;
  width: 100%;
}

.auth-card h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.auth-card .error {
  color: var(--error);
  font-size: 14px;
  margin-top: 12px;
}

.auth-card .success {
  color: var(--success);
  font-size: 14px;
  margin-top: 12px;
}

/* Footer */
footer {
  background: var(--bg-cream, #faf7f2);
  color: var(--text);
  padding: 80px var(--page-px) 40px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 80px;
  margin-bottom: 60px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  display: inline-block;
  color: var(--text);
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 20px;
  max-width: 280px;
  line-height: 1.7;
}

footer h5 {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }

footer ul a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: color 0.3s ease;
}

footer ul a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Job Cards */
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all 0.3s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.job-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.job-card .company {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 12px;
}

.job-card .meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.job-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-card .tag {
  padding: 4px 12px;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Profile Cards — each card renders exactly four sections (identity / facts /
   skills / action). With subgrid support the card shares the parent grid's
   rows, so each section starts at the same height across a row of cards. */
.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 28px 24px 24px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@supports (grid-template-rows: subgrid) {
  .grid-3 > .profile-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
  }
}

.profile-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.card-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

/* Thin gold ring with a white gap lifts the avatar off the card. */
.card-identity .avatar,
.card-identity .avatar-photo,
.detail-header .avatar,
.detail-header .avatar-photo {
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--accent);
}

.card-identity .avatar,
.card-identity .avatar-photo {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
}

.card-identity .avatar { font-size: 28px; }

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 600;
}
.card-role { font-size: 13px; color: var(--accent); }
.card-loc { font-size: 13px; color: var(--text-muted); }

/* Availability: a status pill with a colored dot — green when the candidate
   can start immediately, gold otherwise. */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  color: var(--text-secondary);
}
.avail-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.avail-badge.avail-now {
  border-color: #c3e6cb;
  background: #f0f7ef;
  color: var(--success);
}
.avail-badge.avail-now::before { background: var(--success); }

/* Facts sit in a soft inset panel so the card reads as grouped blocks
   instead of loose lines of text. */
.card-facts {
  background: var(--bg-warm);
  border-radius: 10px;
  padding: 12px 14px;
}

.card-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 6px;
}

.tag-more {
  background: transparent;
  color: var(--text-muted);
}

/* Pins the button to the card bottom in the flex fallback; harmless under
   subgrid where the shared action row already aligns. */
.card-action { margin-top: auto; }
.card-action .btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* Generic tag chip — previously only styled inside .job-card, leaving skill
   tags on candidate cards/detail pages as bare text. */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Labeled facts — candidate cards + candidate detail sidebar. Each row pairs
   a muted category label with its value so tags aren't an anonymous word soup. */
.facts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}
.fact-label {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.fact-value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}
.fact-value.fact-remote { color: var(--accent); }

/* Revealed contacts. Unlike the facts above, these are user-supplied strings of
   unbounded length in a narrow sidebar, so the label sits on its own line and
   each value gets the full width and wraps — a long address can't push past the
   card edge. A candidate may list several numbers or addresses; they stack
   under a single heading. */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.contact-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.contact-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  /* `anywhere` rather than `break-word`: an unbroken 40-character address has
     no break opportunity to fall back on. */
  overflow-wrap: anywhere;
}
a.contact-value { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
a.contact-value:hover { color: var(--accent); }
.card-section-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 6px;
}

/* Payment Options */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.payment-option {
  border: 2px solid var(--border);
  padding: 20px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.payment-option:hover, .payment-option.active {
  border-color: var(--accent);
}

.payment-option h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.payment-option p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Alerts */
.alert {
  padding: 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error { background: #fdecea; color: var(--error); border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: var(--success); border: 1px solid #c3e6cb; }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Scrolling Text Section */
.scroll-text-section {
  padding: 100px var(--page-px);
  background: var(--bg-cream, #faf7f2);
  position: relative;
  overflow: hidden;
}
.scroll-text-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #d4d0ca 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
}
.scroll-text { position: relative; z-index: 1; }
.scroll-text h2 {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  color: var(--text);
}
.scroll-text h2 span { display: block; opacity: 0.35; }
.scroll-text h2 span:nth-child(2) { opacity: 0.45; }
.scroll-text h2 span:nth-child(3) { opacity: 0.55; }
.scroll-text h2 span:nth-child(4) { opacity: 0.65; }
.scroll-text h2 span:nth-child(5) { opacity: 0.75; }
.scroll-text h2 span:nth-child(6) { opacity: 0.85; }

/* Services Section */
.services {
  padding: 120px var(--page-px);
  background: var(--bg-warm);
}
.services-header {
  text-align: center;
  margin-bottom: 80px;
}
.services-header h2 {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  margin-bottom: 24px;
  font-family: 'Playfair Display', serif;
}
.services-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.service-card {
  position: relative;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  transition: border-color 0.3s ease;
}
.service-card:hover { border-color: var(--accent); }
.service-card h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Dark Teal Section */
.dark-section {
  background: var(--teal);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}
.dark-content {
  padding: 100px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dark-content h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  margin-bottom: 32px;
  line-height: 1.2;
  font-family: 'Playfair Display', serif;
}
.dark-content > p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
}
.value-list { list-style: none; }
.value-list li {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.value-list li:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.value-list h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}
.value-list p {
  font-size: 14px;
  margin-bottom: 0;
  opacity: 0.85;
}
.dark-image {
  position: relative;
  overflow: hidden;
}
.dark-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Featured Jobs / Guest Jobs Section */
.guest-jobs {
  padding: 120px 48px;
  background: var(--bg);
}
.guest-jobs-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 48px;
}
.guest-jobs-header h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  font-family: 'Playfair Display', serif;
}
.guest-jobs-header p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
}
.jobs-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all 0.3s ease;
}
.job-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}
.job-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.job-card .company {
  font-size: 13px;
  color: var(--text-secondary);
}
.job-card .salary {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.job-card .location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.job-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.job-tag {
  padding: 4px 10px;
  background: var(--bg-warm);
  font-size: 11px;
  color: var(--text-secondary);
}

/* CTA Section */
.cta {
  padding: 120px var(--page-px);
  background: var(--bg-cream, #faf7f2);
  text-align: center;
}
.cta h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  margin-bottom: 24px;
  font-family: 'Playfair Display', serif;
}
.cta p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
}
/* Auth split layout */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 0;
}
.auth-image {
  position: relative;
  background: var(--teal);
  overflow: hidden;
  min-height: 100vh;
}
.auth-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.auth-image-content {
  position: absolute;
  bottom: 60px;
  left: 60px;
  right: 60px;
  color: var(--white);
  z-index: 2;
}
.auth-image-content h2 {
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  font-family: 'Playfair Display', serif;
}
.auth-image-content p {
  font-size: 15px;
  max-width: 400px;
}
.auth-form-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 60px 60px;
  background: var(--white);
}
.auth-form {
  width: 100%;
  max-width: 400px;
}
.auth-form .form-header {
  margin-bottom: 40px;
}
.auth-form .form-header h1 {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}
.auth-form .form-header p {
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-form .form-group {
  margin-bottom: 20px;
}
.auth-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
.auth-form .form-group input,
.auth-form .form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: var(--bg-warm);
  transition: border-color 0.2s ease;
}
.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}
.auth-form .form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  font-size: 13px;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.remember-me input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.forgot-password {
  color: var(--accent);
  text-decoration: none;
}
.forgot-password:hover { text-decoration: underline; }
.auth-divider {
  text-align: center;
  margin: 32px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  background: var(--white);
  padding: 0 16px;
  position: relative;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-link {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-link a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.auth-link a:hover { color: var(--accent); }

/* Role selector cards */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.role-option {
  border: 2px solid var(--border);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-warm);
}
.role-option:hover { border-color: var(--accent); }
.role-option.active {
  border-color: var(--accent-gold, #d4a853);
  background: var(--white);
}
.role-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.3s ease;
}
.role-option.active .role-icon { background: var(--accent); color: var(--white); }
.role-option h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.role-option p { font-size: 12px; color: var(--text-secondary); }

.fee-notice {
  padding: 14px;
  background: var(--bg-warm);
  border-left: 3px solid var(--accent-gold, #d4a853);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.fee-notice strong { color: var(--text); display: block; margin-bottom: 2px; }
.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.auth-form .progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  margin-bottom: 28px;
  position: relative;
}
.auth-form .progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 33%;
  background: var(--accent);
  transition: background 0.3s ease;
}
.auth-form .step {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.terms {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  text-align: center;
  line-height: 1.5;
}
.terms a { color: var(--accent); text-decoration: none; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-columns { grid-template-columns: 1fr; gap: 24px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .jobs-preview { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .dark-section { grid-template-columns: 1fr; }
  .dark-image { display: none; }
  .dark-content { padding: 60px 32px; }
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .menu-btn { display: flex; }

  section { padding: 60px 24px; }
  .services { padding: 60px 24px; }
  .guest-jobs { padding: 60px 24px; }
  .scroll-text-section { padding: 60px 24px; }
  .cta { padding: 60px 24px; }

  .hero-content { padding: 0 24px 60px; }
  .hero-columns { grid-template-columns: 1fr; gap: 24px; }

  .services-grid { grid-template-columns: 1fr; gap: 32px; }
  .jobs-preview { grid-template-columns: 1fr; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  .auth-split { grid-template-columns: 1fr; }
  .auth-image { display: none; }

  .guest-jobs-header { flex-direction: column; align-items: flex-start; gap: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .auth-page { padding: 100px 24px 60px; }
  .auth-card { padding: 32px 24px; }

  .payment-options { grid-template-columns: 1fr; }

  [style*="grid-template-columns: 300px 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  nav { padding: 12px 16px; }
  section { padding: 40px 16px; }
  .hero { padding: 0; }
  .hero-content { padding: 0 16px 24px; }
  .hero-title { font-size: 32px; margin-bottom: 20px; }
  .hero-divider { margin-bottom: 20px; }
  .hero-columns { gap: 16px; }
  .dark-content { padding: 40px 20px; }
  .services { padding: 40px 16px; }
  .guest-jobs { padding: 40px 16px; }
  .scroll-text-section { padding: 40px 16px; }
  .cta { padding: 40px 16px; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .admin-stats { grid-template-columns: 1fr; }
  .services-grid { gap: 24px; }
  .job-card .meta { flex-wrap: wrap; gap: 8px; }
}

/* Offline indicator */
body.offline #offline-indicator {
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Authenticated nav: avatar + logout */
.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-bottom: none !important;
  flex-shrink: 0;
}

.nav-links .nav-avatar:hover {
  color: var(--white);
  filter: brightness(1.15);
}

.nav-links button.btn-primary {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  padding: 8px 24px;
  background: var(--accent);
  color: var(--white);
}

.nav-links button.btn-primary:hover {
  background: var(--accent-gold);
}

.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.mobile-menu-email {
  color: var(--white);
  font-size: 14px;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profile photos: generic initial-circle + uploaded image */
.avatar {
  border-radius: 50%;
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-photo {
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Single-action file upload: picking a file uploads it immediately, so the control
   is one button. Markup: label.file-upload > input[type=file] + span.btn */
.file-upload {
  display: inline-block;
}

/* The native input stays in the a11y tree and keeps its click/keyboard behaviour;
   it is only visually collapsed. `hidden`/`display:none` would break both. */
.file-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The <span class="btn"> is the visible control, so it must show the focus ring
   the hidden <input> receives. */
.file-upload:focus-within .btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-upload.is-uploading {
  pointer-events: none;
}

.file-upload.is-uploading .btn {
  opacity: 0.75;
  cursor: wait;
}

.file-upload-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: file-upload-spin 0.6s linear infinite;
  flex-shrink: 0;
}

.file-upload:not(.is-uploading) .file-upload-spinner {
  display: none;
}

@keyframes file-upload-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .file-upload-spinner { animation-duration: 2s; }
}

/* === Profile page === */
.profile-container {
  padding: 100px var(--page-px) 60px;
  min-height: 100vh;
}
/* Wide screens: status/identity (visibility, stats, photo) go in a sticky
   sidebar; the editable form stays in the main column at a scannable width. */
.profile-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.profile-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-main {
  min-width: 0;
}
@media (max-width: 1024px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
}

/* Stats row: wraps instead of overflowing on narrow screens. */
.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.profile-stat {
  min-width: 0;
}
.profile-stat-value {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
}
.profile-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* The file-upload button must never push past its card on small screens:
   let its label wrap and cap its width. */
.file-upload {
  max-width: 100%;
}
.file-upload .btn {
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .profile-container { padding: 90px 24px 48px; }
}

@media (max-width: 480px) {
  .profile-container { padding: 84px 16px 40px; }
  .glass-card { padding: 20px; }
  .profile-stats { gap: 24px; }
  .profile-stat-value { font-size: 30px; }
  /* Tighter buttons so long labels (e.g. "Upload CV (PDF or DOCX)") fit. */
  button, .btn { padding: 13px 20px; letter-spacing: 1px; }
  .file-upload .btn { width: 100%; }
}

@media (max-width: 360px) {
  .profile-container { padding: 80px 12px 32px; }
  .glass-card { padding: 16px; }
  button, .btn { padding: 12px 14px; letter-spacing: 0.5px; }
}

/* === Index "How it works" section === */
.how-section {
  padding: 80px var(--page-px);
}

/* === Browse / candidates page === */
.browse-container {
  padding: 100px var(--page-px) 60px;
  min-height: 100vh;
}

/* Filter/content cards are static surfaces here — the lift-on-hover that
   glass-card carries elsewhere reads as a glitch on non-clickable panels. */
.browse-container .glass-card:hover,
.detail-container .glass-card:hover {
  transform: none;
  box-shadow: none;
}

.browse-head { margin-bottom: 40px; }
.browse-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 8px;
}
.browse-head p { color: var(--text-secondary); font-size: 16px; }

/* Search field + button sit on one row on wide screens. */
.browse-search-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.browse-search-row input[type="search"] {
  flex: 1;
  min-width: 0;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.filter-field {
  flex: 1;
  min-width: 150px;
}
.filter-label {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.filter-select {
  width: 100%;
  padding: 10px 34px 10px 14px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid var(--border);
  background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23777777' stroke-width='1.5'/></svg>") no-repeat right 14px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* The remote checkbox dresses as a filter pill and highlights when active. */
.remote-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.remote-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.remote-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--bg-warm);
  color: var(--text);
}

/* Result count as an editorial rule: small caps + a hairline to the margin. */
.results-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 30px 0 20px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.results-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

@media (max-width: 768px) {
  .how-section { padding: 60px 24px; }
  .browse-container { padding: 90px 24px 48px; }
}

@media (max-width: 480px) {
  .how-section { padding: 44px 16px; }
  .browse-container { padding: 84px 16px 40px; }
  /* Stack the search field above a full-width button so neither is squeezed. */
  .browse-search-row { flex-direction: column; }
  .browse-search-row .btn { width: 100%; }
}

@media (max-width: 360px) {
  .how-section { padding: 40px 12px; }
  .browse-container { padding: 80px 12px 32px; }
}

/* === Candidate detail page === */
.detail-container {
  padding: 100px var(--page-px) 60px;
  min-height: 100vh;
}
/* Wide screens: identity/actions sit in a sticky sidebar while the long-form
   content (about, experience, …) keeps a readable line length beside it. */
.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.detail-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-main {
  min-width: 0;
}
/* The sidebar can only stick within its grid row, so a sparse profile (main
   column shorter than the sidebar) leaves it zero room to move. Keep the row
   at least viewport-height on wide screens so it always sticks. */
@media (min-width: 1025px) {
  .detail-main { min-height: calc(100vh - 160px); }
}
/* Sidebar identity stacks vertically so it never feels cramped in ~340px. */
.detail-header {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}
/* The sidebar identity is a centered column at every width: avatar on top,
   name/role/location beneath it, like a business card. */
.detail-sidebar .detail-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: 24px;
}
.detail-sidebar .detail-header .avatar,
.detail-sidebar .detail-header .avatar-photo {
  margin-bottom: 16px;
}
.detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 4px;
}
.detail-role {
  color: var(--accent);
  font-size: 15px;
}
.detail-loc {
  color: var(--text-muted);
  font-size: 14px;
}

.back-link {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.back-link:hover { color: var(--accent); }

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Long-form sections: small-caps label with a hairline rule running to the
   card edge gives the column an editorial rhythm. */
.detail-section { margin-bottom: 36px; }
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-text {
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-line;
}
.detail-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-skills .tag {
  padding: 6px 16px;
  font-size: 13px;
}

.portfolio-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portfolio-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  color: var(--teal);
  overflow-wrap: anywhere;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.portfolio-links a::after {
  content: "\2197";
  font-size: 11px;
  color: var(--accent);
}
.portfolio-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Below the two-column breakpoint the layout stacks into one column. */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
  .detail-container { padding: 90px 24px 48px; }
}
@media (max-width: 480px) {
  .detail-container { padding: 84px 16px 40px; }
}
@media (max-width: 360px) {
  .detail-container { padding: 80px 12px 32px; }
}

/* === Auth pages (login / register): reclaim horizontal space on small screens === */
@media (max-width: 768px) {
  .auth-form-container { padding: 110px 32px 48px; }
}
@media (max-width: 480px) {
  .auth-form-container { padding: 96px 20px 40px; }
  /* First/last name stack so each field is usable. */
  .auth-form .form-row { grid-template-columns: 1fr; }
  /* Remember-me and forgot-password wrap instead of colliding. */
  .auth-form .form-options { flex-wrap: wrap; gap: 10px 16px; }
}
@media (max-width: 360px) {
  .auth-form-container { padding: 90px 14px 32px; }
}

/* === Content pages (Support + Legal): help center, FAQ, contact, privacy, terms === */
.content-page {
  padding: 140px var(--page-px) 80px;
  min-height: 100vh;
}
/* Content spans the same 1440px column as every other page (via --page-px on
   .content-page). Long-form prose keeps a comfortable reading measure of its own. */
.content-page .content-inner {
  max-width: 100%;
  margin: 0 auto;
}

.content-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.content-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--teal);
  margin-bottom: 12px;
}
.content-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 620px;
}
.content-meta {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Long-form reading typography for legal + help text. The block aligns to the
   page's left gutter like every other page; the text keeps a readable line
   length rather than stretching the full 1440px column. */
.prose { max-width: 820px; }
.prose h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--teal);
  margin: 40px 0 14px;
}
.prose h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 26px 0 10px;
}
.prose p { margin-bottom: 16px; color: var(--text-secondary); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--text-secondary); }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--teal); text-decoration: underline; }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--text); }

/* A highlighted callout for the "no guarantees / no responsibility" notices. */
.notice-box {
  background: var(--bg-warm);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
}
.notice-box p { margin-bottom: 8px; }
.notice-box p:last-child { margin-bottom: 0; }

/* Support hub cards */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 8px;
}
.support-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.support-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(26, 58, 74, 0.1);
  border-color: var(--accent);
}
.support-card .support-img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.support-card .support-body { padding: 24px 28px 28px; }
.support-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 8px;
}
.support-card p { color: var(--text-secondary); font-size: 15px; }
.support-card .support-arrow { color: var(--accent); }

@media (max-width: 900px) {
  .support-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .support-grid { grid-template-columns: 1fr; }
  .support-card .support-img { height: 200px; }
}

/* FAQ accordion (native <details>, no JS required) */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  background: var(--white);
  overflow: hidden;
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq-item[open] > summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 24px 20px; color: var(--text-secondary); }
.faq-item .faq-answer p { margin-bottom: 12px; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* Contact page */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.contact-method {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.contact-method h3 { font-size: 16px; color: var(--teal); margin-bottom: 6px; }
.contact-method p { color: var(--text-secondary); font-size: 15px; margin-bottom: 6px; }
.contact-method a { color: var(--teal); font-weight: 500; text-decoration: none; }
.contact-method a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .content-page { padding: 110px 24px 56px; }
}
@media (max-width: 480px) {
  .content-page { padding: 96px 18px 44px; }
  .faq-item > summary { padding: 16px 18px; font-size: 15px; }
  .faq-item .faq-answer { padding: 0 18px 16px; }
}

/* Mission section (why PardesPool exists) — editorial split */
.mission-section {
  padding: 110px 80px;
  background: var(--bg-warm);
  overflow: hidden;
}
.mission-eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.mission-statement {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.15;
  max-width: 900px;
  margin-bottom: 72px;
}
.mission-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.mission-visual {
  position: relative;
  min-height: 480px;
}
.mission-visual-accent {
  position: absolute;
  top: -24px;
  left: -24px;
  width: 190px;
  height: 190px;
  background: var(--accent);
  opacity: 0.25;
}
.mission-img-main {
  position: absolute;
  top: 0;
  left: 0;
  width: 78%;
  height: 360px;
  object-fit: cover;
  box-shadow: 0 30px 60px rgba(26, 58, 74, 0.18);
}
.mission-img-overlap {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54%;
  height: 260px;
  object-fit: cover;
  border: 8px solid var(--bg-warm);
  box-shadow: 0 30px 60px rgba(26, 58, 74, 0.22);
}
.mission-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mission-points li {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.mission-points li:last-child { border-bottom: 1px solid var(--border); }
.mission-num {
  font-family: 'Playfair Display', serif;
  font-size: 54px;
  line-height: 1;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
@supports (-webkit-text-stroke: 1px black) {
  .mission-num {
    color: transparent;
    -webkit-text-stroke: 1px var(--accent);
    opacity: 1;
  }
  .mission-points li:hover .mission-num {
    color: var(--accent);
    -webkit-text-stroke: 0;
  }
}
.mission-points h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
}
.mission-points p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
@media (max-width: 1000px) {
  .mission-split { grid-template-columns: 1fr; gap: 56px; }
  .mission-visual { min-height: 400px; max-width: 560px; }
}
@media (max-width: 768px) {
  .mission-section { padding: 64px 24px; }
  .mission-statement { margin-bottom: 48px; }
  .mission-visual { min-height: 320px; }
  .mission-img-main { height: 250px; }
  .mission-img-overlap { height: 180px; border-width: 6px; }
  .mission-num { font-size: 40px; }
  .mission-points li { gap: 18px; padding: 22px 0; }
}

/* How-it-works stepper */
.hw-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 16px;
}
.hw-steps::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 10px;
  right: 18%;
  height: 1px;
  background: var(--border);
}
.hw-step {
  position: relative;
  padding-top: 52px;
}
.hw-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--accent);
  transition: background 0.3s ease;
}
.hw-step:hover .hw-node { background: var(--accent); }
.hw-ghost {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 140px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hw-step:hover .hw-ghost { opacity: 0.28; }
.hw-step h3 {
  position: relative;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}
.hw-step p {
  position: relative;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 300px;
}
@media (max-width: 900px) {
  .hw-steps { grid-template-columns: 1fr; gap: 44px; }
  .hw-steps::before {
    top: 0;
    bottom: 0;
    left: 9px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .hw-step { padding-top: 0; padding-left: 48px; }
  .hw-node { top: 2px; }
  .hw-ghost { font-size: 90px; top: -14px; right: 0; }
  .hw-step p { max-width: none; }
}

/* Crypto section (why we use crypto) */
.crypto-section {
  display: grid;
  grid-template-columns: 2fr 3fr;
  background: var(--white);
  border-top: 1px solid var(--border);
}
.crypto-price {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 40px;
  background: var(--teal);
  color: var(--white);
  overflow: hidden;
}
.crypto-price::before {
  content: "\20BF";
  /* U+20BF is the only character on the homepage inside Inter's latin-ext
     range, and asking Inter for it cost an 83 KB subset download for this one
     decorative watermark. The system font draws it just as well at 5% opacity. */
  font-family: system-ui, "Segoe UI Symbol", sans-serif;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 380px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.crypto-amount {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-size: clamp(72px, 9vw, 120px);
  line-height: 1;
  color: var(--accent-gold);
}
.crypto-caption {
  position: relative;
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.crypto-content {
  padding: 100px 80px;
}
.crypto-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  margin-bottom: 16px;
}
.crypto-content > p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 40px;
  max-width: 560px;
}
.crypto-points {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.crypto-point {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}
.crypto-point h4 {
  font-size: 16px;
  margin-bottom: 6px;
}
.crypto-point p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
@media (max-width: 900px) {
  .crypto-section { grid-template-columns: 1fr; }
  .crypto-price { padding: 60px 24px; }
  .crypto-price::before { font-size: 260px; }
  .crypto-content { padding: 60px 32px; }
}
/* Crypto + mission small-screen fixes */
.crypto-section > * { min-width: 0; }
.crypto-content h2,
.crypto-caption,
.mission-statement { overflow-wrap: break-word; }
@media (max-width: 480px) {
  .crypto-price { padding: 48px 20px; }
  .crypto-amount { font-size: 60px; }
  .crypto-caption { letter-spacing: 2px; font-size: 11px; }
  .crypto-content { padding: 48px 20px; }
  .crypto-content h2 { font-size: 27px; }
  .crypto-point { padding-left: 16px; }
  .mission-section { padding: 56px 16px; }
  .mission-statement { font-size: 29px; }
  .mission-visual-accent { top: -12px; left: -12px; width: 120px; height: 120px; }
  .how-section .hw-ghost { font-size: 70px; }
}

/* ---------------------------------------------------------------------------
   Install (PWA) prompt
   The bottom sheet and the instructions dialog are both built by app.js; only
   the browsers that can actually install the app ever get them.
   --------------------------------------------------------------------------- */
.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  /* Clear of the iOS home indicator and any on-screen browser chrome. */
  margin-bottom: env(safe-area-inset-bottom, 0px);
  animation: install-banner-in 0.25s ease-out;
}

@keyframes install-banner-in {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .install-banner { animation: none; }
}

.install-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* min-width:0 so a long translation wraps instead of forcing overflow. */
  min-width: 0;
  flex: 1 1 140px;
}

.install-banner-text strong {
  font-size: 15px;
  color: var(--text);
}

.install-banner-text span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.install-banner-actions {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: flex-end;
  align-items: stretch;
}

/* Labels are long in Ukrainian and Hindi, so let the install button wrap and
   keep the dismiss button on one line — the base button line-height of 1
   collapses wrapped lines into each other. */
.install-banner-actions .btn { line-height: 1.3; }
.install-banner-actions .btn-primary { flex: 1 1 auto; }
.install-banner-actions .btn-outline { flex: 0 0 auto; white-space: nowrap; }

.install-dialog {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.install-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.install-dialog-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 28px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.install-dialog-panel h3 {
  margin-bottom: 16px;
  font-size: 20px;
  color: var(--text);
}

.install-dialog-panel ol {
  margin: 0 0 22px 20px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.install-dialog-panel ol li { margin-bottom: 8px; }

.install-dialog-panel .btn { width: 100%; }
