:root {
  --bg: #0b0c0d;
  --sidebar: #151516;
  --main: #1b1b1c;
  --topbar: #181819;
  --panel: #1d1d1e;
  --panel-raised: #222223;
  --line: #2b2c2e;
  --line-soft: #252628;
  --text: #ecedee;
  --muted: #a2a4a8;
  --faint: #717377;
  --ok: #a9d8b8;
  --err: #e6aaaa;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 100svh;
  padding: 20px;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 18% -10%, #191a1b 0%, rgba(11, 12, 13, 0) 60%),
    var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #3b3d40;
  color: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  width: min(1320px, 100%);
  height: calc(100svh - 40px);
  overflow: hidden;
  border: 1px solid #28292c;
  border-radius: var(--radius);
  background: var(--main);
  box-shadow:
    0 40px 100px -45px #000,
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Sidebar ------------------------------------------------------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 12px 12px;
  border-right: 1px solid var(--line-soft);
  background: var(--sidebar);
}

.sidebar__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 20px;
}

.mark {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid #343537;
  border-radius: 9px;
  background: linear-gradient(150deg, #2a2b2d, #1b1c1d);
}

.mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #8e9297;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  transform: rotate(-32deg);
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand__name {
  color: #e4e6e8;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand__sub {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar__label {
  margin: 0 0 8px;
  padding: 0 10px;
  color: #5e6064;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aeb0b4;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #d7d9dc;
}

.nav__item.is-active {
  background: #262728;
  color: #f2f3f4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.nav__icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  opacity: 0.72;
}

.nav__item.is-active .nav__icon {
  opacity: 1;
}

.nav__item:focus-visible {
  outline: 2px solid #7d8288;
  outline-offset: 1px;
}

.sidebar__spacer {
  flex: 1;
  min-height: 20px;
}

.sidebar__foot {
  padding: 14px 10px 4px;
  border-top: 1px solid #252628;
}

.footline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #6d6f73;
  font-size: 11.5px;
}

.dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #434549;
}

/* Main ---------------------------------------------------------------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--main);
}

.topbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  height: 58px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--topbar);
}

.topbar__title {
  margin: 0;
  color: #e6e7e9;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar__hint {
  margin-left: auto;
  margin-right: 6px;
  color: #626468;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.main__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 34px 34px 30px;
  scrollbar-color: #383a3d transparent;
  scrollbar-width: thin;
}

.main__scroll::-webkit-scrollbar {
  width: 10px;
}

.main__scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background-clip: padding-box;
  background-color: #383a3d;
}

.main__scroll::-webkit-scrollbar-thumb:hover {
  background-color: #464850;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
  animation: fade 0.22s ease both;
}

.view[hidden] {
  display: none;
}

/* Shared -------------------------------------------------------------- */

