@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --bg: #f5f7f5;
  --surface: #fff;
  --ink: #111b17;
  --muted: #56645d;
  --muted-strong: #46564d;
  --border: #dfe6df;
  --line: #e8ede8;
  --green: #226148;
  --green-dark: #184832;
  --green-wash: #edf6ef;
  --lime: #bafa49;
  --lime-hover: #a9ec38;
  --dark: #0b1c15;
  --danger: #a52b31;
  --content: 76rem;
  --sides: clamp(1.125rem, 4.1vw, 3rem);
  --small-radius: 0.625rem;
  --card-radius: 1rem;
  --shadow: 0 2px 5px #142a1810;
  --line-icon: 1.25rem;
}

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

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem / 1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:not(:disabled), select:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #33895a;
  outline-offset: 3px;
}

::selection { background: var(--lime); color: var(--dark); }

svg {
  flex: none;
  width: var(--line-icon);
  height: var(--line-icon);
  vertical-align: middle;
}

svg:has(use) {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

svg[width="0"][height="0"] { width: 0; height: 0; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  transform: translateY(-200%);
  border-radius: var(--small-radius);
  background: var(--lime);
  padding: .65rem 1rem;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: #fffffff2;
  backdrop-filter: blur(14px);
}

.header-inner, .site-main, .footer-inner {
  width: min(var(--content), calc(100% - 2 * var(--sides)));
  margin-inline: auto;
}

.header-inner {
  display: grid;
  min-height: 4.1875rem;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .62rem;
  border-radius: var(--small-radius);
  white-space: nowrap;
}

.brand-mark {
  width: 2.39rem;
  height: 2.39rem;
  border-radius: 50%;
  object-fit: contain;
}

.brand-name {
  color: var(--dark);
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
}

.brand-name span { color: var(--green); }

.main-nav, .header-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.header-actions { justify-content: flex-end; gap: .63rem; }

.nav-link {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: .47rem;
  border: 0;
  border-radius: var(--small-radius);
  background: transparent;
  color: var(--muted-strong);
  padding: .4rem .84rem;
  font-size: .875rem;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color .16s, color .16s;
}

.nav-link svg { width: 1.04rem; height: 1.04rem; }

.nav-link:hover { background: #f3f6f3; color: var(--dark); }

.nav-link[aria-current="page"], .nav-link[aria-selected="true"], .nav-link.active, .nav-link.is-active {
  background: var(--green-wash);
  color: var(--green-dark);
}

.button, .icon-button, .profile-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 1px solid transparent;
  border-radius: var(--small-radius);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s;
}

.button { min-height: 2.8rem; padding: .58rem 1rem; font-size: .9rem; }
.button svg { width: 1.12rem; height: 1.12rem; }

.button.primary, .button.button-primary {
  border-color: #b4ee55;
  background: var(--lime);
  color: #142018;
}

.button.primary:hover, .button.button-primary:hover {
  border-color: #9ade36;
  background: var(--lime-hover);
}

.button.secondary, .button.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--dark);
}

.button.secondary:hover, .button.button-secondary:hover { background: var(--green-wash); }

.button.danger, .button.button-danger {
  border-color: #eed4d6;
  background: #fff1f1;
  color: var(--danger);
}

.button.danger:hover, .button.button-danger:hover { background: #fce2e2; }

.icon-button, .profile-button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: .45rem;
}

.profile-button { gap: .44rem; padding-inline: .68rem; font-size: .85rem; }
.icon-button svg, .profile-button svg { width: 1.1rem; height: 1.1rem; }
.profile-button img, .profile-button .avatar { width: 1.35rem; height: 1.35rem; border-radius: 50%; }
.icon-button:hover, .profile-button:hover, .profile-button[aria-current="page"] { border-color: #c8dbcc; background: var(--green-wash); }

.text-button {
  min-height: 2rem;
  border: 0;
  background: none;
  color: var(--green);
  padding: .24rem .1rem;
  font-size: .875rem;
}

.text-button:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: .2em; }

.site-main { min-height: calc(100vh - 10rem); padding: 1.8rem 0 3.75rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 22.3rem);
  align-items: start;
  gap: clamp(1.3rem, 2.15vw, 2rem);
  margin-top: 2.15rem;
}

.feed-section, .team-sidebar { min-width: 0; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .85rem;
  margin-bottom: .95rem;
}

