:root {
  --color-main: #f97316;
  --color-main-dark: #9a3412;
  --color-cta: #ea580c;
  --color-cta-hover: #c2410c;
  --color-accent: #0284c7;
  --color-soft: #fff7ed;
  --color-section: #f8fafc;
  --color-warning: #d97706;
  --color-success: #0f766e;
  --color-text: #111827;
  --color-sub: #4b5563;
  --color-border: #e5e7eb;
  --color-white: #ffffff;
  --shadow-soft: 0 12px 34px rgba(17, 24, 39, 0.08);
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-cta);
}

button,
input,
select,
textarea {
  font: inherit;
}

.u-visually-hidden,
.c-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.c-skip-link:focus {
  z-index: 1000;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: var(--color-white);
  background: var(--color-main-dark);
  border-radius: 6px;
}

.l-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

.l-header__inner {
  width: min(1120px, calc(100% - 32px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.l-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--color-main-dark);
  letter-spacing: 0;
}

.l-header__brand img {
  width: auto;
  max-width: 240px;
  height: 60px;
  border-radius: 0;
  object-fit: contain;
}

.l-header__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.l-header__brand .custom-logo {
  width: auto;
  max-width: 240px;
  height: 60px;
  object-fit: contain;
}

.l-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  color: var(--color-sub);
  font-size: 14px;
  font-weight: 700;
}

.l-header__nav a[aria-current="page"] {
  color: var(--color-main-dark);
}

.l-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
}

.l-header__toggle span:not(.u-visually-hidden) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-text);
}

.l-main {
  min-height: 60vh;
}

.l-container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.l-container--narrow {
  width: min(820px, calc(100% - 32px));
}

.l-section {
  padding: 64px 0;
}

.l-section--soft {
  background: var(--color-section);
}

.l-section--about {
  background: var(--color-soft);
}

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  color: var(--color-white);
  background: var(--color-cta);
  border: 1px solid var(--color-cta);
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.22);
}

.c-button:hover {
  color: var(--color-white);
  background: var(--color-cta-hover);
  border-color: var(--color-cta-hover);
}

.c-button--secondary {
  color: var(--color-main-dark);
  background: var(--color-white);
  border-color: #fed7aa;
  box-shadow: none;
}

.c-button--secondary:hover {
  color: var(--color-cta);
  background: var(--color-soft);
  border-color: var(--color-main);
}

.c-button--small {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
}

.c-kicker {
  margin: 0 0 10px;
  color: var(--color-main-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.c-section-heading {
  margin-bottom: 26px;
}

.c-section-heading h1,
.c-section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.3;
  letter-spacing: 0;
}

.c-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--color-main-dark);
  background: var(--color-soft);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.p-hero {
  padding: 52px 0 60px;
  background: linear-gradient(180deg, var(--color-soft), var(--color-white));
  border-bottom: 1px solid var(--color-border);
}

.p-hero__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  gap: 40px;
  align-items: center;
}

.p-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.18;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}

.p-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--color-sub);
  font-size: 17px;
}

.p-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.p-hero__image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

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

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

.c-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.c-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--color-soft);
  overflow: hidden;
}

.c-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-card__body {
  padding: 18px;
}

.c-card__title {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.c-card p {
  margin: 0;
  color: var(--color-sub);
  font-size: 14px;
}

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

.p-category-card {
  display: flex;
  min-height: 94px;
  padding: 16px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.p-category-card span {
  font-weight: 800;
}

.p-category-card small {
  color: var(--color-accent);
  font-size: 12px;
}

.p-feature-note,
.p-empty,
.p-note,
.p-form-unavailable {
  padding: 22px;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.p-about {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.p-about h2,
.p-about p {
  margin: 0;
}

.p-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  color: var(--color-white);
  background: #2b1a12;
  border-radius: 8px;
}

.p-cta h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.35;
}

.p-cta p {
  margin: 0;
  color: #fed7aa;
}

.p-cta .c-button {
  text-align: center;
}

.p-cta--article {
  margin: 44px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  align-items: center;
  gap: 30px;
}

.p-cta--article > div {
  min-width: 0;
}

.p-cta--article .c-button {
  width: 184px;
  min-height: 64px;
  padding: 14px 22px;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.35;
}

.l-article-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  column-gap: 68px;
}

.p-single {
  width: min(100%, 760px);
  flex: 0 1 760px;
}

.l-sidebar {
  --sidebar-footer-offset: 0px;
  flex: 0 0 292px;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 112px);
  overflow: visible;
  transform: translateY(var(--sidebar-footer-offset, 0px));
  will-change: transform;
  transition: transform 0.16s ease;
}

