:root {
  --brand: #284775;
  --brand-dark: #1e3658;
  --brand-soft: #e8eef5;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c6570;
  --border: #d8dee6;
  --error: #b42318;
  --error-bg: #fef3f2;
  --success: #067647;
  --success-bg: #ecfdf3;
  --radius: 10px;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --space: 1.25rem;
  --max: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 10% -20%, rgba(40, 71, 117, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(40, 71, 117, 0.08), transparent 50%),
    var(--bg);
  line-height: 1.5;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-dark);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  background: var(--brand);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
  opacity: 0.92;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.signin {
  position: relative;
}

.signin-toggle {
  list-style: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  user-select: none;
}

.signin-toggle::-webkit-details-marker {
  display: none;
}

.signin-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 0.45rem;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: 0.1em;
}

.signin[open] .signin-toggle,
.signin-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.signin-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 10.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 35, 50, 0.14);
  padding: 0.35rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.signin-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.signin-menu a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.main {
  flex: 1;
  padding: 2rem 0 3rem;
}

.page-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.2;
}

.back {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.back a {
  text-decoration: none;
  font-weight: 500;
}

.empty {
  color: var(--text-muted);
}

.vacancy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vacancy-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vacancy-row:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: inherit;
}

.vacancy-row-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--brand);
}

.vacancy-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.vacancy-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.85rem 1.25rem;
  margin: 0 0 1.75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.vacancy-facts dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.vacancy-facts dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
}

.vacancy-section {
  margin-bottom: 1.5rem;
}

.vacancy-section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--brand);
}

.prose {
  color: var(--text);
}

.apply {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.apply-title {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  color: var(--brand);
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 28rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-weight: 500;
  font-size: 0.95rem;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="file"] {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.form-row input:focus {
  outline: 2px solid rgba(40, 71, 117, 0.35);
  outline-offset: 1px;
  border-color: var(--brand);
}

.form-check label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400;
  line-height: 1.4;
}

.form-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.req {
  color: var(--error);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--brand-dark);
}

.alert {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0;
  background: var(--brand);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
  color: #fff;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  opacity: 0.85;
}