.section-heading h2, .profile-group h3 {
  color: var(--ink);
  font-size: clamp(1.4rem, 2.3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -.055em;
}

.section-heading p {
  margin-top: .34rem;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .47rem;
  margin-bottom: 1.03rem;
}

.filter-chip, .choice-chip {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: .46rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--small-radius);
  background: var(--surface);
  color: var(--muted-strong);
  padding: .31rem .76rem;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  transition: background-color .16s, border-color .16s, color .16s;
}

.filter-chip svg, .choice-chip svg { width: .93rem; height: .93rem; }
.filter-chip:hover, .choice-chip:hover { border-color: #b5cbb9; color: var(--green-dark); }
.filter-chip.active, .filter-chip.is-active, .filter-chip[aria-pressed="true"], .filter-chip[aria-selected="true"], .filter-chip[aria-current="true"] {
  border-color: #274535;
  background: #234130;
  color: #fff;
}

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

.news-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color .17s, box-shadow .17s, transform .17s;
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: #afc8b6;
  box-shadow: 0 8px 18px #152d1712;
}

.news-link {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  border: 0;
  border-radius: inherit;
  background: none;
  padding: 0;
  text-align: left;
}

.news-cover {
  position: relative;
  display: flex;
  min-height: 8.8rem;
  align-items: flex-start;
  overflow: hidden;
  border-radius: .94rem .94rem 0 0;
  background-color: #19392e;
  background-position: center;
  background-size: cover;
  padding: .72rem;
}

