/* Merlintrader Catalyst — front-end styles (Merlintrader colour theme v0.2.1) */

.mtc-wrap{
	--mtc-primary:#0b2545;
	--mtc-secondary:#2a4d7c;
	--mtc-accent:#4c9f70;
	--mtc-warning:#c44536;
	--mtc-light-bg:#f8fafc;
	--mtc-card-bg:#ffffff;
	--mtc-text-dark:#1e293b;
	--mtc-text-soft:#334155;
	--mtc-border:#e2e8f0;
	--mtc-teal:#14b8a6;
	--mtc-indigo:#6366f1;
	--mtc-blue:#3b82f6;
	--mtc-green:#16a34a;
	--mtc-amber:#f59e0b;
	--mtc-red:#dc2626;
	--mtc-purple:#9333ea;
	display:flex;
	justify-content:center;
	background:#f1f5f9;
	padding:24px 12px;
	box-sizing:border-box;
}
.mtc-wrap *{box-sizing:border-box;}

.mtc-container{
	width:100%;
	max-width:1200px;
	background:#f4f7fb;
	border-radius:22px;
	overflow:hidden;
	box-shadow:0 18px 50px rgba(11,37,69,.16);
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
	color:var(--mtc-text-dark);
}

/* ---------- HEADER ---------- */
.mtc-header{
	position:relative;
	padding:36px 30px 30px;
	background:
		radial-gradient(900px 240px at 15% -40%, rgba(20,184,166,.50), transparent 60%),
		radial-gradient(700px 220px at 90% -10%, rgba(99,102,241,.50), transparent 60%),
		linear-gradient(135deg,#0b2545 0%,#143a6b 55%,#0b2545 100%);
	color:#fff;
}
.mtc-h1{
	margin:0 0 8px;color:#fff;font-size:1.9rem;line-height:1.15;font-weight:800;
	background:linear-gradient(90deg,#fff,#bae6fd);
	-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.mtc-lead{margin:0;max-width:680px;color:#cbd9ea;font-size:1rem;line-height:1.5;}

/* ---------- SEARCH ---------- */
.mtc-search{
	display:flex;
	gap:10px;
	padding:22px 30px;
	flex-wrap:wrap;
	background:#eaf0f8;
	border-bottom:1px solid var(--mtc-border);
}
#mtc-ticker-input{
	flex:1 1 220px;
	min-width:160px;
	padding:14px 16px;
	font-size:1.1rem;
	letter-spacing:.04em;
	text-transform:uppercase;
	border:none;
	border-radius:14px;
	outline:none;
	color:#1e293b;
	background:#ffffff;
	-webkit-text-fill-color:#1e293b;
	box-shadow:0 6px 18px rgba(11,37,69,.10);
}
#mtc-ticker-input::placeholder{color:#94a3b8;opacity:1;}
#mtc-ticker-input:focus{box-shadow:0 0 0 3px rgba(20,184,166,.35);}
#mtc-search-btn{
	padding:14px 24px;
	font-size:1rem;
	font-weight:700;
	color:#fff;
	background:linear-gradient(135deg,#14b8a6,#0ea5e9);
	border:none;
	border-radius:14px;
	cursor:pointer;
	transition:filter .15s ease;
	box-shadow:0 8px 20px rgba(20,184,166,.40);
}
#mtc-search-btn:hover{filter:brightness(1.06);}
#mtc-search-btn:disabled{opacity:.6;cursor:default;}

.mtc-result{padding:0 30px;}
.mtc-result:not(:empty){padding:24px 30px;}

/* ---------- FINVIZ CHART BLOCK ---------- */
.mtc-chart{background:#eaf0f8;border-radius:18px;padding:16px;margin-bottom:22px;}
.mtc-chart-inner{background:#0b2545;border-radius:14px;padding:16px;text-align:center;}
.mtc-chart-inner img{width:100%;max-width:1140px;height:auto;border-radius:8px;display:block;margin:0 auto;background:#fff;}
.mtc-chart-caption{margin:12px 2px 0;font-size:.8rem;color:#cbd5e1;line-height:1.5;}
.mtc-chart-caption a{color:#7dd3fc !important;font-weight:600;}

/* ---------- RESULT CARD ---------- */
.mtc-card{
	border:1px solid var(--mtc-border);
	border-radius:18px;
	background:var(--mtc-card-bg);
	overflow:hidden;
	box-shadow:0 12px 30px rgba(15,23,42,.10);
}
.mtc-card-stripe{height:6px;width:100%;background:linear-gradient(90deg,var(--mtc-red),var(--mtc-amber));}
.mtc-card-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:20px 24px 4px;}
.mtc-card-ticker{font-size:1.7rem;font-weight:800;color:var(--mtc-primary);letter-spacing:.5px;}
.mtc-card-company{font-size:1.05rem;color:var(--mtc-text-soft);}
.mtc-badge{
	display:inline-flex;align-items:center;gap:7px;
	font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;
	color:#065f46;background:#d1fae5;border:1px solid #6ee7b7;
	padding:5px 11px;border-radius:999px;margin-left:auto;
}
.mtc-badge::before{content:"";width:7px;height:7px;border-radius:50%;background:#10b981;}

/* catalyst type tags */
.mtc-tags{display:flex;gap:8px;flex-wrap:wrap;padding:6px 24px 0;}
.mtc-tag{font-size:.72rem;font-weight:700;padding:5px 11px;border-radius:8px;text-transform:uppercase;letter-spacing:.04em;color:#fff;}
.mtc-tag-pdufa{background:linear-gradient(135deg,#dc2626,#f97316);}
.mtc-tag-reg{background:linear-gradient(135deg,#7c3aed,#a855f7);}
.mtc-tag-phase{background:linear-gradient(135deg,#2563eb,#06b6d4);}
.mtc-tag-data{background:linear-gradient(135deg,#0d9488,#22c55e);}
.mtc-tag-ma{background:linear-gradient(135deg,#9333ea,#ec4899);}
.mtc-tag-other{background:#475569;}

.mtc-synopsis{
	margin:0;padding:14px 24px 4px;
	font-size:1rem;line-height:1.55;color:var(--mtc-text-dark);
}

/* countdown */
.mtc-countdown{
	margin:16px 24px 6px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;
	background:linear-gradient(135deg,#fff7ed,#fef2f2);border:1px solid #fdba74;border-radius:14px;padding:14px 20px;
}
.mtc-cd-num{font-size:2rem;font-weight:800;color:#dc2626;line-height:1;}
.mtc-cd-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:#9a3412;font-weight:700;margin-top:3px;}
.mtc-cd-date{margin-left:auto;text-align:right;}
.mtc-cd-date .d{font-size:1.1rem;font-weight:700;color:var(--mtc-primary);}
.mtc-cd-date .s{font-size:.76rem;color:var(--mtc-text-soft);}

/* stat tiles (re-using .mtc-field) */
.mtc-grid{
	display:grid;
	grid-template-columns:repeat(3,1fr);
	gap:14px;
	padding:18px 24px 6px;
	margin:0;
}
@media(max-width:640px){.mtc-grid{grid-template-columns:1fr;}}
.mtc-field{
	border:1px solid var(--mtc-border);border-radius:14px;padding:14px 16px;background:#fff;
	position:relative;overflow:hidden;
}
.mtc-field::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#3b82f6;}
.mtc-field:nth-child(1)::before{background:var(--mtc-blue);}
.mtc-field:nth-child(2)::before{background:var(--mtc-red);}
.mtc-field:nth-child(3)::before{background:var(--mtc-purple);}
.mtc-field:nth-child(4)::before{background:var(--mtc-teal);}
.mtc-field:nth-child(5)::before{background:var(--mtc-green);}
.mtc-field-label{
	font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
	color:var(--mtc-text-soft);margin-bottom:5px;
}
.mtc-field-value{font-size:.98rem;color:var(--mtc-text-dark);line-height:1.4;font-weight:600;}
.mtc-date{font-weight:700;color:var(--mtc-primary);}
.mtc-approx{font-size:.78rem;color:#64748b;font-weight:600;}

/* sources + report */
.mtc-source{padding:14px 24px;font-size:.86rem;color:var(--mtc-text-soft);border-top:1px solid var(--mtc-border);margin-top:10px;}
.mtc-source a{color:var(--mtc-secondary);font-weight:600;text-decoration:none;}
.mtc-source a:hover{text-decoration:underline;}
.mtc-wrap a{color:var(--mtc-secondary) !important;text-decoration:none;}
.mtc-wrap a:hover{text-decoration:underline !important;}
.mtc-source-unverified{color:var(--mtc-warning);}
.mtc-source-unverified a{color:var(--mtc-warning) !important;}
.mtc-report{padding:0 24px 22px;}
.mtc-report a{
	display:inline-flex;align-items:center;gap:8px;
	background:linear-gradient(135deg,#0b2545,#1e3a5f);color:#fff !important;
	padding:11px 18px;border-radius:12px;font-weight:700;text-decoration:none !important;
}
.mtc-report a:hover{filter:brightness(1.1);}

.mtc-loading,.mtc-error{padding:18px 20px;border-radius:12px;font-size:1rem;}
.mtc-loading{background:#eef4fb;color:var(--mtc-secondary);}
.mtc-error{background:#fdecea;color:var(--mtc-warning);}

/* ---------- RECENTLY VIEWED (card grid, fixed columns, cap 12) ---------- */
.mtc-overview{padding:8px 30px 24px;}
.mtc-h2{
	font-size:1.2rem;color:var(--mtc-primary);font-weight:800;
	display:flex;align-items:center;gap:10px;margin:18px 0 14px;
}
.mtc-h2::before{content:"";width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,#14b8a6,#6366f1);}
.mtc-recent-grid{
	display:grid;
	grid-template-columns:repeat(3,1fr);
	grid-auto-rows:1fr;
	gap:14px;
}
.mtc-recent-grid .mtc-rcard:nth-child(n+13){display:none;} /* hard cap 12 */
@media(max-width:640px){.mtc-recent-grid{grid-template-columns:repeat(2,1fr);}}
.mtc-rcard{
	background:#fff;border:1px solid var(--mtc-border);border-radius:14px;
	padding:15px 16px;min-height:104px;cursor:pointer;position:relative;overflow:hidden;
	transition:transform .15s ease,box-shadow .15s ease;
	display:flex;flex-direction:column;gap:6px;
}
.mtc-rcard:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(15,23,42,.14);}
.mtc-rtop{display:flex;align-items:center;gap:8px;}
.mtc-rcard .rt{font-size:1.15rem;font-weight:800;color:var(--mtc-primary) !important;}
.mtc-rcard .rc{font-size:.82rem;color:var(--mtc-text-soft);font-weight:600;line-height:1.3;}
.mtc-rcard .rcat{font-size:.9rem;color:var(--mtc-text-dark);line-height:1.42;}
.mtc-rcard .rbadge{margin-left:auto;display:inline-block;font-size:.66rem;font-weight:700;padding:4px 9px;border-radius:7px;color:#fff;white-space:nowrap;}
.mtc-rbadge-pdufa{background:linear-gradient(135deg,#dc2626,#f97316);}
.mtc-rbadge-reg{background:linear-gradient(135deg,#7c3aed,#a855f7);}
.mtc-rbadge-phase{background:linear-gradient(135deg,#2563eb,#06b6d4);}
.mtc-rbadge-data{background:linear-gradient(135deg,#0d9488,#22c55e);}
.mtc-rbadge-ma{background:linear-gradient(135deg,#9333ea,#ec4899);}
.mtc-rbadge-other{background:#475569;}
.mtc-rcard .rdate{margin-top:auto;font-size:.76rem;font-weight:700;color:var(--mtc-secondary);}

/* ---------- DISCLAIMER ---------- */
.mtc-disclaimer{
	padding:18px 30px 28px;
	background:#eef2f7;
	border-top:1px solid var(--mtc-border);
}
.mtc-disclaimer p{font-size:.8rem;line-height:1.5;color:#64748b;margin:0 0 8px;}
.mtc-disclaimer p:last-child{margin-bottom:0;}
.mtc-disclaimer a{color:var(--mtc-secondary);}
