@charset "UTF-8";

/* anketa.mgermo.ru — компактная сетка, версия 3 от 03.11.2026.
   Совместимо с index.html и JS из profile-form-split.
   Заглушка фотографии и индикатор обработки не требуют изображений. */

:root {
  color-scheme: light;
  --page-bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #1c2b41;
  --muted: #63728a;
  --line: #d9e1ed;
  --line-soft: #e8edf4;
  --control-line: #9eafc7;
  --control-bg: #f8faff;
  --accent: #235cb5;
  --accent-hover: #17478f;
  --accent-soft: #edf4ff;
  --danger: #b32c42;
  --danger-soft: #fff5f7;
  --focus-ring: 0 0 0 3px rgb(35 92 181 / 19%);
  --section-rail: 188px;
  --section-pad: 24px;
  --gap: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; scroll-padding-top: 20px; }
body { min-width: 280px; margin: 0; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
[hidden], .is-hidden { display: none !important; }
template { display: none; }
h1, h2, p { margin: 0; }

/* Общие оси заголовков и полей во всех разделах. */
.page { width: min(1184px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 44px; }
.hero { padding-bottom: 18px; }
.hero h1 { font-size: clamp(25px, 3vw, 30px); line-height: 1.2; font-weight: 700; letter-spacing: -0.035em; }
#profileForm { counter-reset: form-section; overflow: hidden; border: 1px solid #cbd6e6; border-radius: 12px; background: var(--surface); box-shadow: 0 5px 20px rgb(28 43 65 / 4%); }
.section-card, .result-card { display: grid; grid-template-columns: var(--section-rail) minmax(0, 1fr); min-width: 0; scroll-margin-top: 20px; }
.section-card { counter-increment: form-section; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 23px minmax(0, 1fr); align-content: start; gap: 10px; min-width: 0; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.section-head h2 { min-width: 0; font-size: 11px; line-height: 1.6; font-weight: 700; letter-spacing: 0.045em; overflow-wrap: anywhere; }
#profileForm > .section-card > .section-head::before { content: counter(form-section, decimal-leading-zero); padding-top: 1px; color: #7d8da5; font-size: 11px; line-height: 1.6; font-weight: 600; font-variant-numeric: tabular-nums; }
.section-body { min-width: 0; padding: 22px var(--section-pad); }
.fields-grid, .repeat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--gap); }
.fields-grid > *, .repeat-grid > *, .section-body > *, .conditional > * { min-width: 0; }
.field, .field-full { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label, .field-full > label, .photo-field > label { display: block; min-height: 18px; margin-bottom: 6px; color: #45566f; font-size: 12px; line-height: 18px; font-weight: 600; overflow-wrap: anywhere; }
.field:focus-within > label, .field-full:focus-within > label, .photo-field:focus-within > label { color: var(--accent); }

/* Видимые границы, заливка и явный фокус интерактивных элементов. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: var(--control-bg);
  box-shadow: inset 0 1px 2px rgb(28 43 65 / 3%);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 130ms ease, background-color 130ms ease, box-shadow 130ms ease;
}
input::placeholder, textarea::placeholder { color: #738199; opacity: 1; }
select { padding-right: 28px; cursor: pointer; }
textarea { min-height: 150px; resize: vertical; overflow-wrap: anywhere; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #537bb4; background: #fff; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, select:focus, textarea:focus { border-color: var(--accent); background: #fff; box-shadow: var(--focus-ring); }
input:not([type="checkbox"]):not([type="radio"]):disabled, select:disabled, textarea:disabled { border-color: #dde3ed; color: #8a95a6; background: #f0f2f6; box-shadow: none; opacity: 1; -webkit-text-fill-color: #8a95a6; }
.field:has(> input:disabled) > label, .field:has(> select:disabled) > label { color: #8590a1; }
input[type="checkbox"], input[type="radio"] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Фото, ФИО и рождение — одна сетка, без независимых плавающих блоков. */
#personal > .section-body { display: grid; grid-template-columns: 112px repeat(3, minmax(0, 1fr)); grid-template-rows: max-content max-content minmax(0, 1fr); align-items: start; align-content: start; gap: 12px 16px; }
#personal .personal-intro, #personal .personal-name-grid, #personal .personal-rest-grid { display: contents; }
.photo-subsection { grid-column: 1; grid-row: 1 / span 3; width: 112px; min-width: 0; }
.personal-name-grid > .field:has(#lastName) { grid-column: 2; grid-row: 1; }
.personal-name-grid > .field:has(#firstName) { grid-column: 3; grid-row: 1; }
.personal-name-grid > .field:has(#middleName) { grid-column: 4; grid-row: 1; }
.personal-name-grid > .field:has(#birthDate) { grid-column: 2; grid-row: 2; }
.personal-rest-grid > .field-full { grid-column: 3 / -1; grid-row: 2; }
.photo-field { width: 100%; }
.personal-name-grid > .field > label, .personal-rest-grid > .field-full > label, .photo-field > label { display: flex; align-items: center; min-height: 24px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; min-height: 24px; margin-bottom: 6px; }
.field-label-row > label:not(.plain-check) { color: #45566f; font-size: 12px; line-height: 18px; font-weight: 600; }
.field:focus-within > .field-label-row > label:not(.plain-check) { color: var(--accent); }
.field-label-row .plain-check { min-height: 20px; padding: 1px 2px; white-space: nowrap; }
.photo-upload-card { display: block; width: 100%; margin: 0; padding: 4px; border: 1px dashed #7299cf; border-radius: 7px; background: var(--accent-soft); transition: border-color 130ms ease, box-shadow 130ms ease; }
.photo-upload-card:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(35 92 181 / 12%); }
.photo-frame { display: block; position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid #d9e3f1; border-radius: 3px; background: #eaf0f8; }
.photo-frame::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 32%, #bac9df 0 18%, transparent 18.7%), radial-gradient(ellipse 43% 40% at 50% 86%, #bac9df 0 99%, transparent 100%); }
.photo-frame img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.photo-frame img[src="human.svg"], .photo-frame img[src$="/human.svg"], .photo-frame img.is-loading-indicator { visibility: hidden; }
.photo-frame.is-loading::before { opacity: 0.2; }
.photo-frame.is-loading::after { content: ""; position: absolute; left: calc(50% - 15px); top: calc(50% - 15px); width: 30px; height: 30px; border: 3px solid #cbd9ec; border-top-color: var(--accent); border-radius: 50%; animation: photo-spin 800ms linear infinite; pointer-events: none; }
@keyframes photo-spin { to { transform: rotate(360deg); } }

/* Широкие наименования и короткие годы занимают подходящие им колонки. */
#education .fields-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#education .fields-grid > .field:has(#educationLevel), #education .fields-grid > .field:has(#institution), #education .fields-grid > .field:has(#scienceDegree) { grid-column: span 2; }
#education .fields-grid > .field-full:has(#speciality) { grid-column: 1 / -1; }
.conditional { display: none; grid-column: 1 / -1; min-width: 0; }
.conditional.is-visible { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--gap); }
#otherDegreeWrap { grid-column: 1 / -1; }
#otherDegreeWrap.is-visible { grid-template-columns: minmax(0, 1fr); }

/* Переключатель и относящиеся к нему поля находятся на одной строке. */
.politics-grid { grid-template-columns: 168px minmax(0, 1fr); gap: 16px 20px; }
.politics-grid > .field-full { grid-column: 1; }
.politics-grid > .field-full:first-child { grid-row: 1; }
.politics-grid > .field-full:nth-child(3) { grid-row: 2; }
#deputyWrap { grid-column: 2; grid-row: 1; }
#partyWrap { grid-column: 2; grid-row: 2; }
.radio-toggle { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; width: 160px; max-width: 100%; padding: 3px; border: 1px solid #a6b8d0; border-radius: 7px; background: #eaf0f8; }
.toggle-item { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; min-width: 0; margin: 0; padding: 6px 10px; border: 1px solid transparent; border-radius: 4px; background: #fff; color: #4e627e; font-size: 13px; line-height: 18px; font-weight: 600; cursor: pointer; user-select: none; }
.toggle-item:hover { border-color: #7398cd; color: var(--accent); }
.toggle-item:has(input:checked) { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgb(35 92 181 / 16%); }
.toggle-item input[type="radio"] { appearance: none; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; color: inherit; background: transparent; }
.toggle-item input[type="radio"]:checked { background: radial-gradient(circle, currentColor 0 36%, transparent 40%); }
.toggle-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggle-item input[type="radio"]:focus-visible { outline: none; }
.under-input-check { margin-top: 5px; }
.plain-check { display: inline-flex; align-items: flex-start; gap: 6px; min-height: 24px; max-width: 100%; margin: 0; padding: 3px 4px; border: 1px solid transparent; border-radius: 4px; color: #5d6e86; font-size: 11px; line-height: 16px; font-weight: 400; cursor: pointer; user-select: none; }
.plain-check input { width: 14px; height: 14px; margin-top: 1px; }
.plain-check span { min-width: 0; overflow-wrap: anywhere; }
.plain-check:hover { border-color: #b4c9e7; color: var(--accent); background: var(--accent-soft); }
.plain-check:has(input:checked) { border-color: #bbcfec; color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.plain-check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.under-input-check--wide { width: 100%; }
.plain-check--wide { width: fit-content; }
.toggle-block-btn { display: flex; align-items: flex-start; gap: 9px; width: fit-content; max-width: 100%; min-height: 36px; padding: 8px 11px; border: 1px solid #9fb5d2; border-radius: 6px; color: #405777; background: #f5f8fe; font-size: 12px; line-height: 18px; font-weight: 500; cursor: pointer; user-select: none; }
.toggle-block-btn input { margin-top: 1px; }
.toggle-block-btn span { min-width: 0; overflow-wrap: anywhere; }
.toggle-block-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.toggle-block-btn.is-active, .toggle-block-btn:has(input:checked) { border-color: #729bd4; color: var(--accent-hover); background: #e4efff; box-shadow: inset 3px 0 0 var(--accent); }
.toggle-block-btn:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Крупный выбор состава архива с отдельным обязательным блоком заслуг. */
.award-generation-control { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--control-line); border-radius: 9px; background: var(--surface-soft); }
.award-generation-control.is-enabled { border-color: #7fa4da; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.award-generation-copy { min-width: 0; }
.award-generation-title { display: block; color: var(--text); font-size: 16px; line-height: 1.4; font-weight: 700; }
.award-generation-hint { margin-top: 5px; color: #5b7090; font-size: 12px; line-height: 18px; }
.award-generation-control .radio-toggle-large { flex: 0 0 208px; width: 208px; padding: 4px; gap: 4px; }
.radio-toggle-large .toggle-item { min-height: 48px; padding: 12px 16px; gap: 10px; font-size: 15px; line-height: 22px; }
.radio-toggle-large .toggle-item input[type="radio"] { width: 18px; height: 18px; }
.award-details.is-visible { grid-template-columns: minmax(0, 1fr); margin-top: 18px; }
.required-mark { margin-left: 3px; color: var(--danger); font-weight: 700; }

/* Записи объединены в компактную группу с разделителями строк. */
.repeat-list { display: grid; gap: 0; min-width: 0; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.repeat-list:empty { display: none; }
.repeat-item { min-width: 0; padding: 10px 14px 12px; background: #fff; }
.repeat-item + .repeat-item { border-top: 1px solid var(--line); }
.repeat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 8px; }
.repeat-title { color: #73839b; font-size: 11px; line-height: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.repeat-grid { gap: 12px; }
.repeat-grid-employment { grid-template-columns: 136px 136px minmax(0, 1fr) minmax(0, 1fr); }
.repeat-grid-public { grid-template-columns: 136px 136px minmax(0, 1fr); }
.repeat-grid-public > .field-full { grid-column: 3; }
.repeat-grid-awards { grid-template-columns: 136px minmax(0, 1fr); }
.repeat-actions { margin-top: 10px; }
.is-disabled { opacity: 0.55; }

/* Цветная заливка, контрастная граница и заметный клавиатурный фокус. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; max-width: 100%; padding: 8px 14px; border: 1px solid #91abd0; border-radius: 6px; color: #2c548b; background: #eef4ff; font-size: 12px; line-height: 18px; font-weight: 600; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; transition: border-color 130ms ease, background-color 130ms ease, color 130ms ease, box-shadow 130ms ease; }
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-hover); background: #dfeaff; }
.btn:active:not(:disabled), .photo-upload-card:active { transform: translateY(1px); }
.btn:focus-visible, .photo-upload-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: var(--focus-ring); }
.btn:disabled { border-color: #dce3ee; color: #8a95a6; background: #eef1f6; box-shadow: none; opacity: 1; }
.btn-primary { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 2px 4px rgb(35 92 181 / 13%); }
.btn-primary:hover:not(:disabled) { border-color: var(--accent-hover); color: #fff; background: var(--accent-hover); }
.btn-secondary { border-color: #9bb0cd; color: #385b8d; background: #fff; }
.btn-secondary:hover:not(:disabled) { background: #eef4ff; }
.btn-ghost { border-color: #94b2de; color: #24549c; background: #edf4ff; }
.btn-danger { border-color: #dca2ae; color: var(--danger); background: #fff7f9; }
.btn-danger:hover:not(:disabled) { border-color: var(--danger); color: #982039; background: #fce4ea; }
.btn-inline { min-height: 28px; padding: 4px 9px; font-size: 11px; }
.btn-wide { min-width: 158px; }
.btn-wide::before { content: "+"; font-size: 17px; line-height: 16px; font-weight: 400; }
.btn-photo { width: 100%; min-height: 32px; margin-top: 6px; padding: 6px 4px; font-size: 11px; line-height: 18px; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px var(--section-pad); padding-left: calc(var(--section-rail) + var(--section-pad)); background: #f8faff; }
.form-footer .btn { min-height: 40px; padding: 10px 18px; font-size: 13px; }
.form-footer .btn-primary { min-width: 164px; }
.form-footer .btn-secondary { min-width: 112px; }

/* Ошибки остаются рядом со своим полем и не расширяют колонки. */
.error-text { display: none; min-width: 0; margin-top: 5px; color: var(--danger); font-size: 11px; line-height: 16px; font-weight: 400; overflow-wrap: anywhere; }
.error-text:not(:empty) { display: block; }
.has-error input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .has-error select, .has-error textarea { border-color: var(--danger); background: #fffbfc; }
.has-error input:focus, .has-error select:focus, .has-error textarea:focus { box-shadow: 0 0 0 3px rgb(179 44 66 / 15%); }
.photo-field.has-error .photo-upload-card { border-color: var(--danger); background: var(--danger-soft); }
.section-error:not(:empty) { margin-top: 10px; padding: 8px 10px; border: 1px solid #e4b8c2; border-radius: 5px; background: var(--danger-soft); }
.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.field-meta .error-text { flex: 1; margin-top: 0; }
.char-counter { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.char-counter.is-limit { color: var(--danger); font-weight: 600; }
.result-card { margin-top: 16px; overflow: hidden; border: 1px solid #b9cde8; border-radius: 9px; background: #fff; }
.result-card .section-head { grid-template-columns: minmax(0, 1fr); }
#resultBox { max-height: 360px; margin: 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; color: #334c6e; background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }

@media (max-width: 1100px) {
  .repeat-grid-employment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #partyWrap.is-visible { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  :root { --section-pad: 20px; }
  .page { width: calc(100% - 32px); padding-top: 24px; }
  .section-card, .result-card { grid-template-columns: minmax(0, 1fr); }
  .section-head { grid-template-columns: 23px minmax(0, 1fr); gap: 10px; padding: 12px var(--section-pad); border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .section-head h2 { font-size: 11px; line-height: 18px; }
  .section-body { padding: 18px var(--section-pad); }
  .form-footer { padding-left: var(--section-pad); }
  .repeat-grid-employment { grid-template-columns: 136px 136px minmax(0, 1fr) minmax(0, 1fr); }
  #partyWrap.is-visible { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .repeat-grid-employment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #partyWrap.is-visible { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .repeat-grid-employment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repeat-grid-public { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repeat-grid-public > .field-full { grid-column: 1 / -1; }
  #personal > .section-body { grid-template-columns: 112px repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, max-content); }
  .photo-subsection { grid-row: 1 / span 3; }
  .personal-name-grid > .field:has(#lastName) { grid-column: 2; grid-row: 1; }
  .personal-name-grid > .field:has(#firstName) { grid-column: 3; grid-row: 1; }
  .personal-name-grid > .field:has(#middleName) { grid-column: 2; grid-row: 2; }
  .personal-name-grid > .field:has(#birthDate) { grid-column: 3; grid-row: 2; }
  .personal-rest-grid > .field-full { grid-column: 2 / -1; grid-row: 3; }
  #education .fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #education .fields-grid > .field-full:has(#speciality) { grid-column: 1 / -1; }
  .politics-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .politics-grid > .field-full { grid-column: 1; }
  .politics-grid > .field-full:first-child { grid-row: 1; }
  #deputyWrap { grid-column: 1; grid-row: 2; }
  .politics-grid > .field-full:nth-child(3) { grid-row: 3; padding-top: 6px; }
  #partyWrap { grid-column: 1; grid-row: 4; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { min-height: 44px; font-size: 16px; }
  .btn { min-height: 40px; }
  .toggle-item { min-height: 36px; }
  .btn-photo { min-height: 34px; font-size: 11px; }
  #degreeExtraWrap > .field > label { min-height: 36px; }
  .award-generation-control { gap: 14px; padding: 16px; }
  .award-generation-control .radio-toggle-large { flex-basis: 176px; width: 176px; }
}

@media (max-width: 540px) {
  :root { --section-pad: 14px; --gap: 14px; }
  .page { width: calc(100% - 20px); padding: 20px 0 32px; }
  .hero { padding-bottom: 14px; }
  .hero h1 { font-size: 25px; }
  #profileForm { border-radius: 8px; }
  .section-head { padding-top: 11px; padding-bottom: 11px; }
  .section-head h2 { letter-spacing: 0.025em; }
  .section-body { padding-top: 16px; padding-bottom: 16px; }
  #personal > .section-body { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: repeat(5, max-content); gap: 12px; }
  .photo-subsection { grid-column: 1; grid-row: 1 / span 3; width: 104px; }
  .personal-name-grid > .field:has(#lastName) { grid-column: 2; grid-row: 1; }
  .personal-name-grid > .field:has(#firstName) { grid-column: 2; grid-row: 2; }
  .personal-name-grid > .field:has(#middleName) { grid-column: 2; grid-row: 3; }
  .personal-name-grid > .field:has(#birthDate) { grid-column: 1 / -1; grid-row: 4; }
  .personal-rest-grid > .field-full { grid-column: 1 / -1; grid-row: 5; }
  .conditional.is-visible, #partyWrap.is-visible { grid-template-columns: minmax(0, 1fr); }
  #education .field:has(#eduStartDate) > label, #education .field:has(#eduEndDate) > label { min-height: 36px; }
  .repeat-grid-employment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repeat-grid-employment > .field:has([data-role="workPlace"]), .repeat-grid-employment > .field:has([data-role="position"]) { grid-column: 1 / -1; }
  .repeat-grid-awards { grid-template-columns: minmax(0, 1fr); }
  .repeat-item { padding: 10px 10px 12px; }
  .repeat-head { min-height: 36px; }
  .repeat-grid { column-gap: 10px; }
  .repeat-grid > .field:has([data-role="startYear"]) > label, .repeat-grid > .field:has([data-role="endYear"]) > label { min-height: 18px; }
  .plain-check--wide { padding-right: 0; padding-left: 0; }
  .btn-inline { min-height: 36px; padding: 8px 10px; }
  .toggle-block-btn { width: 100%; min-height: 42px; padding: 10px; }
  .repeat-actions .btn { width: 100%; min-height: 42px; }
  .form-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px var(--section-pad); }
  .form-footer .btn { width: 100%; min-width: 0; min-height: 44px; }
  .field-meta { gap: 8px; }
  #degreeExtraWrap > .field > label { min-height: 18px; }
  .award-generation-control { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .award-generation-control .radio-toggle-large { flex-basis: auto; width: 100%; }
  .radio-toggle-large .toggle-item { min-height: 46px; }
  .award-details.is-visible { margin-top: 14px; }
}

@media (max-width: 360px) {
  #personal > .section-body { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .photo-subsection { width: 88px; }
  .btn-photo { font-size: 10px; padding-right: 2px; padding-left: 2px; }
  .under-input-check .plain-check { padding-right: 0; padding-left: 0; }
  .repeat-grid-employment, .repeat-grid-public { grid-template-columns: minmax(0, 1fr); }
  .repeat-grid-public > .field-full { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .photo-frame.is-loading::after { animation: none; }
  .btn:active:not(:disabled), .photo-upload-card:active { transform: none; }
}

@media (forced-colors: active) {
  .btn, .photo-upload-card, .toggle-block-btn, .toggle-item { border-color: ButtonText; }
  .toggle-item:has(input:checked) { outline: 2px solid Highlight; outline-offset: -3px; }
}

@media print {
  :root, body { color: #000; background: #fff; }
  .page { width: 100%; margin: 0; padding: 0; }
  #profileForm { overflow: visible; border-color: #bbb; box-shadow: none; }
  .section-card { grid-template-columns: 160px minmax(0, 1fr); break-inside: avoid; }
  .section-head { background: #f6f6f6; }
  .form-footer, .repeat-actions, .js-remove-item, .btn-photo { display: none !important; }
  input, select, textarea { color: #000 !important; }
}