.p-toc {
  flex: 0 0 auto;
  max-height: none;
  overflow: hidden;
}

.p-sidebar-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.p-sidebar-box h2 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.35;
}

.p-toc__list {
  height: clamp(320px, 46vh, 440px);
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.p-toc__link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  color: var(--color-sub);
  border-left: 3px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.p-toc__link span {
  color: var(--color-main-dark);
  font-weight: 800;
}

.p-toc__link b {
  font-weight: 700;
}

.p-toc__link--h3 {
  padding-left: 14px;
}

.p-toc__link--h4 {
  padding-left: 22px;
  font-size: 12px;
}

.p-toc__link.is-active {
  color: var(--color-text);
  background: var(--color-soft);
  border-left-color: var(--color-main);
}

.p-sidebar-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--color-sub);
  font-size: 13px;
  line-height: 1.55;
}

.p-sidebar-list a {
  display: block;
  padding: 2px 0;
  font-weight: 700;
}

.p-sidebar-list--tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-sidebar-list--tags a {
  padding: 5px 9px;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.p-breadcrumb {
  margin-bottom: 18px;
  color: var(--color-sub);
  font-size: 13px;
}

.p-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.p-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #9ca3af;
}

.p-single__header h1,
.p-page h1 {
  margin: 12px 0 16px;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.32;
  letter-spacing: 0;
}

.p-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--color-sub);
  font-size: 13px;
}

.p-single__thumb {
  margin-top: 24px;
}

.p-single__thumb img {
  width: 100%;
  border-radius: 8px;
}

.p-summary {
  margin-top: 24px;
  padding: 20px;
  background: var(--color-soft);
  border: 1px solid #fed7aa;
  border-radius: 8px;
}

.p-summary h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.p-summary p {
  margin: 0;
  color: var(--color-main-dark);
  font-weight: 700;
}

.p-entry {
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.9;
}

.p-entry > *:first-child {
  margin-top: 0;
}

.p-entry p {
  margin: 1.15em 0;
}

.p-entry h2 {
  margin: 2.4em 0 0.85em;
  padding: 0 0 12px 18px;
  border-bottom: 2px solid var(--color-border);
  border-left: 6px solid var(--color-main);
  font-size: 28px;
  line-height: 1.38;
  letter-spacing: 0;
}

.p-entry h3 {
  margin: 2em 0 0.8em;
  padding: 12px 16px;
  background: var(--color-soft);
  border-left: 5px solid var(--color-main);
  border-radius: 6px;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0;
}

.p-entry h4 {
  margin: 1.7em 0 0.6em;
  color: var(--color-main-dark);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0;
}

