/* =========================================================
   Theo Capital — ARK-like (clean, institutional, light)
   ========================================================= */

/* ========== Base / Variables ========== */
:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;

  --ink: #0b0f14;
  --muted: rgba(11,15,20,.70);
  --muted2: rgba(11,15,20,.55);

  --line: rgba(11,15,20,.12);
  --line2: rgba(11,15,20,.08);

  --shadow: 0 10px 28px rgba(11,15,20,.08);
  --shadow2: 0 6px 18px rgba(11,15,20,.06);

  --radius: 18px;
  --radius2: 14px;

  --accent: #00a3ff;
  --accent-2: #0066ff;

  --pos: #0b7a4b;
  --neg: #b42318;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ========== Wrappers ========== */
.tc-bg{ background: var(--bg); }

.tc-wrap{
  width: min(1160px, 92vw);
  margin: 0 auto;
  padding: 22px 0;
}

/* ========== Navigation ========== */
.tc-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow2);
}

.tc-brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--ink);
}

.tc-logo{
  width:34px;
  height:34px;
  border-radius:10px;
  background: linear-gradient(135deg, var(--ink), rgba(11,15,20,.55));
}

.tc-brandname{
  font-weight:700;
  letter-spacing:.2px;
}

.tc-navlinks{
  display:flex;
  gap:8px;
}

.tc-pill{
  text-decoration:none;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  font-weight:600;
  font-size:14px;
}

.tc-pill:hover{
  box-shadow: var(--shadow2);
}

/* ========== Hero ========== */
.tc-hero{
  padding:28px 0 12px;
}

.tc-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tc-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: var(--accent);
}

.tc-h1{
  margin:14px 0 10px;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height:1.05;
  letter-spacing:-0.7px;
}

.tc-sub{
  max-width:70ch;
  margin:0;
  color: var(--muted);
  line-height:1.6;
}

/* ========== Grid / Cards ========== */
.tc-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:16px;
  margin-top:18px;
}

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

.tc-card{
  min-width:0;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tc-card-inner{
  padding:16px;
}

/* ========== Controls ========== */
.tc-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.tc-input{
  flex:1 1 280px;
  padding:12px 14px;
  border-radius: var(--radius2);
  border:1px solid var(--line);
  background:#fff;
}

.tc-input::placeholder{ color: rgba(11,15,20,.45); }

.tc-input:focus{
  outline:none;
  border-color: rgba(0,163,255,.5);
  box-shadow: 0 0 0 4px rgba(0,163,255,.12);
}

.tc-btn{
  padding:12px 14px;
  border-radius: var(--radius2);
  border:1px solid rgba(0,163,255,.35);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color:#fff;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,163,255,.18);
}

.tc-btn:disabled{ opacity:.6; cursor:not-allowed; }

.tc-badge{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--surface-2);
  font-size:14px;
  color: var(--muted);
  font-weight:600;
}

/* ========== Table ========== */
.tc-tablewrap{
  margin-top:12px;
  overflow-x:auto;
  border:1px solid var(--line2);
  border-radius:12px;
}

.tc-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  background:#fff;
}

.tc-table th,
.tc-table td{
  padding:12px;
  border-bottom:1px solid var(--line2);
  white-space:nowrap;
  text-align:left;
  color: var(--ink);
}

.tc-table th{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
  position:sticky;
  top:0;
  background:#fff;
  z-index:1;
}

.tc-table tbody tr{
  cursor:pointer;
}

.tc-table tbody tr:hover{
  background: rgba(11,15,20,.02);
}

.tc-mono{ font-family: var(--mono); }
.tc-num{ font-variant-numeric: tabular-nums; }

.tc-pos{ color: var(--pos); font-weight:700; }
.tc-neg{ color: var(--neg); font-weight:700; }

/* Discount / Premium badge */
.tc-badge2{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--surface-2);
  font-weight:800;
  font-size:13px;
}

