@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/Manrope.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: Barlow;
  src: url('/assets/fonts/BarlowCondensed-ExtraBold.ttf') format('truetype');
  font-display: swap;
  font-weight: 800;
}

:root {
  --background: #111216;
  --chrome: #17181d;
  --chrome-raised: #1d1e24;
  --chrome-line: #30323a;
  --paper: #f2eee7;
  --paper-raised: #fbf9f5;
  --paper-soft: #e7e1d8;
  --paper-line: #cec6ba;
  --ink: #19191d;
  --ink-muted: #6d6966;
  --text: #eee9e2;
  --text-muted: #9c9ba4;
  --accent: #dc6747;
  --accent-dark: #963923;
  --green: #72b37b;
  --green-dark: #315e39;
  --amber: #c99445;
  --blue: #627fa8;
  --page-pad: clamp(18px, 3vw, 46px);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text);
  background: var(--background);
  font-family: Manrope, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); }
body { margin: 0; min-width: 320px; background: var(--background); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid #e6b873; outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--chrome-line);
  background: rgba(17, 18, 22, .97);
  backdrop-filter: blur(14px);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .18);
}

.brand { display: flex; align-items: center; flex: 0 0 auto; gap: 13px; margin-right: 40px; }
.brand img { width: 112px; height: 48px; object-fit: contain; }
.brand > span { width: 1px; height: 25px; background: #494b55; }
.brand strong { font: 800 15px/1 Barlow, sans-serif; letter-spacing: .16em; }
.main-nav, .external-nav { display: flex; align-items: stretch; align-self: stretch; }
.main-nav a, .external-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #b0afb7;
  font-size: 12px;
  font-weight: 700;
}
.main-nav a::after { position: absolute; right: 16px; bottom: -1px; left: 16px; height: 2px; background: transparent; content: ''; }
.main-nav a:hover, .main-nav a.active, .external-nav a:hover { color: #fff; }
.main-nav a.active::after { background: var(--accent); }
.external-nav { margin-left: auto; }
.external-nav a { padding: 0 10px; color: #92919a; font-size: 11px; }

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 18px;
  padding: 8px 11px;
  border: 1px solid #41434c;
  border-radius: 4px;
  background: #202127;
  color: #d2d0d5;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
}
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(114, 179, 123, .7); }
.live-pill.connecting i { background: var(--amber); box-shadow: 0 0 9px rgba(201, 148, 69, .65); }
.live-pill.offline i { background: var(--accent); box-shadow: 0 0 9px rgba(220, 103, 71, .65); }