.p-entry strong {
  font-weight: 800;
  background: linear-gradient(transparent 62%, #fed7aa 0);
}

.p-entry .is-warning strong,
.p-entry strong.is-warning {
  background: linear-gradient(transparent 62%, #fcd34d 0);
}

.p-entry a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-entry ul,
.p-entry ol {
  padding-left: 1.4em;
}

.p-entry li + li {
  margin-top: 0.35em;
}

.p-entry blockquote {
  margin: 1.5em 0;
  padding: 16px 18px;
  color: var(--color-sub);
  background: var(--color-section);
  border-left: 5px solid var(--color-accent);
  border-radius: 6px;
}

.p-entry table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  white-space: nowrap;
}

.p-entry th,
.p-entry td {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.p-entry th {
  background: var(--color-section);
}

.p-entry figure,
.p-entry img {
  max-width: 100%;
}

.p-entry figure {
  margin: 1.6em 0;
}

.p-entry img {
  border-radius: 8px;
}

.p-entry figcaption {
  margin-top: 8px;
  color: var(--color-sub);
  font-size: 13px;
}

.p-related {
  margin-top: 54px;
}

.p-related h2,
.p-supervisor h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.p-supervisor {
  margin-top: 44px;
  padding: 22px;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.p-supervisor__inner {
  display: flex;
  gap: 16px;
}

.p-supervisor img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.p-supervisor p {
  margin: 0 0 6px;
  color: var(--color-sub);
}

.p-supervisor__name {
  color: var(--color-text) !important;
  font-weight: 800;
}

.p-page {
  padding-bottom: 20px;
}

.wpcf7 form {
  display: grid;
  gap: 14px;
}

.wpcf7 p {
  margin: 0;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
}

.wpcf7 textarea {
  min-height: 180px;
}

.wpcf7 input[type="submit"] {
  min-height: 48px;
  padding: 12px 20px;
  color: var(--color-white);
  background: var(--color-cta);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.l-footer {
  color: #fff7ed;
  background: #23150f;
}

.l-footer__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 36px;
}

.l-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
}

.l-footer__brand p {
  margin: 0;
  color: #fed7aa;
}

.l-footer__site {
  color: var(--color-white) !important;
  font-size: 20px;
  font-weight: 800;
}

.l-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 28px;
  color: var(--color-white);
  font-weight: 700;
}

.l-footer__company,
.l-footer__copy {
  margin: 18px 0 0;
  color: #fed7aa;
  font-size: 13px;
}

.l-footer a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-mobile-cta {
  display: none;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.page-numbers {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
}

.page-numbers.current {
  color: var(--color-white);
  background: var(--color-main);
  border-color: var(--color-main);
}

@media (max-width: 980px) {
  .l-header__toggle {
    display: block;
  }

  .l-header__nav {
    position: absolute;
    top: calc(var(--header-height) + 1px);
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
  }

  .l-header__nav.is-open {
    display: flex;
  }

  .l-header__nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
  }

  .p-hero__inner {
    grid-template-columns: 1fr;
  }

  .l-article-layout {
    display: block;
  }

  .p-single {
    width: 100%;
  }

  .l-sidebar {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
    margin-top: 44px;
    transform: none;
    will-change: auto;
  }

  .p-toc {
    max-height: none;
  }

  .p-toc__list {
    height: auto;
    max-height: 360px;
    overflow-y: auto;
  }

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

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

  .p-about,
  .p-cta {
    display: block;
  }

.p-cta .c-button {
  margin-top: 18px;
}

  .p-mobile-cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    color: var(--color-white);
    background: var(--color-cta);
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.24);
  }

  .p-mobile-cta.is-hidden {
    display: none;
  }
}

@media (max-width: 640px) {
  .l-section {
    padding: 42px 0;
  }

  .p-hero {
    padding: 38px 0 44px;
  }

  .p-hero h1 {
    font-size: 34px;
  }

  .p-hero p,
  .p-entry {
    font-size: 16.5px;
  }

  .p-hero__actions,
  .p-cta {
    align-items: stretch;
  }

  .p-hero__actions .c-button,
  .p-cta .c-button {
    width: 100%;
  }

  .c-card-grid,
  .c-card-grid--three,
  .p-category-grid {
    grid-template-columns: 1fr;
  }

  .p-single__header h1,
  .p-page h1 {
    font-size: 30px;
  }

  .p-entry h2 {
    font-size: 24px;
  }

  .p-entry h3 {
    font-size: 20px;
  }

  .p-cta {
    padding: 22px;
  }

  .p-cta h2 {
    font-size: 22px;
  }

  .p-supervisor__inner {
    display: block;
  }

  .p-supervisor img {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
