@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #102c25;
  --ink-soft: #526560;
  --forest: #0f372d;
  --mint: #b9f6dd;
  --mint-strong: #4fd8a7;
  --paper: #f3f1e9;
  --white: #fcfcf8;
  --line: #d5d8cf;
  --danger: #b83d34;
  --shadow: 0 28px 70px rgba(15, 55, 45, 0.11);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-height: 100%; background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 90% 5%, rgba(79, 216, 167, .14), transparent 28rem),
    linear-gradient(90deg, rgba(15,55,45,.028) 1px, transparent 1px),
    linear-gradient(rgba(15,55,45,.028) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 32px 32px, 32px 32px, auto;
}

button, input { font: inherit; }
select { font: inherit; }
button { cursor: pointer; }
fieldset { min-width: 0; }

.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;
}

.app-shell { max-width: 1240px; margin: 0 auto; padding: 0 32px 56px; }

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15,55,45,.18);
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 39px; height: 39px; display: grid; place-items: center;
  background: var(--forest); color: var(--mint); font: 500 18px "DM Mono";
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .06em; }
.brand small { margin-top: 1px; color: var(--ink-soft); font-size: 11px; letter-spacing: .04em; }

.site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 22px; }
.site-nav a { padding: 10px 12px; color: var(--ink-soft); text-decoration: none; font: 600 11px "DM Mono"; letter-spacing: .04em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--forest); background: rgba(15,55,45,.05); }
.site-nav a.active { color: var(--forest); border-bottom-color: var(--mint-strong); }

