/* Стили страницы AI Coach. Меняйте цвета и общую типографику в :root. */

/* 01. Основные цвета, шрифты и сброс */
:root {
  font-family: Inter, Arial, sans-serif;
  color: #172a2d;
  background: #f7f9f9;
  font-synthesis: none;
  --green: #07564b;
  --lime: #d5f66c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #719c2f;
  outline-offset: 4px;
}
/* 02. Шапка и логотип */
header {
  height: 90px;
  background: white;
  border-bottom: 1px solid #e0e7e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5vw, 24px);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--green);
  text-decoration: none;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--lime);
  border-radius: 7px;
  font-size: 23px;
}
.brand-icon span {
  font-size: 16px;
  margin-left: -3px;
}
.brand-divider {
  height: 24px;
  width: 1px;
  background: #d9e1df;
  margin: 0 7px;
}
.product {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  color: #667675;
}
.pill {
  font-size: 13px;
  background: #f1f5f4;
  border: 1px solid #e1e8e6;
  border-radius: 20px;
  padding: 8px 13px;
  color: #526360;
}
/* 03. Основная сетка и вводный блок */
main {
  max-width: 1320px;
  margin: auto;
  padding: 50px max(5vw, 24px) 0;
}
.intro {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 60px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--green);
}
h1 {
  font-size: clamp(36px, 4.2vw, 55px);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -2px;
  margin: 20px 0;
}
h1 span {
  color: var(--green);
}
p {
  font-size: 16px;
  line-height: 1.6;
  color: #657472;
}
.intro > div > p {
  max-width: 590px;
  margin-bottom: 26px;
}
#general {
  visibility: hidden;
}
.primary {
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 7px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.primary:hover {
  background: #063e36;
}
.primary span {
  font-size: 20px;
  font-weight: 400;
}
aside {
  background: #0b443d;
  color: white;
  padding: 30px 32px;
  border-radius: 12px;
  border-top: 4px solid var(--lime);
}
.aside-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--lime);
}
aside h2 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  font-weight: 500;
  margin: 18px 0 24px;
}
ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 17px;
}
ol li {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
}
ol b {
  color: var(--lime);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #507267;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
}
aside p {
  font-size: 14px;
  color: #c0d1c9;
  border-top: 1px solid #3c6259;
  padding-top: 18px;
  margin: 24px 0 0;
}
/* 04. Библиотека ралли и таблица */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}
h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.6px;
}
.count {
  background: #e4eee9;
  font-size: 14px;
  vertical-align: middle;
  padding: 5px 9px;
  border-radius: 6px;
  margin-left: 8px;
  color: var(--green);
}
.section-heading p {
  font-size: 14px;
  margin: 8px 0 0;
}
.legend {
  color: #798681;
  font-size: 13px;
}
.table-wrap {
  border: 1px solid #dfe7e4;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  background: #edf2f0;
  font-size: 12px;
  letter-spacing: 1px;
  color: #687773;
  font-weight: 600;
  padding: 17px 25px;
}
td {
  padding: 17px 25px;
  border-top: 1px solid #e7edeb;
  font-size: 14px;
}
tbody tr:hover {
  background: #fafcfb;
}
.rally-name {
  font-weight: 650;
  white-space: nowrap;
}
.rally-number {
  font-size: 12px;
  color: #95a59e;
  font-weight: 400;
  display: inline-block;
  width: 35px;
}
.asset {
  border: 0;
  background: transparent;
  color: #8a9893;
  padding: 0;
  text-align: left;
  font-size: 14px;
  cursor: default;
}
.asset small {
  display: block;
  font-size: 12px;
  color: #8c9692;
  margin-top: 4px;
}
.comment {
  border: 1px solid #ceddd6;
  border-radius: 6px;
  padding: 9px 12px;
  background: white;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.comment:hover {
  background: #edf5ed;
  border-color: #77a394;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #84918b;
  font-size: 12px;
  padding: 30px 0;
}
/* 05. Анкета, поля и сообщения */
dialog {
  border: 0;
  border-radius: 14px;
  padding: 27px 34px 32px;
  width: min(700px, calc(100% - 24px));
  max-height: 92dvh;
  color: #172a2d;
  box-shadow: 0 24px 100px #00291e38;
}
dialog::backdrop {
  background: #0a292a85;
  backdrop-filter: blur(4px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.icon-button {
  border: 0;
  background: #f0f4f2;
  color: #4f625b;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-size: 25px;
}
dialog h2 {
  font-size: 28px;
  line-height: 1.2;
}
.form-intro {
  font-size: 14px;
  margin: 10px 0 26px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 25px;
}
legend,
.question {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.required {
  color: var(--green);
}
.rating {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.rating label {
  flex: 1;
  position: relative;
}
.rating input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.rating span {
  display: grid;
  place-items: center;
  border: 1px solid #cbd8d2;
  border-radius: 6px;
  height: 46px;
  font-size: 18px;
  cursor: pointer;
}
.rating input:checked + span {
  background: var(--green);
  color: var(--lime);
  border-color: var(--green);
}
.rating input:focus-visible + span {
  outline: 3px solid #719c2f;
  outline-offset: 2px;
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #748379;
  margin-top: 8px;
  gap: 12px;
}
.question {
  display: block;
  margin: 22px 0 10px;
}
textarea,
input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  border: 1px solid #d3ded8;
  border-radius: 6px;
  padding: 12px;
  color: #172a2d;
  background: #fcfdfc;
  font-size: 14px;
  line-height: 1.5;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
textarea::placeholder,
input::placeholder {
  color: #8e9a94;
}
.optional-title {
  border-top: 1px solid #e0e7e3;
  margin: 28px 0 18px;
  padding-top: 22px;
  font-size: 12px;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.optional-title span {
  font-weight: 400;
  letter-spacing: 0;
  color: #859188;
  margin-left: 10px;
}
.identity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.identity label {
  font-size: 14px;
  font-weight: 500;
}
.identity input {
  margin-top: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 18px;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.submit-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}
.submit-area p {
  font-size: 12px;
  max-width: 220px;
  margin: 0;
}
.submit-area .primary {
  white-space: nowrap;
}
#success-view {
  text-align: center;
  padding: 20px 0 35px;
}
#success-view p {
  font-size: 15px;
}
.success-icon {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 30px;
  margin: 0 auto 25px;
}
#success-view .primary {
  margin-top: 20px;
}
/* 06. Адаптация под размеры экрана */
@media (min-width: 1500px) {
  main {
    padding-left: 40px;
    padding-right: 40px;
  }
}
@media (max-width: 800px) {
  header {
    height: 74px;
  }
  .intro {
    gap: 30px;
    grid-template-columns: 1.2fr 1fr;
  }
  aside {
    padding: 24px;
  }
  .brand {
    font-size: 20px;
  }
  .pill {
    font-size: 12px;
  }
  .product,
  .brand-divider {
    display: none;
  }
  main {
    padding-top: 32px;
  }
  th,
  td {
    padding: 15px 16px;
  }
  .comment {
    white-space: normal;
  }
  .rally-number {
    display: none;
  }
}
@media (max-width: 600px) {
  header {
    padding: 0 18px;
  }
  .pill {
    max-width: 135px;
    text-align: center;
    font-size: 12px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 34px;
  }
  h1 {
    font-size: 39px;
    letter-spacing: -1.5px;
  }
  aside {
    padding: 22px;
  }
  aside h2 {
    font-size: 23px;
  }
  aside h2 br {
    display: none;
  }
  main {
    padding: 30px 18px 0;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  th,
  td {
    padding: 13px 8px;
  }
  th {
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  td,
  .asset,
  .comment {
    font-size: 12px;
  }
  .comment {
    padding: 8px;
  }
  .asset small {
    font-size: 11px;
  }
  .rally-name {
    white-space: normal;
  }
  .table-wrap {
    border-radius: 7px;
  }
  footer {
    gap: 20px;
    font-size: 11px;
  }
  dialog {
    padding: 22px 20px;
  }
  dialog h2 {
    font-size: 25px;
  }
  .identity {
    grid-template-columns: 1fr;
  }
  .submit-area {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .submit-area p {
    max-width: none;
    text-align: center;
  }
  .question,
  legend {
    font-size: 14px;
  }
}

.brand-logo {
  display: block;
  width: 145px;
  height: auto;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .brand-logo {
    width: 122px;
  }
}

a.asset {
  color: var(--green);
  cursor: pointer;
  text-decoration: none;
}
a.asset:hover {
  text-decoration: underline;
}

.primary:disabled {
  opacity: 0.65;
  cursor: wait;
}
/* Состояния формы */
.form-error {
  color: #a32626;
}
