:root {
  --ink: #10182d;
  --ink-soft: #293550;
  --muted: #66728b;
  --canvas: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --line: #dde5f1;
  --line-strong: #c9d4e7;
  --navy: #0c1229;
  --navy-soft: #111d3d;
  --blue: #365bff;
  --blue-dark: #2344d1;
  --cyan: #12bad1;
  --cyan-soft: #dff9fc;
  --gold: #f5ac45;
  --gold-soft: #fff2da;
  --green: #087d64;
  --green-soft: #e2f6ef;
  --red: #bd3f4f;
  --red-soft: #ffeaee;
  --shadow-sm: 0 7px 22px rgba(16, 24, 45, .05);
  --shadow: 0 22px 52px rgba(13, 24, 51, .1);
  --shadow-dark: 0 28px 58px rgba(7, 13, 32, .28);
  --radius: 18px;
  --radius-lg: 30px;
}

* { box-sizing: border-box; }

html {
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.5 "Segoe UI Variable", "Aptos", "Inter", "Segoe UI", Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 4% 14%, rgba(54, 91, 255, .09), transparent 34rem),
    radial-gradient(circle at 96% 8%, rgba(18, 186, 209, .11), transparent 32rem),
    var(--canvas);
}

button, input, textarea, select { font: inherit; }

button {
  cursor: pointer;
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  min-height: 76px;
  padding: 13px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(221, 229, 241, .85);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.055em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 11px 25px rgba(54, 91, 255, .28);
}

nav {
  display: flex;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 5px;
}

.nav-link {
  min-height: 43px;
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  transition: background .17s ease, color .17s ease;
}

.nav-link.active,
.nav-link:hover {
  color: var(--blue-dark);
  background: #edf1ff;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.identity {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.hidden { display: none !important; }

.primary,
.secondary,
.outline,
.danger,
.small-action {
  min-height: 46px;
  padding: 11px 19px;
  border-radius: 13px;
  font-weight: 650;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.primary:hover,
.secondary:hover,
.outline:hover,
.small-action:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #2649dd);
  box-shadow: 0 12px 22px rgba(54, 91, 255, .26);
}

.primary:hover { box-shadow: 0 16px 25px rgba(54, 91, 255, .34); }

.secondary {
  color: var(--blue-dark);
  background: #edf1ff;
  border: 1px solid #dbe3ff;
}

.outline {
  color: var(--blue-dark);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.outline:hover { border-color: #bac8ea; }

.danger {
  color: var(--red);
  background: var(--red-soft);
}

.small-action {
  min-height: 37px;
  padding: 7px 12px;
  color: var(--blue-dark);
  background: #eef2ff;
  font-size: 13px;
}

.small-action.warn {
  color: #956019;
  background: var(--gold-soft);
}

.small-action.danger {
  color: var(--red);
  background: var(--red-soft);
}

.hero .secondary {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .25);
}

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 25px clamp(18px, 4vw, 54px) 72px;
}

.launch-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #cde9ec;
  border-radius: 14px;
  color: #335268;
  background: rgba(237, 251, 253, .95);
  font-size: 13.5px;
}

.launch-notice strong { color: var(--ink-soft); }

.notice-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(18, 186, 209, .12);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(480px, 1.04fr) minmax(360px, .73fr);
  gap: clamp(25px, 4vw, 48px);
  align-items: center;
  overflow: hidden;
  padding: clamp(38px, 5.5vw, 66px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 12%, rgba(68, 119, 255, .35), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(18, 186, 209, .27), transparent 28%),
    linear-gradient(127deg, #091024 0%, #111d3d 50%, #131735 100%);
  color: #f8fbff;
  box-shadow: var(--shadow-dark);
  max-width: 100%;
}

