@font-face {
  font-family: "Contrail";
  src: url("../fonts/contrail.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Sofia Pro";
  src: url("../fonts/SofiaProRegular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #e8ebff;
  --bg-deep: #d9def9;
  --surface: rgba(244, 245, 255, 0.88);
  --surface-strong: rgba(239, 241, 255, 0.96);
  --surface-muted: rgba(228, 234, 252, 0.9);
  --surface-bright: rgba(248, 249, 255, 0.98);
  --border: rgba(16, 28, 68, 0.12);
  --border-strong: rgba(11, 75, 114, 0.24);
  --text: #101c44;
  --text-muted: #66708d;
  --text-soft: #31415f;
  --accent: #101c44;
  --accent-secondary: #067299;
  --accent-tertiary: #0b4b72;
  --accent-soft: rgba(6, 114, 153, 0.12);
  --accent-glow: rgba(16, 28, 68, 0.12);
  --buy: #067299;
  --sell: #b42318;
  --hold: #0b4b72;
  --success: #067299;
  --danger: #b42318;
  --warning: #8a6d1d;
  --shadow-lg: 0 24px 64px rgba(16, 28, 68, 0.12);
  --shadow-md: 0 12px 30px rgba(16, 28, 68, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(880px 460px at 50% -6%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 30%, rgba(232, 235, 255, 0) 68%),
    radial-gradient(760px 480px at 14% 20%, rgba(6, 114, 153, 0.13) 0%, rgba(6, 114, 153, 0.05) 32%, rgba(232, 235, 255, 0) 68%),
    radial-gradient(720px 420px at 82% 10%, rgba(11, 75, 114, 0.11) 0%, rgba(11, 75, 114, 0.04) 30%, rgba(232, 235, 255, 0) 64%),
    linear-gradient(180deg, rgba(244, 246, 255, 0.92), rgba(225, 231, 252, 0.98)),
    url("../images/borg_tile.webp");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: auto, auto, auto, auto, 180px 180px;
  background-position: top center, top left, top right, top left, top left;
  background-attachment: fixed, fixed, fixed, fixed, scroll;
  padding: clamp(14px, 2vw, 28px);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle at 10% 18%, rgba(16, 28, 68, 0.1) 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 64%, rgba(6, 114, 153, 0.1) 0 1px, transparent 1.7px),
    radial-gradient(circle at 77% 29%, rgba(11, 75, 114, 0.1) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 78%, rgba(16, 28, 68, 0.08) 0 1px, transparent 1.7px),
    radial-gradient(circle at 92% 52%, rgba(6, 114, 153, 0.08) 0 1px, transparent 1.6px);
  opacity: 0.7;
}

body::after {
  background:
    linear-gradient(90deg, rgba(16, 28, 68, 0.04), rgba(16, 28, 68, 0)),
    linear-gradient(rgba(255, 255, 255, 0.18) 50%, rgba(16, 28, 68, 0.015) 50%);
  background-size: auto, 100% 4px;
  mix-blend-mode: multiply;
  opacity: 0.2;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: "Contrail", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.container {
  width: 100%;
  margin: 0 auto;
}

.container--narrow {
  width: 100%;
}

.container--medium {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  background: linear-gradient(180deg, rgba(247, 248, 255, 0.96), rgba(236, 240, 255, 0.94));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: calc(100% - 52px);
  color: var(--text);
  text-decoration: none;
  font-family: "Contrail", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-wordmark {
  display: block;
  width: auto;
  height: 40px;
  max-width: 273px;
  filter:
    drop-shadow(0 8px 20px rgba(16, 28, 68, 0.08))
    drop-shadow(0 2px 6px rgba(6, 114, 153, 0.12));
}

.brand-logo {
  width: clamp(30px, 3.2vw, 42px);
  height: clamp(30px, 3.2vw, 42px);
  fill: var(--text-soft);
}

.site-header {
  display: block;
  margin-bottom: 14px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: clamp(24px, 3.8vw, 46px);
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.menu-btn {
  margin-left: 0;
  margin-top: 0;
  background: linear-gradient(180deg, rgba(16, 28, 68, 0.98), rgba(25, 38, 85, 0.98));
  color: #f6f7ff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  position: static !important;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 24px rgba(16, 28, 68, 0.18);
}

.menu-btn:hover {
  background: linear-gradient(180deg, rgba(6, 114, 153, 0.98), rgba(11, 75, 114, 0.98));
  border-color: var(--border-strong);
}

.drawer {
  position: fixed;
  top: 0;
  right: -270px;
  width: 250px;
  height: 100%;
  background: linear-gradient(180deg, rgba(246, 247, 255, 0.98), rgba(232, 236, 252, 0.98));
  border-left: 1px solid var(--border-strong);
  padding: 18px 14px;
  transition: right 0.25s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: -18px 0 48px rgba(16, 28, 68, 0.14);
  backdrop-filter: blur(20px);
}

.drawer.open {
  right: 0;
}

.drawer a {
  color: var(--text-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.drawer a:hover,
.drawer a.active {
  background: rgba(6, 114, 153, 0.1);
  border-color: var(--border-strong);
  box-shadow: 0 8px 22px rgba(6, 114, 153, 0.08);
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 2px;
}

.drawer-user {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 2px 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 28, 68, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  font-size: 14px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
}

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

.table th {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  background: rgba(16, 28, 68, 0.04);
}

.table tr:hover {
  background: rgba(6, 114, 153, 0.06);
}

.table--records .record-summary-row {
  cursor: pointer;
}

.table--records .record-summary-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.table--records .record-details-row td {
  background: rgba(232, 236, 252, 0.86);
}

.record-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.record-field {
  min-width: 0;
}

.record-field strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.record-field span {
  color: var(--text);
}

.record-field--evidence {
  grid-column: 1 / -1;
}

.record-evidence {
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

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

.footer {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.site-global-footer {
  margin-top: 22px;
  padding: 12px 0 4px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

pre {
  white-space: pre-wrap;
  margin: 0;
  color: var(--text-soft);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  line-height: 1.5;
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--text-soft);
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

button:not(.menu-btn) {
  margin-top: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), #1d2a62);
  color: #f5f6ff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(16, 28, 68, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

button:not(.menu-btn):hover {
  filter: brightness(1.05);
}

small {
  color: var(--text-muted);
}

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

.bio {
  line-height: 1.6;
  color: var(--text-soft);
}

.avatar {
  width: min(38vw, 140px);
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-md);
}

.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-card .avatar {
  display: block;
  margin: 0 auto;
}

.about-card .bio {
  width: 100%;
}

.buy {
  color: var(--buy);
  font-weight: 700;
}

.sell {
  color: var(--sell);
  font-weight: 700;
}

.hold {
  color: var(--hold);
  font-weight: 700;
}

.paper-summary-card {
  display: block;
  margin: 0;
}

.paper-summary-gap {
  height: 10px;
  display: block;
}

.paper-summary-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.paper-summary-card__eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper-summary-card__title {
  margin: 0;
  color: var(--accent);
  font-size: clamp(18px, 2.6vw, 24px);
}

.paper-summary-card__copy {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.paper-summary-actions {
  margin-left: auto;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.paper-summary-actions .reset-form {
  margin-left: 0;
}

.reset-form {
  margin-left: auto;
}

.reset-btn {
  margin-top: 0 !important;
  background: #c2410c;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(194, 65, 12, 0.28);
}

.reset-btn--danger {
  background: #b91c1c;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.35);
}

.reset-btn--danger:hover {
  background: #7f1d1d;
}

.paper-summary-card__head .reset-btn {
  margin-top: 0 !important;
}

.reset-btn:hover {
  background: #9a3412;
}

.paper-summary-card__head h2 {
  margin: 0;
  font-size: 20px;
  font-family: "Contrail", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.paper-summary-card__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.paper-summary-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(232, 236, 252, 0.88));
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.paper-summary-stat > div {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
}

.trade-cards {
  display: block;
}

.trade-card {
  margin: 0;
}

.trade-card + .trade-card {
  margin-top: 10px;
}

.trade-card__head {
  display: flex;
  justify-content: space-between;
  gap: 8px 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.trade-card__title {
  margin: 0;
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.trade-card__time {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.trade-card__action {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(16, 28, 68, 0.06);
  font-size: 12px;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trade-card__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(232, 236, 252, 0.9));
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trade-stat h3 {
  margin: 4px 0 6px;
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.trade-stat > div {
  font-size: 16px;
  font-weight: 700;
}

.trade-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trade-pagination__link {
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 6px 10px;
}

.trade-pagination__link:hover {
  background: rgba(6, 114, 153, 0.08);
  border-color: var(--border-strong);
}

.auth-shell {
  max-width: 720px;
  margin: 0 auto 18px;
}

.auth-shell__intro {
  margin-bottom: 16px;
}

.auth-shell__intro h2 {
  margin: 0 0 8px;
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-shell__intro p {
  margin: 0;
  color: var(--text-soft);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.auth-form--grid .checkbox,
.auth-form--grid button {
  grid-column: 1 / -1;
}

.auth-hint {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.notice {
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.notice--success {
  background: rgba(6, 114, 153, 0.08);
  border-color: rgba(6, 114, 153, 0.24);
  color: var(--success);
}

.notice--error {
  background: rgba(255, 110, 130, 0.1);
  border-color: rgba(255, 110, 130, 0.3);
  color: var(--danger);
}

.notice--warning {
  background: rgba(138, 109, 29, 0.08);
  border-color: rgba(138, 109, 29, 0.24);
  color: var(--warning);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
}

.checkbox input {
  width: auto;
  margin: 0;
}

.checkbox--inline {
  margin: 0;
  white-space: nowrap;
}

.user-actions {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-form label {
  margin: 0;
}

.inline-form input[type="password"] {
  min-width: 200px;
}

.button-danger {
  background: #ef5d73;
  color: #fff2f4;
  box-shadow: 0 0 28px rgba(239, 93, 115, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

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

.user-panel {
  margin-bottom: 18px;
}

.user-list-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 18px;
}

.user-list-card__head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.user-list-card__head h2 {
  margin: 0 0 8px;
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.user-list-card__head p {
  margin: 0;
  color: var(--text-soft);
}

.user-list {
  display: grid;
  gap: 0;
  padding: 14px 14px 18px;
  margin-top: 4px;
}

button.user-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface-muted) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  text-align: left;
  cursor: pointer;
  margin: 0 !important;
  border-radius: 16px;
  margin-top: 0 !important;
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 26px rgba(0, 0, 0, 0.22);
  padding: 16px 18px !important;
}

button.user-list-item + button.user-list-item {
  margin-top: 10px !important;
}

button.user-list-item:last-child {
  margin-bottom: 0;
}

button.user-list-item:hover,
button.user-list-item.active {
  background: rgba(6, 114, 153, 0.1) !important;
  border-color: var(--border-strong) !important;
}

.user-list-item__main,
.user-list-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-list-item__main {
  min-width: 0;
  flex-wrap: wrap;
}

.user-list-item__main strong {
  font-size: 16px;
}

.user-list-item__main span {
  color: var(--text-muted);
  font-size: 13px;
}

.user-list-item__meta {
  flex: 0 0 auto;
}

.user-list-item__chevron {
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.status-pill--warning {
  color: var(--warning);
  border-color: rgba(217, 255, 115, 0.28);
}

.status-pill--success {
  color: var(--success);
  border-color: rgba(99, 255, 187, 0.32);
}

.user-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 5, 8, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1100;
}

.user-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.user-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(440px, 100vw);
  height: 100vh;
  padding: 18px;
  background: linear-gradient(180deg, rgba(4, 18, 24, 0.97), rgba(2, 10, 14, 0.99));
  border-right: 1px solid var(--border-strong);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 1101;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
}

.user-drawer.open {
  transform: translateX(0);
}

.user-drawer__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.user-drawer__close {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16, 28, 68, 0.08);
  color: var(--text-soft);
  cursor: pointer;
  flex: 0 0 auto;
}

.user-drawer__eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.user-drawer__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.user-drawer__meta {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.user-drawer__meta > div {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 30, 36, 0.88);
}

.user-drawer__meta small {
  display: block;
  margin-bottom: 6px;
}

.user-drawer__section {
  margin: 0;
}

.user-drawer__section h3 {
  margin: 0 0 10px;
  font-family: "Sofia Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 860px) {
  body {
    padding: 14px;
    background-attachment: scroll, scroll, scroll, scroll, scroll;
  }

  body::before,
  body::after {
    display: none;
  }

  .topbar,
  .drawer,
  .table,
  .card,
  form,
  .user-drawer {
    backdrop-filter: none;
  }

  .brand-wordmark {
    filter: drop-shadow(0 6px 14px rgba(16, 28, 68, 0.12));
  }

  .topbar {
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  .brand {
    font-size: clamp(18px, 5.6vw, 28px);
  }

  .brand-wordmark {
    height: 40px;
    max-width: 273px;
  }

  .brand-logo {
    width: clamp(28px, 8vw, 38px);
    height: clamp(28px, 8vw, 38px);
  }

  .site-header {
    margin-bottom: 12px;
  }

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

  .table {
    font-size: 13px;
  }

  .record-details-grid {
    grid-template-columns: 1fr;
  }

  .card--row {
    flex-direction: column;
    align-items: flex-start;
  }

  .trade-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-summary-card__grid {
    grid-template-columns: 1fr;
  }

  .auth-form--grid {
    grid-template-columns: 1fr;
  }

  .user-actions {
    min-width: 0;
  }

  .inline-form {
    align-items: stretch;
  }

  .inline-form input[type="password"] {
    min-width: 0;
    width: 100%;
  }

  .user-list-item {
    padding: 14px;
  }

  .user-list-item__main,
  .user-list-item__meta {
    align-items: flex-start;
  }

  .user-drawer {
    width: min(92vw, 420px);
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
    font-size: clamp(16px, 5.8vw, 22px);
    max-width: calc(100% - 46px);
  }

  .brand-wordmark {
    height: 40px;
    max-width: 273px;
    width: auto;
  }

  .brand-logo {
    width: 26px;
    height: 26px;
  }

  .site-title {
    font-size: clamp(20px, 7.8vw, 30px);
  }

  .menu-btn {
    padding: 6px 8px;
    font-size: 15px;
  }

  .trade-card__grid {
    grid-template-columns: 1fr;
  }

  .trade-pagination {
    flex-wrap: wrap;
  }

  .table--records thead {
    display: none;
  }

  .table--records,
  .table--records tbody,
  .table--records tr,
  .table--records td {
    display: block;
    width: 100%;
  }

  .table--records .record-summary-row {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .table--records .record-summary-row td {
    border: 0;
    padding: 6px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .table--records .record-summary-row td::before {
    content: attr(data-label);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    flex: 0 0 auto;
  }

  .table--records .record-details-row td {
    border: 0;
    padding: 8px 12px 12px;
  }

  .user-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-list-item__meta {
    width: 100%;
    justify-content: space-between;
  }

  .user-drawer {
    width: 100vw;
  }

  .user-drawer__title {
    font-size: 24px;
  }
}

/* Demo nav layout */
.nav-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Demo nav link styling */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-link:hover {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.nav-link.active {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Refined brand overrides */
:root {
  --bg: #edf1ff;
  --bg-deep: #dfe6fb;
  --surface: #f7f8ff;
  --surface-strong: #eef2ff;
  --surface-muted: #e9eefc;
  --surface-bright: #ffffff;
  --border: rgba(16, 28, 68, 0.1);
  --border-strong: rgba(6, 114, 153, 0.24);
  --text: #101c44;
  --text-muted: #6d7898;
  --text-soft: #354566;
  --accent: #101c44;
  --accent-secondary: #067299;
  --accent-tertiary: #0b4b72;
  --accent-quaternary: #5e6f96;
  --accent-soft: rgba(6, 114, 153, 0.12);
  --accent-glow: rgba(16, 28, 68, 0.08);
  --buy: #067299;
  --sell: #b42318;
  --hold: #0b4b72;
  --success: #0d7a5f;
  --danger: #b42318;
  --warning: #8a6d1d;
  --primary-bg-start: #1b2a5b;
  --primary-bg-end: #101c44;
  --primary-bg-hover-start: #24346b;
  --primary-bg-hover-end: #162452;
  --secondary-bg-start: #1787ad;
  --secondary-bg-end: #067299;
  --secondary-bg-hover-start: #2496bc;
  --secondary-bg-hover-end: #0b7da3;
  --danger-bg-start: #ca4a36;
  --danger-bg-end: #b42318;
  --danger-bg-hover-start: #d55a43;
  --danger-bg-hover-end: #c23122;
  --neutral-bg-start: #7988ad;
  --neutral-bg-end: #5e6f96;
  --shadow-lg: 0 28px 80px rgba(16, 28, 68, 0.12);
  --shadow-md: 0 16px 40px rgba(16, 28, 68, 0.1);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(860px 420px at 50% -8%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.55) 26%, rgba(237, 241, 255, 0) 64%),
    radial-gradient(720px 460px at 10% 16%, rgba(6, 114, 153, 0.08) 0%, rgba(6, 114, 153, 0.02) 38%, rgba(237, 241, 255, 0) 72%),
    radial-gradient(700px 460px at 88% 6%, rgba(11, 75, 114, 0.08) 0%, rgba(11, 75, 114, 0.02) 34%, rgba(237, 241, 255, 0) 70%),
    linear-gradient(180deg, #f6f8ff 0%, #e7edff 100%);
  background-repeat: no-repeat;
  background-size: auto;
  background-attachment: fixed;
  padding: clamp(16px, 2vw, 28px);
}

body::before {
  background-image:
    linear-gradient(rgba(16, 28, 68, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 28, 68, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.22;
}

body::after {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  mix-blend-mode: screen;
  opacity: 0.65;
}

body.has-open-drawer {
  overflow: hidden;
}

a {
  color: var(--accent-secondary);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3 {
  text-shadow: none;
}

p,
ul,
ol {
  margin: 0;
}

.container {
  max-width: var(--content-width);
}

.container--medium,
.container--narrow {
  max-width: var(--content-width);
}

.topbar,
.card,
form,
.table,
pre,
.paper-summary-stat,
.trade-stat,
.record-evidence,
.user-drawer__meta > div {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 246, 255, 0.96));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.topbar {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}

.brand {
  max-width: none;
}

.brand-wordmark {
  height: 42px;
  max-width: min(320px, 100%);
  filter: none;
}

.site-header,
.site-title {
  text-align: left;
}

.site-title {
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.site-subtitle {
  max-width: 44rem;
  margin-top: 14px;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-soft);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.card {
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.pill-grid,
.button-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pill--accent {
  background: rgba(16, 28, 68, 0.1);
  border-color: rgba(16, 28, 68, 0.18);
  color: var(--accent);
}

.pill--ghost {
  background: rgba(11, 75, 114, 0.08);
  border-color: rgba(11, 75, 114, 0.16);
  color: var(--accent-tertiary);
}

.pill--success {
  background: rgba(13, 122, 95, 0.08);
  border-color: rgba(13, 122, 95, 0.18);
  color: var(--success);
}

.stat-grid,
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stat {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 240, 255, 0.96));
}

.stat strong {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.1;
}

.stat-trend {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stat-trend--up {
  color: var(--success);
}

.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--primary-bg-start) 0%, var(--primary-bg-end) 100%);
  color: #f7f8ff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(16, 28, 68, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
button.btn:hover,
a.btn:hover {
  color: #f7f8ff;
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--primary-bg-hover-start) 0%, var(--primary-bg-hover-end) 100%);
  box-shadow: 0 16px 28px rgba(16, 28, 68, 0.2);
}

.btn--ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 244, 255, 0.92));
  color: var(--accent-tertiary);
  border-color: rgba(11, 75, 114, 0.16);
  box-shadow: 0 8px 18px rgba(16, 28, 68, 0.06);
}

.btn--ghost:hover {
  color: var(--accent-tertiary);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(245, 247, 255, 1));
}

.btn--secondary {
  background: linear-gradient(180deg, var(--secondary-bg-start) 0%, var(--secondary-bg-end) 100%);
  color: #f7fcff;
  box-shadow: 0 12px 22px rgba(6, 114, 153, 0.2);
}

.btn--secondary:hover {
  background: linear-gradient(180deg, var(--secondary-bg-hover-start) 0%, var(--secondary-bg-hover-end) 100%);
  box-shadow: 0 16px 28px rgba(6, 114, 153, 0.24);
}

.btn--danger,
.button-danger {
  background: linear-gradient(180deg, var(--danger-bg-start) 0%, var(--danger-bg-end) 100%);
  color: #fff8f7;
  box-shadow: 0 12px 22px rgba(180, 35, 24, 0.22);
}

.btn--danger:hover,
.button-danger:hover {
  background: linear-gradient(180deg, var(--danger-bg-hover-start) 0%, var(--danger-bg-hover-end) 100%);
  box-shadow: 0 16px 28px rgba(180, 35, 24, 0.26);
}

button:not(.menu-btn):not(.btn) {
  border-radius: 999px;
}

.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-color: rgba(16, 28, 68, 0.08);
}

.nav-demo,
.demo-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-nav {
  justify-self: end;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-item-with-children {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.nav-link {
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-secondary);
  box-shadow: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-tertiary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 245, 255, 0.98));
  box-shadow: 0 20px 44px rgba(16, 28, 68, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1205;
}

.nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 14px;
}

.nav-item-with-children:hover .nav-submenu,
.nav-item-with-children:focus-within .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-submenu__link {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
}

.nav-submenu__link:hover {
  background: rgba(6, 114, 153, 0.08);
  border-color: var(--border-strong);
  color: var(--accent-secondary);
}

.demo-drawer .nav-link,
.demo-drawer a {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.demo-drawer .nav-link::after,
.demo-drawer a::after {
  display: none;
}

.demo-drawer .nav-link:hover,
.demo-drawer .nav-link.active,
.demo-drawer a:hover,
.demo-drawer a.active {
  background: rgba(6, 114, 153, 0.1);
  border-color: var(--border-strong);
  box-shadow: 0 8px 22px rgba(6, 114, 153, 0.08);
}

.drawer-submenu {
  display: grid;
  gap: 8px;
  margin: -2px 0 8px 14px;
}

.drawer-submenu__link {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(16, 28, 68, 0.08);
  background: rgba(255, 255, 255, 0.56);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.drawer-submenu__link:hover {
  background: rgba(6, 114, 153, 0.08);
  color: var(--accent-secondary);
}

.drawer {
  top: 88px;
  right: 20px;
  width: min(320px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 108px);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 245, 255, 0.98));
  box-shadow: 0 26px 56px rgba(16, 28, 68, 0.18);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.drawer.open {
  right: 20px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.overlay {
  background: rgba(16, 28, 68, 0.24);
  backdrop-filter: blur(3px);
  z-index: 1090;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(16, 28, 68, 0.08);
  text-align: left;
}

table th {
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

table tbody tr:hover {
  background: rgba(6, 114, 153, 0.04);
}

form,
.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field,
.choice-card,
.toggle-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.96));
}

.field-label,
legend.field-label {
  color: var(--accent);
  font-size: 0.96rem;
  font-weight: 700;
}

.field-help {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.field-error {
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.5;
}

label {
  margin: 0;
}

input,
textarea,
select {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 28, 68, 0.12);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8792b0;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-secondary) 50%),
    linear-gradient(135deg, var(--accent-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(6, 114, 153, 0.34);
  box-shadow: 0 0 0 4px rgba(6, 114, 153, 0.12);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent-secondary);
  box-shadow: none;
}

.choice-card {
  margin: 0;
  align-content: start;
}

.choice-pill,
.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 28, 68, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.toggle-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.toggle-copy {
  display: grid;
  gap: 6px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: rgba(16, 28, 68, 0.14);
  box-shadow: inset 0 0 0 1px rgba(16, 28, 68, 0.08);
  transition: background 0.18s ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(16, 28, 68, 0.16);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-ui {
  background: rgba(6, 114, 153, 0.34);
}

.switch input:checked + .switch-ui::after {
  transform: translateX(22px);
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 38px;
}

.form-actions {
  margin-top: 4px;
}

.notice--error {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.16);
}

.status-pill--warning {
  color: var(--warning);
  border-color: rgba(138, 109, 29, 0.18);
}

.status-pill--success {
  color: var(--success);
  border-color: rgba(13, 122, 95, 0.18);
}

.user-drawer-overlay {
  background: rgba(16, 28, 68, 0.24);
  backdrop-filter: blur(3px);
}

.user-list-item,
.user-drawer,
.user-drawer__meta > div {
  box-shadow: var(--shadow-md);
}

.user-list-item,
.user-drawer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 244, 255, 0.96));
}

.user-drawer {
  border-right: 1px solid var(--border);
}

.user-drawer__meta > div {
  background: rgba(255, 255, 255, 0.82);
}

.demo-shell {
  max-width: calc(var(--content-width) + 40px);
  margin: 0 auto;
}

.demo-navbar {
  position: sticky;
  top: 16px;
  z-index: 1100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.demo-main {
  display: grid;
  gap: 22px;
}

.demo-hero {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 32px;
  border: 1px solid rgba(16, 28, 68, 0.08);
  background:
    radial-gradient(circle at top right, rgba(6, 114, 153, 0.12), rgba(6, 114, 153, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 255, 0.96));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-actions {
  margin-top: 24px;
}

.brand-demo {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.bg-demo {
  min-height: 190px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(16, 28, 68, 0.08);
  background:
    linear-gradient(180deg, rgba(247, 249, 255, 0.92), rgba(236, 240, 255, 0.88)),
    url("../images/borg_tile.webp") center/220px repeat;
}

.surface-tile {
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.surface-tile__label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-weight: 700;
}

.media-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.96));
}

.avatar-demo {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(16, 28, 68, 0.08);
  box-shadow: 0 14px 24px rgba(16, 28, 68, 0.12);
}

@media (max-width: 1040px) {
  body {
    background-attachment: scroll;
  }

  .demo-navbar {
    grid-template-columns: 1fr auto;
  }

  .demo-nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .demo-drawer {
    top: 0;
    right: 0;
    width: min(340px, 86vw);
    height: 100dvh;
    max-height: none;
    padding: 88px 16px 24px;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 44px rgba(16, 28, 68, 0.18);
    opacity: 1;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 1110;
  }

  .demo-drawer.open {
    right: 0;
    pointer-events: auto;
    transform: translateX(0);
  }

  .nav-submenu {
    display: none;
  }

  .showcase-grid,
  .stat-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .media-card {
    grid-template-columns: 96px 1fr;
  }

  .avatar-demo {
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 12px;
  }

  .demo-navbar {
    top: 12px;
    padding: 12px 14px;
  }

  .demo-drawer,
  .demo-drawer.open {
    width: min(320px, 92vw);
    padding-top: 76px;
  }

  .brand-wordmark {
    height: 34px;
  }

  .site-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .card,
  .demo-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .section-head,
  .brand-demo {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-card {
    grid-template-columns: 1fr;
  }
}

*, *::before, *::after {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.kc-hero-layout,
.kc-slider-grid,
.kc-services-grid,
.kc-about-grid,
.kc-contact-grid,
.kc-footer-grid,
.kc-partners-grid {
  display: grid;
  gap: 18px;
}

.kc-hero-layout {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  border-radius: inherit;
  display: block;
}

.kc-hero-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 52rem;
  min-height: 100%;
  padding: clamp(28px, 5vw, 52px);
  color: #ffffff;
}

.kc-hero-copy .site-title,
.kc-hero-copy .site-subtitle {
  color: #ffffff;
}

.kc-hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.kc-hero-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.96), rgba(236, 240, 255, 0.94));
}

.kc-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  transition: opacity 0.5s ease;
}

.kc-hero-slide.is-active {
  opacity: 1;
}

.kc-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kc-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 20, 44, 0.52), rgba(12, 20, 44, 0.12) 45%, rgba(12, 20, 44, 0.18));
}

.kc-hero-panel,
.kc-placeholder,
.kc-partner-logo {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(247, 249, 255, 0.94), rgba(236, 240, 255, 0.92)),
    url("../images/borg_tile.webp") center/220px repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.kc-hero-panel {
  padding: clamp(24px, 3vw, 34px);
}

.kc-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.kc-slider-item {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.kc-services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kc-service-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.kc-service-card .kc-placeholder,
.kc-service-media {
  min-height: 160px;
}

.kc-service-media {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.kc-about-media,
.kc-service-media img {
  display: block;
  width: 100%;
}

.kc-about-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  max-height: 260px;
}

.kc-about-media img,
.kc-service-media img {
  height: 100%;
  object-fit: cover;
}

.kc-about-media img {
  height: 260px;
  min-height: 0;
}

.kc-service-media img {
  min-height: 160px;
}

.kc-service-card .btn {
  margin-top: auto;
  align-self: stretch;
  width: 100%;
  text-align: center;
}

.kc-about-grid,
.kc-contact-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.kc-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kc-team-card {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.kc-team-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-height: 220px;
}

.kc-team-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.kc-team-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(247, 249, 255, 0.94), rgba(236, 240, 255, 0.92)),
    url("../images/borg_tile.webp") center/220px repeat;
}

.kc-team-copy {
  display: grid;
  gap: 10px;
}

.kc-services-overview {
  margin-bottom: 18px;
}

.kc-services-jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kc-services-jumpnav__link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
}

.kc-services-jumpnav__link:hover {
  background: rgba(6, 114, 153, 0.08);
  border-color: var(--border-strong);
  color: var(--accent-secondary);
}

.kc-specialist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kc-specialist-card {
  display: grid;
  gap: 16px;
  height: 100%;
}

.kc-specialist-card__media {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-height: 220px;
}

.kc-specialist-card__media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.kc-specialist-card__head {
  display: grid;
  gap: 6px;
}

.kc-specialist-card__head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.kc-specialist-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kc-specialist-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.55;
}

.kc-specialist-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d8f4f 0%, #2f6f3d 100%);
}

.kc-specialist-card .hero-actions {
  margin-top: auto;
}

.kc-specialist-cta {
  display: grid;
  gap: 10px;
}

.kc-service-section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.kc-service-section__media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-height: 320px;
}

.kc-service-section__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.kc-service-section__content {
  display: grid;
  gap: 14px;
}

.kc-service-section__block {
  display: grid;
  gap: 8px;
}

.kc-page-hero {
  padding: clamp(28px, 5vw, 52px);
}

.kc-page-hero__content {
  max-width: 52rem;
}

.kc-page-hero .site-title,
.kc-page-hero .site-subtitle {
  color: var(--accent);
}

.kc-quote-form {
  gap: 22px;
}

.kc-quote-field {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.kc-quote-field input,
.kc-quote-field select,
.kc-quote-field textarea {
  min-height: 96px;
  padding: 18px 20px;
  border-radius: 0;
  border: 2px solid rgba(16, 28, 68, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  font-size: 1rem;
}

.kc-quote-field select {
  appearance: auto;
}

.kc-quote-field textarea {
  min-height: 240px;
}

.kc-quote-checks {
  margin: 0;
}

.kc-quote-checks__row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.kc-quote-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--text-soft);
}

.kc-quote-check input {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
}

.kc-quote-actions {
  padding-top: 4px;
}

.kc-quote-submit {
  width: 100%;
  min-height: 92px;
  border-radius: 6px;
  background: rgba(228, 228, 236, 0.95);
  border: 2px solid rgba(16, 28, 68, 0.1);
  color: rgba(34, 34, 34, 0.76);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
}

.kc-quote-submit:hover {
  background: rgba(217, 217, 228, 0.98);
  color: rgba(34, 34, 34, 0.82);
}

.kc-footer-grid {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
}

.kc-partners-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 12px;
}