main { width: 100%; max-width: 1540px; min-height: calc(100vh - 236px); margin: 0 auto; padding: 38px var(--page-pad) 72px; }
.loading-page { display: grid; min-height: 430px; place-content: center; justify-items: center; color: var(--text-muted); }
.loader { width: 28px; height: 28px; border: 2px solid #41434a; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
.loading-page p { margin: 14px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero { position: relative; display: grid; min-height: 630px; grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr); align-items: center; gap: clamp(30px, 4vw, 62px); margin-bottom: 1px; padding: clamp(38px, 5vw, 72px); overflow: hidden; border: 1px solid #403c3c; background: #111216; }
.hero::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(9, 9, 12, .96) 0%, rgba(9, 9, 12, .87) 38%, rgba(9, 9, 12, .63) 68%, rgba(9, 9, 12, .72) 100%); content: ''; }
.hero::after { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 5px; background: var(--accent); content: ''; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .47; filter: saturate(.85) contrast(1.08); }
.hero-copy, .hero-screen { position: relative; z-index: 3; min-width: 0; }
.kicker { color: #f09176; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero h1 { max-width: 650px; margin: 15px 0 21px; color: #f7f1e9; font: 800 clamp(54px, 5.1vw, 78px)/.87 Barlow, sans-serif; letter-spacing: -.02em; }
.hero p { max-width: 620px; margin: 0; color: #d0cac5; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.download-button, .orders-button { display: inline-flex; min-height: 57px; align-items: center; justify-content: center; padding: 0 21px; border: 1px solid var(--accent); border-radius: 3px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.download-button { min-width: 224px; background: var(--accent); color: #fff; box-shadow: 0 12px 32px rgba(220, 103, 71, .22); }
.download-button b { margin-left: auto; padding-left: 24px; font-size: 16px; }
.download-button:hover { background: #c65336; }
.orders-button { border-color: #66616a; background: rgba(12, 12, 15, .58); color: #e6e0d9; }
.orders-button:hover { border-color: #a9a2a2; background: rgba(28, 28, 33, .8); }
.hero-note { display: block; margin-top: 18px; color: #99959a; font: 9px/1.6 var(--mono); letter-spacing: .035em; }
.hero-screen { margin: 0; overflow: hidden; transform: perspective(1200px) rotateY(-2deg); border: 1px solid rgba(224, 218, 211, .35); background: #111216; box-shadow: 0 35px 90px rgba(0, 0, 0, .5); }
.hero-screen img { display: block; width: 100%; height: auto; }
.hero-screen figcaption { display: flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 13px; border-top: 1px solid #3c3d43; background: #16171b; color: #aaa7ab; font: 700 9px/1 var(--mono); letter-spacing: .09em; }
.hero-screen figcaption i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(114, 179, 123, .7); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 22px; border: 1px solid var(--paper-line); background: var(--paper-line); }
.metric { display: flex; min-width: 0; min-height: 124px; flex-direction: column; justify-content: center; padding: 21px 23px; background: var(--paper); color: var(--ink); }
.metric span { color: var(--ink-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric strong { margin-top: 6px; overflow: hidden; font: 800 clamp(26px, 2.4vw, 36px)/1.08 Barlow, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.metric small { margin-top: 6px; overflow: hidden; color: var(--ink-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 34px 0 18px; }
.section-heading h1, .section-heading h2 { margin: 0; font: 800 clamp(38px, 4vw, 58px)/1 Barlow, sans-serif; }
.section-heading p { margin: 8px 0 0; color: var(--text-muted); }
.section-heading .update { padding-bottom: 5px; color: #8f8e97; font: 10px/1 var(--mono); letter-spacing: .06em; }

.toolbar { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--paper-line); border-bottom: 0; background: var(--paper-raised); color: var(--ink); }
.toolbar strong { margin-right: 8px; font-size: 12px; }
.filter-button { min-height: 36px; padding: 0 13px; border: 1px solid #b7afa5; border-radius: 3px; background: var(--paper); color: #5c5753; font-size: 10px; font-weight: 800; cursor: pointer; letter-spacing: .04em; }
.filter-button:hover, .filter-button.active { border-color: var(--accent); background: #fff1e5; color: var(--accent-dark); }

.card { min-width: 0; margin-bottom: 22px; border: 1px solid var(--paper-line); background: var(--paper); color: var(--ink); }
.card-header { display: flex; min-height: 58px; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--paper-line); background: var(--paper-raised); }
.card-header h2 { margin: 0; font-size: 16px; }
.card-meta { margin-left: auto; color: var(--ink-muted); font-size: 11px; font-weight: 700; }
.card-header > .status { margin-left: auto; }
.table-scroll { width: 100%; overflow-x: auto; scrollbar-color: #9c948b var(--paper-soft); }
.order-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 12px; }
.order-table th { height: 40px; padding: 0 15px; border-bottom: 1px solid var(--paper-line); background: var(--paper-soft); color: #65615e; font-size: 9px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.order-table td { height: 62px; max-width: 260px; padding: 10px 15px; border-bottom: 1px solid #dcd5cb; white-space: nowrap; }
.order-table tbody tr:last-child td { border-bottom: 0; }
.order-table tr[data-href] { cursor: pointer; }
.order-table tr[data-href]:hover, .order-table tr[data-href]:focus { outline: 0; background: #ffe8d3; }
.numeric { text-align: right !important; font-variant-numeric: tabular-nums; }
.amount { color: var(--ink); font-weight: 800; }
.unit { margin-left: 3px; color: var(--ink-muted); font-size: .75em; font-weight: 700; }
.price { color: var(--accent-dark); font-weight: 800; }
.side, .status { display: inline-flex; align-items: center; width: max-content; padding: 4px 7px; border: 1px solid #aea69d; border-radius: 3px; background: #ece7e0; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.side.buy { border-color: #76a17c; background: #dfebdf; color: #315e39; }
.side.sell { border-color: #bb7670; background: #f2dfdc; color: #873b35; }
.status.open { border-color: #76a17c; background: #dfebdf; color: #315e39; }
.status.cancelled { border-color: #a7a098; background: #e5e0da; color: #5d5854; }
.status.expired { border-color: #c89448; background: #f6e4c7; color: #74470d; }
.hash { display: block; max-width: 210px; overflow: hidden; color: #39373a; font: 11px/1.5 var(--mono); text-decoration: underline; text-decoration-color: #aaa29a; text-overflow: ellipsis; text-underline-offset: 3px; white-space: nowrap; }
.hash:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.verified { color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.table-empty { height: 150px !important; color: var(--ink-muted); text-align: center; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 26px 0 8px; }
.pagination a, .pagination span { display: inline-grid; min-width: 40px; height: 40px; padding: 0 10px; place-items: center; border: 1px solid #44464f; border-radius: 3px; color: #d7d3ce; font-size: 10px; font-weight: 800; }
.pagination a:hover { border-color: var(--accent); color: #fff; }
.pagination .current { border-color: var(--accent); background: var(--accent); color: #fff; }
.pagination .disabled { opacity: .35; }
.pagination .ellipsis { min-width: 24px; padding: 0; border: 0; }

.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; color: #8f8e97; font-size: 11px; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs i { color: #555761; font-style: normal; }
.page-header { margin: 4px 0 26px; }
.page-header h1 { margin: 0; font: 800 clamp(38px, 4.2vw, 58px)/1 Barlow, sans-serif; }
.page-header p { margin: 9px 0 0; color: var(--text-muted); }
.identifier { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--paper-line); background: var(--paper); color: var(--ink); }
.identifier > div { min-width: 0; flex: 1; }
.identifier span { display: block; margin-bottom: 6px; color: var(--ink-muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.identifier code { display: block; overflow-wrap: anywhere; font: 11px/1.5 var(--mono); }
.copy-button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid #9e968d; border-radius: 3px; background: #fff; color: #494542; font-size: 10px; font-weight: 800; cursor: pointer; }
.copy-button:hover { border-color: var(--accent); color: var(--accent-dark); }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-list > div { min-height: 98px; padding: 19px 20px; border-right: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.detail-list > div:nth-child(2n) { border-right: 0; }
.detail-list > div:nth-last-child(-n + 2) { border-bottom: 0; }
.detail-list > div > span { display: block; margin-bottom: 7px; color: var(--ink-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-list strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.signature-box { padding: 20px; }
.signature-state { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-weight: 800; }
.signature-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px rgba(201, 148, 69, .55); }
.signature-state.good i { background: var(--green); box-shadow: 0 0 8px rgba(114, 179, 123, .65); }
.signature-state.bad i { background: var(--accent); }
.signature-box p { color: var(--ink-muted); font-size: 12px; }
.signature-box > .unit { display: block; margin: 12px 0 0; }
.signature-box code { display: block; margin-top: 12px; overflow-wrap: anywhere; font: 10px/1.6 var(--mono); }
.action-box { margin-top: 22px; padding: 24px; border: 1px solid #454048; background: var(--chrome-raised); }
.action-box h2 { margin: 0 0 9px; font: 800 29px/1 Barlow, sans-serif; }
.action-box p { max-width: 760px; margin: 0; color: var(--text-muted); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; margin-top: 18px; padding: 0 17px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.button:hover { background: #c65336; }

.protocol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--paper-line); background: var(--paper-line); }
.protocol-step { min-height: 250px; padding: 28px; background: var(--paper); color: var(--ink); }
.protocol-step b { color: var(--accent); font: 800 42px/1 Barlow, sans-serif; }
.protocol-step h2 { margin: 22px 0 9px; font: 800 26px/1 Barlow, sans-serif; }
.protocol-step p { margin: 0; color: var(--ink-muted); line-height: 1.7; }
.protocol-note { margin-top: 22px; padding: 24px; border-left: 4px solid var(--accent); background: #211d20; color: #c5bec0; }
.protocol-note strong { color: #fff; }

.error-card { padding: 32px; border: 1px solid #73463f; background: #2b1d1e; color: #efc3bb; }
.error-card h1 { margin: 0 0 8px; font: 800 42px/1 Barlow, sans-serif; }
.error-card p { margin: 0; }

footer { display: flex; min-height: 122px; align-items: center; padding: 28px var(--page-pad); border-top: 1px solid var(--chrome-line); background: #0d0e11; }
.footer-brand { display: flex; align-items: center; gap: 15px; }
.footer-brand img { width: 80px; height: 36px; object-fit: contain; }
.footer-brand span { color: #777986; font: 700 9px/1 var(--mono); letter-spacing: .12em; }
.footer-links { display: flex; gap: 26px; margin-left: auto; color: #93919a; font-size: 10px; }
.footer-links a:hover { color: #fff; }
.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; padding: 11px 15px; transform: translateY(12px); border: 1px solid #565863; border-radius: 3px; background: #24252b; color: #eee; font-size: 11px; opacity: 0; pointer-events: none; transition: .18s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .external-nav { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .hero-screen { width: min(100%, 900px); transform: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { position: relative; flex-wrap: wrap; padding-top: 10px; }
  .brand { width: calc(100% - 130px); margin-right: 0; }
  .brand img { width: 90px; }
  .live-pill { position: absolute; top: 20px; right: var(--page-pad); }
  .main-nav { width: 100%; height: 48px; margin-top: 7px; }
  .main-nav a { flex: 1; justify-content: center; padding: 0 8px; }
  .main-nav a::after { right: 8px; left: 8px; }
  main { padding-top: 24px; }
  .hero { gap: 32px; padding: 38px 24px 28px; }
  .hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .hero::before { background: linear-gradient(180deg, rgba(9, 9, 12, .92) 0%, rgba(9, 9, 12, .82) 52%, rgba(9, 9, 12, .68) 100%); }
  .download-button { min-width: min(100%, 260px); }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 105px; padding: 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-heading .update { padding: 0; }
  .toolbar { align-items: flex-start; flex-wrap: wrap; }
  .toolbar strong { width: 100%; }
  .protocol-grid { grid-template-columns: 1fr; }
  .protocol-step { min-height: 0; }
  footer { align-items: flex-start; flex-direction: column; gap: 24px; }
  .footer-links { flex-wrap: wrap; gap: 16px 24px; margin-left: 0; }
}

@media (max-width: 560px) {
  .hero-actions { align-items: stretch; flex-direction: column; }
  .download-button, .orders-button { width: 100%; }
  .hero-note { font-size: 8px; }
  .metrics { grid-template-columns: 1fr; }
  .order-table { min-width: 0; }
  .order-table thead { display: none; }
  .order-table, .order-table tbody { display: block; }
  .order-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 16px; border-bottom: 1px solid #d1c9be; }
  .order-table td { display: block; height: auto; max-width: none; padding: 0; border: 0; white-space: normal; }
  .order-table td::before { display: block; margin-bottom: 4px; color: var(--ink-muted); content: attr(data-label); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .order-table .order-side { grid-column: 1; }
  .order-table .order-status { grid-column: 2; justify-self: end; text-align: right; }
  .order-table .order-id { grid-column: 1 / -1; }
  .order-table .hash { max-width: 100%; }
  .order-table .numeric { text-align: left !important; }
  .order-table .order-expires { text-align: right !important; }
  .pagination a, .pagination span { min-width: 36px; height: 38px; padding: 0 7px; }
  .pagination .page-middle, .pagination .ellipsis { display: none; }
  .identifier { align-items: flex-start; flex-direction: column; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list > div, .detail-list > div:nth-child(2n), .detail-list > div:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--paper-line); }
  .detail-list > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
