/* Teduhet design system — mobile first. Tokens → base → components → layouts → breakpoints. */
:root {
  --primary: #1D4ED8; --primary-ink: #1E3A8A; --primary-soft: #DBEAFE; --accent: #F59E0B; --accent-ink: #111827;
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #F8FAFC; --ink: #0F172A; --ink-2: #334155; --muted: #64748B; --line: #E2E8F0;
  --ok: #047857; --ok-soft: #D1FAE5; --warn: #B45309; --warn-soft: #FEF3C7; --err: #B91C1C; --err-soft: #FEE2E2;
  --radius: 14px; --radius-sm: 10px; --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 32px rgba(30,58,138,.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --touch: 48px; --wrap: 1320px; --z-top: 50; --z-bottom: 60; --z-menu: 70;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #60A5FA; --primary-ink: #BFDBFE; --primary-soft: #172554; --accent: #FBBF24;
    --bg: #0B1120; --surface: #111827; --surface-2: #0F172A; --ink: #F1F5F9; --ink-2: #CBD5E1; --muted: #94A3B8; --line: #1E293B;
    --ok: #34D399; --ok-soft: #064E3B; --warn: #FBBF24; --warn-soft: #451A03; --err: #F87171; --err-soft: #450A0A;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5); color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); padding-bottom: calc(68px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.main, .admin-shell, .inst-wrap { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s3); letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 var(--s3); }
code { font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; justify-content: center; }
.ic { width: 22px; height: 22px; flex: none; } .ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
.main { padding-top: var(--s4); padding-bottom: var(--s6); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0B1120; } }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn-accent:hover { filter: brightness(.95); background: var(--accent); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); } .btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; } .btn-lg { min-height: var(--touch); padding: 12px 20px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.row-actions.between, .row-between { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: center; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.stack { display: grid; gap: var(--s3); }
.section { margin: var(--s6) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.section-head h2 { margin: 0; } .section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-head { margin-bottom: var(--s4); }
.narrow { max-width: 460px; margin: var(--s5) auto; } .narrow-wide { max-width: 760px; margin: 0 auto; }
.prose { max-width: 70ch; } .prose h2 { margin-top: var(--s5); }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-ink); vertical-align: middle; }
.badge-ok, .badge-pass, .badge-healthy, .badge-published, .badge-active, .badge-accepted, .badge-done { background: var(--ok-soft); color: var(--ok); }
.badge-warn, .badge-warning, .badge-pending, .badge-new { background: var(--warn-soft); color: var(--warn); }
.badge-error, .badge-blocker, .badge-blocked, .badge-suspended, .badge-rejected, .badge-declined { background: var(--err-soft); color: var(--err); }
.badge-muted, .badge-hidden, .badge-cancelled { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-demo { background: #EDE9FE; color: #5B21B6; }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 2px var(--s2); scrollbar-width: none; margin-bottom: var(--s3); }
.chips::-webkit-scrollbar { display: none; }
.wrap-chips { flex-wrap: wrap; overflow: visible; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: .92rem; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); } .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip small { color: var(--muted); font-weight: 500; } .chip-sm { min-height: 28px; padding: 2px 10px; font-size: .8rem; } .chip-lg { min-height: 48px; }
.chip-glass { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; } .chip-glass:hover { background: rgba(255,255,255,.24); color: #fff; border-color: #fff; }

/* Alerts */
.alert { padding: var(--s3) var(--s4); border-radius: var(--radius-sm); margin-bottom: var(--s4); border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); } .alert-error { background: var(--err-soft); color: var(--err); } .alert-warn { background: var(--warn-soft); color: var(--warn); }

/* Forms */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; min-height: var(--touch); padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid var(--primary-soft); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); margin: 0; flex: none; }
input[type=file] { padding: 8px; } input:disabled { background: var(--surface-2); color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; min-height: 32px; cursor: pointer; }
.check-grid { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s3); } legend { font-weight: 700; margin-bottom: var(--s2); display: flex; align-items: center; gap: 8px; }
.grid-2, .grid-3 { display: grid; gap: var(--s3); } .grid-3 { align-items: end; }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.inline-form input, .inline-form select { width: auto; flex: 1 1 160px; }
.radio-cards { display: grid; gap: var(--s3); }
.radio-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: var(--s4); border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.radio-card > .ic { grid-row: span 2; width: 28px; height: 28px; color: var(--primary); }
.radio-card input { position: absolute; top: 12px; right: 12px; }
.radio-card small { grid-column: 2; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .9rem; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 14px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--primary); } .switch input:checked + span::before { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; } .switch input:focus-visible + span { outline: 3px solid var(--accent); }
.toggle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); } .toggle-list li { display: flex; gap: var(--s3); align-items: flex-start; }

