:root {
  --paper: #f5f2ea;
  --surface: #fffdf7;
  --ink: #171614;
  --muted: #676057;
  --line: #d8d0c2;
  --green: #1f7a4d;
  --red: #b53d2d;
  --amber: #b7791f;
  --teal: #14737b;
  --black: #11100e;
  --shadow: 0 14px 35px rgba(49, 43, 33, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.88);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--surface);
  font-weight: 800;
  border-radius: 8px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
}

.brand p,
.hero-copy p,
.plan p {
  color: var(--muted);
  line-height: 1.45;
}

.session {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.16);
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(340px, 1.28fr);
  gap: 22px;
  min-height: 420px;
  align-items: stretch;
}

.hero-copy,
.panel,
.control-band {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.hero-copy {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  max-width: 10ch;
  font-size: 54px;
  line-height: 0.98;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.primary-btn,
.icon-btn {
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--surface);
  min-height: 42px;
  cursor: pointer;
  border-radius: 8px;
}

.primary-btn {
  padding: 0 18px;
  font-weight: 700;
}

.icon-btn {
  width: 42px;
  font-size: 22px;
  display: grid;
  place-items: center;
}

.primary-btn.live::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #62c88a;
  box-shadow: 0 0 0 5px rgba(98, 200, 138, 0.18);
  vertical-align: middle;
}

.primary-btn.paused {
  background: #faf7ef;
  color: var(--ink);
}

.primary-btn.paused::before {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(183, 121, 31, 0.18);
}

.market-visual {
  min-height: 420px;
  background: #22201b;
  border: 1px solid #22201b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.control-band {
  margin-top: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.tradingview-band {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(320px, 0.68fr);
  gap: 16px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 16px;
}

.live-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quote-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quote-card span,
.quote-card small {
  color: var(--muted);
  line-height: 1.35;
}

.quote-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-card strong {
  font-size: 28px;
  line-height: 1;
}

.tv-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.tv-header p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.4;
}

.tradingview-widget-container {
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf7ef;
}

.tradingview-widget-container__widget {
  min-height: 160px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #faf7ef;
  color: var(--ink);
  padding: 0 11px;
}

.compact {
  min-width: 150px;
}

.compact input {
  width: 34px;
  height: 34px;
  accent-color: var(--green);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

h3 {
  font-size: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.good {
  color: #0f5130;
  background: #dff3e6;
}

.badge.bad {
  color: #7a1f16;
  background: #f8d8d2;
}

.badge.pending {
  color: #704900;
  background: #f7e6bd;
}

.badge.neutral {
  color: #403a32;
  background: #ebe4d8;
}

.metrics {
  display: grid;
  gap: 14px;
  margin: 0;
}

.metrics.mini {
  gap: 9px;
  margin-bottom: 14px;
}

.metrics.mini div {
  padding-top: 9px;
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

dt,
.gate-list,
.checklist,
.plan {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.gate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
  line-height: 1.35;
}

.gate-list li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--green);
}

.workflow {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  margin-top: 16px;
}

.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.feed-list li {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  line-height: 1.35;
}

.feed-list strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.feed-list a {
  color: var(--teal);
  text-decoration: none;
}

.wide {
  min-height: 230px;
}

.checklist,
.plan {
  display: grid;
  gap: 14px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

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

.plan div {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.plan strong {
  display: block;
  color: var(--ink);
  margin-bottom: 7px;
}

@media (max-width: 980px) {
  .hero,
  .workflow,
  .intel-grid,
  .tradingview-band,
  .control-band {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h2 {
    max-width: 12ch;
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .shell {
    padding: 14px;
  }

  .metric-grid,
  .live-strip,
  .plan {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 22px;
  }

  h2 {
    font-size: 36px;
  }
}