.news-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-hackathon { background-color: #163932; background-image: url("./assets/hackathon.webp"); }
.cover-aero { background-color: #243342; background-image: url("./assets/championship.webp"); }
.cover-internship { background-color: #263f36; background-image: url("./assets/internship.webp"); }
.cover-workshop { background-color: #323742; background-image: url("./assets/workshop.webp"); }

.news-kind {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  gap: .35rem;
  align-items: center;
  border: 1px solid #ffffff3d;
  border-radius: .37rem;
  background: #15291fe8;
  color: #ecf8ef;
  padding: .26rem .51rem;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.25;
}

.news-kind svg { width: .85rem; height: .85rem; }

.news-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: .92rem 1rem .85rem;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .36rem .52rem;
  margin-bottom: .47rem;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 700;
}

.news-meta svg, .news-footer svg { width: .93rem; height: .93rem; }

.news-body h3 {
  margin-bottom: .38rem;
  font-size: 1.19rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.043em;
  overflow-wrap: anywhere;
}

.news-body p {
  flex: 1;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.news-footer {
  display: flex;
  min-height: 2rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .3rem .55rem;
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  padding-top: .64rem;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 700;
}

.news-footer > span { display: inline-flex; align-items: center; gap: .27rem; }
.news-footer > :last-child { margin-inline-start: auto; color: var(--green); font-weight: 800; }

.sidebar-controls { margin-bottom: 1.03rem; }

.sidebar-controls .button {
  width: 100%;
  min-height: 2.25rem;
  padding-block: .32rem;
}

.sidebar-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar-item, .sidebar-team {
  display: grid;
  width: 100%;
  min-height: 5.38rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .68rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: .76rem .92rem;
  text-align: left;
  transition: background-color .16s;
}

.sidebar-item:hover, .sidebar-team:hover, .sidebar-all:hover { background: #f5f9f5; }
.sidebar-item:focus-visible, .sidebar-team:focus-visible, .sidebar-all:focus-visible { outline-offset: -3px; }

.sidebar-item > svg {
  width: .85rem;
  height: .85rem;
  align-self: center;
  color: #67796d;
}

.avatar, .sidebar-avatar {
  display: inline-grid;
  width: 2.33rem;
  height: 2.33rem;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #e9f4e8;
  color: #305740;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
}

.avatar img, .sidebar-avatar img, img.sidebar-avatar, img.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.sidebar-avatar, img.avatar { width: 2.33rem; height: 2.33rem; }
.sidebar-item:nth-child(3n + 2) .sidebar-avatar, .sidebar-team:nth-child(3n + 2) .sidebar-team-avatar { background-color: #edf0fb; color: #3b406b; }
.sidebar-item:nth-child(3n + 3) .sidebar-avatar, .sidebar-team:nth-child(3n + 3) .sidebar-team-avatar { background-color: #faf1e3; color: #754c28; }
.sidebar-avatar svg, .avatar svg { width: 1.19rem; height: 1.19rem; }

.sidebar-item-content, .sidebar-team-copy { display: grid; min-width: 0; gap: .19rem; }

.sidebar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .18rem .5rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.sidebar-meta > span { color: var(--green); }
.sidebar-meta > .sidebar-demo { color: var(--muted); }

.sidebar-item-content strong, .sidebar-team-copy strong {
  overflow: hidden;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-role, .sidebar-team-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-all {
  display: flex;
  width: 100%;
  min-height: 3.02rem;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  background: var(--surface);
  color: var(--green);
  padding: .65rem .75rem;
  font-size: .87rem;
  font-weight: 800;
  transition: background-color .16s;
}

.sidebar-all svg { width: .96rem; height: .96rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }

.footer-inner {
  display: flex;
  min-height: 4.9rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  color: var(--muted);
  padding-block: .75rem;
  font-size: .83rem;
}

.footer-inner strong, .footer-inner a { color: var(--dark); font-weight: 800; }
.footer-inner .brand-mark { width: 1.7rem; height: 1.7rem; }
.footer-inner .brand-name { font-size: 1rem; }

.inner-page { padding-top: 1rem; }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.page-heading h1 {
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -.065em;
}

.page-heading p {
  max-width: 44rem;
  margin-top: .42rem;
  color: var(--muted);
  font-size: 1rem;
}

.team-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .6rem .8rem;
  margin-bottom: 1.2rem;
}

.team-toolbar .filter-bar { margin: .15rem auto .1rem 0; }
.team-toolbar .filter-chip { min-height: 2.55rem; }

.input-wrap { position: relative; display: inline-flex; align-items: center; }
.input-wrap > svg { position: absolute; left: .8rem; width: 1rem; height: 1rem; color: var(--muted); pointer-events: none; }
.input-wrap > input[type="search"] { width: 100%; padding-inline-start: 2.2rem; }
.team-search { width: min(100%, 18rem); }

input:not([type="checkbox"], [type="radio"]), textarea, select, .form-input {
  min-width: 0;
  min-height: 2.66rem;
  border: 1px solid #d1ded2;
  border-radius: var(--small-radius);
  background-color: var(--surface);
  color: var(--ink);
  padding: .52rem .73rem;
  font-size: .94rem;
}

input::placeholder, textarea::placeholder { color: #617169; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
textarea, textarea.form-input { min-height: 6rem; resize: vertical; }

select {
  appearance: none;
  max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2346564d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right .69rem center;
  background-repeat: no-repeat;
}

select, select.form-input { padding-inline-end: 2.05rem; }

.team-list, .teams-grid, .team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.team-card, .profile-card, .empty-state {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-card {
  display: flex;
  flex-direction: column;
  padding: 1.05rem;
}

.team-card-header, .team-author, .team-card-footer {
  display: flex;
  align-items: center;
}

.team-card-header {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .55rem;
  margin-bottom: .98rem;
}

.team-author { min-width: 0; gap: .55rem; }
.team-author-name { overflow-wrap: anywhere; font-size: .85rem; font-weight: 800; }
.team-author .avatar { width: 2rem; height: 2rem; font-size: .98rem; }

.type-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .3rem;
  border: 1px solid #cfe8d4;
  border-radius: 99rem;
  background: #eef8f0;
  color: #23543b;
  padding: .2rem .5rem;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.35;
}

.type-badge[data-type="members"], .type-badge.type-members, .type-badge.is-members {
  border-color: #dce3f5;
  background: #f0f3ff;
  color: #3c4c78;
}

.team-card h3 {
  margin-bottom: .4rem;
  font-size: clamp(1.13rem, 2vw, 1.36rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.team-card-goal {
  color: var(--muted);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.team-card-roles, .tag-list, .choice-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .37rem .42rem;
}

.team-card-roles { margin: .82rem 0 1rem; }

.tag {
  display: inline-flex;
  min-height: 1.58rem;
  max-width: 100%;
  align-items: center;
  border: 1px solid #e1e8e1;
  border-radius: .38rem;
  background: #f2f5f2;
  color: #395247;
  padding: .15rem .5rem;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.team-card-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .3rem .65rem;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: .4rem;
}

.team-card-date { color: var(--muted); font-size: .78rem; font-weight: 700; }

.empty-state {
  display: grid;
  min-height: 10rem;
  grid-column: 1 / -1;
  align-content: center;
  justify-items: center;
  gap: .55rem;
  padding: 1.2rem;
  text-align: center;
}

.empty-state h2, .empty-state h3 { font-size: 1.2rem; letter-spacing: -.026em; }
.empty-state p { max-width: 32rem; color: var(--muted); }
.empty-state .button { margin-top: .42rem; }

.profile-summary { width: min(100%, 53rem); }

.profile-card { padding: clamp(1.1rem, 3vw, 2rem); }
.profile-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: .9rem; }

.avatar.avatar-large {
  width: 4.2rem;
  height: 4.2rem;
  font-size: 2rem;
}

.profile-card-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.profile-card-head p, .profile-card-details p { color: var(--muted); overflow-wrap: anywhere; }
.profile-card-details { display: grid; gap: 1rem; }
.profile-group { display: grid; gap: .44rem; }
.profile-group h3 { font-size: 1.08rem; letter-spacing: -.022em; }
.profile-group + .profile-group { margin-top: .9rem; }
.profile-card-head > .button { margin-inline-start: auto; }
.profile-posts { margin-top: 1.6rem; }
.profile-posts > h2 { margin-bottom: .8rem; font-size: 1.42rem; letter-spacing: -.035em; }
.profile-posts .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.list-status { grid-column: 1 / -1; color: var(--muted); }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }

.site-dialog {
  --dialog-width: 37rem;
  position: fixed;
  width: min(var(--dialog-width), calc(100% - 2rem));
  max-width: none;
  max-height: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 1.08rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 70px #10271b47;
}

.site-dialog-wide { --dialog-width: 42rem; }
.site-dialog::backdrop { background: #0c1d16a8; backdrop-filter: blur(4px); }
body:has(.site-dialog[open]) { overflow: hidden; }

.dialog-inner { position: relative; padding: clamp(1.05rem, 3.2vw, 1.75rem); }

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.06rem;
}

.dialog-header h2 { font-size: clamp(1.46rem, 4vw, 1.85rem); font-weight: 800; letter-spacing: -.05em; overflow-wrap: anywhere; }
.dialog-header p { margin-top: .38rem; color: var(--muted); }

.dialog-close { flex: none; font-size: 1.45rem; }

.dialog-body { min-width: 0; overflow-wrap: anywhere; }
.dialog-body p > a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: .17em; }
.dialog-body > .profile-group:last-of-type { margin-bottom: .9rem; }
.dialog-body form > .form-hint { margin-bottom: 1rem; }
.dialog-body > p, .dialog-body > :is(h3, .tag-list, .team-card-roles) { margin-bottom: .65rem; }

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.35rem;
  border-top: 1px solid var(--line);
  padding-top: .95rem;
}

.dialog-actions .button { min-width: 5rem; }

.form-field {
  display: grid;
  min-width: 0;
  gap: .39rem;
  margin: 0 0 .92rem;
  border: 0;
  padding: 0;
}

.form-label, .form-field legend {
  color: var(--ink);
  padding: 0;
  font-size: .9rem;
  font-weight: 800;
}

.form-field legend { margin-bottom: .42rem; }
.form-field.form-check {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: .45rem;
  color: var(--muted-strong);
  font-size: .875rem;
  cursor: pointer;
}
.form-check input { width: 1rem; height: 1rem; margin: .17rem 0 0; flex: none; }

.form-hint, .form-error {
  font-size: .83rem;
  line-height: 1.5;
}

.form-hint { color: var(--muted); }
.form-error { color: var(--danger); font-weight: 750; }
.form-error:empty { display: none; }
.form-input[aria-invalid="true"] { border-color: var(--danger); }

.avatar-options { display: flex; flex-wrap: wrap; gap: .47rem; }

.avatar-choice {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: .68rem;
  background: #f7faf7;
  color: var(--green-dark);
  padding: .22rem;
  font-size: 1.46rem;
  line-height: 1;
  cursor: pointer;
}

.avatar-choice :is(.avatar, img) { width: 2.35rem; height: 2.35rem; border-radius: 50%; }
.avatar-choice:hover { border-color: #84ad91; }

.choice-list + .custom-choice, .avatar-options + .custom-choice { margin-top: .26rem; }
.choice-chip:is([aria-pressed="true"], [aria-selected="true"], .is-selected, :has(input:checked)),
.avatar-choice:is([aria-pressed="true"], [aria-selected="true"], .is-selected, :has(input:checked)) {
  border-color: #72a67b;
  background: #e3f4e5;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px #72a67b;
}

.custom-choice { display: flex; align-items: stretch; gap: .46rem; }
.custom-choice > input { flex: 1; }
.custom-choice .button { min-height: 2.66rem; }

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .35rem;
  border: 1px solid var(--border);
  border-radius: var(--small-radius);
  background: #f4f7f4;
  padding: .25rem;
}

.segmented-control > :is(label, button) {
  position: relative;
  display: inline-flex;
  min-height: 2.26rem;
  flex: 1 1 9rem;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: transparent;
  color: var(--muted-strong);
  padding: .3rem .6rem;
  font-size: .875rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.segmented-control > :is(label, button):is([aria-pressed="true"], .is-selected, :has(input:checked)) {
  border-color: #c7dacb;
  background: var(--surface);
  color: var(--green-dark);
  box-shadow: var(--shadow);
}

.segmented-control > :is(label, button):hover { color: var(--green-dark); }

.toast {
  position: fixed;
  z-index: 10;
  inset: auto 1rem 1rem auto;
  width: fit-content;
  max-width: calc(100% - 2rem);
  border: 1px solid #3e6050;
  border-radius: .73rem;
  background: #1a3528;
  color: #f6fdf8;
  padding: .7rem .95rem;
  font-size: .9rem;
  font-weight: 750;
  box-shadow: 0 8px 24px #11251b4d;
}

.toast:empty { display: none; }

@media (max-width: 65rem) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 19rem); }
  .team-list, .teams-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 53rem) {
  .header-inner { gap: .75rem; }
  .nav-link { padding-inline: .6rem; }
  .nav-link svg { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .team-sidebar { display: grid; grid-template-columns: 1fr auto; gap: 0 .7rem; }
  .team-sidebar .section-heading { align-items: center; }
  .sidebar-controls { align-self: center; }
  .sidebar-card { grid-column: 1 / -1; }
}

@media (max-width: 40rem) {
  .site-main { padding-top: 1rem; }
  .site-header { position: relative; }
  .header-inner { min-height: 0; grid-template-columns: 1fr 1fr; gap: 0 .7rem; padding-top: .56rem; }
  .brand-mark { width: 2.29rem; height: 2.29rem; }
  .header-actions { min-height: 2.65rem; }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: .23rem;
    margin-top: .38rem;
    padding-bottom: .42rem;
  }
  .nav-link { min-width: 0; min-height: 2.45rem; flex: 1 1 auto; gap: .32rem; padding-inline: .43rem; font-size: .81rem; }
  .nav-link svg { display: inline; width: .92rem; height: .92rem; }
  .profile-button { padding-inline: .49rem; }
  .header-actions { gap: .39rem; }
  .dashboard-grid { gap: 1.5rem; margin-top: 1.6rem; }
  .news-grid { gap: .7rem; }
  .news-body { padding: .68rem .7rem; }
  .news-cover { min-height: 7rem; }
  .news-body h3 { font-size: 1.05rem; }
  .news-body p { font-size: .9375rem; }
  .news-meta, .news-footer { font-size: .74rem; }
  .sidebar-controls .button { width: auto; font-size: .82rem; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.05rem; }
  .inner-page { padding-top: .3rem; }
  .team-toolbar { flex-wrap: wrap; gap: .6rem; }
  .team-toolbar .filter-bar { width: 100%; }
  .team-search { width: auto; min-width: 10rem; flex: 1; }
  .team-list, .teams-grid, .team-grid, .profile-posts .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 31rem) {
  .news-grid { grid-template-columns: 1fr; }
  .news-cover { min-height: 8.6rem; }
  .news-body { padding: .85rem .94rem; }
  .news-body h3 { font-size: 1.15rem; }
  .news-body p { font-size: 1rem; }
  .team-sidebar { grid-template-columns: 1fr; }
  .sidebar-controls .button { width: 100%; }
  .sidebar-controls { align-self: stretch; }
  .filter-chip { padding-inline: .56rem; font-size: .81rem; }
  .site-dialog { width: calc(100% - 1.25rem); }
  .dialog-actions { justify-content: stretch; }
  .dialog-actions .button { flex: 1; }
}

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