:root {
  --font: Gilroy, Manrope, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --text: #3e3e59;
  --muted: #5c5c73;
  --label: #8d8da6;
  --line: #e6e6ef;
  --bg: #f8f8fc;
  --white: #ffffff;
  --header: #363676;
  --avatar: #474787;
  --orange: #e86630;
  --badge: #2f2a85;
  --child: #feef1f;
  --tab-bg: #f0f0f7;
  --footer: #eae8f7;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --column: 1200px;
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
}

button,
input,
a {
  font-family: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

.page-header {
  background: var(--header);
  color: var(--white);
}

.page-header__inner,
.page,
.hero__inner,
.page-footer__inner {
  width: min(var(--column), calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.status-bar {
  display: none;
}

.page-header__inner {
  display: flex;
  align-items: center;
  height: 50px;
}

.page-header__logo {
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}

.page-header__logo img,
.page-header__avatar img,
.page-header__menu img {
  width: auto;
  height: auto;
}

.page-header__nav {
  display: flex;
  align-items: center;
  height: 46px;
  margin-left: 136px;
}

.page-header__link {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 32px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  line-height: 22.5px;
  text-decoration: none;
}

.page-header__user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.page-header__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.page-header__name {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 16.8px;
  letter-spacing: 0;
}

.page-header__menu {
  display: none;
}

.page-header__menu {
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-header__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar);
}

.hero {
  position: relative;
  overflow: hidden;
  background-color: #3c3a86;
  background-image: url("../assets/backgroundRing.png");
  background-repeat: no-repeat;
  background-size: 1919px 166px;
  background-position: 56.25% center;
  color: var(--white);
}

.hero__inner {
  position: static;
  display: flex;
  align-items: center;
  min-height: 166px;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
}

.hero__lead {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 48px;
}

.help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  min-height: 100px;
  padding: 16px 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.help__service {
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
  max-width: 220px;
}

.help__service img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.help__service p,
.action span {
  font-size: 12px;
  font-weight: 600;
  line-height: 150%;
  letter-spacing: 9%;
  text-transform: uppercase;
}

.help__service p {
  max-width: 140px;
}

.help__phones {
  display: contents;
}

.help__phone {
  display: flex;
  align-items: center;
  order: 2;
  color: inherit;
  text-decoration: none;
}

.help__phone--plain {
  order: 3;
}

.help__phone-label {
  order: 4;
  flex: none;
  color: var(--label);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.help__phone-value {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  white-space: nowrap;
}

.help__phone-value img {
  width: 24px;
  height: 24px;
}

.help__phone-value span {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.block__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
}

.add-policy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.add-policy__plus {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
}

.switcher__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.switcher__tabs {
  display: inline-flex;
  gap: 4px;
  width: max-content;
  padding: 4px;
  border-radius: 10px;
  background: var(--tab-bg);
}

.switcher__tab {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.switcher:has(#policies-active:checked) .switcher__tab[for="policies-active"],
.switcher:has(#kids-active:checked) .switcher__tab[for="kids-active"],
.switcher:has(#policies-archive:checked) .switcher__tab[for="policies-archive"],
.switcher:has(#kids-archive:checked) .switcher__tab[for="kids-archive"] {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(62, 62, 89, 0.08);
}

.switcher__panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.switcher__panel--archive {
  display: none;
}

.switcher:has(#policies-archive:checked) .switcher__panel--active,
.switcher:has(#kids-archive:checked) .switcher__panel--active {
  display: none;
}

.switcher:has(#policies-archive:checked) .switcher__panel--archive,
.switcher:has(#kids-archive:checked) .switcher__panel--archive {
  display: flex;
}

.empty {
  padding: 28px 0;
  color: var(--muted);
  font-size: 16px;
}

.policy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
  padding: 28px 24px 20px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.policy-card__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--badge);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.policy-card__badge--child {
  background: var(--child);
  color: var(--text);
}

.policy-card__top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "number term"
    "owner term";
  column-gap: 24px;
  align-items: start;
}

.policy-card__number {
  grid-area: number;
  font-size: 20px;
  font-weight: 700;
  line-height: 140%;
}

.policy-card__owner {
  grid-area: owner;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.policy-card__term {
  grid-area: term;
  text-align: right;
}

.policy-card__term-label {
  color: var(--text);
  font-size: 17px;
  line-height: 140%;
  font-weight: 700;
}

.policy-card__term-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

.policy-card__term-value img {
  flex: none;
  width: 16px;
  height: 16px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 104px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-decoration: none;
}

.action img {
  flex: none;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.show-all {
  display: flex;
  justify-content: center;
}

.show-all a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  text-decoration: none;
}

.news {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.news-card__cover {
  width: 100%;
  height: 188px;
  object-fit: cover;
}

.news-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
}

.news-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.news-card__text {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.news-card__more {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-decoration: none;
  text-transform: uppercase;
}

.news-card__more--fill {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--white);
}

.news-all {
  display: none;
}

.page-footer {
  padding: 24px 0;
  background: var(--footer);
}

.page-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 39px;
}

.page-footer__logo img {
  width: 39px;
  height: 39px;
}

.page-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--muted);
  text-align: right;
}

.page-footer__copy {
  font-size: 13px;
  line-height: 18px;
}

.page-footer__policy {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  text-decoration: none;
}

@media (max-width: 1440px) {
  .page-header__inner,
  .page,
  .hero__inner {
    width: min(1060px, calc(100% - 68px));
  }

  .page-footer__inner {
    width: min(720px, calc(100% - 68px));
  }

  .page-header__nav {
    margin-left: 66px;
  }

  .help {
    min-height: 124px;
    padding: 18px 24px;
  }

  .help__phones {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "label ."
      "phone phone2";
    column-gap: 32px;
    row-gap: 4px;
    align-items: end;
    justify-content: end;
  }

  .help__phone-label {
    grid-area: label;
    order: 0;
  }

  .help__phone {
    grid-area: phone;
    order: 0;
  }

  .help__phone--plain {
    grid-area: phone2;
  }

  .help__phones {
    margin-right: 140px;
  }
}

@media (max-width: 1200px) {
  .page-header__nav {
    margin-left: 24px;
  }

  .page-header__link {
    padding: 0 16px;
  }

  .actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .help {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    gap: 16px;
  }

  .help__service,
  .help__service p {
    max-width: none;
  }

  .help__phones {
    justify-content: start;
    margin-right: 0;
  }
}

@media (min-width: 1920px) {
  .hero {
    background-size: cover;
    background-position: center center;
  }
}

@media (max-width: 768px) {
  .page-header__nav {
    display: none;
  }

  .hero__title {
    font-size: 26px;
    line-height: 32px;
  }

  .hero__lead {
    font-size: 18px;
    line-height: 24px;
  }

  .help {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    min-height: 0;
    padding: 18px 20px;
  }

  .help__service,
  .help__service p {
    max-width: none;
  }

  .news {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .action:nth-child(-n+3) {
    grid-column: span 2;
  }

  .action:nth-child(n+4) {
    grid-column: span 3;
  }

  .block__title {
    font-size: 24px;
    line-height: 30px;
  }

  .help__phones {
    column-gap: 12px;
  }
}

@media (max-width: 640px) {
  .help__phones {
    column-gap: 10px;
  }

  .help__phone-value {
    gap: 6px;
    font-size: 16px;
    line-height: 22px;
  }

  .help__phone-value img {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .help {
    padding-right: 12px;
    padding-left: 12px;
  }

  .help__phones {
    column-gap: 8px;
  }

  .help__phone-label {
    font-size: 10px;
    line-height: 13px;
  }

  .help__phone-value {
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
  }

  .help__phone-value img {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 520px) {
  .action {
    gap: 8px;
    min-height: 80px;
    padding: 10px 12px;
  }

  .action img {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .action {
    justify-content: flex-start;
    min-height: 56px;
    padding: 12px 14px;
  }

  .action img {
    display: none;
  }
}

@media (max-width: 700px) {
  .hero__copy {
    max-width: calc(100% - 120px);
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action:nth-child(-n+3),
  .action:nth-child(n+4) {
    grid-column: auto;
  }

  .policy-card__top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "number"
      "term"
      "owner";
    row-gap: 5px;
  }

  .policy-card__owner {
    margin-top: 0;
  }

  .policy-card__term,
  .policy-card__term-value {
    text-align: left;
    justify-content: flex-start;
  }

  .action:nth-child(5) {
    grid-column: 1 / -1;
  }

  .add-policy__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .news {
    grid-template-columns: 1fr;
  }

  .news-card__more {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 425px) {
  .page {
    width: calc(100% - 32px);
  }

  .page-header__inner {
    width: calc(100% - 32px);
  }

  .hero__inner {
    width: calc(100% - 32px);
  }

  .page-footer__inner {
    width: calc(100% - 32px);
  }

  .page-header__menu {
    display: none;
  }

  .status-bar {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 47px;
    padding: 0 14px 8px 22px;
    color: var(--white);
  }

  .status-bar__time {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.3px;
  }

  .status-bar__notch {
    position: absolute;
    top: 0;
    left: 50%;
    width: 126px;
    height: 30px;
    transform: translateX(-50%);
    border-radius: 0 0 18px 18px;
    background: #000;
  }

  .status-bar__icons {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .status-bar__icons svg {
    display: block;
  }

  .hero {
    display: none;
  }

  .help {
    align-items: center;
    margin-top: 16px;
    padding: 18px 16px 16px;
    text-align: center;
  }

  .help__service {
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .help__service::before,
  .help__service::after {
    content: "";
    flex: 1 1 12px;
    height: 1px;
    background: #d5d5e4;
  }

  .help__service img {
    display: none;
  }

  .help__phones {
    justify-content: center;
    column-gap: 12px;
    width: 100%;
  }

  .help__phone-label {
    justify-self: start;
    font-size: 10px;
    line-height: 13px;
  }

  .help__phone-value {
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
  }

  .help__phone-value img {
    width: 14px;
    height: 14px;
  }

  .block__title {
    font-size: 22px;
    line-height: 28px;
  }

  .add-policy {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    gap: 0;
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .switcher__panel {
    margin-top: 32px;
  }

  .switcher__panel > .policy-card:first-child {
    margin-top: 0;
  }

  .action {
    justify-content: flex-start;
    min-height: 56px;
    padding: 12px;
  }

  .action img {
    display: none;
  }

  .news-card:nth-child(n + 2) {
    display: none;
  }

  .news-all {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-width: 180px;
    height: 44px;
    margin-top: 4px;
    padding: 0 28px;
    border-radius: 8px;
    background: var(--orange);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    text-decoration: none;
    width: 100%;
  }

  .policy-card {
    padding: 24px 16px 16px;
  }

  .page-header__avatar {
    background: none;
  }

  .page-header__profile {
    flex-flow: row-reverse;
    gap: 3px;
  }
}
