/* ── Brand tokens ──────────────────────────────────────────────────────── */
:root {
  --c-primary:     #094A5E;
  --c-primary-mid: #3B6E7E;
  --c-accent:      #B6BE10;
  --c-accent-dark: #8A9008;
  --c-bg:          #F4F6F7;
  --c-surface:     #FFFFFF;
  --c-border:      #D4DCE0;
  --c-text:        #1A2E35;
  --c-text-muted:  #5A7280;
  --c-text-light:  #94AABB;
  --c-danger:      #C94040;
  --c-success:     #2E8B57;
  --c-warning:     #E07B20;

  --header-h:   64px;
  --header-rows: 6;
  --toolbar-h:  52px;
  --radius:     6px;
  --radius-lg:  10px;
  --shadow-sm:  0 1px 3px rgba(9,74,94,0.08);
  --shadow-md:  0 3px 12px rgba(9,74,94,0.12);
  --font:       'DM Sans', 'Segoe UI', sans-serif;
  --font-mono:  'DM Mono', 'Fira Mono', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
}

/* ── Login screen ───────────────────────────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
  z-index: 1000;
}
#login-screen.hidden { display: none; }

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card .logo-area {
  text-align: center;
  margin-bottom: 28px;
}
.login-card h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.05em;
}
.login-card label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  margin-bottom: 5px;
  margin-top: 16px;
}
.login-card input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.login-card input:focus { border-color: var(--c-primary-mid); }
.login-error {
  color: var(--c-danger);
  font-size: 12px;
  margin-top: 8px;
  min-height: 18px;
}
.btn-login {
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  background: var(--c-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .15s;
}
.btn-login:hover { background: var(--c-primary-mid); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }

/* ── App shell ──────────────────────────────────────────────────────────── */
#app { height: 100vh; display: flex; flex-direction: column; }
#app.hidden { display: none; }

/* ── Header ─────────────────────────────────────────────────────────────── */
#header {
  height: var(--header-h);
  background: var(--c-primary);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}

.header-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-title span {
  color: var(--c-accent);
  font-size: 11px;
  font-weight: 400;
  margin-left: 6px;
  opacity: 0.85;
  vertical-align: middle;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* ── Header resize handle ─────────────────────────────────────────────────── */
#header-resize-handle {
  height: 6px;
  background: var(--c-accent);
  flex-shrink: 0;
  position: relative;
  cursor: default;
  user-select: none;
  transition: height .15s;
}
.layout-editing #header-resize-handle {
  height: 12px;
  cursor: ns-resize;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.layout-editing #header-resize-handle:hover {
  background: #cfd416;
  height: 14px;
}
.header-resize-grip {
  display: none;
  color: var(--c-primary);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  letter-spacing: 2px;
}
.layout-editing .header-resize-grip { display: flex; align-items: center; }

.logo-svg text { letter-spacing: 0.12em; }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
#toolbar {
  height: var(--toolbar-h);
  background: var(--c-primary-mid);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
#toolbar::-webkit-scrollbar { display: none; }

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.toolbar-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.toolbar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

/* Toolbar selects + inputs */
.tb-select, .tb-input {
  height: 30px;
  padding: 0 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: white;
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}
.tb-select:hover, .tb-input:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}
.tb-select option { background: var(--c-primary); color: white; }
.tb-input::placeholder { color: rgba(255,255,255,0.45); }
.tb-input:focus { border-color: var(--c-accent); }

/* Toolbar checkboxes */
.tb-check-group {
  display: flex;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.tb-check-group input[type=checkbox] { accent-color: var(--c-accent); cursor: pointer; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all .15s;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--c-accent); color: var(--c-primary); }
.btn-primary:hover:not(:disabled) { background: var(--c-accent-dark); }

.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.22); }

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-border);
}
.btn-outline:hover:not(:disabled) { background: var(--c-bg); }

.btn-danger  { background: var(--c-danger); color: white; }
.btn-edit-layout {
  background: var(--c-accent);
  color: var(--c-primary);
  font-weight: 700;
}
.btn-edit-layout.active {
  background: var(--c-warning);
  color: white;
  animation: pulse-border 1.5s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,123,32,0.4); }
  50%       { box-shadow: 0 0 0 4px rgba(224,123,32,0); }
}

/* ── Main content ────────────────────────────────────────────────────────── */
#main-content {
  flex: 1;
  overflow: auto;
  padding: 10px;
  position: relative;
}

/* ── GridStack overrides ──────────────────────────────────────────────────── */
.grid-stack { background: transparent; }

