:root {
  color-scheme: light;
  --ink: #10243d;
  --muted: #52657a;
  --blue: #0877be;
  --blue-dark: #07578a;
  --sky: #dff2fc;
  --surface: #f4f8fb;
  --white: #fcfeff;
  --line: #cbd9e5;
  --error: #a51d2d;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(28, 76, 111, .14);
  font-family: Avenir, "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); line-height: 1.5; }
a { color: var(--blue-dark); }
button, input, select { font: inherit; }
button, .primary-button { touch-action: manipulation; }

.site-header {
  height: 72px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(252, 254, 255, .96);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; font-size: 20px; }
.admin-header .brand small { color: #dff2fc; }
.header-link { color: var(--blue-dark); font-weight: 700; text-underline-offset: 4px; }

.hero { max-width: 1240px; margin: 0 auto; min-height: calc(100dvh - 72px); display: grid; grid-template-columns: .9fr 1.1fr; align-items: stretch; padding: 48px 24px; gap: 54px; }
.hero-copy { align-self: center; max-width: 570px; }
.eyebrow { color: var(--blue-dark); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.035em; margin-top: 0; }
.hero h1 { font-size: clamp(44px, 6vw, 76px); max-width: 11ch; margin-bottom: 24px; }
.hero-subtitle { font-size: clamp(19px, 2vw, 25px); color: var(--muted); max-width: 40ch; margin: 0 0 34px; }
.hero-photo { min-height: 620px; border-radius: var(--radius); background: linear-gradient(145deg, rgba(8,119,190,.08), rgba(16,36,61,.18)), url('/static/ftth-hero.png') center / cover; box-shadow: var(--shadow); }

.primary-button, .position-button { border: 0; border-radius: 9px; cursor: pointer; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s ease, background .18s ease; }
.primary-button { background: var(--blue); color: white; padding: 15px 22px; }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:active, .position-button:active { transform: translateY(1px); }

.vacancies { background: var(--surface); padding: 100px max(24px, calc((100vw - 1240px) / 2)); }
.section-heading { max-width: 620px; margin-bottom: 48px; }
.section-heading h2, .application-section h2, .share-section h2 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 16px; }
.section-heading p, .application-intro > p, .share-section p { color: var(--muted); font-size: 19px; }
.vacancy-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.vacancy { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
.vacancy h3 { font-size: clamp(25px, 3vw, 38px); margin: 8px 0 18px; }
.vacancy p { color: var(--muted); max-width: 60ch; }
.vacancy ul { grid-column: 1; display: flex; gap: 14px; flex-wrap: wrap; list-style: none; padding: 0; margin: 18px 0 0; font-weight: 700; font-size: 14px; }
.vacancy li { padding: 7px 10px; background: var(--surface); border-radius: 7px; }
.vacancy-count { color: var(--blue-dark); font-size: 13px; font-weight: 800; }
.position-button { grid-column: 2; grid-row: 1 / 4; align-self: center; background: transparent; color: var(--blue-dark); border: 1px solid var(--blue); padding: 12px 17px; }
.position-button:hover { background: var(--sky); }
.vacancy-featured { grid-column: 1 / -1; border-color: var(--blue); background: var(--sky); }
.vacancy-featured li { background: var(--white); }
.vacancy-dark { background: var(--ink); color: var(--white); }
.vacancy-dark p { color: #c8d8e6; }
.vacancy-dark li { color: var(--ink); background: var(--white); }
.vacancy-dark .vacancy-count, .vacancy-dark .position-button { color: #8ed5fa; }
.vacancy-dark .position-button { border-color: #8ed5fa; }

.application-section { max-width: 1240px; margin: 0 auto; padding: 110px 24px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 76px; }
.application-intro { padding-top: 12px; }
.privacy-note { margin-top: 32px; display: grid; gap: 4px; padding-left: 18px; border-left: 4px solid var(--blue); }
.privacy-note span { color: var(--muted); }
.application-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); background: var(--white); }
.field { display: grid; gap: 7px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-weight: 800; }
input, select { width: 100%; min-height: 50px; border: 1px solid #8196aa; border-radius: 9px; padding: 11px 13px; background: white; color: var(--ink); }
input:focus, select:focus { outline: 3px solid rgba(8, 119, 190, .28); border-color: var(--blue-dark); }
.field-error { color: var(--error); font-size: 14px; font-weight: 700; margin: 0; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-weight: 500; font-size: 14px; }
.consent input { min-height: auto; width: 20px; height: 20px; margin: 2px 0 0; }
.legal-summary { color: var(--muted); font-size: 13px; }
.submit-button { width: 100%; min-height: 52px; margin-top: 8px; }

.share-section { margin: 0 24px 80px; padding: 72px max(24px, calc((100vw - 1240px) / 2)); border-radius: var(--radius); background: var(--sky); }
.share-section h2, .share-section p { max-width: 780px; }
.site-footer { max-width: 1240px; margin: 0 auto; padding: 40px 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 24px; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; }

.message-page { min-height: calc(100dvh - 72px); display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.message-card { max-width: 620px; text-align: center; background: white; padding: 54px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.message-card h1 { font-size: 46px; }
.message-card p { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.success-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: 28px; margin: 0 auto 24px; }
.legal-page { max-width: 820px; margin: 0 auto; padding: 72px 24px 110px; }
.legal-page h1 { font-size: clamp(38px, 5vw, 60px); margin-top: 36px; }
.legal-page section { margin-top: 36px; }
.legal-page h2 { font-size: 25px; margin-bottom: 10px; }
.legal-page p { color: var(--muted); }
.legal-version { border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; }

.admin-body { background: var(--surface); min-height: 100dvh; }
.admin-header { height: 72px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; background: var(--ink); }
.admin-header .brand { color: var(--white); }
.admin-header .brand small { color: #b8cad9; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: 52px 24px 90px; }
.login-shell { min-height: calc(100dvh - 176px); display: grid; place-items: center; }
.login-card { width: min(100%, 440px); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); padding: 36px; }
.login-card h1 { font-size: 35px; margin-bottom: 10px; }
.login-card > p { color: var(--muted); margin-bottom: 28px; }
.login-card .login-error { color: var(--error); padding: 10px 12px; background: #fff0f2; border-radius: 8px; font-weight: 700; }
.admin-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.admin-title h1 { font-size: 52px; margin-bottom: 4px; }
.admin-title p { color: var(--muted); margin: 0; }
.admin-actions { display: flex; align-items: center; gap: 16px; }
.admin-actions form { margin: 0; }
.secondary-button { display: inline-flex; padding: 11px 15px; border: 1px solid var(--blue); border-radius: 9px; text-decoration: none; font-weight: 800; }
.text-button { border: 0; background: none; color: var(--blue-dark); text-decoration: underline; cursor: pointer; }
.filters { display: grid; grid-template-columns: 1.5fr 1fr .6fr auto auto; align-items: end; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; margin-bottom: 22px; }
.filters .field { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: #edf4f8; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.class-badge { display: inline-block; padding: 5px 10px; border-radius: 7px; font-weight: 800; font-size: 13px; line-height: 1.2; white-space: nowrap; background: #d9e4ec; }
.class-A { color: #064b30; background: #c8f1dc; }
.class-B { color: #07578a; background: var(--sky); }
.class-X { color: var(--error); background: #ffe1e5; }
.admin-empty { padding: 70px 28px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.candidate-layout { display: grid; grid-template-columns: 1fr .8fr; gap: 26px; margin-top: 28px; }
.candidate-profile, .review-form { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.candidate-profile h1 { font-size: 46px; margin-bottom: 8px; }
.candidate-profile > p { color: var(--blue-dark); font-weight: 800; }
.candidate-profile dl { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.candidate-profile dl div { min-width: 0; }
.candidate-profile dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.candidate-profile dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.review-form h2 { font-size: 30px; }
textarea { width: 100%; resize: vertical; border: 1px solid #8196aa; border-radius: 9px; padding: 11px 13px; color: var(--ink); }
.review-form small { color: var(--muted); }

@media (max-width: 800px) {
  .site-header { padding: 0 18px; }
  .header-link { font-size: 14px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 42px 18px 64px; gap: 32px; }
  .hero h1 { font-size: 49px; }
  .hero-photo { min-height: 430px; }
  .vacancies { padding: 72px 18px; }
  .vacancy-grid, .application-section, .field-row { grid-template-columns: 1fr; }
  .vacancy, .vacancy-featured { grid-column: auto; display: block; padding: 26px; }
  .position-button { margin-top: 20px; width: 100%; }
  .application-section { padding: 72px 18px; gap: 32px; }
  .application-form { padding: 24px 18px; }
  .share-section { margin: 0 18px 60px; padding: 50px 24px; }
  .site-footer { margin: 0 18px; padding: 32px 0; grid-template-columns: 1fr; }
  .message-card { padding: 38px 22px; }
  .admin-main { padding: 38px 18px 70px; }
  .admin-title, .admin-actions { align-items: flex-start; flex-direction: column; }
  .filters, .candidate-layout, .candidate-profile dl { grid-template-columns: 1fr; }
  .filters .primary-button { width: 100%; }
  .login-card { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
