:root {
  --ink: #141A33;
  --ink-2: #4A5068;
  --muted: #5E6478;
  --bg: #F5F5F8;
  --surface: #FFFFFF;
  --line: #E2E3EA;
  --line-2: #D5D7E0;
  --brass: #E3B341;
  --brass-text: #8A6410;
  --night-2: #222947;
  --soft-on-dark: #C9CCDA;
  --ok-bg: #E6F3EF;
  --ok-text: #1F4F47;
  --warn-bg: #FBF1D6;
  --warn-text: #6B4D0A;
  --danger: #A33A1A;
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--ink); }
a:hover { color: var(--brass-text); }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.card h2 { margin-top: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
.section { padding-top: 28px; padding-bottom: 48px; }
.display { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 5vw, 38px); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { flex: none; vertical-align: -4px; }

/* Header and footer */
.top { background: var(--ink); color: #fff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--sans); font-size: 23px; font-weight: 700; letter-spacing: -0.5px; text-transform: lowercase; }
.brand svg { color: #fff; }
.brand:hover { color: #fff; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--soft-on-dark); text-decoration: none; padding: 10px 10px; border-radius: 10px; font-size: 15px; }
.nav a:hover { color: #fff; background: var(--night-2); }
.nav .btn { color: var(--ink); }
.foot { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 14px; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--ink-2); }
.langs { display: flex; gap: 4px; }
.langs a { padding: 8px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; min-width: 44px; text-align: center; }
.langs a[aria-current] { background: var(--ink); color: #fff; }
.flash { background: var(--ok-bg); color: var(--ok-text); border-radius: 12px; padding: 12px 16px; margin: 16px 0 0; font-weight: 500; }

/* Hero */
.hero { background: var(--ink); color: #fff; padding: 40px 0 56px; }
.hero-inner { max-width: 760px; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 7vw, 56px); margin: 8px 0 16px; }
.hero .lead { color: var(--soft-on-dark); font-size: 18px; margin: 0 0 24px; }
.hero-slim { padding: 20px 0 28px; }
.hero-slim h1 { font-size: clamp(26px, 5vw, 36px); margin: 8px 0 6px; }
.hero-slim .lead { font-size: 15px; margin: 0; }
.eyebrow { color: var(--brass); font-weight: 600; font-size: 14px; margin: 0; letter-spacing: .02em; }
.eyebrow-dark { color: var(--brass-text); font-weight: 600; font-size: 13px; margin: 0 0 4px; }
.lead-dark { color: var(--ink-2); font-size: 17px; margin: 0 0 20px; }
.back { color: var(--soft-on-dark); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.back:hover { color: #fff; }

/* Layout helpers */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.grid2, .grid3 { display: grid; gap: 16px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card p:last-child { margin-bottom: 0; }
.card-note { background: var(--warn-bg); border-color: #EAD9A6; }
.card-ok { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-bg); border-color: #BFDDD4; color: var(--ok-text); }
.step { display: inline-flex; width: 32px; height: 32px; border-radius: 16px; background: var(--ink); color: var(--brass); align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }
.price { font-family: var(--serif); font-size: 28px; margin: 4px 0 8px; }
.prose p { color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: 600 15px var(--sans); text-decoration: none; cursor: pointer; background: var(--surface); color: var(--ink); }
.btn-accent { background: var(--brass); color: var(--ink); }
.btn-accent:hover { background: #D9A52D; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262E52; color: #fff; }
.btn-line { border-color: var(--line-2); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: #4A5276; color: #fff; }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.btn-text, .btn-text:hover { background: none; border: 0; color: var(--ink-2); text-decoration: underline; padding: 0 8px; min-height: 44px; cursor: pointer; font: inherit; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-big { min-height: 56px; font-size: 17px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type=email], input[type=text], input[type=date], input:not([type]), select, textarea {
  font: 500 16px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #7FA6E8; outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 8px 14px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.check:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-big { border-radius: 12px; }
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 17px; }
details[open] > summary { margin-bottom: 12px; }
.scale legend { font-size: 15px; color: var(--ink); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg-wrap { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-weight: 500; color: var(--ink); text-align: center; padding: 4px; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid #7FA6E8; outline-offset: 2px; }
.inline { display: inline; }

/* Tables and chips */
.table-box { overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 8px; }
td { padding: 14px 8px; border-top: 1px solid #ECEDF2; }
.chip { display: inline-flex; padding: 4px 10px; border-radius: 12px; background: #E8E9F0; color: #3A4058; font-weight: 600; font-size: 13px; }
.chip-ok { background: var(--ok-bg); color: var(--ok-text); }
.chip-warn { background: var(--warn-bg); color: var(--warn-text); }
.plain { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-top: 1px solid #ECEDF2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.list li:first-child { border-top: 0; }

/* Request flow */
.waves { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.waves li { display: flex; align-items: center; gap: 10px; color: var(--soft-on-dark); }
.waves span { width: 24px; height: 24px; border-radius: 12px; border: 2px solid #5E6478; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.waves .done { color: #fff; }
.waves .done span { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.waves .now { color: #fff; }
.waves .now span { border-color: var(--brass); }
.cand-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.cand-top { border: 2px solid var(--brass); }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: #E8E9F0; color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar-big { width: 64px; height: 64px; border-radius: 32px; background: var(--night-2); color: #fff; border: 2px solid var(--brass); font-family: var(--serif); font-size: 22px; }
.reasons { margin: 0 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.req h3 { font-size: 26px; margin: 2px 0 12px; }
.facts { margin: 0 0 12px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #ECEDF2; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.ok-line { display: flex; gap: 8px; align-items: center; background: var(--ok-bg); color: var(--ok-text); border-radius: 12px; padding: 10px 12px; font-weight: 500; }

/* Ensembles */
.presets { margin-bottom: 16px; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.seat { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg); border-radius: 10px; padding: 6px 6px 6px 12px; font-weight: 500; color: var(--ink); }
.seat input { width: 64px; min-height: 40px; text-align: center; padding: 6px; }
.progress { height: 10px; border-radius: 5px; background: var(--night-2); margin-top: 16px; max-width: 520px; }
.progress div { height: 10px; border-radius: 5px; background: var(--brass); }
.proj-row { justify-content: space-between; }

/* Career */
.profile-head { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.profile-head h1 { margin: 0 0 4px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0 8px; max-width: 520px; }
.stats div { background: var(--night-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.stats strong { color: var(--brass); font-size: 24px; }
.stats span { color: var(--soft-on-dark); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 32px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); }
.bar div { height: 8px; border-radius: 4px; background: var(--ink); }
.bar-val { font-weight: 600; text-align: right; }
.hist { display: flex; gap: 12px; align-items: flex-start; color: #1F6E61; }
.hist strong, .hist .muted { color: inherit; }
.hist strong { color: var(--ink); }
.hist .muted { color: var(--muted); }
.declared { color: var(--muted); border-style: dashed; }
.reply { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.reply label { width: 100%; }

@media (max-width: 520px) {
  .hero { padding: 28px 0 40px; }
  .nav a { padding: 10px 8px; font-size: 14px; }
  .bar-row { grid-template-columns: 100px 1fr 28px; }
}
