/* ==========================================================================
   ILLUSIO CAPITAL - ANONYMOUS & DECENTRALIZED QUANTITATIVE PROTOCOL
   MINIMALIST LIGHT THEME | ROBOTO TYPOGRAPHY | ESTABLISHED 2022
   ========================================================================== */

:root {
  /* Minimalist Monochromatic Light Palette */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark: #0f172a;
  
  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-dark: #0f172a;

  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #ffffff;

  /* Accents */
  --accent-green: #059669;
  --accent-green-bg: #ecfdf5;
  --accent-green-border: #a7f3d0;
  
  /* Pure Roboto Typography */
  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizing & Radius */
  --container-max: 1180px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --transition: 0.2s ease-in-out;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background-color: var(--bg-main);
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--text-primary);
  color: #ffffff;
}

/* Subtle Light Canvas Background */
#canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   MINIMALIST HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  font-family: var(--font-main);
}

.protocol-tag {
  font-family: var(--font-main);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Enhanced Client Portal Nav Button */
.btn-portal-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
  transition: all var(--transition);
  letter-spacing: -0.01em;
}

.btn-portal-enhanced .portal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.btn-portal-enhanced:hover {
  background: #1e293b;
  border-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-black {
  background: var(--text-primary);
  color: #ffffff;
}

.btn-black:hover {
  background: #232d42;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-primary);
}

/* ==========================================================================
   HERO / PROTOCOL OVERVIEW
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem 0;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  color: var(--accent-green);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-description strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Gains Grid Strip */
.gains-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.65rem;
  padding: 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 1.75rem;
}

.gain-card {
  display: flex;
  flex-direction: column;
}

.gain-year {
  font-family: var(--font-main);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.gain-val {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-green);
}

/* ==========================================================================
   SIMULATOR (PURE ROBOTO TYPOGRAPHY)
   ========================================================================== */
.simulator-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-main);
}

.simulator-card * {
  font-family: var(--font-main) !important;
}

.card-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card-tag {
  font-size: 0.72rem;
  color: var(--accent-green);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.sim-control-box {
  margin-bottom: 1.1rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.sim-val-display {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.range-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
}

.horizon-toggle-bar {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 1.1rem;
}

.horizon-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.horizon-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.chart-wrapper {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1.1rem;
}

.chart-svg {
  width: 100%;
  height: 120px;
  overflow: visible;
}

.comparison-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.comp-item.featured {
  background: #ffffff;
  border-color: var(--text-primary);
  border-width: 1.5px;
}

.comp-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot.black { background: var(--text-primary); }
.dot.btc { background: #f59e0b; }
.dot.gray { background: #94a3b8; }

.comp-amount {
  font-weight: 800;
  font-size: 0.9rem;
}

/* ==========================================================================
   PAGE SECTIONS & THESIS / ESSAY GRIDS
   ========================================================================== */
.page-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-light);
}

.section-head {
  margin-bottom: 2.25rem;
}

.section-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  display: block;
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 760px;
  line-height: 1.7;
}

/* 3-Column Thesis Grid */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.thesis-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thesis-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.thesis-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.thesis-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* 2-Column Deep Dive / Future of Finance Block */
.future-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.future-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.future-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.future-box p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.future-box p:last-child {
  margin-bottom: 0;
}

/* Minimalist Founder Card */
.founder-card {
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  max-width: 720px;
}

.founder-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.founder-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
}

.founder-role {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
}

.founder-bio {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Minimal Footer */
.site-footer {
  background: #ffffff;
  padding: 2.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   INSTITUTIONAL CLIENT PORTAL STYLES (CENTERED & MINIMALIST)
   ========================================================================== */
.portal-centered-container {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.portal-auth-card {
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 0.5rem;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}

.auth-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.text-input {
  width: 100%;
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.75rem 0.85rem 0.75rem 2.5rem;
  background: var(--bg-main);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}

.text-input:focus {
  background: #ffffff;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

.auth-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input {
  accent-color: var(--text-primary);
  cursor: pointer;
}

.btn-auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.01em;
}

.btn-auth-submit:hover {
  background: #1e293b;
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.portal-live-ticker {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 0.65rem 1.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticker-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   WEEKLY PERFORMANCE MATRIX (3 MONTHS x 4 WEEKS)
   ========================================================================== */
.month-selector-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.month-tab-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.month-tab-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.month-tab-btn.active {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.month-card-block {
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.month-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.month-title-group h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.month-title-group span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.month-aggregate-pills {
  display: flex;
  gap: 1rem;
}

.agg-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  text-align: right;
}

.agg-pill-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.agg-pill-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-green);
}

.weeks-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.week-tile {
  background: var(--bg-main);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
}

.week-tile:hover {
  border-color: var(--border-strong);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.week-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.week-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.week-date-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.week-yield-display {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--accent-green);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.week-pnl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-light);
}

.week-pnl-val {
  font-weight: 800;
  color: var(--text-primary);
}

.week-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.week-status-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-green);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* Admin Weekly Editor Styles */
.admin-week-editor-card {
  background: #ffffff;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.admin-month-block {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-main);
}

.admin-month-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-week-inputs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.admin-week-col {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.admin-field-group {
  margin-bottom: 0.65rem;
}

.admin-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  display: block;
}

.admin-field-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-main);
  font-size: 0.82rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
}

.admin-field-input:focus {
  outline: none;
  border-color: var(--text-primary);
}