.environment { display: flex; align-items: center; gap: 9px; font: 500 12px "DM Mono"; text-transform: uppercase; letter-spacing: .08em; }
.language-select {
  height: 34px;
  padding: 0 24px 0 9px;
  border: 1px solid rgba(15,55,45,.22);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: 500 11px "DM Mono";
  letter-spacing: .06em;
}
.language-select:focus { outline: 2px solid rgba(79,216,167,.45); outline-offset: 2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #27c489; box-shadow: 0 0 0 4px rgba(39,196,137,.12); }
.status-dot.muted { background: #91a09b; box-shadow: none; margin-right: 6px; display: inline-block; }
.icon-button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; }
.icon-button:hover { background: rgba(15,55,45,.07); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { padding-top: 66px; }
.intro { max-width: 790px; margin-bottom: 48px; }
.eyebrow { margin: 0 0 16px; font: 500 11px "DM Mono"; letter-spacing: .16em; color: #36725f; }
.intro h1 { margin: 0; max-width: 720px; font-size: clamp(44px, 6vw, 76px); line-height: .98; letter-spacing: -.055em; font-weight: 600; }
.intro > p:last-child { max-width: 570px; margin: 23px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.market-intro { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; }
.market-intro > div { max-width: 790px; }
.market-intro h1 { margin: 0; font-size: clamp(42px, 5vw, 66px); line-height: 1; letter-spacing: -.05em; }
.market-intro > div > p:last-child { max-width: 670px; margin: 20px 0 0; color: var(--ink-soft); line-height: 1.65; }
.market-status { flex: none; padding: 8px 10px; color: #765a12; background: #f5e7b8; font: 600 10px "DM Mono"; letter-spacing: .08em; text-transform: uppercase; }
.market-status[data-state="open"] { color: #0b573f; background: var(--mint); }

.market-panel { padding: 30px; background: var(--white); box-shadow: var(--shadow); }
.market-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.market-panel-heading .eyebrow, .order-panel .eyebrow, .recent-orders .eyebrow { margin-bottom: 5px; }
.market-panel h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.market-panel-heading > small { color: var(--ink-soft); font: 500 9px "DM Mono"; letter-spacing: .08em; }
.table-scroll { overflow-x: auto; }
.market-table { width: 100%; border-collapse: collapse; font: 500 11px "DM Mono"; white-space: nowrap; }
.market-table th { padding: 10px 12px; color: var(--ink-soft); background: #eff3ef; text-align: right; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.market-table th:first-child, .market-table td:first-child { text-align: left; }
.market-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.market-table td strong, .market-table td small { display: block; }
.market-table td small { margin-top: 4px; color: var(--ink-soft); font-size: 8px; }
.quality-badge { display: inline-block !important; width: fit-content; margin-left: auto; padding: 4px 6px; color: #725911 !important; background: #f6e9ba; text-transform: uppercase; }
.quality-badge.licensed-live { color: #0b573f !important; background: var(--mint); }
.quality-badge.derived-mock { color: #68422b !important; background: #f3d8c5; }
.market-workspace { display: grid; grid-template-columns: minmax(330px, .68fr) minmax(0, 1.32fr); gap: 18px; margin-top: 18px; }
.order-panel h2, .recent-orders h2 { margin-bottom: 24px; }
.order-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr; gap: 10px; }
.order-grid .field-group { margin-bottom: 18px; }
.order-grid select { width: 100%; height: 50px; padding: 0 12px; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.order-preview { margin-bottom: 12px; padding: 17px; background: #eef8f3; border-left: 3px solid var(--mint-strong); }
.order-preview span, .order-preview strong { display: block; }
.order-preview span { margin-bottom: 5px; color: var(--ink-soft); font-size: 10px; }
.order-preview strong { font: 500 15px "DM Mono"; }
.order-disclaimer { margin: 12px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.compact-table { font-size: 10px; }

.nav-ticker { margin: -12px 0 32px; padding: 28px 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; color: #ecf8f3; background: var(--forest); box-shadow: var(--shadow); }
.nav-ticker .eyebrow { margin-bottom: 10px; color: var(--mint); }
.nav-ticker h2 { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font: 500 clamp(25px, 4vw, 48px) "DM Mono"; letter-spacing: -.055em; }
.nav-ticker h2 > span:nth-child(2) { color: #749b8e; font-size: .72em; }
.nav-ticker h2 strong { color: var(--mint); font-weight: 500; }
.nav-ticker-meta { min-width: 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.mock-badge { padding: 5px 7px; color: var(--forest); background: var(--mint); font: 600 9px "DM Mono"; letter-spacing: .08em; }
.nav-ticker-meta small { color: #a9beb7; font: 400 9px/1.4 "DM Mono"; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .72fr); box-shadow: var(--shadow); }
.panel { padding: 38px; }
.form-panel { background: var(--white); }
.context-panel { color: #ecf8f3; background: var(--forest); display: flex; flex-direction: column; justify-content: space-between; min-height: 610px; }

.approval-card {
  margin: 0 0 36px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #f7faf7;
}
.narrow-main { max-width: 790px; margin: 0 auto; }
.standalone-panel { padding: 34px; background: var(--white); box-shadow: var(--shadow); }
.standalone-panel .panel-copy { margin: 18px 0 25px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.standalone-panel .primary-button { max-width: 330px; }
.standalone-panel .approval-status { margin-top: 18px; }
.form-section-title { margin: 30px 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: #36725f; font: 500 10px "DM Mono"; letter-spacing: .13em; text-transform: uppercase; }
.form-section-title:first-of-type { margin-top: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.form-grid .full-span { grid-column: 1 / -1; }
.demo-privacy-note { margin: -4px 0 20px; padding: 13px 15px; color: var(--ink-soft); background: #eef8f3; border-left: 3px solid var(--mint-strong); font-size: 11px; line-height: 1.55; }
.next-step { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; }
.next-step a, .mock-card a { color: var(--forest); font-weight: 700; }
.step-heading { display: flex; align-items: flex-start; gap: 14px; }
.step-heading > span { min-width: 34px; height: 34px; display: grid; place-items: center; color: var(--forest); background: var(--mint); font: 500 11px "DM Mono"; }
.step-heading .eyebrow { margin: 0 0 4px; }
.step-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.approval-card > p:not(.approval-status) { margin: 16px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inline-form .secondary-button { min-height: 50px; white-space: nowrap; }
.approval-status { margin: 12px 0 0; font: 500 11px/1.5 "DM Mono"; color: var(--ink-soft); }
.approval-status[data-state="pending"] { color: #8b6413; }
.approval-status[data-state="approved"] { color: #167451; }
.approval-status[data-state="error"] { color: var(--danger); }
.operation-heading { margin: 0 0 24px; }

.mode-switch { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.mode-button { position: relative; min-width: 108px; padding: 0 14px 15px; border: 0; color: #72817c; background: transparent; font-weight: 600; }
.mode-button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.mode-button.active { color: var(--forest); }
.mode-button.active::after { background: var(--mint-strong); }

.payment-fieldset { margin: 0 0 23px; padding: 0; border: 0; }
.payment-fieldset legend { margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.payment-option { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.payment-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.payment-option > span { min-height: 74px; display: flex; flex-direction: column; justify-content: center; padding: 13px 15px; border: 1px solid var(--line); background: #fff; }
.payment-option strong { color: var(--ink); font-size: 13px; }
.payment-option small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.payment-option input:checked + span { border-color: #51aa8a; box-shadow: inset 0 0 0 1px #51aa8a; background: #f0fbf6; }
.payment-option input:focus-visible + span { outline: 2px solid rgba(79,216,167,.55); outline-offset: 2px; }
.mock-card { margin: -7px 0 23px; padding: 20px; border: 1px solid #d6c99e; background: #fffaf0; }
.mock-card[hidden] { display: none; }
.mock-card > p { margin: 0 0 17px; color: #6f5c22; font-size: 11px; line-height: 1.5; }
.mock-card-credentials { display: grid; grid-template-columns: 2fr 1fr .75fr; gap: 8px; margin: 0 0 18px; padding: 13px; background: #f7edcf; border: 1px dashed #b9a35d; }
.mock-card-credentials span { min-width: 0; }
.mock-card-credentials small, .mock-card-credentials strong { display: block; }
.mock-card-credentials small { margin-bottom: 4px; color: #7d6a2e; font-size: 9px; }
.mock-card-credentials strong { color: #463b19; font: 500 11px "DM Mono"; overflow-wrap: anywhere; }
.mock-card .field-group { margin-bottom: 14px; }
.mock-card .card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.about-card { min-height: 250px; padding: 32px; background: var(--white); box-shadow: var(--shadow); }
.about-card h2 { margin: 0 0 16px; font-size: 27px; line-height: 1.12; letter-spacing: -.035em; }
.about-card > p:last-child { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.dark-card { color: #ecf8f3; background: var(--forest); }
.dark-card .eyebrow { color: var(--mint); }
.dark-card > p:last-child { color: #abc0b9; }
.demo-card-section { display: grid; grid-template-columns: 1fr minmax(320px, .85fr); gap: 44px; align-items: center; padding: 42px; background: #e8f6f0; box-shadow: var(--shadow); scroll-margin-top: 24px; }
.demo-card-section h2 { margin: 0 0 14px; font-size: 32px; letter-spacing: -.04em; }
.demo-card-section > div:first-child > p:last-child { color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.card-visual { min-height: 210px; padding: 26px; color: #eafff7; background: linear-gradient(135deg, #0f372d, #1f6654); box-shadow: 0 20px 45px rgba(15,55,45,.22); display: flex; flex-direction: column; justify-content: space-between; }
.card-brand, .card-meta { display: flex; justify-content: space-between; align-items: flex-start; }
.card-brand span { font-weight: 700; letter-spacing: .06em; }
.card-brand small { padding: 4px 7px; color: var(--forest); background: var(--mint); font: 600 9px "DM Mono"; }
.card-number { font: 500 clamp(17px, 2.1vw, 23px) "DM Mono"; letter-spacing: .025em; white-space: nowrap; }
.card-meta { justify-content: flex-start; gap: 42px; }
.card-meta small, .card-meta strong { display: block; }
.card-meta small { margin-bottom: 4px; color: #a9c9bd; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.card-meta strong { font: 500 12px "DM Mono"; }
.card-cta { grid-column: 1 / -1; width: fit-content; min-height: 48px; text-decoration: none; align-items: center; }

.field-group { margin: 0 0 23px; }
.field-group label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; letter-spacing: .015em; }
.field-group label span { color: #8a9692; font-weight: 500; }
.field-group label .label-primary { color: inherit; font-weight: 700; }
input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; outline: none; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: #51aa8a; box-shadow: 0 0 0 3px rgba(79,216,167,.16); }
input.invalid { border-color: var(--danger); }

.amount-input { height: 82px; display: flex; align-items: center; border: 1px solid var(--line); background: #fff; padding: 0 19px; transition: border-color .15s, box-shadow .15s; }
.amount-input:focus-within { border-color: #51aa8a; box-shadow: 0 0 0 3px rgba(79,216,167,.16); }
.amount-input > span:first-child { font-size: 20px; color: #75847f; }
.amount-input input { height: auto; min-width: 0; border: 0; box-shadow: none; padding: 0 12px; font: 500 clamp(30px, 4vw, 43px) "DM Mono"; letter-spacing: -.04em; }
.amount-input input:focus { box-shadow: none; }
.token-label { font: 500 11px "DM Mono"; letter-spacing: .08em; background: #e7f7f0; padding: 7px 9px; white-space: nowrap; }
.field-meta { display: flex; justify-content: space-between; min-height: 19px; margin-top: 7px; }
.field-meta small { color: #86928e; }
.error { min-height: 17px; display: block; margin-top: 6px; color: var(--danger) !important; font-size: 11px; }

.review-card { margin: 29px 0 18px; padding: 19px 20px; display: flex; justify-content: space-between; align-items: center; background: #eef8f3; border-left: 3px solid var(--mint-strong); }
.review-card span { display: block; color: var(--ink-soft); font-size: 11px; margin-bottom: 4px; }
.review-card strong { font: 500 16px "DM Mono"; }
.review-rate { text-align: right; color: #72817c; font: 400 9px/1.5 "DM Mono"; letter-spacing: .1em; }
.review-rate strong { color: var(--ink); font-size: 11px; }

.primary-button, .secondary-button { min-height: 52px; padding: 0 19px; border: 1px solid transparent; font-weight: 700; transition: transform .15s, background .15s; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: space-between; color: #effcf7; background: var(--forest); }
.primary-button:hover { background: #174b3e; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .68; }
.primary-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button { background: transparent; color: var(--ink); border-color: var(--line); }
.secondary-button:hover { background: #f0f2ed; }

.context-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--mint); border: 1px solid rgba(185,246,221,.35); }
.context-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.context-top > p:not(.context-copy) { margin: 27px 0 8px; color: var(--mint); font: 500 10px "DM Mono"; letter-spacing: .11em; text-transform: uppercase; }
.context-top h2 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -.035em; font-weight: 500; }
.context-copy { margin: 18px 0 0; color: #a9beb7; font-size: 13px; line-height: 1.6; }
.details-list { margin: 40px 0 0; }
.details-list div { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.13); }
.details-list dt { color: #8fa8a0; font-size: 11px; }
.details-list dd { margin: 0; font: 400 11px "DM Mono"; }

.dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(0,0,0,.24); }
.dialog::backdrop { background: rgba(8,27,22,.68); backdrop-filter: blur(3px); }
.dialog form { padding: 34px; }
.dialog-close { position: absolute; top: 17px; right: 17px; }
.dialog h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.035em; }
.dialog h2 + p { margin: 0 0 26px; color: var(--ink-soft); font-size: 13px; }
.confirmation-list { margin: 0; border-top: 1px solid var(--line); }
.confirmation-list div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.confirmation-list dt { color: var(--ink-soft); font-size: 12px; }
.confirmation-list dd { margin: 0; overflow-wrap: anywhere; font: 500 12px "DM Mono"; }
.dialog-actions { display: flex; gap: 10px; margin-top: 26px; }
.dialog-actions .primary-button { flex: 1; justify-content: center; }
.compact .field-group { margin-bottom: 16px; }

.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 15px 18px; color: #fff; background: var(--forest); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error-toast { background: #742c28; }

@media (max-width: 760px) {
  .app-shell { padding: 0 18px 32px; }
  .topbar { height: auto; min-height: 76px; flex-wrap: wrap; padding: 14px 0; row-gap: 10px; }
  .site-nav { order: 3; width: 100%; margin: 0; border-top: 1px solid rgba(15,55,45,.12); padding-top: 8px; }
  .site-nav a { flex: 1; text-align: center; }
  main { padding-top: 42px; }
  .intro { margin-bottom: 34px; }
  .intro h1 { font-size: 46px; }
  .nav-ticker { align-items: flex-start; flex-direction: column; padding: 24px 22px; }
  .nav-ticker-meta { align-items: flex-start; text-align: left; }
  .workspace { grid-template-columns: 1fr; }
  .panel { padding: 26px 22px; }
  .context-panel { min-height: 410px; }
  .amount-input { height: 74px; }
  .inline-form, .payment-options, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-span { grid-column: auto; }
  .mock-card-credentials { grid-template-columns: 1fr 1fr; }
  .mock-card-credentials span:first-child { grid-column: 1 / -1; }
  .about-grid, .demo-card-section { grid-template-columns: 1fr; }
  .market-intro { align-items: flex-start; flex-direction: column; }
  .market-workspace { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .demo-card-section { padding: 28px 22px; gap: 28px; }
  .card-cta { grid-column: auto; width: 100%; }
}

@media (max-width: 440px) {
  .intro h1 { font-size: 40px; }
  .brand small { display: none; }
  .environment { font-size: 10px; }
  .amount-input { padding: 0 13px; }
  .amount-input input { font-size: 29px; }
  .token-label { padding: 6px; }
  .review-card { align-items: flex-end; padding: 16px; }
  .dialog form { padding: 28px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
