/* UI components */

/* Site-wide announcement (above header) */
.site-announce {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 200, 154, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 200, 154, 0.16), rgba(109, 255, 200, 0.06)),
    rgba(0, 0, 0, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.site-announce__label {
  flex-shrink: 0;
  margin-top: 0.1rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1208;
  background: var(--accent-warm);
}

.site-announce__text {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.site-announce__edit {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--accent-warm);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  opacity: 0.9;
}

.site-announce__edit:hover {
  opacity: 1;
  color: #fff;
}

/* Header / logo / nav */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 0.75rem 0.9rem 0.75rem 1.15rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.logo__mark {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(109, 255, 200, 0.28);
  overflow: hidden;
}

.logo__mark svg {
  width: 100%;
  height: 100%;
}

.logo__text {
  background: linear-gradient(120deg, #fff 20%, var(--accent) 55%, var(--accent-2) 100%);
  background-size: 160% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s ease-in-out infinite;
}

.nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

.nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 550;
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav a.is-active {
  color: var(--text);
  background: rgba(109, 255, 200, 0.14);
  box-shadow: inset 0 0 0 1px rgba(109, 255, 200, 0.25);
}

/* Hero */
.hero {
  margin-bottom: 1.5rem;
  padding: 2rem 1.6rem 1.85rem;
}

.hero__glow {
  position: absolute;
  width: 280px;
  height: 280px;
  top: -120px;
  right: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 255, 200, 0.22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(109, 255, 200, 0.22);
}

.eyebrow__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__brand {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  background: linear-gradient(135deg, #fff 0%, #d8fff0 40%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 14em;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgba(242, 244, 248, 0.88);
}

.lead {
  margin: 0;
  max-width: 34em;
  color: var(--text-muted);
  font-size: 1.02rem;
  font-weight: 450;
}

/* Home section cards */
.sections {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .sections {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .sections {
    grid-template-columns: repeat(4, 1fr);
  }
}

.section-link {
  --tint: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.35rem 1.25rem 1.25rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.section-link::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--tint) 28%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}

.section-link:nth-child(2) { --tint: var(--accent-2); }
.section-link:nth-child(3) { --tint: var(--accent-warm); }

.section-link:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tint) 45%, rgba(255, 255, 255, 0.2));
  box-shadow:
    var(--shadow-hover),
    0 0 0 1px color-mix(in srgb, var(--tint) 18%, transparent),
    inset 0 1px 0 var(--glass-highlight);
}

.section-link:hover::after {
  opacity: 1;
}

.section-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 28%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--tint) 18%, transparent);
}

.section-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.section-desc {
  position: relative;
  z-index: 1;
  display: block;
  flex: 1;
  margin-bottom: 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.section-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--tint);
  transition: gap var(--dur) var(--ease);
}

.section-link:hover .section-cta {
  gap: 0.55rem;
}

/* Footer */
.footer {
  margin-top: 2.75rem;
  padding: 0 0.35rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer__pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer__pulse::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Inner pages */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 550;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.back:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(109, 255, 200, 0.25);
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.page-intro {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 34em;
}

.page-intro code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.placeholder {
  padding: 1.5rem 1.4rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px dashed rgba(109, 255, 200, 0.28);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.925rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Tools list */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.tool-list a {
  --tint: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.25rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.tool-list a:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tint) 40%, rgba(255, 255, 255, 0.2));
  box-shadow: var(--shadow-hover), 0 0 0 1px color-mix(in srgb, var(--tint) 15%, transparent);
}

.tool-list .tool-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 28%, transparent);
}

