/* ============================================================
   OpenTrade — Clipping Guide
   Black & white. No color-coding, no gradients, no glow.
   Bricolage Grotesque / IBM Plex Sans / IBM Plex Mono
   ============================================================ */

:root{
  --bg: #ffffff;
  --bg-elevated: #fafafa;
  --bg-card: #f6f6f6;
  --bg-card-hover: #efefef;
  --border: #dcdcdc;
  --border-soft: #e9e9e9;
  --border-strong: #111111;

  --text: #111111;
  --text-dim: #555555;
  --text-faint: #8a8a8a;

  --ink: #111111;
  --ink-soft: rgba(17,17,17,.06);
  --ink-border: rgba(17,17,17,.18);

  --font-display: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 10px;
  --radius-sm: 7px;
  --sidebar-w: 268px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior:smooth; }
html, body{ overflow-x: hidden; max-width: 100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection{ background: var(--ink); color:#fff; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: #d4d4d4; border-radius:10px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background: #b9b9b9; }

a{ color:inherit; text-decoration:none; }
h1,h2,h3{ font-family: var(--font-display); font-weight: 700; margin:0; letter-spacing: -0.01em; }
p{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }
table{ border-collapse: collapse; width:100%; }
button{ font-family: inherit; }

/* ================= Layout shell ================= */

.shell{
  display:grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height:100vh;
}

/* ================= Sidebar ================= */

.sidebar{
  position: sticky;
  top:0;
  align-self:start;
  height:100vh;
  overflow-y:auto;
  background: var(--bg);
  border-right:1px solid var(--border);
  padding: 30px 18px 22px;
  display:flex;
  flex-direction:column;
  gap: 26px;
}

.sidebar__brand{ display:flex; align-items:center; gap:10px; padding: 0 8px; }
.brandmark{ display:flex; flex-shrink:0; }
.sidebar__brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.sidebar__brand-name{ font-family: var(--font-display); font-weight:700; font-size:17px; }
.sidebar__brand-sub{ font-size:11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing:.04em; text-transform:uppercase; }

.nav{ display:flex; flex-direction:column; gap:2px; flex:1; }

.nav__item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease;
}
.nav__item:hover{ background: var(--bg-card); color: var(--text); }
.nav__item.is-active{ background: var(--ink); color: #fff; }
.nav__item.is-active .nav__num{ color: rgba(255,255,255,.6); }
.nav__item.is-active .nav__icon{ color: #fff; }

.nav__num{ font-family: var(--font-mono); font-size:11px; color: var(--text-faint); width:16px; flex-shrink:0; }
.nav__icon{ display:flex; width:18px; height:18px; flex-shrink:0; color: var(--text-dim); }
.nav__icon svg{ width:100%; height:100%; fill: currentColor; }
.nav__label{ font-size:14.5px; font-weight:500; }

.sidebar__cta{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border:1px solid var(--border-strong);
  font-size:13px; font-weight:600; color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.sidebar__cta:hover{ background: var(--ink); color:#fff; }

/* ================= Mobile bar ================= */

.mobile-bar{ display:none; }
.nav-scrim{ display:none; }

/* ================= Content / panels ================= */

.content{ min-width:0; position:relative; }

.panel{ display:none; }
.panel.is-active{ display:block; animation: panelIn .3s ease; }

@keyframes panelIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.panel__inner{ max-width: 740px; margin: 0 auto; padding: 68px 40px 140px; }
.panel__inner--wide{ max-width: 900px; }

.panel__head{
  display:flex; gap:18px; align-items:flex-start;
  padding-bottom: 30px; margin-bottom: 34px;
  border-bottom: 1px solid var(--border);
}
.panel__num{
  font-family: var(--font-mono); font-size:13px; color: var(--ink);
  background: var(--bg-card); border:1px solid var(--border);
  border-radius: 8px; width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.panel__head h1{ font-size: 32px; margin-bottom:6px; }
.panel__head p{ color: var(--text-dim); font-size:15px; max-width: 52ch; }

/* ================= Hero (Start Here) ================= */

.hero{ padding: 8px 0 40px; margin-bottom: 8px; }

.eyebrow{
  display:inline-block;
  font-family: var(--font-mono); font-size:11.5px; letter-spacing:.1em; text-transform:uppercase;
  color: var(--text-dim);
  padding-bottom: 20px;
}

.hero__title{
  font-size: 44px; line-height:1.1; margin-bottom:18px; max-width: 20ch;
  font-weight:750;
}
.accent-text{ text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }

.hero__sub{ font-size:16.5px; color: var(--text-dim); max-width: 52ch; }

/* ================= Section headings ================= */

.section-heading{ font-size:20px; margin: 40px 0 16px; }
.sub-heading{ font-family: var(--font-body); font-weight:700; font-size:15.5px; margin: 26px 0 10px; color: var(--text); }
.lead{ font-size:17px; color: var(--text-dim); max-width:58ch; }

/* ================= Callouts (all one treatment — no color-coding) ================= */

.callout{
  display:flex; flex-direction:column; gap:6px;
  background: var(--bg-card); border:1px solid var(--border);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 22px 0;
}
.callout p{ color: var(--text-dim); font-size:14.5px; line-height:1.55; }
.callout p strong{ color: var(--text); }
.callout__tag{
  font-family: var(--font-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  font-weight:600; color: var(--text);
}
.callout--important{ border-left-width: 3px; }
.callout--warn{ border-left-width: 3px; }

/* ================= Checklist ================= */

.checklist{ display:flex; flex-direction:column; gap:2px; margin: 18px 0; }
.checklist li{ border-bottom:1px solid var(--border-soft); }
.checklist li:last-child{ border-bottom:none; }
.checklist label{
  display:flex; align-items:center; gap:12px; padding: 12px 4px; cursor:pointer;
}
.checklist input[type=checkbox]{
  appearance:none; -webkit-appearance:none;
  width:19px; height:19px; flex-shrink:0;
  border:1.5px solid var(--border-strong); border-radius:5px;
  background: var(--bg);
  display:grid; place-content:center;
  transition: border-color .15s ease, background .15s ease;
}
.checklist input[type=checkbox]::before{
  content:""; width:10px; height:10px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0); transition: transform .12s ease;
  background: #fff;
}
.checklist input[type=checkbox]:checked{ background: var(--ink); border-color: var(--ink); }
.checklist input[type=checkbox]:checked::before{ transform: scale(1); }
.checklist span{ font-size:15px; color: var(--text); transition: color .15s ease; }
.checklist input[type=checkbox]:checked + span{ color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--border); }

/* ================= Rule / quote / step lists ================= */

.rule-list{ display:flex; flex-direction:column; gap:11px; margin: 14px 0; }
.rule-list li{
  position:relative; padding-left:20px; font-size:15px; color: var(--text-dim); line-height:1.55;
}
.rule-list li::before{
  content:""; position:absolute; left:0; top:8px; width:5px; height:5px; border-radius:50%;
  background: var(--ink);
}
.rule-list li strong{ color: var(--text); }

.quote-list{ display:flex; flex-direction:column; gap:8px; margin: 14px 0; }
.quote-list li{
  font-size:14.5px; color: var(--text); font-style: italic;
  background: var(--bg-card); border:1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.step-list{ display:flex; flex-direction:column; gap:14px; margin: 14px 0; counter-reset: step; }
.step-list li{
  position:relative; padding-left: 34px; font-size:15px; color: var(--text-dim); line-height:1.55;
  counter-increment: step;
}
.step-list li::before{
  content: counter(step);
  position:absolute; left:0; top:0;
  width:24px; height:24px; border-radius:7px;
  background: var(--bg); border:1px solid var(--border-strong); color: var(--ink);
  font-family: var(--font-mono); font-size:12px; font-weight:600;
  display:flex; align-items:center; justify-content:center;
}
.step-list li strong{ color: var(--text); }

.divider{ border:none; border-top:1px solid var(--border); margin: 40px 0; }

.muted-note{ font-size:13.5px; color: var(--text-faint); margin-top:10px; }
.muted-note em{ color: var(--text-dim); font-style: normal; }

.inline-link{ color: var(--text); border-bottom:1px solid var(--border-strong); }
.inline-link:hover{ color: var(--text-dim); }
.inline-code{ font-family: var(--font-mono); font-size:.92em; background: var(--bg-card); border:1px solid var(--border-soft); padding: 1px 6px; border-radius:5px; color: var(--text); }

.link-box{
  display:flex; align-items:center; background: var(--bg-card); border:1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 10px 0;
}
.link-box code{ font-family: var(--font-mono); font-size:13.5px; color: var(--text); word-break: break-all; }

/* ================= Hub grid (Start Here) ================= */

.hub-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin: 16px 0; }
.hub-card{
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display:flex; flex-direction:column; gap:8px;
  transition: border-color .15s ease, background .15s ease;
}
.hub-card:hover{ border-color: var(--border-strong); background: var(--bg-card); }
.hub-card__num{ font-family: var(--font-mono); font-size:12px; color: var(--text-faint); }
.hub-card h3{ font-size:17px; }
.hub-card p{ font-size:13.5px; color: var(--text-dim); line-height:1.5; }

/* ================= Tables ================= */

.table-wrap{ overflow-x:auto; margin: 16px 0 20px; border:1px solid var(--border); border-radius: var(--radius); }
.data-table{ font-size:14px; }
.data-table th{
  text-align:left; font-family: var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase;
  color: var(--text-faint); font-weight:500; padding: 12px 16px; background: var(--bg-card);
  border-bottom:1px solid var(--border);
}
.data-table td{ padding: 13px 16px; color: var(--text-dim); border-bottom:1px solid var(--border-soft); vertical-align:top; }
.data-table tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover td{ background: var(--bg-elevated); color: var(--text); }
.data-table .nowrap{ white-space:nowrap; color: var(--text); font-weight:600; }
.data-table .pos{ color: var(--text); font-weight:600; }
.data-table .pos::before{ content: "✓ "; }
.data-table .neg{ color: var(--text-faint); }
.data-table .neg::before{ content: "✕ "; }
.data-table--compare td:first-child{ border-right: 1px solid var(--border-soft); }
.data-table--numbered td.idx{
  font-family: var(--font-mono); color: var(--text); width:36px; text-align:center;
}

/* ================= Chips (countries) ================= */

.chip-row{ display:flex; flex-wrap:wrap; gap:8px; margin: 14px 0 22px; }
.chip{
  font-size:13px; font-family: var(--font-mono); color: var(--text);
  background: var(--bg); border:1px solid var(--border); border-radius:999px; padding: 7px 14px;
}

/* ================= Path blocks (Tier targeting) ================= */

.path-block{
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px 22px; margin: 18px 0;
}
.path-block__label{
  display:flex; align-items:center; justify-content:space-between;
  font-family: var(--font-display); font-weight:700; font-size:17px; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom:1px solid var(--border);
}
.path-block__label span{
  font-family: var(--font-mono); font-size:12px; font-weight:500; color: var(--text-dim);
  background: var(--bg-card); border:1px solid var(--border); padding: 4px 10px; border-radius:999px;
}

/* ================= Format cards ================= */

.format-card{
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius);
  padding: 28px 28px 26px; margin: 20px 0 28px;
}
.format-card__head{ display:flex; gap:16px; align-items:flex-start; margin-bottom:16px; }
.format-card__num{
  font-family: var(--font-mono); font-size:13px; color: var(--ink);
  background: var(--bg-card); border:1px solid var(--border);
  border-radius:8px; width:34px; height:34px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
}
.format-card h2{ font-size:21px; margin-bottom:4px; }
.format-card__best{ font-size:13.5px; color: var(--text-faint); }
.format-card > p{ font-size:15px; color: var(--text-dim); line-height:1.6; max-width: 62ch; }

.resource-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.resource{
  display:flex; align-items:center; gap:10px;
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; transition: border-color .15s ease, background .15s ease;
}
.resource:hover{ border-color: var(--border-strong); background: var(--bg-card); }
.resource__tag{
  font-family: var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.06em;
  color: var(--text-faint);
}
.resource__label{ font-size:13.5px; color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset:3px; }
.resource__go{ color: var(--text-faint); flex-shrink:0; }
.resource:hover .resource__go{ color: var(--text); }

/* ================= Responsive ================= */

@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr; }

  .mobile-bar{
    display:flex; align-items:center; justify-content:space-between;
    position:sticky; top:0; z-index:40;
    background: var(--bg); border-bottom:1px solid var(--border);
    padding: 14px 18px;
  }
  .mobile-bar__brand{ display:flex; align-items:center; gap:9px; }
  .mobile-bar__name{ font-family: var(--font-display); font-weight:700; font-size:15px; }
  .mobile-bar__name em{ font-style:normal; color: var(--text-faint); font-weight:500; }

  .mobile-bar__toggle{
    display:flex; flex-direction:column; gap:4px; background:none; border:none; padding:8px; cursor:pointer;
  }
  .mobile-bar__toggle span{ width:20px; height:2px; background: var(--text); border-radius:2px; transition: transform .2s ease, opacity .2s ease; }
  .mobile-bar__toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .mobile-bar__toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
  .mobile-bar__toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

  .sidebar{
    position:fixed; top:0; left:0; height:100vh; width: 82%; max-width:320px;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.7,.2,1);
    z-index:60; padding-top: 74px;
    box-shadow: 20px 0 60px rgba(0,0,0,.12);
  }
  .sidebar.is-open{ transform: translateX(0); }

  .nav-scrim{
    display:block; position:fixed; inset:0; background: rgba(0,0,0,.35);
    opacity:0; pointer-events:none; transition: opacity .25s ease; z-index:50;
  }
  .nav-scrim.is-open{ opacity:1; pointer-events:auto; }

  .panel__inner{ padding: 40px 22px 90px; }
  .hero__title{ font-size:30px; max-width: 18ch; }
  .hub-grid{ grid-template-columns: 1fr; }
  .panel__head{ flex-direction:column; }
}

@media (max-width: 480px){
  .resource{ width:100%; }
  .path-block{ padding: 20px 18px; }
}