.grid-stack-item-content {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Edit layout mode — main grid */
.layout-editing #grid-container .grid-stack-item-content {
  border: 2px dashed var(--c-accent);
  box-shadow: 0 0 0 0 transparent;
}
.layout-editing #grid-container .grid-stack-item:hover .grid-stack-item-content {
  border-color: var(--c-warning);
  box-shadow: 0 0 0 3px rgba(224,123,32,0.15);
}
.layout-editing #grid-container .gs-resizable-handle {
  opacity: 1 !important;
}

/* ── Panel anatomy ────────────────────────────────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  flex-shrink: 0;
}
.panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-primary);
}
.panel-subtitle {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 1px;
}
.panel-info {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.panel-info:hover { background: var(--c-primary); color: white; border-color: var(--c-primary); }

.panel-body {
  flex: 1;
  overflow: auto;
  padding: 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border) transparent;
}

/* ── Dashboard KPI cards ─────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.kpi-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.kpi-grid.three-col { grid-template-columns: repeat(3, 1fr); }

.kpi-card {
  background: var(--c-bg);
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid var(--c-border);
}
.kpi-card .kpi-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  margin-bottom: 3px;
}
.kpi-card .kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.2;
}
.kpi-card .kpi-value.large  { font-size: 22px; }
.kpi-card .kpi-value.accent { color: var(--c-accent-dark); }
.kpi-card .kpi-value.green  { color: var(--c-success); }

.kpi-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-light);
  margin: 10px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
}

/* ── System config ───────────────────────────────────────────────────────── */
.system-block {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.system-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  font-weight: 700;
  font-size: 12px;
  color: var(--c-primary);
}
.system-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.system-dot.active { background: var(--c-accent); color: var(--c-primary); }
.system-block-body { padding: 8px 10px; }
.system-block-body .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}
.system-info-row {
  font-size: 11px;
  color: var(--c-text-muted);
  padding: 4px 0;
  border-top: 1px solid var(--c-border);
  margin-top: 4px;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
.field-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  margin-bottom: 3px;
}
select.field-select, input.field-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 12px;
  font-family: var(--font);
  color: var(--c-text);
  background: white;
  outline: none;
  transition: border-color .15s;
}
select.field-select:focus, input.field-input:focus {
  border-color: var(--c-primary-mid);
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid var(--c-border);
  white-space: nowrap;
}
.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--c-bg);
  color: var(--c-text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--c-bg); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .total-row td { font-weight: 700; color: var(--c-primary); border-top: 2px solid var(--c-border); }

/* ── Variables list (in-use costs) ───────────────────────────────────────── */
.var-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--c-bg);
  font-size: 12px;
}
.var-row:last-child { border-bottom: none; }
.var-name  { color: var(--c-text); }
.var-value {
  font-weight: 600;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

/* ── Revenue bars ────────────────────────────────────────────────────────── */
.rev-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rev-bar-label { width: 90px; font-size: 12px; color: var(--c-text); }
.rev-bar-track {
  flex: 1;
  height: 18px;
  background: var(--c-bg);
  border-radius: 3px;
  overflow: hidden;
}
.rev-bar-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 3px;
  transition: width .5s ease;
}
.rev-bar-fill.accent { background: var(--c-accent-dark); }
.rev-bar-fill.mid    { background: var(--c-primary-mid); }
.rev-bar-fill.light  { background: var(--c-text-light); }
.rev-bar-amount {
  width: 80px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
}

/* ── Timing selects ──────────────────────────────────────────────────────── */
.timing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.timing-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-primary);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--c-accent);
}
.timing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 8px;
}
.timing-row label {
  font-size: 11px;
  color: var(--c-text);
  white-space: nowrap;
  flex: 1;
}
.timing-row select {
  width: 80px;
  padding: 4px 6px;
  font-size: 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font);
  color: var(--c-text);
  background: white;
}
.timing-note {
  font-size: 10px;
  color: var(--c-text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Cashflow payback table ──────────────────────────────────────────────── */
.payback-row-highlight td { background: rgba(182,190,16,0.12); font-weight: 700; }

/* ── Chart container ─────────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  padding: 8px;
  width: 100%;
  height: 100%;
  min-height: 180px;
  box-sizing: border-box;
}
.chart-wrap canvas { max-width: 100%; }

/* ── Notes panel ─────────────────────────────────────────────────────────── */
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
}
.notes-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--c-bg);
}
.notes-key   { color: var(--c-text-muted); font-size: 11px; white-space: nowrap; }
.notes-val   { font-weight: 600; color: var(--c-text); }