.tool-list .tool-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-list .tool-body strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tool-list .tool-body > span:not(.tool-hint) {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.tool-list .tool-arrow {
  color: var(--text-faint);
  font-size: 1.1rem;
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tool-list a:hover .tool-arrow {
  color: var(--tint);
  transform: translateX(3px);
}

.tool-list .soon {
  opacity: 0.48;
  pointer-events: none;
}

.tool-list strong {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.tool-list .tool-status {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.tool-list .tool-status--on {
  color: #052018;
  background: #6dffc8;
  border: 1px solid #3fd9a8;
}

.tool-list .tool-status--off {
  color: #fff5f5;
  background: rgba(220, 60, 60, 0.55);
  border: 1px solid rgba(255, 140, 140, 0.55);
}

.tool-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--accent-warm);
}

.tool-hint code {
  font-size: 0.85em;
}

.tool-list a.tool-offline {
  border-color: rgba(255, 160, 100, 0.25);
}

/* ——— Auth / forms / KB ——— */

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

.userbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.userbar__name {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 550;
  text-decoration: none;
}

a.userbar__name:hover,
a.userbar__name.is-active {
  color: var(--accent);
}

.header {
  gap: 0.75rem 1rem;
}

@media (min-width: 900px) {
  .header .nav {
    margin-left: auto;
  }

  .userbar {
    margin-left: 0.5rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn--primary {
  color: #061014;
  background: linear-gradient(120deg, var(--accent), #9dfff0);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.btn--danger {
  color: #ffb4b4;
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 100, 100, 0.28);
}

.btn--danger:hover {
  background: rgba(255, 80, 80, 0.2);
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto 0;
  padding: 1.75rem 1.5rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form--wide {
  padding: 1.5rem;
  max-width: 720px;
}

.form__row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.form__field {
  display: grid;
  gap: 0.4rem;
}

.form__field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.form__field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-color: rgba(8, 12, 18, 0.72);
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236dffc8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 0.85rem center;
  background-size: 100% 100%, 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form__field select:hover {
  border-color: rgba(109, 255, 200, 0.28);
  background-color: rgba(12, 18, 26, 0.85);
}

.form__field select:focus {
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23eef1f6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 0.85rem center;
  background-size: 100% 100%, 14px;
}

.form__field select option {
  background-color: #12161e;
  color: #eef1f6;
}

.form__field textarea {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 220px;
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  border-color: rgba(109, 255, 200, 0.45);
  box-shadow: 0 0 0 3px rgba(109, 255, 200, 0.12);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash--error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ffc9c9;
}

.flash--ok {
  background: rgba(109, 255, 200, 0.1);
  border: 1px solid rgba(109, 255, 200, 0.28);
  color: #c9ffe8;
}

.flash--warn {
  background: rgba(255, 200, 120, 0.1);
  border: 1px solid rgba(255, 200, 120, 0.28);
  color: #ffe3b8;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.page-head .back {
  margin-bottom: 0.75rem;
}

.page-head .page-intro {
  margin-bottom: 0;
}

.kb-filters {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0 1.5rem;
}

.kb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kb-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.kb-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.kb-chip.is-active {
  color: var(--text);
  background: rgba(109, 255, 200, 0.14);
  border-color: rgba(109, 255, 200, 0.3);
}

.kb-search input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
}

.kb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .kb-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kb-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  padding: 1.2rem 1.25rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.kb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(109, 255, 200, 0.35);
  box-shadow: var(--shadow-hover);
}

a.kb-card {
  text-decoration: none;
  color: inherit;
}

.kb-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.kb-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kb-view__desc {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.kb-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.kb-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.kb-card__preview {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.kb-card__dates {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.change-log {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.change-log__title {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.change-log__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.change-log__list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
}

.change-log__list strong {
  color: var(--text);
}

.change-log__list time {
  color: var(--text-faint);
  font-size: 0.78rem;
}

.kb-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.kb-badge--regex {
  color: #c4b5ff;
  background: rgba(196, 181, 255, 0.14);
}

.kb-badge--script {
  color: var(--accent);
  background: var(--accent-soft);
}

.kb-badge--snippet {
  color: #9ecbff;
  background: rgba(120, 180, 255, 0.14);
}

.kb-badge--note {
  color: var(--accent-warm);
  background: rgba(255, 200, 154, 0.14);
}

.kb-badge--prompt {
  color: #f0a0d0;
  background: rgba(240, 160, 208, 0.14);
}

.docs-badge--guide {
  color: #9ecbff;
  background: rgba(120, 180, 255, 0.14);
}

.docs-badge--process {
  color: var(--accent);
  background: var(--accent-soft);
}

.docs-badge--checklist {
  color: #8fd9a8;
  background: rgba(120, 200, 150, 0.14);
}

.docs-badge--agreement {
  color: #c4b5ff;
  background: rgba(196, 181, 255, 0.14);
}

.docs-badge--other {
  color: var(--accent-warm);
  background: rgba(255, 200, 154, 0.14);
}

.doc-body {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-files {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.doc-files--view {
  margin-top: 1.1rem;
}

.doc-files__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.doc-files__meta {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.doc-files__delete {
  margin: 0;
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.doc-gallery__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.doc-gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.form__field input[type="file"] {
  padding: 0.65rem 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  cursor: pointer;
}

.kb-lang {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: ui-monospace, monospace;
}

.kb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.kb-tag {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.kb-view {
  padding: 1.5rem 1.35rem;
}

.kb-view__head {
  margin-bottom: 1.25rem;
}

.kb-view__meta {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.kb-view__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  align-items: center;
}

.fav-form {
  display: inline-flex;
  margin: 0;
}

.fav-btn.is-active {
  color: var(--accent-warm);
  border-color: rgba(255, 200, 154, 0.35);
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 1.25rem;
}

.activity-list__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-list__item:last-child {
  border-bottom: 0;
}

.activity-list__main {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  color: var(--text-muted);
}

.activity-list__main strong {
  color: var(--text);
  font-weight: 650;
}

.activity-list__main a {
  color: var(--accent);
}

.activity-list__time {
  font-size: 0.8rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem;
  margin: 0 0 1.25rem;
}

.account-nav__link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.account-nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.account-nav__link.is-active {
  color: #04110c;
  background: var(--accent);
}

.account-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 800px) {
  .account-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.account-card {
  padding: 1.25rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.account-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.account-meta {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.account-meta dt {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin: 0 0 0.15rem;
}

.account-meta dd {
  margin: 0;
  font-weight: 600;
}

.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.account-stat {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.15rem;
}

.account-stat strong {
  font-size: 1.35rem;
  font-family: var(--font-display);
}

.account-stat span {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.account-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.account-list li > span:last-child {
  color: var(--text-faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.account-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* Home dashboard */
.home-hello {
  margin: 0 0 1.35rem;
}

.home-hello__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.1rem;
  flex-wrap: wrap;
  margin: 0 0 0.35rem;
}

.home-hello__hi {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-hello__ver {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 255, 200, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.home-hello__hash {
  color: var(--text-muted);
  font-weight: 550;
  letter-spacing: 0.02em;
}

.home-hello__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 36rem;
}

.home-launch {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}

@media (min-width: 720px) {
  .home-launch {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1080px) {
  .home-launch {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.home-launch__btn {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(109, 255, 200, 0.28);
  background: rgba(109, 255, 200, 0.1);
  color: var(--text);
  text-decoration: none;
}

.home-launch__btn--alt {
  border-color: rgba(196, 181, 255, 0.3);
  background: rgba(196, 181, 255, 0.1);
}

.home-launch__btn strong {
  font-size: 1.12rem;
}

.home-launch__btn span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.home-launch__btn em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.35rem;
}

.home-launch__btn--alt em {
  color: var(--accent-2);
}

.home-launch__btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.home-launch__btn.is-offline em {
  color: var(--accent-warm);
}

.home-grid {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 0.9rem;
}

@media (min-width: 800px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.home-card {
  padding: 1.2rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.home-card--wide {
  margin-bottom: 0.4rem;
}

.home-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-card__head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-card__head a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.home-card__head a:hover {
  color: var(--text);
}

.home-card__title {
  margin: 0;
  font-weight: 650;
  font-size: 1.02rem;
}

.home-card__meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-faint);
}

.home-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.home-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.home-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.home-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.9rem;
}

.home-list li > span:last-child:not(.home-list__side) {
  color: var(--text-faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.home-list__side {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.home-feed-search {
  display: grid;
  gap: 0.45rem;
}

.home-feed-search .kb-search input {
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}

.home-feed-found {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.home-feed-found a {
  color: var(--text-muted);
}

.home-feed-found a:hover {
  color: var(--text);
}

.home-feed {
  display: grid;
  gap: 0.5rem;
}

.home-feed__day {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-feed__day:first-child {
  margin-top: 0;
}

.home-feed__item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.home-feed__summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 0.85rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.home-feed__summary::-webkit-details-marker {
  display: none;
}

.home-feed__summary::marker {
  content: '';
}

.home-feed__summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.home-feed__summary:focus-visible {
  outline: 2px solid rgba(109, 255, 200, 0.45);
  outline-offset: -2px;
}

.home-feed__kind {
  flex-shrink: 0;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-feed__kind--announce {
  color: #1a1208;
  background: var(--accent-warm);
}

.home-feed__kind--tip {
  color: #062018;
  background: var(--accent);
}

.home-feed__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-feed__item[open] .home-feed__title {
  white-space: normal;
}

.home-feed__time {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.home-feed__chevron {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.1rem;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.home-feed__item[open] .home-feed__chevron {
  transform: rotate(-135deg);
  opacity: 0.75;
}

.home-feed__panel {
  display: grid;
  gap: 0.5rem;
  padding: 0.15rem 0.95rem 0.85rem;
}

.home-feed__body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-feed__panel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.home-feed__edit {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.home-feed__edit:hover {
  color: var(--text);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.pager a,
.pager span {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.pager a:hover {
  color: var(--text);
  border-color: rgba(109, 255, 200, 0.35);
}

.pager__current {
  color: #c9ffe8;
  border-color: rgba(109, 255, 200, 0.35);
  background: rgba(109, 255, 200, 0.14);
}

.pager__gap {
  border: 0;
  background: transparent;
  min-width: 1rem;
  color: var(--text-faint);
}

.feed-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.feed-admin-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.feed-admin-list strong {
  display: block;
  margin-top: 0.35rem;
}

.feed-admin-list p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.feed-admin-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}

.feed-admin-list__actions form {
  margin: 0;
}

.code-block {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.code-block__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-block__pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  max-height: min(70vh, 640px);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 860px) {
  .admin-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.user-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-list__date {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.form__field--check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.form__field--check input {
  width: auto;
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.page-head__actions form {
  margin: 0;
}

/* Training */
.train-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.train-course {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.train-course:hover {
  transform: translateY(-2px);
}

.train-course__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.train-course__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.train-course__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.train-progress {
  display: grid;
  gap: 0.4rem;
}

.train-progress--hero {
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.train-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.train-progress__track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.train-progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2, #8ad4ff));
  box-shadow: 0 0 16px rgba(109, 255, 200, 0.35);
  animation: train-fill 0.9s var(--ease) forwards;
}

@keyframes train-fill {
  from { width: 0; }
  to { width: var(--p, 0%); }
}

.train-path {
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
  display: grid;
  gap: 0;
  position: relative;
}

.train-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.85rem;
  align-items: stretch;
  position: relative;
  padding-bottom: 1rem;
}

.train-step:last-child {
  padding-bottom: 0;
}

.train-step__rail {
  position: absolute;
  left: 1.15rem;
  top: 2.4rem;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.train-step:last-child .train-step__rail {
  display: none;
}

.train-step--done .train-step__rail {
  background: rgba(109, 255, 200, 0.35);
}

.train-step__node {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
}

.train-step__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.train-step--done .train-step__node {
  color: #04110c;
  background: var(--accent);
  border-color: transparent;
}

.train-step--current .train-step__node {
  color: #04110c;
  background: var(--accent);
  border-color: transparent;
  animation: train-node-pulse 1.8s var(--ease) infinite;
}

.train-step--locked .train-step__node {
  opacity: 0.55;
}

.train-step__card {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

a.train-step__card:hover {
  transform: translateX(4px);
}

.train-step__card--locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.train-step__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.train-step--current .train-step__label {
  color: var(--accent);
}

.train-step--done .train-step__label {
  color: var(--accent);
}

.train-step__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.train-step__hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.train-step--flash .train-step__card {
  animation: train-unlock 0.85s var(--ease);
}

.train-lesson__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.train-lesson__done {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.train-step--noaccess .train-step__node {
  opacity: 0.4;
}

.train-access-list {
  display: grid;
  gap: 0.85rem;
}

.train-access-card {
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.train-access-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.train-access-card__head strong {
  font-family: var(--font-display);
  margin-right: 0.4rem;
}

.train-access-card__progress {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.train-access-card__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.train-access-checks {
  display: grid;
  gap: 0.4rem;
}

.train-access-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.train-access-check input {
  margin-top: 0.2rem;
}

.train-access-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.form__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

#lesson-body.is-plain {
  min-height: 22rem;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form--editor.glass {
  overflow: visible;
}

.form--editor .tox-tinymce {
  border-radius: 12px !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.train-body {
  margin-top: 0.35rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text);
}

.train-body > *:first-child {
  margin-top: 0;
}

.train-body h2,
.train-body h3,
.train-body h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 1.5rem 0 0.65rem;
}

.train-body h2 {
  font-size: 1.35rem;
}

.train-body h3 {
  font-size: 1.12rem;
}

.train-body h4 {
  font-size: 1.02rem;
  color: var(--text-muted);
}

.train-body p {
  margin: 0 0 0.85rem;
}

.train-body ul,
.train-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.train-body li {
  margin: 0.25rem 0;
}

.train-body a {
  color: var(--accent);
}

.train-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid rgba(109, 255, 200, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 12px 12px 0;
  color: var(--text-muted);
}

.train-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

.train-body img,
.train-body video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.train-body figure {
  margin: 1rem 0;
}

.train-body figcaption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.train-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.train-body th,
.train-body td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.train-body th {
  background: rgba(255, 255, 255, 0.05);
}

.train-body pre,
.train-body code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

.train-body pre {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.train-body .train-callout {
  margin: 1rem 0;
  padding: 0.9rem 1.05rem;
  border-left: 3px solid var(--accent);
  background: rgba(109, 255, 200, 0.08);
  border-radius: 0 12px 12px 0;
}

.train-body .train-callout--tip {
  border-left-color: #8ad4ff;
  background: rgba(138, 212, 255, 0.08);
}

.train-body .train-callout--warn {
  border-left-color: var(--accent-warm, #ffc89a);
  background: rgba(255, 200, 154, 0.1);
}

.train-body iframe.train-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  background: #000;
}

/* —— Отчётность —— */
.report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.report-stats--admin {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-stats--admin[data-stats-mode="buying"],
.report-stats--admin[data-stats-mode="seo"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-stats--admin[data-stats-mode="internal"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-stat {
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.25rem;
}

.report-stat strong {
  font-family: var(--font-display, inherit);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.report-stat span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.report-period {
  margin-bottom: 1.25rem;
}

.report-focus {
  margin: -0.35rem 0 1.25rem;
}

.report-period-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.report-period-custom .form__field {
  min-width: 9rem;
}

.report-form-card {
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.75rem;
  max-width: 800px;
}

.report-dir-tabs {
  margin: 0.75rem 0 1.1rem;
}

.report-dir-panel[hidden] {
  display: none;
}

.report-dir-panel + .report-dir-panel {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.report-dir-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.report-dir-hint {
  margin: -0.4rem 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.report-form {
  max-width: none;
  padding: 0;
}

.report-qty-grid {
  grid-template-columns: 1fr 1fr;
}

.report-grade__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.report-grade__inputs--solo {
  grid-template-columns: 1fr;
}

.report-grade__inputs em {
  display: block;
  margin-bottom: 0.25rem;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.report-weight {
  font-style: normal;
  font-weight: 500;
  color: var(--text-faint);
}

.report-table-wrap {
  overflow-x: auto;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
}

.report-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.report-table--team {
  min-width: 72rem;
}

.report-table th,
.report-table td {
  padding: 0.7rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.report-table th {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.report-table th:last-child,
.report-table td:last-child {
  width: 1%;
  padding-left: 1.25rem;
  padding-right: 1.15rem;
}

.report-table td:last-child:not(.report-table__compose):not(.report-table__meta) {
  white-space: nowrap;
}

.report-table tfoot td {
  border-bottom: 0;
  font-weight: 600;
  padding-top: 0.9rem;
}

.report-table tr.is-me td {
  background: rgba(109, 255, 200, 0.06);
}

.report-table__actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.report-table__actions form {
  display: inline-flex;
  margin: 0 0 0 0.4rem;
  vertical-align: middle;
}

.report-table__actions .btn {
  vertical-align: middle;
}

.report-table__compose {
  max-width: 28rem;
  line-height: 1.4;
  word-break: break-word;
}

.report-table__meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  min-width: 10rem;
  padding-right: 1.15rem;
  white-space: normal;
}

.report-log {
  list-style: none;
  margin: 0;
  padding: 0.35rem 1rem;
}

.report-log li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-log li:last-child {
  border-bottom: 0;
}

.report-log__when {
  display: inline-block;
  min-width: 4.6rem;
  margin-right: 0.45rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.report-log__sum {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.report-table__empty {
  color: var(--text-muted);
  text-align: center;
}

.report-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  color: #0a1210;
  background: var(--accent);
}

.report-attend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.25rem;
}

.report-attend__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.report-status {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.report-status--ok {
  color: #0a1210;
  background: var(--accent);
}

.report-status--warn {
  color: #ffd7c2;
  background: rgba(255, 120, 80, 0.18);
}

.report-status--mute {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.report-table tr.is-missing td {
  background: rgba(255, 120, 80, 0.04);
}

.report-delta {
  width: 1%;
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 650;
  text-align: right;
}

.report-table--team th:last-child,
.report-table--team td:last-child {
  min-width: 4.5rem;
  text-align: right;
}

.report-table--team td:nth-last-child(2) .report-work {
  min-width: 0;
}

.report-delta--up {
  color: #8dffd0;
}

.report-delta--down {
  color: #ff9b7a;
}

.report-delta--flat {
  color: var(--text-muted);
  font-weight: 500;
}

.report-plan,
.report-comment {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
}

.report-comment {
  max-width: 18rem;
}

.report-kpi {
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.25rem;
}

.report-kpi p {
  margin: 0;
}

.report-kpi p + p {
  margin-top: 0.35rem;
}

.report-person-link {
  color: inherit;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
}

.report-person-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.report-mix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.report-mix--one {
  grid-template-columns: 1fr;
}

.report-mix__col {
  padding: 1rem 1.15rem 1.1rem;
}

.report-mix__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.report-mix__sum,
.report-mix__empty,
.report-mix__meta {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.report-mix__list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.report-mix__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.report-mix__row strong {
  font-variant-numeric: tabular-nums;
}

.report-mix__bar {
  height: 4px;
  margin: 0.35rem 0 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.report-mix__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.report-work {
  display: grid;
  gap: 0.35rem;
  min-width: 8.5rem;
  max-width: 100%;
}

.report-work__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
}

.report-work__head strong,
.report-work__total {
  font-variant-numeric: tabular-nums;
}

.report-work__head em,
.report-work__total {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.report-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1100px) {
  .report-stats,
  .report-stats--admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-mix {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .report-stats,
  .report-stats--admin {
    grid-template-columns: 1fr;
  }

  .report-mix {
    grid-template-columns: 1fr;
  }

  .report-qty-grid {
    grid-template-columns: 1fr;
  }
}

/* Timesheet */
.timesheet__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
}

.timesheet__title {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.timesheet__sub {
  margin: 0;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.timesheet__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.timesheet__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.9rem;
}

.timesheet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
}

.timesheet-chip b {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.timesheet-wrap {
  overflow: auto;
  padding: 0.35rem;
}

.timesheet-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.timesheet-grid th,
.timesheet-grid td {
  padding: 0.2rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timesheet-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 2.15rem;
  padding: 0.35rem 0.15rem;
  color: var(--text-muted);
  background: rgba(10, 12, 18, 0.92);
}

.timesheet-grid thead th span {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.timesheet-grid thead th em {
  display: block;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: lowercase;
}

.timesheet-grid thead th.is-weekend,
.timesheet-grid thead th.is-weekend span {
  color: var(--text-faint);
}

.timesheet-grid .is-today {
  box-shadow: inset 0 0 0 1px rgba(109, 255, 200, 0.35);
}

.timesheet-grid__name {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 11.5rem;
  min-width: 11.5rem;
  padding: 0.45rem 0.7rem !important;
  text-align: left !important;
  background: rgba(10, 12, 18, 0.94);
}

.timesheet-grid thead .timesheet-grid__name {
  z-index: 4;
}

.timesheet-grid__name strong {
  display: block;
  font-size: 0.88rem;
}

.timesheet-grid__name span {
  display: block;
  margin-top: 0.12rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 500;
}

.timesheet-grid__sum {
  min-width: 3.2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.timesheet-grid__empty {
  padding: 1.2rem !important;
  color: var(--text-muted);
}

.timesheet-cell {
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.timesheet-cell--work {
  color: #0a1210;
  background: rgba(109, 255, 200, 0.82);
}

.timesheet-cell--vacation {
  color: #1a1208;
  background: rgba(255, 200, 154, 0.88);
}

.timesheet-cell--weekend {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.timesheet-cell--leave {
  color: #0d1020;
  background: rgba(196, 181, 255, 0.86);
}

.timesheet-cell--sick {
  color: #2a100c;
  background: rgba(255, 140, 110, 0.88);
}

.timesheet-chip--work { color: var(--accent); }
.timesheet-chip--vacation { color: var(--accent-warm); }
.timesheet-chip--weekend { color: var(--text-muted); }
.timesheet-chip--leave { color: var(--accent-2); }
.timesheet-chip--sick { color: #ff9b7a; }

.timesheet-pop {
  position: fixed;
  z-index: 40;
  display: grid;
  gap: 0.3rem;
  min-width: 10.5rem;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 12, 18, 0.96);
  box-shadow: var(--shadow);
}

.timesheet-pop[hidden] {
  display: none;
}

.report-status--off {
  color: var(--accent-warm);
  background: rgba(255, 200, 154, 0.14);
}


