.koralek-docs,
.koralek-docs * {
  box-sizing: border-box;
}

.koralek-docs {
  position: relative;
  overflow: hidden;
  padding: 90px 5% 105px;
  background:
    radial-gradient(circle at 4% 7%, rgba(255, 224, 102, .25) 0 155px, transparent 156px),
    radial-gradient(circle at 96% 88%, rgba(135, 206, 235, .22) 0 175px, transparent 176px),
    var(--k-paper);
  color: var(--k-ink);
  font-family: var(--k-font);
}

.koralek-docs::before,
.koralek-docs::after {
  position: absolute;
  z-index: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  box-shadow:
    inset 3px 3px 5px rgba(255,255,255,.65),
    inset -3px -4px 6px rgba(0,0,0,.13),
    2px 4px 6px rgba(0,0,0,.1);
  content: "";
}

.koralek-docs::before { top: 27%; left: 3%; background: var(--k-rose); }
.koralek-docs::after { right: 4%; bottom: 24%; background: var(--k-yellow); }

.koralek-docs__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--k-max);
  margin: 0 auto;
}

.kd-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 25px;
  align-items: end;
  margin-bottom: 46px;
}

.kd-hero h1 {
  max-width: 760px;
  margin: 0 0 12px;
  color: var(--k-ink);
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -.06em;
}

.kd-hero p {
  max-width: 655px;
  margin: 0;
  color: var(--k-muted);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.65;
}

.kd-hero__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 2px dashed rgba(39, 140, 98, .32);
  border-radius: var(--k-radius-pill);
  background: rgba(255,255,255,.58);
  color: var(--k-green);
  font-size: .88rem;
  font-weight: 900;
  white-space: nowrap;
}

.kd-hero__hint span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 224, 102, .68);
  font-size: 1rem;
}

.kd-section { margin-top: 68px; }

.kd-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.kd-section__title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0;
  color: var(--k-ink);
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -.04em;
}

.kd-section__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 224, 102, .68);
  font-size: 1.35rem;
}

.kd-section__icon--blue { background: rgba(135, 206, 235, .67); }
.kd-section__icon--rose { background: rgba(255, 170, 187, .56); }

.kd-section__description {
  max-width: 500px;
  margin: 0;
  color: var(--k-muted);
  font-size: .93rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: right;
}

.kd-main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 21px;
}

.kd-main-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 245px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(39, 140, 98, .1);
  border-radius: 27px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--k-shadow);
  text-decoration: none;
  transition: transform .28s ease, box-shadow .28s ease;
}

.kd-main-card:hover {
  box-shadow: var(--k-shadow-hover);
  transform: translateY(-7px) rotate(-.35deg);
}

.kd-main-card::after {
  position: absolute;
  top: -38px;
  right: -38px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(255, 224, 102, .3);
  content: "";
}

.kd-main-card:nth-child(2)::after,
.kd-main-card:nth-child(5)::after { background: rgba(135, 206, 235, .29); }

.kd-main-card:nth-child(3)::after,
.kd-main-card:nth-child(6)::after { background: rgba(255, 170, 187, .27); }

.kd-main-card__type {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 24px;
  color: var(--k-green);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.kd-main-card__type::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.kd-main-card__icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 18px;
  background: rgba(255, 224, 102, .65);
  font-size: 1.65rem;
}

.kd-main-card:nth-child(2) .kd-main-card__icon,
.kd-main-card:nth-child(5) .kd-main-card__icon { background: rgba(135, 206, 235, .65); }

.kd-main-card:nth-child(3) .kd-main-card__icon,
.kd-main-card:nth-child(6) .kd-main-card__icon { background: rgba(255, 170, 187, .55); }

.kd-main-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 7px;
  color: var(--k-ink);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.2;
}

.kd-main-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--k-muted);
  font-size: .89rem;
  font-weight: 600;
  line-height: 1.5;
}

.kd-main-card__open {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--k-green);
  font-size: .88rem;
  font-weight: 900;
}

.kd-main-card__open::after {
  content: "→";
  font-size: 1.1rem;
  transition: transform .2s ease;
}

.kd-main-card:hover .kd-main-card__open::after { transform: translateX(4px); }

.kd-forms {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 24px;
  align-items: stretch;
}

.kd-forms__main {
  padding: 27px;
  border-radius: 29px;
  background: #e8f7ef;
  box-shadow: var(--k-shadow);
}

.kd-forms__main-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.kd-forms__main-head span {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  font-size: 1.35rem;
}

.kd-forms__main-head h3 {
  margin: 0 0 3px;
  color: var(--k-ink);
  font-size: 1.3rem;
  font-weight: 900;
}

.kd-forms__main-head p {
  margin: 0;
  color: var(--k-muted);
  font-size: .87rem;
  font-weight: 600;
}

.kd-form-list { display: grid; gap: 10px; }

