/* =============================================================
   ScreenAlyze Stock Screener - style.css
   Palette
     ink       #0C1B2A  (header / footer)
     ink-2     #13293D  (sidebar)
     paper     #F4F6F9  (page background)
     panel     #FFFFFF
     line      #DDE3EB
     text      #1C2733
     muted     #5B6B7C
     up/brand  #12A96B  (green)  | logo green #3DDC97
     down      #D64545  (red)
     link      #0B62C9
   Type: IBM Plex Sans (UI), IBM Plex Mono (numbers)
   ============================================================= */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: "IBM Plex Sans", Arial, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: #1C2733;
	background: #F4F6F9;
}

a { color: #0B62C9; }
a:hover { color: #084B9B; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid #12A96B;
	outline-offset: 2px;
}

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 28px 0 10px; }

/* ---------- Header ---------- */
.site-header {
	background: #0C1B2A;
	border-bottom: 3px solid #12A96B;
}
.header-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.logo-link { display: inline-flex; line-height: 0; }
.logo { display: block; }

.auth-nav { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.auth-link {
	color: #EAF2FB;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	padding: 7px 12px;
	border-radius: 4px;
}
.auth-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.auth-cta { background: #12A96B; color: #fff; }
.auth-cta:hover { background: #0E8A57; color: #fff; }
.auth-sep { color: #40546B; }
.user-email {
	color: #9FB4C9;
	font-size: 13px;
	font-family: "IBM Plex Mono", monospace;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
}

/* ---------- Layout: sidebar + content ---------- */
.layout {
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 16px 40px;
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.sidebar {
	flex: 0 0 232px;
	background: #13293D;
	border-radius: 6px;
	padding: 14px 0;
	color: #C7D5E3;
}
.sidebar-title {
	margin: 0 16px 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #7E96AD;
}
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list a {
	display: block;
	padding: 7px 16px;
	color: #D8E4EF;
	text-decoration: none;
	font-size: 14px;
	border-left: 3px solid transparent;
}
.sidebar-list a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-list a.active {
	border-left-color: #3DDC97;
	background: rgba(61,220,151,.10);
	color: #fff;
	font-weight: 600;
}

.content {
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
	border: 1px solid #DDE3EB;
	border-radius: 6px;
	padding: 24px 28px 32px;
}

.cat-desc { color: #5B6B7C; margin: 0 0 12px; }
.cat-text { margin: 0 0 18px; }
.result-count { color: #5B6B7C; font-size: 13px; margin: 14px 0 8px; }

/* ---------- Notices ---------- */
.notice {
	padding: 10px 14px;
	border-radius: 4px;
	border: 1px solid #DDE3EB;
	background: #F4F6F9;
	margin: 14px 0;
	font-size: 14px;
}
.notice-info  { border-color: #BBD4F0; background: #EAF3FD; }
.notice-error { border-color: #EBC1C1; background: #FBEDED; color: #8C2B2B; }
.notice-ok    { border-color: #BFE3CF; background: #ECF9F1; color: #1B6B44; }

/* ---------- Results table ---------- */
.table-wrap { overflow-x: auto; }

.stock-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}
.stock-table th, .stock-table td {
	padding: 7px 10px;
	border-bottom: 1px solid #E8EDF3;
	text-align: left;
	white-space: nowrap;
}
.stock-table thead th {
	background: #F0F3F7;
	border-bottom: 2px solid #C9D3DF;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #41546A;
}
.stock-table thead a { color: #0B62C9; text-decoration: none; }
.stock-table thead a:hover { text-decoration: underline; }
.th-disabled { color: #8A97A6; cursor: not-allowed; }
.sort-arrow { color: #12A96B; font-size: 10px; }

.stock-table tbody tr:hover { background: #F7FAF8; }
.stock-table td.num, .stock-table th.num { text-align: right; }
.stock-table td.num {
	font-family: "IBM Plex Mono", Consolas, monospace;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}
.stock-table td.ticker { font-family: "IBM Plex Mono", Consolas, monospace; }
.stock-table td.up   { color: #12A96B; }
.stock-table td.down { color: #D64545; }

/* Responsive column hiding
   flag 0 -> .hide-tablet : hidden on tablets only
   flag 2 -> .hide-small  : hidden on smartphones and tablets */
@media (min-width: 641px) and (max-width: 1024px) {
	.hide-tablet { display: none; }
}
@media (max-width: 1024px) {
	.hide-small { display: none; }
}

/* ---------- Pager ---------- */
.pager { margin: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager-item {
	min-width: 34px;
	text-align: center;
	padding: 6px 8px;
	border: 1px solid #DDE3EB;
	border-radius: 4px;
	text-decoration: none;
	font-size: 13px;
	color: #0B62C9;
	background: #fff;
}
a.pager-item:hover { border-color: #12A96B; }
.pager-item.current { background: #0C1B2A; border-color: #0C1B2A; color: #fff; font-weight: 600; }
.pager-item.disabled { color: #A9B4C0; cursor: not-allowed; background: #F4F6F9; }
.pager-ellipsis { color: #5B6B7C; font-size: 13px; padding: 0 4px; }

.upgrade-note {
	margin-top: 18px;
	padding: 12px 14px;
	border: 1px dashed #12A96B;
	border-radius: 4px;
	background: #F0FBF5;
	font-size: 14px;
}

/* ---------- Forms ---------- */
.form-narrow { max-width: 440px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.field input, .field textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #C9D3DF;
	border-radius: 4px;
	font: inherit;
	background: #fff;
}
.field input:focus, .field textarea:focus { border-color: #12A96B; }
.field-error input, .field-error textarea { border-color: #D64545; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }	/* honeypot */

.btn {
	display: inline-block;
	background: #12A96B;
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 10px 20px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { background: #0E8A57; color: #fff; }
.form-note { color: #5B6B7C; font-size: 13px; margin-top: 16px; }

/* ---------- My Account ---------- */
.account-table { border-collapse: collapse; margin: 10px 0 18px; }
.account-table th, .account-table td { padding: 8px 14px; border-bottom: 1px solid #E8EDF3; text-align: left; }
.account-table th { color: #5B6B7C; font-weight: 600; font-size: 13px; }
.account-table td { font-family: "IBM Plex Mono", Consolas, monospace; font-size: 13.5px; }

/* ---------- Sign-Up plans ---------- */
.plans { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.plan {
	flex: 1 1 180px;
	border: 1px solid #DDE3EB;
	border-radius: 6px;
	padding: 20px;
	text-align: center;
	background: #FAFBFC;
	position: relative;
}
.plan-featured { border-color: #12A96B; background: #F0FBF5; }
.plan-badge {
	position: absolute;
	top: -11px; left: 50%;
	transform: translateX(-50%);
	background: #12A96B;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 2px 10px;
	border-radius: 10px;
	margin: 0;
}
.plan-name { margin: 4px 0 8px; font-size: 17px; }
.plan-price {
	font-family: "IBM Plex Mono", Consolas, monospace;
	font-size: 32px;
	font-weight: 500;
	margin: 0;
	color: #0C1B2A;
}
.plan-per { color: #5B6B7C; font-size: 13px; margin: 4px 0 16px; }

/* ---------- Home grid ---------- */
.home-grid {
	list-style: none;
	margin: 14px 0 6px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.home-grid a {
	display: block;
	border: 1px solid #DDE3EB;
	border-radius: 6px;
	padding: 12px 14px;
	text-decoration: none;
	background: #FAFBFC;
	height: 100%;
}
.home-grid a:hover { border-color: #12A96B; background: #F0FBF5; }
.home-grid-caption { display: block; font-weight: 600; color: #0C1B2A; margin-bottom: 4px; }
.home-grid-desc { display: block; color: #5B6B7C; font-size: 12.5px; line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq h2 { font-size: 16px; margin: 24px 0 6px; }
.faq p { margin: 0 0 10px; }

/* ---------- Footer ---------- */
.site-footer {
	background: #0C1B2A;
	color: #9FB4C9;
	font-size: 13px;
}
.footer-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 26px 16px 16px;
	display: flex;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.footer-name { color: #fff; font-weight: 600; margin: 0 0 4px; }
.footer-addr, .footer-mail { margin: 0 0 4px; }
.footer-mail a { color: #3DDC97; text-decoration: none; }
.footer-mail a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }
.footer-nav a { color: #C7D5E3; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-legal {
	border-top: 1px solid #1E3852;
	padding: 12px 16px;
	max-width: 1240px;
	margin: 0 auto;
}
.footer-legal p { margin: 0; color: #6E86A0; font-size: 12px; }

/* ---------- Responsive layout ---------- */
@media (max-width: 900px) {
	.layout { flex-direction: column; }
	/* Sidebar stays fully visible (non-collapsible) but moves
	   below the main content on small screens. */
	.sidebar { order: 2; flex: 1 1 auto; width: 100%; }
	.content { order: 1; width: 100%; padding: 18px 16px 24px; }
}

@media (max-width: 640px) {
	.header-inner { padding: 6px 12px; }
	/* the 280px logo scales down so the auth links still fit */
	.logo { width: 190px; height: auto; }
	.user-email { max-width: 130px; }
	h1 { font-size: 22px; }
	.plans { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