/* Tables → cards on mobile */
.table-wrap { overflow-x: auto; margin-bottom: var(--s4); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s3); background: var(--surface); padding: var(--s2); }
  .table-cards td { border: 0; padding: 6px 8px; }
  .table-cards td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
}

/* Top bar */
.topbar { position: sticky; top: 0; z-index: var(--z-top); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: var(--s3); min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; flex: none; }
.brand span { display: none; }
.topsearch { flex: 1; position: relative; display: flex; align-items: center; }
.topsearch > .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.topsearch input { min-height: 42px; padding-left: 40px; border-radius: var(--radius-pill); background: var(--surface-2); }
.topnav { display: none; }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.hide-sm { display: none; }
.dropdown { position: relative; } .dropdown summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border-radius: var(--radius-pill); color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--z-menu); display: grid; }
.dropdown .menu a, .dropdown .menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; width: 100%; }
.dropdown .menu a:hover, .dropdown .menu button:hover, .dropdown .menu [aria-current] { background: var(--surface-2); }
.menu-head { padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; flex: none; }
.avatar-btn { padding: 0 !important; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: var(--z-menu); padding: 6px; list-style: none; margin: 0; }
.suggest a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.suggest a[aria-selected=true], .suggest a:hover { background: var(--primary-soft); }
.suggest small { color: var(--muted); }

/* Bottom nav (mobile) */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; min-height: 60px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottomnav a[aria-current] { color: var(--primary); } .bottomnav a[aria-current] .ic { stroke-width: 2.4; }

/* Hero */
.hero { margin: calc(-1 * var(--s4)) calc(-1 * var(--s4)) 0; padding: var(--s6) var(--s4) var(--s7); color: #fff;
  background: linear-gradient(135deg, rgba(29,78,216,.9), rgba(30,58,138,.92)), url(../img/hero.jpg) right center/cover; }