.hero::after {
  position: absolute;
  left: 41%;
  bottom: -125px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero h1 {
  max-width: 720px;
  margin: 13px 0 20px;
  color: #fff;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.015;
  letter-spacing: -.065em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.intro {
  max-width: 650px;
  margin: 0 0 31px;
  color: #bbc7dd;
  font-size: 18px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.trust-row {
  display: flex;
  gap: clamp(13px, 2.6vw, 30px);
  margin-top: 44px;
}

.trust-row div {
  padding-left: clamp(12px, 2vw, 19px);
  border-left: 1px solid rgba(215, 225, 242, .2);
}

.trust-row strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.trust-row span {
  color: #98a8c8;
  font-size: 12px;
}

.market-preview {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 25px;
  background: rgba(255, 255, 255, .98);
  color: var(--ink);
  box-shadow: 0 25px 50px rgba(3, 8, 24, .34);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 13px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 100px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
}

.live-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12af82;
  content: "";
}

.preview-project {
  margin-bottom: 13px;
  padding: 19px;
  border: 1px solid #edf1f8;
  border-radius: 17px;
  background: var(--surface-soft);
}

.preview-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.preview-project h3 {
  margin: 7px 0 13px;
  font-size: 20px;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.preview-tags span {
  padding: 5px 9px;
  border-radius: 100px;
  color: #3d4d71;
  background: #eaefff;
  font-size: 12px;
  font-weight: 600;
}

.preview-budget {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
}

.preview-budget strong {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.04em;
}

.preview-budget span {
  color: var(--muted);
  font-size: 12px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--blue-dark);
  background: #dfe7ff;
  font-size: 13px;
  font-weight: 750;
}

.profile-card strong,
.profile-card span {
  display: block;
  font-size: 13px;
}

.profile-card span { color: var(--muted); }

.verified {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 100px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 700;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 16px 0 14px;
}

.workflow-strip div {
  padding: 9px 4px;
  border-radius: 9px;
  color: var(--muted);
  background: #eef2f7;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.workflow-strip .done {
  color: var(--green);
  background: var(--green-soft);
}

.workflow-strip .active {
  color: var(--blue-dark);
  background: #e6ebff;
}

.guardrail {
  margin: 0;
  padding: 11px 12px;
  border-radius: 11px;
  color: #596680;
  background: #f4f6fb;
  font-size: 12px;
}

.category-band {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  margin: 26px 0 20px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.category-band p {
  flex-shrink: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-list span {
  padding: 8px 14px;
  border-radius: 100px;
  color: #334263;
  background: #f2f5fb;
  font-size: 13px;
  font-weight: 600;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin: 20px 0 48px;
}

.metrics article {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metrics article::after {
  position: absolute;
  right: -20px;
  bottom: -24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(54, 91, 255, .06);
  content: "";
}

.metrics strong {
  color: var(--navy);
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -.045em;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

.tab-panel {
  display: none;
  animation: appear .18s ease;
}

.tab-panel.active { display: block; }

.workspace-view .hero,
.workspace-view .category-band,
.workspace-view .metrics {
  display: none;
}

.workspace-view .tab-panel.active {
  margin-top: 24px;
}

@keyframes appear {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: clamp(27px, 3.4vw, 39px);
  line-height: 1.1;
  letter-spacing: -.05em;
}

h3 {
  margin: 0 0 15px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -.025em;
}

.role-required {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card-list {
  display: grid;
  gap: 12px;
}

.item-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}

.item-card:hover {
  transform: translateY(-1px);
  border-color: #d0dcf0;
  box-shadow: 0 15px 28px rgba(16, 24, 45, .08);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.item-card h4 {
  margin: 0 0 5px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.item-card p {
  margin: 8px 0;
  color: var(--muted);
}

.amount {
  flex-shrink: 0;
  color: var(--blue-dark);
  font-weight: 750;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 5px 10px;
  border-radius: 100px;
  color: #3c4b72;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.15fr);
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 20px;
}

.dashboard-stat {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-stat strong {
  display: block;
  color: var(--navy);
  font-size: 31px;
  letter-spacing: -.05em;
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
}

.board-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.board-title h3 { margin-bottom: 0; }

.checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #e9eef7;
  border-radius: 12px;
  color: var(--ink-soft);
  background: #fbfcff;
  font-size: 14px;
}

.check-item::before {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--muted);
  background: #eef2f7;
  content: "";
}

.check-item.complete::before {
  color: #fff;
  background: var(--green);
  content: "\2713";
  font-size: 12px;
  font-weight: 700;
}

.role-callout {
  margin-bottom: 22px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #45536e;
  background: var(--surface);
}

.form-card,
.board {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-card {
  display: grid;
  gap: 13px;
}

.form-card label {
  display: grid;
  gap: 6px;
  color: #54617c;
  font-size: 13px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfcff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(54, 91, 255, .12);
}

.highlighted {
  border-color: #d2ddff;
  background:
    radial-gradient(circle at 100% 0, rgba(54, 91, 255, .06), transparent 14rem),
    var(--surface);
}

.muted { color: var(--muted); }

.profile-guest {
  max-width: 590px;
}

.verification-card {
  border-color: #d3ddf5;
  background: linear-gradient(150deg, #fff, #f7f9ff);
}

.check {
  display: flex !important;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px !important;
  padding: 9px 0;
  color: var(--ink-soft) !important;
  font-size: 13px;
}

.check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  padding: 0;
}

.recommended-board { margin-top: 20px; }

.message-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 17px;
  min-height: 560px;
}

.thread-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.thread {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.thread.active,
.thread:hover {
  border-color: #c9d7fe;
  background: #f4f7ff;
}

.thread strong,
.thread span {
  display: block;
}

.thread span {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-board {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.chat-empty {
  margin: auto;
  color: var(--muted);
}

.chat-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.chat-header h3 { margin-bottom: 5px; }

.message-stream {
  display: grid;
  align-content: start;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  max-height: 455px;
  padding: 20px;
  background: #fafbff;
}

.bubble {
  max-width: 78%;
  padding: 11px 13px;
  border-radius: 14px 14px 14px 4px;
  color: var(--ink);
  background: #edf1fa;
}

.bubble.mine {
  justify-self: end;
  border-radius: 14px 14px 4px 14px;
  color: #fff;
  background: var(--blue);
}

.bubble small {
  display: block;
  margin-top: 5px;
  color: inherit;
  opacity: .7;
}

.message-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.message-compose textarea {
  min-height: 46px;
  resize: vertical;
}

.admin-block { margin-bottom: 19px; }

.contracts {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.contract {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.contract-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 100px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 650;
}

.status.disputed,
.status.refund_pending {
  color: var(--red);
  background: var(--red-soft);
}

.status.funding_pending,
.status.settlement_processing {
  color: #956019;
  background: var(--gold-soft);
}

.milestone {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #e5ebf5;
  border-radius: 13px;
  background: #f8faff;
}

.deliverable {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--blue);
  background: var(--surface);
}

.ledger,
.audit {
  display: grid;
  gap: 8px;
}

.ledger-row,
.audit-row {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f7;
  font-size: 14px;
}

.ledger-lines { color: var(--muted); }

.admin-metrics { margin: 0 0 20px; }
.admin-split { margin-bottom: 19px; }

dialog {
  width: min(780px, calc(100vw - 30px));
  padding: 30px;
  border: 0;
  border-radius: 23px;
  background: var(--surface);
  box-shadow: 0 28px 85px rgba(9, 15, 34, .3);
}

dialog::backdrop {
  background: rgba(7, 12, 28, .55);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--muted);
  background: none;
  font-size: 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.auth-expanded {
  grid-template-columns: minmax(255px, .8fr) minmax(325px, 1.2fr);
}

.registration-flow fieldset,
.wizard-form fieldset {
  display: grid;
  gap: 13px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.registration-steps,
.wizard-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 17px;
}

.registration-steps span,
.wizard-steps span {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  background: #f0f3f8;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.registration-steps span.active,
.wizard-steps span.active {
  color: var(--blue-dark);
  background: #e8eeff;
}

.role-choice {
  display: grid !important;
  grid-template-columns: auto 1fr;
  column-gap: 10px !important;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.role-choice input {
  grid-row: span 2;
  width: auto;
  margin-top: 4px;
}

.role-choice strong {
  color: var(--ink);
  font-size: 14px;
}

.role-choice span {
  color: var(--muted);
  font-size: 12px;
}

.workflow-dialog {
  width: min(720px, calc(100vw - 30px));
}

.workflow-dialog.small-dialog {
  width: min(540px, calc(100vw - 30px));
}

.wizard-form {
  margin-top: 22px;
}

.wizard-form label {
  display: grid;
  gap: 6px;
  color: #54617c;
  font-size: 13px;
  font-weight: 600;
}

.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.workflow-summary {
  padding: 13px;
  border: 1px solid #dce5f8;
  border-radius: 12px;
  color: #4c5870;
  background: #f5f8ff;
  font-size: 13px;
}

.form-card.compact {
  padding: 18px;
  background: #f8faff;
  box-shadow: none;
}

.auth-grid .secondary {
  color: var(--blue-dark);
  border: 0;
  background: #ebefff;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 10;
  max-width: 390px;
  padding: 13px 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--navy-soft);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error { background: var(--red); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 25px clamp(18px, 4vw, 54px) 43px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -.045em;
}

.footer-brand span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 1060px) {
  .topbar {
    flex-wrap: wrap;
    gap: 14px;
  }

  nav {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .split,
  .workspace-grid,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .market-preview {
    max-width: 480px;
  }

  .metrics,
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }

  .message-layout {
    grid-template-columns: 1fr;
  }

  .thread-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .account .identity { display: none; }

  main { padding-top: 17px; }

  .launch-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .launch-notice span:last-child {
    width: calc(100% - 18px);
    margin-left: 18px;
  }

  .hero {
    padding: 29px 21px 23px;
    border-radius: 25px;
  }

  .hero h1 {
    font-size: clamp(35px, 10.6vw, 43px);
    letter-spacing: -.052em;
  }
  .intro { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .trust-row { display: grid; grid-template-columns: 1fr 1fr; margin-top: 34px; }

  .market-preview {
    width: 100%;
    padding: 15px;
  }

  .category-band {
    display: block;
    padding: 17px;
  }

  .category-band p { margin-bottom: 13px; }
  .metrics,
  .dashboard-grid,
  .auth-grid,
  .form-columns { grid-template-columns: 1fr; }
  .account { margin-left: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .contract-header { flex-direction: column; }
  .ledger-row, .audit-row { grid-template-columns: 1fr; gap: 4px; }
  .thread-list { grid-template-columns: 1fr; }
  .bubble { max-width: 94%; }

  footer {
    display: block;
  }

  footer > span {
    display: block;
    margin-top: 9px;
  }
}
