:root {
  color-scheme: light;
  --bg: #f7f9f7; --surface: #fff; --soft: #f2f7f3; --tint: #e5f1e9;
  --line: #d3e1d7; --text: #162e29; --muted: #475f56; --accent: #18594e;
  --strong: #124b42; --on-accent: #fff; --focus: #146453;
  --intro-start: #e4f1e9; --intro-end: #edf4e9;
  --shadow: 0 10px 34px #1a493a0d;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 100%; line-height: 1.53; font-synthesis: none;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0c0d; --surface: #131817; --soft: #19231f; --tint: #20342b;
  --line: #35483f; --text: #eaf4ef; --muted: #b0c4ba; --accent: #9ae1c5;
  --strong: #b4efd8; --on-accent: #102a23; --focus: #a7ead1;
  --intro-start: #172b25; --intro-end: #182720; --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b0c0d; --surface: #131817; --soft: #19231f; --tint: #20342b;
    --line: #35483f; --text: #eaf4ef; --muted: #b0c4ba; --accent: #9ae1c5;
    --strong: #b4efd8; --on-accent: #102a23; --focus: #a7ead1;
    --intro-start: #172b25; --intro-end: #182720; --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .6rem 1rem; background: var(--surface); transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.7rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.1rem; align-items: center; }
.brand { display: inline-flex; gap: .7rem; align-items: center; justify-self: start; color: var(--text); text-decoration: none; line-height: 1.25; }
.brand img { flex: 0 0 auto; }
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .78rem; margin-top: .18rem; }
.nav, .header-actions { display: flex; align-items: center; gap: .45rem; }
.nav a { display: flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .35rem .7rem; border-radius: .6rem; text-decoration: none; color: var(--muted); font-size: .875rem; font-weight: 620; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--strong); background: var(--soft); }
.header-actions { justify-content: end; }
.button, .theme { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 2.85rem; border: 1px solid transparent; border-radius: .68rem; text-align: center; text-decoration: none; font-weight: 680; line-height: 1.25; }
.button { padding: .65rem 1rem; font-size: .91rem; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--strong); }
.secondary, .theme { border-color: var(--line); background: var(--surface); color: var(--accent); }
.secondary:hover, .theme:hover { background: var(--soft); border-color: var(--accent); }
.theme { width: 2.85rem; padding: 0; }
.theme svg, .icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun, .theme[aria-pressed='true'] .moon { display: none; }
.theme[aria-pressed='true'] .sun { display: block; }
.cabinet { font-size: .8rem; }
.cabinet-short { display:none; }
.main { flex: 1 0 auto; padding-block: 1.85rem 3.7rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, p, a { overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 750; letter-spacing: -.043em; line-height: 1.08; }
h2 { font-size: clamp(1.3rem, 2.45vw, 1.65rem); letter-spacing: -.022em; line-height: 1.2; }
h3 { font-size: 1.2rem; line-height: 1.24; letter-spacing: -.016em; }
.home-intro { padding: clamp(1.2rem, 4.2vw, 2.6rem); border: 1px solid var(--line); border-radius: 1.3rem; background: radial-gradient(ellipse at 93% -15%, var(--tint), transparent 48%), linear-gradient(125deg, var(--intro-start), var(--intro-end)); }
.intro-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem; margin-bottom: .85rem; }
.intro-line a, .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .38rem; font-size: .88rem; font-weight: 670; text-decoration: none; }
.intro-line a:hover, .text-link:hover { text-decoration: underline; }
.pilot-badge { display: inline-flex; align-items: center; width: fit-content; gap: .45rem; padding: .24rem .65rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--surface); color: var(--strong); font-size: .79rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
a.pilot-badge { min-height: 2.75rem; }
a.pilot-badge:hover { border-color: var(--accent); }
.pilot-badge > span[aria-hidden="true"] { width: .44rem; height: .44rem; border-radius: 50%; background: var(--accent); }
.home-intro > p { margin-top: .65rem; max-width: 42rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: minmax(8rem, 1.32fr) minmax(8rem, 1fr) minmax(8rem, 1fr) auto; gap: .75rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: .95rem; padding: .9rem; }
.home-intro .filters { margin-top: 1.05rem; max-width: 68rem; box-shadow: var(--shadow); }
.intro-line:not(:has(.pilot-badge:not([hidden]))) { display: none; }
.filters .field { display: grid; gap: .28rem; min-width: 0; }
.filters label { color: var(--text); font-size: .79rem; font-weight: 700; }
.filters input, .filters select { min-height: 2.88rem; width: 100%; min-width: 0; padding: .6rem .67rem; border: 1px solid var(--line); border-radius: .58rem; background: var(--soft); color: var(--text); font-size: .95rem; font-weight: 480; }
.filters input::placeholder { color: var(--muted); opacity: 1; }
.filters .button { white-space: nowrap; min-height: 2.88rem; }
.filters .request-filter { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-self: start; gap: .5rem; min-height: 2.75rem; cursor: pointer; font-size: .9rem; }
.filters .request-filter input { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--accent); }
.results-filters .button { grid-column: 4; grid-row: 1; }
.quick-cities { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .48rem; margin-top: .7rem; }
.quick-cities > span { color: var(--muted); margin-right: .12rem; font-size: .82rem; }
.pill { display: inline-flex; gap: .35rem; align-items: center; min-height: 2.75rem; padding: .35rem .66rem; border-radius: 2rem; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: .82rem; text-decoration: none; }
.pill:hover { border-color: var(--accent); }
.section { margin-top: 1.9rem; }
.section-heading, .page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1.2rem; }
.section-heading { margin-bottom: .55rem; }
.page-title { margin-bottom: 1.15rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .25rem .6rem; color: var(--muted); margin-bottom: 1rem; font-size: .86rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 2rem; }
.breadcrumb span { align-self: center; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.card { min-width: 0; display: flex; flex-direction: column; gap: .7rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); padding: 1rem; }
.card:hover { border-color: var(--accent); }
.card-main { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.avatar { width: 3.75rem; height: 3.75rem; border-radius: .8rem; background: var(--tint); color: var(--strong); position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; font-size: .94rem; font-weight: 720; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card h3 a { color: var(--strong); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.location { display: flex; align-items: baseline; gap: .4rem; color: var(--muted); font-size: .88rem; }
.location .icon { align-self: center; color: var(--accent); }
.card-main .location { margin-top: .2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.tag { color: var(--strong); background: var(--soft); font-size: .81rem; padding: .25rem .53rem; border-radius: .4rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .65rem; margin-top: auto; }
.status { color: var(--muted); font-size: .82rem; }
.card-list { display: grid; gap: .75rem; }
.card-list .card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .9fr) minmax(10rem, auto); align-items: center; padding: 1rem 1.15rem; gap: .8rem 1.1rem; }
.card-list .card-actions { margin: 0; flex-direction: column; align-items: start; justify-self: end; }
.card-list .card-details { display: grid; gap: .35rem; }
.card-details > p { color: var(--muted); font-size: .86rem; }
.training-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .35rem; }
.count { color: var(--muted); font-size: .85rem; margin-bottom: .6rem; }
[data-pagination] { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.loading, .state { color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: .9rem; padding: 1.15rem; }
.loading { min-height: 4rem; }
.state h1, .state h2 { color: var(--text); }
.state p { margin-top: .55rem; }
.state .button { margin: .9rem .45rem 0 0; }
noscript .state { margin-top: .65rem; }
.explore, .afterword { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.3rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: .95rem; }
.explore { background: var(--surface); }
.afterword { background: var(--soft); }
.explore p, .afterword p { color: var(--muted); margin-top: .3rem; }
.explore-links { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); grid-template-areas: "identity request" "details request"; gap: .85rem; align-items: start; }
.profile-identity { grid-area: identity; }
.profile-details { grid-area: details; }
.profile-details .profile-section:first-child { margin: 0; padding: 0; border: 0; }
.profile, .request-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1.05rem; padding: clamp(1rem, 3.5vw, 2rem); }
.profile-top { display: flex; align-items: center; gap: .95rem; }
.profile-top .avatar { width: 5.2rem; height: 5.2rem; font-size: 1.2rem; }
.profile-top h1 { margin: .45rem 0 .25rem; font-size: clamp(1.65rem, 4vw, 2.65rem); }
.profile .tags { margin-top: .95rem; }
.profile-section { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile-section p { color: var(--muted); margin-top: .45rem; white-space: pre-line; }
.request-panel { grid-area: request; background: var(--soft); }
.request-panel p { color: var(--muted); margin-top: .55rem; }
.request-panel .button { margin-top: .85rem; }
.request-panel > small { display: block; margin-top: .45rem; color: var(--muted); }
.narrow { max-width: 48rem; margin-inline: auto; }
.guide-note { margin-top: 1.15rem; padding: .9rem 1rem; background: var(--tint); border-radius: .85rem; }
.steps { display: grid; gap: .55rem; list-style: none; margin: 1.1rem 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: .9rem 1rem .9rem 3.85rem; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; position: absolute; top: .9rem; left: 1rem; width: 1.95rem; height: 1.95rem; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 700; }
.steps h2, .faq h2 { font-size: 1.2rem; }
.steps p, .faq details p { color: var(--muted); margin-top: .4rem; }
.faq details { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.faq summary { min-height: 2.75rem; padding: .55rem .15rem; font-weight: 650; cursor: pointer; }
.faq details p { padding: 0 .15rem .7rem; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .4rem 1.4rem; padding-block: 1.25rem; }
.footer-inner p, .footer-inner nav { font-size: .85rem; color: var(--muted); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.footer-inner nav a { display: inline-flex; align-items: center; gap: .22rem; min-height: 2.75rem; text-decoration: none; }
.footer-inner nav a:hover { text-decoration: underline; }
@media (max-width: 59rem) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: .65rem; }
  .nav { justify-self: center; }
  .cabinet { padding-inline: .58rem; }
}
@media (max-width: 47rem) {
  .wrap { width: min(100% - 2rem, 72rem); }
  .header-inner { grid-template-columns: 1fr auto; gap: .35rem; padding-top: .65rem; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; justify-content: start; margin-bottom: .2rem; }
  .nav a:first-child { margin-left: -.1rem; }
  .cabinet-wide { display:none; }
  .cabinet-short { display:inline; }
  .main { padding-block: 1rem 2.35rem; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .name-field { grid-column: 1 / -1; }
  .filters .button { grid-column: 1 / -1; }
  .results-filters .button { grid-row: auto; }
  .home-intro .filters { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .home-intro .filters .name-field { grid-column: 1 / -1; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-list .card { grid-template-columns: minmax(0, 1fr) auto; }
  .card-list .card-details { grid-row: 2; grid-column: 1; }
  .card-list .card-actions { grid-column: 2; grid-row: 1 / 3; }
  .profile-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "identity" "request" "details"; }
  .footer-inner { display: block; }
}
@media (max-width: 34rem) {
  .wrap { width: calc(100% - 1.4rem); }
  .nav { gap: .15rem; }
  .nav a { min-height: 2.75rem; padding-inline: .37rem; font-size: .8rem; white-space: nowrap; }
  .home-intro { padding: .9rem; }
  .home-intro h1 { font-size: clamp(1.5rem, 7.5vw, 2rem); }
  .home-intro > p { font-size: .93rem; }
  .home-intro .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .68rem; gap: .6rem; }
  .home-intro .filters .name-field input { min-height: 2.65rem; }
  .filters input, .filters select { padding-inline: .48rem; font-size: 1rem; }
  .intro-line { margin-bottom: .25rem; gap: .2rem .6rem; }
  .intro-line a { font-size: .8rem; }
  .quick-cities > span { display: none; }
  .quick-cities .pill { padding-inline: .49rem; }
  .section { margin-top: 1.3rem; }
  .home-intro + .section { margin-top: 1rem; }
  .card-grid, .card-list .card { grid-template-columns: minmax(0, 1fr); }
  .card-list .card-actions, .card-list .card-details { grid-row: auto; grid-column: auto; }
  .card-list .card-actions { flex-direction: row; align-items: center; justify-self: start; }
  .explore, .afterword { align-items: start; flex-direction: column; }
  .profile-top .avatar { width: 3.8rem; height: 3.8rem; }
}