.hero-sm { padding-bottom: var(--s6); }
.hero-in { max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: #FDE68A; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 3.5vw, 3.6rem); margin-bottom: var(--s2); letter-spacing: -.03em; }
.lead { font-size: 1.08rem; color: #DBEAFE; max-width: 60ch; }
.bigsearch { position: relative; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: var(--radius-pill); padding: 6px; box-shadow: var(--shadow-lg); margin: var(--s4) 0; }
.bigsearch > .ic { margin-left: 10px; color: #64748B; }
.bigsearch input { border: 0; min-height: 48px; font-size: 1.05rem; padding: 0 6px; background: transparent; color: #0F172A; }
.bigsearch input:focus { outline: 0; }
.bigsearch .btn { min-height: 48px; flex: none; }
.hero-chips { margin: 0; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.cat-tile { display: grid; justify-items: center; gap: 6px; padding: var(--s3) var(--s2); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: center; text-decoration: none; color: var(--ink); font-size: .85rem; font-weight: 600; line-height: 1.25; }
.cat-tile:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.cat-tile small { color: var(--muted); font-weight: 500; }
.cat-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); flex: none; }
.cat-tile:nth-child(3n+2) .cat-ic { background: var(--warn-soft); color: var(--warn); }
.industries { display: grid; gap: var(--s4); } .industry h2 { display: flex; align-items: center; gap: var(--s3); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; }
.cat-list a { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; min-height: var(--touch); align-items: center; }

/* Profile card */
.grid-cards { display: grid; gap: var(--s3); }
.pcard { position: relative; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.pcard-link { flex: 1; display: flex; gap: var(--s3); padding: var(--s3); color: var(--ink); text-decoration: none; min-width: 0; }
.pcard-media { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); flex: none; overflow: hidden; }
.pcard-media .ic { width: 30px; height: 30px; } .pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-body { display: grid; gap: 2px; min-width: 0; }
.pcard-title { font-size: 1.02rem; display: flex; align-items: center; gap: 6px; }
.pcard-meta { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .88rem; }
.pcard-call { display: grid; place-items: center; width: 56px; border-left: 1px solid var(--line); color: var(--primary); }
.pcard-call:hover { background: var(--primary-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: .8rem; font-weight: 700; } .verified .ic { width: 18px; height: 18px; }
.stars { color: #CBD5E1; letter-spacing: 1px; } .stars .on { color: var(--accent); } .stars-sm { font-size: .9rem; }

/* Listing card */
.lcard { display: flex; gap: var(--s3); justify-content: space-between; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.lcard-title { margin: 0 0 4px; font-size: 1rem; } .lcard-desc { color: var(--ink-2); font-size: .92rem; margin-bottom: 4px; }
.lcard-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .85rem; margin: 0; }
.lcard-meta span, .lcard-meta a { display: inline-flex; align-items: center; gap: 4px; }
.lcard-price { font-weight: 800; color: var(--primary); white-space: nowrap; text-align: right; } .lcard-price small { display: block; font-weight: 500; color: var(--muted); }
.lcard-offer { border-left: 4px solid var(--accent); } .lcard-event { border-left: 4px solid var(--primary); } .lcard-job { border-left: 4px solid var(--ok); }
.lrow { display: grid; gap: var(--s2); } .lrow > .btn, .lrow > .row-actions { justify-self: start; } .lrow.is-hidden, .is-hidden { opacity: .55; }

/* Search layout */
.search-layout { display: grid; gap: var(--s4); }
.filters .form { gap: var(--s3); } .filters { order: 2; } .results { order: 1; }
.results-head h1 { margin-bottom: 4px; }

/* Profile */
.profile { display: grid; gap: var(--s4); }
.profile-head { padding: 0; overflow: hidden; }
.profile-cover { height: 96px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 22%, var(--surface))); color: var(--primary); }
.profile-cover .ic { width: 56px; height: 56px; opacity: .6; }
.profile-id { display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s4); margin-top: -44px; align-items: flex-start; }
.profile-id h1 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: var(--s2) 0 2px; }
.profile-id p { margin: 0; }
.profile-logo { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); font-size: 1.8rem; font-weight: 800; border: 4px solid var(--surface); flex: none; overflow: hidden; }
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-trust { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px !important; }
.profile-trust a { text-decoration: none; color: var(--ink); }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); padding: var(--s4); }
.profile-actions > :first-child { grid-column: 1 / -1; }
.profile-actions .btn { width: 100%; padding-left: 10px; padding-right: 10px; } .profile-actions form { display: contents; }
/* Horizontal scrollers hint that there is more to the right */
.tabs.has-more, .chips.has-more { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.post-link { display: inline-flex; margin-bottom: var(--s2); }
.profile-actions .btn-ghost { border-color: var(--line); }
.sheet { border: 2px solid var(--primary); scroll-margin-top: 80px; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: var(--s4); scrollbar-width: none; position: sticky; top: 60px; background: var(--bg); z-index: 5; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; min-height: var(--touch); white-space: nowrap; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--primary); border-bottom-color: var(--primary); }
.tabs small { background: var(--surface-2); border-radius: 9px; padding: 0 6px; font-size: .75rem; }
.profile-body { display: grid; gap: var(--s4); } .profile-main { display: grid; gap: var(--s4); align-content: start; } .profile-side { display: grid; gap: var(--s4); align-content: start; }
.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .kv li { display: flex; gap: 10px; align-items: flex-start; word-break: break-word; }
.hours { width: 100%; border-collapse: collapse; } .hours th, .hours td { padding: 6px 0; text-align: left; font-weight: 500; } .hours td { text-align: right; } .hours .today { font-weight: 800; color: var(--primary); }
.hours .today th { font-weight: 800; }
.review header { display: flex; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; margin-bottom: var(--s2); }
.reply { margin-top: var(--s3); padding: var(--s3); background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: 8px; }
.review-summary { display: grid; gap: var(--s4); } .big-rating { display: grid; justify-items: start; gap: 4px; } .big-rating b { font-size: 3rem; line-height: 1; }
.dist { display: grid; gap: 6px; } .dist-row { display: grid; grid-template-columns: 32px 1fr 36px; gap: 8px; align-items: center; font-size: .88rem; }
.dist-row.wide { grid-template-columns: minmax(90px, 40%) 1fr 40px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; border: 1px solid var(--line); } .bar i { display: block; height: 100%; background: var(--accent); }
.rate-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-input legend { width: 100%; }
.rate-input input { position: absolute; opacity: 0; }
.rate-input label { font-size: 2.2rem; line-height: 1; color: #CBD5E1; cursor: pointer; padding: 4px; }
.rate-input input:checked ~ label, .rate-input label:hover, .rate-input label:hover ~ label { color: var(--accent); }
.rate-input input:focus-visible + label { outline: 3px solid var(--accent); border-radius: 6px; }
.report summary { cursor: pointer; color: var(--muted); font-size: .85rem; } blockquote.review { margin: 0 0 var(--s3); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; } .mini-list li { border-bottom: 1px solid var(--line); }
.mini-list li > a, .mini-list li > span:first-child:not(:only-child) { display: flex; justify-content: space-between; gap: var(--s2); padding: 10px 0; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.mini-list li { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; align-items: center; } .mini-list li > a { flex: 1; }
.trust-box li { font-size: .9rem; }

/* Feed / posts / requests */
.feed { display: grid; gap: var(--s3); max-width: 720px; }
.post-head { display: flex; justify-content: space-between; gap: var(--s2); align-items: flex-start; margin-bottom: var(--s2); }
.post-author { display: flex; gap: 10px; text-decoration: none; color: var(--ink); } .post-author > span:last-child { display: grid; }
.post-author .cat-ic { width: 40px; height: 40px; border-radius: 12px; }
.post-foot { display: flex; flex-wrap: wrap; gap: var(--s2); }
.req-head { display: flex; justify-content: space-between; gap: var(--s2); }
.notif { display: grid; gap: 2px; text-decoration: none; color: var(--ink); } .notif.unread { border-left: 4px solid var(--primary); }

/* Empty / KPI / misc */
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--ink-2); }
.empty-lg { padding: var(--s7) var(--s4); }
.empty-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); margin-bottom: var(--s3); }
.empty-icon .ic { width: 34px; height: 34px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin-bottom: var(--s4); }
.kpi { display: grid; gap: 2px; } .kpi b { font-size: 1.8rem; line-height: 1.1; } .kpi span { color: var(--muted); font-size: .85rem; } .kpi .ic { color: var(--primary); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .checklist li.ok { color: var(--ok); }
.two-col { display: grid; gap: var(--s4); align-items: start; margin-bottom: var(--s4); }
.split { display: grid; gap: var(--s4); }
.tourist { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.cta-provider { display: grid; gap: var(--s4); align-items: center; padding: var(--s5); border-radius: var(--radius); background: var(--ink); color: #fff; }
.cta-provider p { color: #CBD5E1; }
.need-grid { display: grid; gap: var(--s3); } .need h2 { display: flex; align-items: center; gap: var(--s3); }
.pager { display: flex; justify-content: center; align-items: center; gap: var(--s3); margin: var(--s5) 0; }
.hours-edit { display: grid; gap: var(--s2); } .hours-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; } .hours-row input[type=time] { width: auto; min-width: 110px; }
.secret { font-size: 1rem; letter-spacing: .08em; word-break: break-all; }
.danger-zone { border-color: var(--err-soft); } .steps-list { padding-left: 1.2em; display: grid; gap: 6px; }
.debug { text-align: left; background: #0F172A; color: #E2E8F0; padding: var(--s4); border-radius: var(--radius); overflow: auto; font-size: .8rem; }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: var(--s5) 0; margin-top: var(--s6); }
.footer-in { display: grid; gap: var(--s3); } .footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); } .footer nav a { color: var(--ink-2); text-decoration: none; min-height: 32px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer-logo { filter: brightness(0) invert(1); opacity: .85; } }

/* Admin */
.admin-shell { display: grid; gap: var(--s4); padding-top: var(--s4); padding-bottom: var(--s6); }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); padding-bottom: var(--s2); }
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; font-size: .92rem; }
.admin-nav a[aria-current] { background: var(--primary); color: #fff; } .admin-nav a:hover:not([aria-current]) { background: var(--surface-2); }
.admin-main { min-width: 0; }
.sortable { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: 6px; }
.sortable li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; padding-left: calc(10px + var(--depth, 0) * 24px); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sortable li.dragging { opacity: .5; border-style: dashed; } .sortable .row-actions { margin-left: auto; }
.handle { cursor: grab; color: var(--muted); font-weight: 900; user-select: none; }
.theme-card .swatches { display: flex; gap: 4px; grid-row: span 2; } .swatches i { width: 22px; height: 44px; border-radius: 6px; display: block; }

/* Installer */
.installer { padding-bottom: 0; }
.inst-wrap { max-width: 860px; margin: 0 auto; padding: var(--s4); }
.inst-head { display: flex; justify-content: space-between; align-items: center; margin: var(--s4) 0; }
.inst-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 var(--s4); overflow-x: auto; }
.inst-steps li { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.inst-steps span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; background: var(--surface); }
.inst-steps em { font-style: normal; display: none; }
.inst-steps .current span { background: var(--primary); border-color: var(--primary); color: #fff; } .inst-steps .current em { display: inline; color: var(--ink); font-weight: 700; }
.inst-steps .done span { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.inst-card { display: grid; gap: var(--s3); }
.inst-log { list-style: none; padding: 0; display: grid; gap: 8px; } .inst-log li { padding: var(--s3); border-radius: var(--radius-sm); }
.inst-log .ok { background: var(--ok-soft); } .inst-log .fail { background: var(--err-soft); }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; } .summary dt { font-weight: 700; } .summary dd { margin: 0; word-break: break-all; }

/* ≥ 600px */
@media (min-width: 600px) {
  .brand span { display: inline; }
  .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr auto; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .radio-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .need-grid { grid-template-columns: repeat(2, 1fr); }
  .review-summary { grid-template-columns: auto 1fr; align-items: center; }
  .cta-provider { grid-template-columns: 1fr auto; }
  .inst-steps em { display: inline; }
  .profile-id { flex-direction: row; align-items: flex-end; gap: var(--s4); }
}
/* ≥ 900px: desktop expands the same information architecture */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .hide-sm { display: inline-flex; }
  .topsearch { max-width: 360px; }
  .topnav { display: flex; gap: 2px; overflow: hidden; }
  .topnav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
  .topnav a:hover, .topnav a[aria-current] { color: var(--primary); background: var(--primary-soft); }
  .hero { margin: 0; border-radius: 0 0 28px 28px; padding: var(--s7) var(--s6); background: linear-gradient(90deg, rgba(29,78,216,.97) 0 45%, rgba(29,78,216,.55)), url(../img/hero.jpg) right center/cover; }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .search-layout { grid-template-columns: 280px 1fr; align-items: start; }
  .filters { order: 0; position: sticky; top: 76px; } .results { order: 0; }
  .profile-body { grid-template-columns: 1fr 340px; }
  .profile-actions { display: flex; flex-wrap: wrap; } .profile-actions > :first-child { grid-column: auto; } .profile-actions .btn { width: auto; padding-left: 20px; padding-right: 20px; }
  .profile-side { position: sticky; top: 124px; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 3fr 2fr; }
  .industries { grid-template-columns: repeat(2, 1fr); }
  .need-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-shell { grid-template-columns: 220px 1fr; align-items: start; }
  .admin-nav { flex-direction: column; border: 0; position: sticky; top: 76px; }
  .footer-in { grid-template-columns: 1.4fr 2fr; align-items: start; }
}
/* ≥ 1280px: use the room — more columns, never stretched lines */
@media (min-width: 1280px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .search-layout .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(8, 1fr); }
  .industries { grid-template-columns: repeat(3, 1fr); }
  .topsearch { max-width: 420px; }
}
@media (min-width: 1600px) { :root { --wrap: 1520px; } .search-layout .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .bottomnav, .footer, .profile-actions, .tabs { display: none; } body { background: #fff; } }
