:root {
  --bg: #f6f1e8;
  --panel: #f9f5ed;
  --text: #3f2a20;
  --muted: #6a4a36;
  --line: #e7d8b7;
  --accent: #5b3723;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  text-align: justify;
  text-justify: inter-word;
}

h1, h2, h3, h4, h5, h6 {
  text-align: left;
  text-justify: auto;
  line-height: 1.25;
}
.wrap { width: min(1000px, 92vw); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  background: #f8e3b6;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ecd39f;
  z-index: 10;
}
.top .wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}
.brand {
  text-decoration: none;
  color: #4a3023;
  font-weight: 700;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.brand-logo {
  width: 54px;
  height: auto;
  max-width: none;
  border-radius: 0;
  flex: 0 0 auto;
}

.brand-text {
  display: inline-block;
}
.nav { display: flex; flex-wrap: wrap; gap: .4rem; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #d9bf8e;
  border-radius: 10px;
  background: #f8e3b6;
  color: #4a3023;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.lang-switch {
  display: flex;
  align-items: center;
  position: relative;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown > summary {
  list-style: none;
}

.lang-dropdown > summary::-webkit-details-marker {
  display: none;
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .36rem .6rem;
  border-radius: 999px;
  border: 1px solid #d9bf8e;
  background: #f8e3b6;
  color: #4a3023;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lang-current:hover {
  background: #f3d9a4;
}

.lang-flag {
  line-height: 1;
  font-size: .95rem;
}

.lang-code {
  letter-spacing: .04em;
}

.lang-caret {
  font-size: .72rem;
  opacity: .75;
  transition: transform .18s ease;
}

.lang-dropdown[open] .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  min-width: 165px;
  display: grid;
  gap: .15rem;
  padding: .35rem;
  border-radius: 12px;
  border: 1px solid #d9bf8e;
  background: #f9f5ed;
  box-shadow: 0 8px 22px rgba(63, 42, 32, 0.18);
  z-index: 30;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .55rem;
  border-radius: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: .86rem;
}

.lang-option:hover {
  background: #f4e5c4;
  color: #4a3023;
}

.lang-option.active {
  background: #ead0a3;
  color: #4a3023;
  font-weight: 600;
}

.lang-name {
  white-space: nowrap;
}
.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: .45rem .65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .93rem;
}
.nav-link:hover { border-color: #d9bf8e; color: #4a3023; }
.nav-link.active {
  color: #f8e3b6;
  background: var(--accent);
}
.content { padding: 1.4rem 0 2.8rem; }

.site-footer {
  width: min(1000px, 92vw);
  margin: 0 auto 1rem;
  text-align: center;
}

.site-footer-maintainer {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}

.site-footer-rights {
  margin: .18rem 0 0;
  color: #8a7968;
  font-size: .72rem;
  line-height: 1.35;
}

.site-footer-maintainer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer-maintainer a:hover {
  color: #4a3023;
}

h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: .2rem 0 1rem; }
.article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  line-height: 1.62;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
a { color: #337ab7; }
a:hover { color: #5b3723; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

.board-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  align-items: start;
}

.member-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.member-card h4 {
  margin: 0 0 .35rem;
}

.member-card p {
  margin: 0;
}

.member-card img {
  display: block;
  margin-bottom: .75rem;
  width: 164px;
  height: 164px;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 860px) {
  .board-members {
    grid-template-columns: 1fr;
  }
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: start;
}

.partner-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  align-items: flex-start;
}

.partner-card h3 {
  margin: 0;
  min-height: 3.2em;
  text-align: left;
}

.partner-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(63, 42, 32, 0.08);
}

.partner-card p {
  margin: 0;
  text-align: justify;
}

.contact-offline-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf7ef;
  padding: 1rem;
  margin-bottom: 1.1rem;
}

.contact-offline-card h3 {
  margin: 0 0 .45rem;
}

.contact-offline-form {
  display: grid;
  gap: .5rem;
}