/* ── Status badge ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-stale   { background: rgba(224,123,32,0.25); color: #ffcf80; }
.badge-fresh   { background: rgba(46,139,87,0.25);  color: #7dffb3; }
.badge-draft   { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }

/* ── Loading / empty states ──────────────────────────────────────────────── */
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--c-text-muted);
  font-size: 12px;
  gap: 6px;
  padding: 20px;
  text-align: center;
}
.state-empty .icon { font-size: 28px; opacity: .4; }
.loading-spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--c-primary);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  box-shadow: var(--shadow-md);
  animation: slide-in .2s ease;
  border-left: 3px solid var(--c-accent);
}
.toast.error  { background: var(--c-danger); border-left-color: #ff8888; }
.toast.success{ border-left-color: #7ecf9e; }
@keyframes slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Scenario name input ─────────────────────────────────────────────────── */
#scenario-name {
  width: 200px;
}

/* ── Run button state ────────────────────────────────────────────────────── */
#btn-run.running {
  background: var(--c-primary-mid);
  cursor: wait;
  pointer-events: none;
}

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Load modal ─────────────────────────────────────────────────────────── */
#load-modal { display: none; }
#load-modal.open { display: flex !important; }

/* ── Project configuration panel ───────────────────────────────────────── */
.cfg-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Section block — bordered card matching timing panel style */
.cfg-section {
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  overflow: hidden;
}

.cfg-section-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e4e7ea;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #094A5E;
}

.cfg-section-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Full-width row inside a section */
.cfg-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfg-field-label {
  font-size: 10px;
  font-weight: 500;
  color: #6b7a87;
  text-transform: none;
}

/* Selects — match the timing panel's dropdown style */
.cfg-select, .cfg-select-sm {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #1a2e3b;
  cursor: pointer;
  appearance: auto;
  box-sizing: border-box;
}
.cfg-select-sm { padding: 6px 8px; font-size: 12px; }
.cfg-select:focus, .cfg-select-sm:focus {
  outline: none;
  border-color: #094A5E;
  box-shadow: 0 0 0 2px rgba(9,74,94,.12);
}

.cfg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cfg-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.cfg-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cfg-item-label {
  font-size: 10px;
  font-weight: 500;
  color: #6b7a87;
}

/* On/Off select — colour the value */
.cfg-select-sm option[value="on"]  { color: #1A7F5A; font-weight: 600; }
.cfg-select-sm option[value="off"] { color: #888; }

/* Remove gap where toolbar was */
#toolbar { display: none !important; }

/* ── Override Table Editor ───────────────────────────────────────────────── */
#table-editor-modal input[type="number"]:focus {
  outline: none;
  border-color: #094A5E;
  box-shadow: 0 0 0 2px rgba(9,74,94,0.12);
}
#table-editor-modal input[type="text"]:focus {
  outline: none;
  border-color: #094A5E;
  box-shadow: 0 0 0 2px rgba(9,74,94,0.12);
}
#table-editor-modal input[type="number"] {
  transition: border-color .15s, box-shadow .15s;
}
/* Remove spinner arrows on rate inputs for cleaner look */
#te-body input[type="number"]::-webkit-inner-spin-button,
#te-body input[type="number"]::-webkit-outer-spin-button { opacity: 0.4; }

/* ── System inactive state ───────────────────────────────────────────────── */
.system-block.system-inactive {
  border-color: #e0e0e0;
  background: #fafafa;
}
.system-block.system-inactive .system-block-header {
  background: #f4f4f4;
  color: #999;
  border-bottom-color: #e8e8e8;
}
.system-block.system-inactive .system-dot {
  background: #ccc;
  color: #fff;
}

/* ── Info panel trigger buttons ─────────────────────────────────────── */
.cfg-info-btn, .tbl-info-btn {
  background: none;
  border: 1px solid #c5d6dd;
  border-radius: 50%;
  width: 14px; height: 14px;
  font-size: 9px;
  line-height: 14px;
  cursor: pointer;
  color: #5a7280;
  padding: 0;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  margin-left: 3px;
}
.cfg-info-btn:hover, .tbl-info-btn:hover {
  background: #094A5E;
  color: #fff;
  border-color: #094A5E;
}

/* ── Info panel body content ────────────────────────────────────────── */
.ip-section { margin-bottom: 18px; }
.ip-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #5a7280;
  margin-bottom: 6px;
}
.ip-body { font-size: 12px; color: #2d4550; line-height: 1.6; }
.ip-formula {
  font-family: monospace;
  font-size: 11px;
  background: #f4f9fb;
  border: 1px solid #dce8ed;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 6px 0;
  color: #094A5E;
  word-break: break-all;
}
.ip-note {
  background: #fffbeb;
  border-left: 3px solid #fcd34d;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  font-size: 11px;
  color: #92400e;
  margin: 6px 0;
}
.ip-tag {
  display: inline-block;
  background: #e8f4f8;
  color: #094A5E;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  margin: 2px 2px 2px 0;
}