.kd-form {
  display: grid;
  grid-template-columns: 43px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 17px;
  background: rgba(255,255,255,.9);
  color: var(--k-ink);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.kd-form:hover { background: #fff; transform: translateX(5px); }

.kd-form__file {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 224, 102, .68);
  color: #826800;
  font-size: .7rem;
  font-weight: 900;
}

.kd-form__file--doc { background: rgba(135, 206, 235, .65); color: #20739a; }

.kd-form__name { font-size: .93rem; font-weight: 900; line-height: 1.35; }

.kd-form__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--k-green);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
}

.kd-form__download::before { content: "↓"; font-size: 1.1rem; }

.kd-forms__help {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 29px;
  border-radius: 29px 29px 48px 20px;
  background: #fff5cb;
  box-shadow: var(--k-shadow);
}

.kd-forms__help-icon {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 18px;
  background: #fff;
  font-size: 1.55rem;
}

.kd-forms__help h3 { margin: 0 0 9px; color: var(--k-ink); font-size: 1.3rem; font-weight: 900; }
.kd-forms__help p { margin: 0; color: #615940; font-size: .91rem; font-weight: 600; line-height: 1.58; }

.kd-forms__help a {
  display: inline-flex;
  width: fit-content;
  margin-top: 17px;
  color: var(--k-green-dark);
  font-size: .9rem;
  font-weight: 900;
  text-decoration: none;
}

.kd-archive {
  overflow: hidden;
  border: 1px solid rgba(39, 140, 98, .11);
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--k-shadow);
}

.kd-archive__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 26px;
  border-bottom: 1px solid #e8efeb;
}

.kd-archive__intro p { margin: 0; color: var(--k-muted); font-size: .9rem; font-weight: 600; line-height: 1.5; }

.kd-archive__count {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: var(--k-radius-pill);
  background: rgba(135, 206, 235, .52);
  color: #1b6b90;
  font-size: .78rem;
  font-weight: 900;
}

.kd-archive details { border-bottom: 1px solid #e8efeb; }
.kd-archive details:last-child { border-bottom: 0; }

.kd-archive summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 26px;
  color: var(--k-ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  list-style: none;
}

.kd-archive summary::-webkit-details-marker { display: none; }

.kd-archive summary::after {
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid var(--k-green);
  border-bottom: 2px solid var(--k-green);
  content: "";
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}

.kd-archive details[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }

.kd-archive summary span { display: inline-flex; align-items: center; gap: 11px; }

.kd-archive summary span::before {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 170, 187, .47);
  content: "📁";
  font-size: 1rem;
}

.kd-archive__content { padding: 0 26px 24px; }

.kd-file-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kd-file {
  display: grid;
  grid-template-columns: 37px 1fr auto;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid #e6efea;
  border-radius: 16px;
  background: #fbfdfb;
  color: var(--k-ink);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.kd-file:hover { background: #fff; transform: translateY(-2px); }

.kd-file__format {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
  background: rgba(135, 206, 235, .55);
  color: #24769a;
  font-size: .64rem;
  font-weight: 900;
}

.kd-file__format--odt { background: rgba(255, 224, 102, .62); color: #806600; }
.kd-file__format--doc { background: rgba(255, 170, 187, .51); color: #92405a; }

.kd-file__name { font-size: .85rem; font-weight: 800; line-height: 1.32; }
.kd-file__action { color: var(--k-green); font-size: .78rem; font-weight: 900; }

.kd-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
  padding: 20px 23px;
  border-radius: 21px;
  background: rgba(39, 140, 98, .09);
}

.kd-note__icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--k-green);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.kd-note p { margin: 0; color: #35604f; font-size: .92rem; font-weight: 700; line-height: 1.58; }

@media (max-width: 980px) {
  .koralek-docs { padding: 75px 5%; }
  .kd-main-grid { grid-template-columns: repeat(2, 1fr); }
  .kd-forms { grid-template-columns: 1fr; }
  .kd-forms__help { min-height: 220px; }
}

@media (max-width: 620px) {
  .koralek-docs { padding: 70px 20px; }
  .kd-hero { grid-template-columns: 1fr; gap: 21px; margin-bottom: 35px; }
  .kd-hero__hint { width: fit-content; }
  .kd-section { margin-top: 50px; }
  .kd-section__head { display: block; margin-bottom: 18px; }
  .kd-section__description { margin-top: 12px; text-align: left; }
  .kd-main-grid { grid-template-columns: 1fr; gap: 16px; }
  .kd-main-card { min-height: 220px; }
  .kd-forms__main, .kd-forms__help { padding: 20px 16px; border-radius: 22px; }
  .kd-form { grid-template-columns: 39px 1fr; gap: 10px; }
  .kd-form__file { width: 39px; height: 39px; }
  .kd-form__download { grid-column: 2; width: fit-content; }
  .kd-archive__intro { align-items: flex-start; flex-direction: column; padding: 19px 17px; }
  .kd-archive summary { padding: 18px 17px; font-size: .93rem; }
  .kd-archive__content { padding: 0 17px 18px; }
  .kd-file-grid { grid-template-columns: 1fr; }
  .kd-file { grid-template-columns: 35px 1fr auto; }
  .kd-note { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .koralek-docs * { transition-duration: .01ms !important; }
}