.contact-offline-form label {
  font-weight: 600;
}

.contact-field {
  width: 100%;
  border: 1px solid #d9bf8e;
  border-radius: 8px;
  background: #fffdf9;
  color: var(--text);
  padding: .55rem .65rem;
  font: inherit;
}

.contact-textarea {
  resize: vertical;
  min-height: 7.2rem;
}

.contact-submit {
  justify-self: start;
  margin-top: .25rem;
  border: 1px solid #4a3023;
  background: var(--accent);
  color: #f8e3b6;
  padding: .5rem .85rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-submit:hover {
  background: #4a3023;
}

.contact-offline-status {
  margin: .6rem 0 0;
  color: #4a3023;
  font-weight: 600;
}

.contact-embed-wrap {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  width: min(100%, 860px);
  padding: .6rem;
  border: 1px solid #e6d3ad;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7e8c9 0%, #efe2c7 100%);
}

.contact-embed-frame {
  display: block;
  width: min(100%, 760px);
  margin: 0 auto;
  height: 980px;
  min-height: 0;
  border: 0;
  border-radius: 9px;
  background: #fffdf9;
}

.docs-grid {
  margin-top: .9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-preview-wrap {
  height: 170px;
  background: linear-gradient(180deg, #fff9ee 0%, #f0e2c8 100%);
  border-bottom: 1px solid var(--line);
}

.doc-preview {
  width: 100%;
  height: 100%;
  border: 0;
}

.doc-preview-fallback {
  display: block;
  padding: .9rem;
  color: var(--muted);
  font-size: .88rem;
}

.doc-meta {
  padding: .8rem;
  display: grid;
  gap: .5rem;
}

.doc-year {
  margin: 0;
  font-size: 1.02rem;
}

.doc-file {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
  text-align: left;
}

.doc-actions {
  display: flex;
  gap: .45rem;
  margin-top: .15rem;
}

.doc-btn {
  text-decoration: none;
  display: inline-block;
  padding: .4rem .62rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #f8e3b6;
  font-size: .82rem;
  line-height: 1;
}

.doc-btn.ghost {
  background: transparent;
  color: var(--accent);
}

.doc-btn:hover {
  background: #4a3023;
  border-color: #4a3023;
  color: #f8e3b6;
}

@media (max-width: 980px) {
  .docs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .doc-preview-wrap {
    height: 190px;
  }
}

@media (max-width: 980px) {
  .partners-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .partners-grid {
    grid-template-columns: 1fr;
  }

  .top .wrap {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  body {
    text-align: left;
    text-justify: auto;
  }

  .top {
    position: static;
  }

  .top .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .7rem 0;
  }

  .brand {
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding-top: .2rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-link {
    white-space: nowrap;
    text-align: center;
  }

  .lang-switch {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .lang-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .article {
    border-radius: 12px;
    padding: .9rem;
    line-height: 1.58;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .board-members,
  .partners-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .member-card {
    align-items: center;
    text-align: center;
  }

  .member-card h4,
  .member-card p {
    text-align: center;
  }

  .member-card img {
    margin-left: auto;
    margin-right: auto;
    width: 138px;
    height: 138px;
  }

  .partner-card p,
  .article p {
    text-align: left;
  }

  .doc-actions {
    flex-wrap: wrap;
  }

  .contact-embed-wrap {
    padding: .45rem;
  }

  .contact-embed-frame {
    height: 860px;
    border-radius: 7px;
  }
}

@media (max-width: 520px) {
  .wrap,
  .site-footer {
    width: 94vw;
  }

  .brand-logo {
    width: 44px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .nav-link {
    font-size: .88rem;
    padding: .42rem .58rem;
  }

  .content {
    padding: 1rem 0 2rem;
  }

  .article {
    padding: .78rem;
  }

  .contact-embed-frame {
    height: 800px;
  }

  .doc-preview-wrap {
    height: 180px;
  }
}