:root {
  color-scheme: dark;
  --bg: #151719;
  --panel: #1c2024;
  --panel-2: #22272d;
  --line: #30363d;
  --text: #eef1f4;
  --muted: #9ca6b2;
  --soft: #c4cbd3;
  --blue: #6aa9ff;
  --green: #5ee0a0;
  --orange: #ffb86b;
  --red: #ff6b7a;
  --ia-bg: #050809;
  --ia-panel: #070c0d;
  --ia-card: #0c1416;
  --ia-line: #17383b;
  --ia-strong-line: #00eaff;
  --ia-accent: #14c6c0;
  --ia-accent-dark: #0b4c4e;
  --ia-soft: #d7e6e7;
  --ia-muted: #8fa3a5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

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

@keyframes ia-blink {
  0%, 48% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.home-shell {
  min-height: 100vh;
  background: var(--ia-bg);
  color: var(--text);
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: var(--ia-panel);
  border-bottom: 1px solid #14262a;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.home-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #17787a;
  background: linear-gradient(160deg, var(--ia-accent), var(--ia-accent-dark));
  color: #0a1214;
  font-weight: 700;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--ia-accent);
  border-radius: 9px;
  padding: 13px 22px;
  background: var(--ia-card);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: transform .22s cubic-bezier(.16,.8,.3,1), background-color .22s;
}

.home-button:hover {
  transform: translateY(-2px) scale(1.03);
  background: #10262a;
}

.home-button.secondary {
  border-color: var(--ia-strong-line);
  font-weight: 500;
}

.home-button.small {
  min-height: 38px;
  padding: 9px 16px;
  flex: none;
}

.home-hero {
  padding: 96px 32px 72px;
  border-bottom: 1px solid #14262a;
  background: linear-gradient(89deg, var(--ia-bg), #0f9395);
}

.home-inner {
  max-width: 780px;
  margin: 0 auto;
}

.home-kicker {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ia-muted);
  animation: ia-rise .7s cubic-bezier(.16,.8,.3,1) both;
}

.home-hero h1 {
  margin: 22px 0 0;
  max-width: none;
  font-family: Verdana, Geneva, sans-serif;
  font-size: clamp(42px, 7vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
  text-shadow: 0 4px 12px rgba(0,0,0,.15);
  animation: ia-rise .8s cubic-bezier(.16,.8,.3,1) .1s both;
}

.home-lead {
  margin: 26px 0 0;
  max-width: 62ch;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.55;
  animation: ia-rise .8s cubic-bezier(.16,.8,.3,1) .2s both;
}

.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 38px;
  animation: ia-rise .8s cubic-bezier(.16,.8,.3,1) .3s both;
}

.home-band {
  padding: 72px 32px;
  border-bottom: 1px solid #14262a;
  background: var(--ia-panel);
}

.home-band.alt {
  box-shadow: inset 0 0 0 1px var(--ia-line);
}

.home-band h2 {
  margin: 0;
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 20px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-statement {
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.45;
  font-weight: 500;
}

.home-copy {
  margin: 34px 0 0;
  max-width: 64ch;
  color: var(--ia-soft);
  font-size: 17px;
  line-height: 1.65;
}

.home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.home-tags span {
  border: 1px solid var(--ia-strong-line);
  border-radius: 20px;
  padding: 7px 12px;
  background: var(--ia-card);
  color: var(--soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  transition: transform .22s cubic-bezier(.16,.8,.3,1), background-color .22s;
}

.home-tags span:hover {
  transform: scale(1.07);
  background: #10262a;
}

.home-grid,
.home-access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  margin-top: 26px;
  border: 1px solid #163034;
  border-radius: 12px;
  background: #163034;
  overflow: hidden;
}

.home-access {
  gap: 12px;
  border: 0;
  background: transparent;
}

.home-grid article,
.home-access article {
  display: flex;
  gap: 14px;
  padding: 22px;
  background: var(--ia-card);
  transition: transform .28s cubic-bezier(.16,.8,.3,1), background-color .28s;
}

.home-access article {
  border: 1px solid var(--ia-line);
  border-radius: 12px;
}

.home-grid article:hover,
.home-access article:hover {
  transform: scale(1.025);
  background: #101d20;
}

.home-grid span,
.home-access span {
  flex: none;
  color: var(--ia-accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.home-grid p,
.home-access p {
  margin: 0;
  color: #fff;
  font-size: 15.5px;
  line-height: 1.5;
}

.center {
  text-align: center;
}

.faq {
  background: var(--ia-bg);
}

.faq h2 {
  margin-top: 14px;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 38px;
  letter-spacing: 0;
  text-transform: none;
}

.faq-list {
  margin-top: 34px;
  border: 1px solid var(--ia-line);
  border-radius: 14px;
  background: var(--ia-card);
  padding: 6px 22px;
}

.faq-list details {
  border-bottom: 1px solid var(--ia-line);
}

.faq-list details:last-child {
  border-bottom: 0;
}

.faq-list summary {
  padding: 20px 0;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.faq-list p {
  margin: 0;
  padding: 0 0 22px;
  color: #b7c7c8;
  font-size: 14.5px;
  line-height: 1.65;
}

.home-final {
  padding: 96px 32px 110px;
  background: linear-gradient(89deg, var(--ia-bg), var(--ia-accent-dark));
}

.home-final p {
  margin: 0 0 18px;
  color: #fff;
  font-size: 18px;
}

.home-final-title {
  font-size: 34px !important;
  line-height: 1.2;
  font-weight: 700;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 19px;
  margin-left: 8px;
  vertical-align: -3px;
  background: var(--ia-accent);
  animation: ia-blink 1.1s steps(1, end) infinite;
}

.home-footer {
  padding: 26px 32px 40px;
  border-top: 1px solid #14262a;
}

.home-footer .home-inner {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: baseline;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
}

.home-footer a {
  margin-left: auto;
  color: var(--ia-accent);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 250px;
}

.sidebar, .rightbar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}

.rightbar {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.side-head { padding: 18px; border-bottom: 1px solid var(--line); }
.side-head p, .muted { color: var(--muted); margin: 4px 0 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(150deg, #2b3440, #1a1f25);
  color: var(--green);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  padding: 18px;
}

.channel-list, .member-list, .admin-nav {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.channel, .admin-nav button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 7px;
  padding: 10px;
  background: transparent;
  color: var(--soft);
}

.channel.active, .admin-nav button.active, .channel:hover, .admin-nav button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.chat {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) auto;
  min-height: 100vh;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #181b1f;
}

.messages {
  padding: 22px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
}

.message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #2b3440;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 700;
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  padding: 12px;
}

.meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}

.meta small { color: var(--muted); }
.bubble p { margin: 0; line-height: 1.45; color: var(--soft); }

.composer {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.composer textarea, input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.composer textarea { resize: none; min-height: 46px; }

.panel-button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--green);
  color: #071019;
  font-weight: 700;
}

.signin {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.signin input { width: 220px; }

.status {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  font-size: 13px;
}

.admin-main {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-content {
  padding: 28px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table th, .table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.table th { color: var(--muted); font-size: 12px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin: 18px 0;
}

@media (max-width: 900px) {
  .home-header { padding: 14px 18px; }
  .home-hero, .home-band, .home-final { padding-left: 18px; padding-right: 18px; }
  .home-button.small { font-size: 12px; padding: 8px 10px; }
  .home-statement { font-size: 22px; }
  .home-access, .home-grid { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar, .rightbar { min-height: auto; }
  .rightbar { display: none; }
  .chat { min-height: 70vh; }
  .admin-main { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