.tc-discount{
  background: rgba(11,122,75,.08);
  border-color: rgba(11,122,75,.25);
  color: var(--pos);
}

.tc-premium{
  background: rgba(180,35,24,.08);
  border-color: rgba(180,35,24,.25);
  color: var(--neg);
}

/* ========== Sidebar Stats ========== */
.tc-mini{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.tc-stat{
  padding:14px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: var(--shadow2);
}

.tc-stat-label{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
}

.tc-stat-value{
  margin-top:10px;
  font-size:22px;
  font-weight:800;
}

/* ========== Detail Panel (ARK-style) ========== */
.tc-detail{
  margin-top:16px;
  padding:16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
}

.tc-detail-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
}

.tc-detail-left{ min-width:0; }
.tc-detail-right{ display:flex; gap:12px; }

.tc-detail-kicker{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
}

.tc-detail-title{
  margin:6px 0 4px;
  font-size:26px;
  font-weight:900;
}

.tc-detail-sub{
  margin:0;
  color: var(--muted);
}

.tc-detail-close{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
}

/* Metrics */
.tc-detail-metrics{
  display:flex;
  gap:14px;
  margin-top:10px;
  flex-wrap:wrap;
}

.tc-metric{
  border:1px solid var(--line2);
  border-radius:12px;
  padding:10px 12px;
}

.tc-metric-label{
  font-size:12px;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
}

.tc-metric-value{
  margin-top:6px;
  font-weight:900;
}

/* Sparkline */
.tc-spark-wrap{
  border:1px solid var(--line);
  background: var(--surface-2);
  border-radius:12px;
  padding:10px 12px;
}

.tc-spark-label{
  font-size:12px;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
  margin-bottom:6px;
}

.tc-spark{
  width:160px;
  height:46px;
}

.tc-spark path{
  stroke: var(--accent);
  stroke-width:2.25;
  fill:none;
}

/* Tabs */
.tc-tabs{
  display:flex;
  gap:8px;
  margin-top:12px;
  flex-wrap:wrap;
}

.tc-tab{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  font-size:13px;
}

.tc-tab.is-active{
  border-color: rgba(0,163,255,.35);
  box-shadow: 0 0 0 4px rgba(0,163,255,.1);
}

/* Detail grid */
.tc-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}

@media (max-width: 820px){
  .tc-detail-grid{ grid-template-columns:1fr; }
}

.tc-detail-card{
  border:1px solid var(--line2);
  border-radius:14px;
  padding:14px;
}

.tc-detail-label{
  font-size:12px;
  text-transform:uppercase;
  font-weight:800;
  color: rgba(11,15,20,.55);
}

.tc-detail-value{
  margin-top:10px;
  font-size:22px;
  font-weight:900;
}

.tc-detail-note{
  margin-top:6px;
  font-size:13px;
  color: var(--muted2);
}

/* Narrative + implied */
.tc-detail-narrative,
.tc-implied{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line2);
}

.tc-detail-text{
  margin-top:8px;
  line-height:1.65;
  color: var(--muted);
}

/* ========== Footer / Disclaimer ========== */
.tc-foot{
  margin-top:14px;
  font-size:13px;
  color: var(--muted2);
}

.tc-disclaimer{
  margin-top:26px;
  padding:16px 18px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: var(--surface-2);
  font-size:13px;
  color: var(--muted);
  line-height:1.6;
}

.tc-disclaimer strong{
  color: rgba(11,15,20,.85);
  font-weight:800;
}
/* ===== Sorting UX ===== */
.tc-table th[data-sort]{
  cursor: pointer;
  user-select: none;
}

.tc-table th[data-sort]:hover{
  background: rgba(11,15,20,.02);
}

/* Selected row highlight */
.tc-table tbody tr.is-selected{
  outline: 2px solid rgba(0,163,255,.35);
  outline-offset: -2px;
  background: rgba(0,163,255,.06);
}