.kc-partner-logo {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.kc-partner-logo img {
  display: block;
  width: auto;
  height: 68px;
  max-width: 100%;
  object-fit: contain;
}

.demo-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(16, 28, 68, 0.08);
  background:
    radial-gradient(circle at top right, rgba(6, 114, 153, 0.12), rgba(6, 114, 153, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 255, 0.96));
}

.btn,
button.btn,
a.btn {
  min-width: 160px;
  white-space: nowrap;
  box-sizing: border-box;
}

.kc-cta {
  background: linear-gradient(180deg, #3d8f4f 0%, #2f6f3d 100%);
  color: #f4fff5;
}

.kc-cta:hover {
  background: linear-gradient(180deg, #4ea05f 0%, #356f41 100%);
  color: #f4fff5;
}

.kc-cta.btn--ghost {
  background: rgba(61, 143, 79, 0.12);
  border-color: rgba(61, 143, 79, 0.24);
  color: #2f6f3d;
}

.kc-cta.btn--ghost:hover {
  background: rgba(61, 143, 79, 0.18);
  color: #2f6f3d;
}

.kc-support-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.kc-note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
}

.kc-footer-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.kc-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kc-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.kc-social-link i {
  font-size: 1rem;
}

.kc-cookie {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(100%, 980px);
  z-index: 1200;
}

.kc-cookie .card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kc-nav-cta,
.demo-nav .kc-nav-cta,
.demo-drawer .kc-nav-cta {
  min-width: 0 !important;
  width: auto !important;
  min-height: 40px !important;
  padding: 9px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-radius: 999px !important;
  border: 1px solid rgba(47, 111, 61, 0.18) !important;
  background: linear-gradient(180deg, #4a9d5c 0%, #2f6f3d 100%) !important;
  color: #f5fff6 !important;
  box-shadow:
    0 12px 24px rgba(47, 111, 61, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  text-transform: uppercase;
}

.demo-nav {
  gap: 22px;
}

.demo-nav .nav-link {
  padding: 8px 2px;
}

.demo-nav .kc-nav-cta {
  margin-left: 8px;
}

.demo-nav .kc-nav-cta:hover,
.demo-drawer .kc-nav-cta:hover {
  background: linear-gradient(180deg, #58ab69 0%, #356f41 100%) !important;
  color: #f5fff6 !important;
  border-color: rgba(47, 111, 61, 0.28) !important;
  box-shadow:
    0 16px 28px rgba(47, 111, 61, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.demo-nav .kc-nav-cta.active,
.demo-drawer .kc-nav-cta.active {
  background: linear-gradient(180deg, #3f9150 0%, #285f34 100%) !important;
  color: #f5fff6 !important;
}

.demo-drawer .kc-nav-cta.kc-cta {
  border-color: transparent !important;
}

.demo-drawer .kc-nav-cta.kc-cta:hover {
  color: #f4fff5 !important;
}

.demo-navbar {
  position: relative;
  top: auto;
  width: auto;
  margin-bottom: 22px;
  background: linear-gradient(180deg, rgba(247, 248, 255, 1), rgba(236, 240, 255, 1));
  transition: top 0.2s ease, left 0.2s ease, right 0.2s ease, width 0.2s ease, border-radius 0.2s ease;
}

.demo-navbar.is-pinned {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  margin-bottom: 0;
  border-radius: 0;
  z-index: 1201;
}

.body--nav-pinned .demo-main {
  padding-top: calc(var(--kc-nav-height, 0px) + 22px);
}

.demo-drawer {
  top: 0;
  right: -340px;
  width: min(320px, 86vw);
  height: 100dvh;
  padding: 92px 16px 24px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(247, 248, 255, 1), rgba(236, 240, 255, 1));
  box-shadow: none !important;
  transition: right 0.24s ease;
  overflow-y: auto;
}

.demo-drawer.open {
  right: 0;
}

.kc-drawer-brand {
  position: absolute;
  top: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.kc-drawer-brand img {
  display: block;
  width: auto;
  height: 34px;
}

.demo-drawer a {
  box-shadow: none !important;
}

@media (max-width: 980px) {
  .kc-services-grid,
  .kc-slider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kc-partners-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kc-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .kc-hero-layout,
  .kc-about-grid,
  .kc-contact-grid {
    grid-template-columns: 1fr;
  }

  .kc-hero-layout,
  .kc-hero-copy,
  .kc-hero-slider {
    min-height: 420px;
  }

  .kc-hero-copy {
    padding: 24px;
    max-width: 100%;
  }

  .kc-services-grid,
  .kc-slider-grid,
  .kc-footer-grid,
  .kc-team-grid {
    grid-template-columns: 1fr;
  }

  .kc-team-card {
    grid-template-columns: 1fr;
  }

  .kc-service-section__grid {
    grid-template-columns: 1fr;
  }

  .kc-service-section__media {
    order: 1;
  }

  .kc-service-section__content {
    order: 2;
  }

  .kc-specialist-grid {
    grid-template-columns: 1fr;
  }

  .kc-partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kc-cookie .card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .kc-hero-layout,
  .kc-hero-copy,
  .kc-hero-slider {
    min-height: 360px;
  }

  .kc-hero-copy {
    align-items: center;
    text-align: center;
  }

  .kc-hero-copy .hero-actions {
    justify-content: center;
  }

  .kc-services-grid,
  .kc-partners-grid,
  .kc-slider-grid {
    grid-template-columns: 1fr;
  }

  .kc-placeholder {
    min-height: 150px;
  }
}