.section-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.section-lede {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.rule {
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, #3c3e41, #2a2b2d);
}

.note {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.note--faint {
  color: var(--faint);
}

/* Imprint ------------------------------------------------------------- */

.imprint {
  padding: 46px 46px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(620px 320px at 12% 8%, rgba(255, 255, 255, 0.022), transparent 70%),
    linear-gradient(180deg, #1e1e1f 0%, #1a1a1b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.imprint__image {
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.mail-image {
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.imprint .rule {
  margin: 26px 0 22px;
}

.imprint__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 0 4px;
}

.legal {
  max-width: 62ch;
}

.legal--applies {
  margin-top: 16px;
}

.legal__label {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal__text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.legal__text a {
  color: #d7d9dc;
  text-decoration: underline;
  text-decoration-color: #4a4c50;
  text-underline-offset: 3px;
}

.legal__text a:hover {
  text-decoration-color: #9a9ea3;
}

/* Imprint content (Markdown) ------------------------------------------ */

.md > :first-child {
  margin-top: 0;
}

.md h1,
.md h2,
.md h3,
.md h4 {
  margin: 22px 0 6px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.md p,
.md li {
  max-width: 62ch;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.md ul,
.md ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.md strong {
  color: #e4e6e8;
}

.md a {
  color: #d7d9dc;
  text-decoration: underline;
  text-decoration-color: #4a4c50;
  text-underline-offset: 3px;
}

.md a:hover {
  text-decoration-color: #9a9ea3;
}

.md hr {
  width: 44px;
  height: 1px;
  margin: 26px 0 22px;
  border: 0;
  background: linear-gradient(90deg, #3c3e41, #2a2b2d);
}

.md img {
  margin: 4px 0;
}

.md table {
  margin: 0 0 12px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 13px;
}

.md td,
.md th {
  padding: 4px 14px 4px 0;
  text-align: left;
}

.md__back {
  margin: 22px 0 0;
  font-size: 13px;
}

.md__back a {
  color: #d7d9dc;
  text-underline-offset: 3px;
}

/* Profile ------------------------------------------------------------- */

.profile {
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1d1d1e;
}

.profile__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #2a2b2d;
  object-fit: cover;
}

.profile__body {
  min-width: 0;
}

.profile__body p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile__name {
  color: #eceef0;
  font-size: 18px;
  font-weight: 600;
}

.profile__handle {
  color: #909398;
  font-size: 13px;
}

.profile__meta {
  color: #6c6e72;
  font-size: 12px;
}

.profile__open {
  flex: none;
  margin-left: auto;
  padding: 8px 13px;
  border: 1px solid #34363a;
  border-radius: 9px;
  background: #242526;
  color: #e3e5e7;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.profile__open:hover {
  background: #2c2d2f;
}

.profile__info {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-line;
}

/* Privacy ------------------------------------------------------------- */

.privacy {
  max-width: 76ch;
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a1a1b;
}

.privacy h3 {
  margin: 26px 0 8px;
  color: #e6e7e9;
  font-size: 14px;
  font-weight: 600;
}

.privacy p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.privacy .address {
  padding-left: 12px;
  border-left: 2px solid #34363a;
  color: #8f9297;
  font-size: 12.5px;
}

.privacy a {
  color: #d7d9dc;
  text-underline-offset: 3px;
}

.privacy .note {
  margin-top: 24px;
}

/* Language switch ----------------------------------------------------- */

.lang {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid #2e2f32;
  border-radius: 8px;
  background: #141415;
}

.lang a {
  padding: 3px 9px;
  border-radius: 6px;
  color: #82858a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.lang a:hover {
  color: #d7d9dc;
}

.lang a[aria-current="true"] {
  background: #2a2b2d;
  color: #f2f3f4;
}

.lang a:focus-visible {
  outline: 2px solid #7d8288;
  outline-offset: 1px;
}

/* Contact ------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a1a1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.contact__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 38px 34px;
  border-right: 1px solid var(--line-soft);
  background: radial-gradient(
    520px 320px at 20% 10%,
    rgba(255, 255, 255, 0.02),
    transparent 70%
  );
}

.contact__mail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.contact__form {
  padding: 36px 38px 32px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}

.field label {
  color: #82858a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #2e2f32;
  border-radius: 9px;
  background: #141415;
  color: var(--text);
  font-size: 14.5px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.field textarea {
  min-height: 148px;
  line-height: 1.6;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: #3a3b3e;
}

.field input:focus,
.field textarea:focus {
  border-color: #6e7278;
  outline: none;
  background: #161617;
  box-shadow: 0 0 0 3px rgba(150, 155, 162, 0.11);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 5px;
  padding: 12px 18px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #f0f2f3, #dcdfe2);
  color: #121314;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 12px 26px -16px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.submit:hover:not(:disabled) {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.submit:active:not(:disabled) {
  transform: translateY(0);
}

.submit:focus-visible {
  outline: 2px solid #9ba0a6;
  outline-offset: 3px;
}

.submit:disabled {
  cursor: progress;
  filter: brightness(0.92);
}

.submit.is-loading .submit__spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 10px;
  border: 2px solid rgba(18, 19, 20, 0.25);
  border-top-color: #121314;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit__spinner {
  display: none;
}

.status {
  min-height: 20px;
  margin: 13px 1px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.status[data-kind="success"] {
  color: var(--ok);
}

.status[data-kind="error"] {
  color: var(--err);
}

/* Channels ------------------------------------------------------------ */

.channels__head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 2px 2px 2px;
}

.channels__head > div {
  min-width: 0;
}

.count {
  flex: none;
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid #2e2f32;
  border-radius: 999px;
  background: #1c1c1d;
  color: #83868b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 10px;
}

.channel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #2a2b2d;
  border-radius: 12px;
  background: #1d1d1e;
  color: inherit;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.channel:hover {
  border-color: #3c3e41;
  background: #232324;
  transform: translateY(-1px);
}

.channel:focus-visible {
  outline: 2px solid #8a8f95;
  outline-offset: 2px;
}

.channel__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2b2d;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.channel__avatar--empty,
.site-icon {
  display: grid;
  place-items: center;
  color: #a2a4a8;
  font-size: 16px;
  font-weight: 600;
}

.site-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #2e2f32;
  border-radius: 12px;
  background: #222324;
}

.site-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.channel__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.4;
}

.channel__name,
.channel__handle,
.channel__subs {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel__name {
  color: #e6e7e9;
  font-size: 13.5px;
  font-weight: 600;
}

.channel__handle {
  color: #909398;
  font-size: 12px;
}

.channel__subs {
  margin-top: 1px;
  color: #6c6e72;
  font-size: 11px;
}

.channels__note {
  padding: 0 2px;
}

/* Footer -------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  flex: none;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 34px;
  border-top: 1px solid var(--line-soft);
  background: var(--topbar);
  color: #5d5f63;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Motion & responsive ------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  body {
    padding: 0;
  }

  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .sidebar__head {
    flex: none;
    padding: 0;
  }

  .brand__sub,
  .sidebar__label,
  .sidebar__spacer,
  .sidebar__foot {
    display: none;
  }

  .nav {
    flex-direction: row;
    flex: none;
    gap: 2px;
  }

  .nav__item {
    align-items: center;
    width: auto;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .nav__icon {
    margin-top: 0;
  }

  .topbar {
    height: 52px;
    padding: 0 18px;
  }

  .topbar__hint {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

  .main__scroll {
    padding: 22px 18px;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .contact__aside {
    gap: 14px;
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .contact__form {
    padding: 26px 24px 24px;
  }

  .imprint {
    padding: 32px 24px;
  }

  .privacy {
    padding: 26px 22px;
  }

  .profile {
    padding: 18px;
  }

  .profile__row {
    flex-wrap: wrap;
  }

  .profile__open {
    margin-left: 0;
  }

  .imprint__meta {
    gap: 10px;
  }

  .footer {
    padding: 12px 18px;
  }
}

@media (max-width: 480px) {
  .brand {
    display: none;
  }

  .nav__item {
    font-size: 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .channels {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .view,
  .submit.is-loading .submit__spinner {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
