/*
Theme Name: TN Result Ledger
Theme URI: https://tnresult.in/
Author: TNResult
Description: A result-information theme for tnresult.in — Tamil Nadu SSLC, HSE +1 and HSE +2 board result information in English and Tamil. No plugins required. Version 1.3.1 rebuilds the homepage and site chrome on the structure of the official Tamil Nadu examination portals: a centred Arial masthead in royal blue, the purple Examination Results band, a maroon-bordered results box with bold examination links on the pale pink page, a quick-link box row, and directorate-style panels — always with this site's own name, words and data.
Version: 1.3.2
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tn-result-ledger
*/

/* ---------------------------------------------------------- tokens */

:root {
	--green: #003399;
	--green-dark: #002266;
	--purple: #992299;
	--maroon: #800000;
	--wash: #f7d8f7;
	--ink: #1c1c28;
	--muted: #4a4453;
	--mist: #f6ecf8;
	--red: #990000;
	--teal-dark: #003333;
	--dge-blue: #016999;
	--dge-blue-2: #0298ce;
	--turmeric: #800000;
	--turmeric-bright: #992299;
	--line: #cdb9da;
	--white: #ffffff;
	--font-display: Arial, Helvetica, "Hind Madurai", sans-serif;
	--font-text: Arial, Helvetica, "Hind Madurai", sans-serif;
	--measure: 44rem;
	--wide: 64rem;
}

/* ------------------------------------------------------------ base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--wash);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: 1rem;
	line-height: 1.6;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--green);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--green-dark);
}

:focus-visible {
	outline: 3px solid var(--maroon);
	outline-offset: 2px;
	border-radius: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--white);
	padding: 0.6rem 1rem;
	z-index: 100;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
	color: var(--white);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.wrap {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0 1.25rem;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	line-height: 1.25;
	color: var(--ink);
	margin: 0 0 0.6em;
}

h1 {
	font-size: 2rem;
	font-weight: 700;
}

h2 {
	font-size: 1.5rem;
	font-weight: 700;
}

h3 {
	font-size: 1.2rem;
	font-weight: 700;
}

p {
	margin: 0 0 1em;
}

/* ---------------------------------------------------------- header */

/* The masthead sits directly on the pale page, as on the official
 * results portal — no white header block. */

.site-head {
	background: transparent;
	color: var(--ink);
}

/* slim utility strip, in the directorate-portal manner */

.gov-strip {
	background: var(--green-dark);
	color: #dbe4ff;
	font-size: 0.88rem;
}

.gov-strip .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1.5rem;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

.strip-name {
	font-weight: 700;
	color: var(--white);
	letter-spacing: 0.02em;
}

/* centred title block: royal-blue name, maroon line, dark-teal Tamil line */

.masthead .wrap {
	padding-top: 1.2rem;
	padding-bottom: 1rem;
	text-align: center;
}

.brand {
	display: block;
	color: var(--ink);
	text-decoration: none;
}

.brand:hover {
	color: var(--ink);
}

.brand-text {
	display: block;
}

.brand-name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.8rem;
	line-height: 1.15;
	display: block;
	color: var(--green);
}

.brand-line {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--red);
	margin-top: 0.25rem;
}

.brand-ta {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--teal-dark);
	margin-top: 0.2rem;
}

/* the purple Examination Results band (portal manner):
 * home icon cell at left, white bold title centred, empty right cell */

.results-band {
	background: var(--purple);
	color: var(--white);
}

.results-band .wrap {
	display: flex;
	align-items: center;
}

.band-cell {
	flex: 0 0 20%;
	display: flex;
	align-items: center;
}

.band-home a {
	display: inline-flex;
	padding: 0.3rem;
}

.band-title {
	flex: 1 1 auto;
	text-align: center;
	font-weight: 700;
	font-size: 1.05rem;
	padding: 0.45rem 0;
}

.head-tools {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-left: auto;
}

.lang-switch {
	font-size: 0.92rem;
}

.lang-switch a {
	color: #dbe4ff;
	text-decoration: none;
	padding: 0.2rem 0.1rem;
}

.lang-switch a[aria-current="true"] {
	color: var(--white);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.lang-sep {
	color: #8fa3d9;
	margin: 0 0.35rem;
}

.tool-btn {
	background: transparent;
	border: 1px solid #dbe4ff;
	border-radius: 6px;
	color: var(--white);
	font-family: var(--font-text);
	font-size: 0.9rem;
	padding: 0.32rem 0.8rem;
	cursor: pointer;
}

.tool-btn:hover {
	background: var(--green);
}

.search-panel {
	background: var(--green-dark);
}

.search-panel .wrap {
	padding-top: 0.9rem;
	padding-bottom: 0.9rem;
}

.search-form {
	display: flex;
	gap: 0.6rem;
	max-width: 40rem;
}

.search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	font: inherit;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--white);
	color: var(--ink);
}

.search-form button {
	font: inherit;
	font-weight: 600;
	background: var(--white);
	color: var(--green);
	border: 1px solid var(--white);
	border-radius: 6px;
	padding: 0.55rem 1.1rem;
	cursor: pointer;
}

.search-form button:hover {
	background: var(--mist);
}

/* ------------------------------------------------------------- nav */

/* directorate blue gradient bar */

.site-nav {
	background: linear-gradient(to bottom, var(--dge-blue) 0%, var(--dge-blue-2) 100%);
}

.menu-toggle {
	display: none;
	width: 100%;
	background: none;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	font: inherit;
	font-weight: 600;
	color: var(--white);
	text-align: left;
	padding: 0.7rem 1.25rem;
	cursor: pointer;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.site-nav li a {
	display: block;
	padding: 0.68rem 0.95rem;
	color: var(--white);
	text-decoration: none;
	font-weight: 600;
}

.site-nav li a:hover {
	color: var(--white);
	background: rgba(0, 0, 0, 0.18);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.site-nav li.current-menu-item a,
.site-nav li.current_page_item a {
	color: var(--white);
	font-weight: 700;
	box-shadow: inset 0 -3px 0 var(--white);
}

.site-nav a:focus-visible,
.gov-strip a:focus-visible,
.gov-strip .tool-btn:focus-visible,
.results-band a:focus-visible {
	outline-color: var(--white);
}

/* --------------------------------------------------------- homepage */

.home-top {
	padding: 1.6rem 0 0.4rem;
	text-align: center;
}

.home-top h1 {
	color: var(--green);
	margin-bottom: 0.35rem;
}

.hero-intro {
	font-size: 1.05rem;
	color: var(--muted);
	max-width: 62ch;
	margin-left: auto;
	margin-right: auto;
}

/* the results box: white, 1px maroon border, bold bulleted links —
 * the official result portal's central element */

.results-box {
	background: var(--white);
	border: 1px solid var(--maroon);
	max-width: 48rem;
	margin: 1.4rem auto 0;
	padding: 0.6rem 1.4rem;
	text-align: left;
}

.results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.results-item {
	position: relative;
	padding: 0.7rem 0 0.7rem 1.15rem;
}

.results-item + .results-item {
	border-top: 1px dotted var(--line);
}

.results-item::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 1.15rem;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--maroon);
	transform: rotate(45deg);
}

.result-link {
	font-weight: 700;
	font-size: 1.12rem;
	margin: 0;
}

.result-link a {
	color: var(--green);
}

.result-class {
	margin: 0.1rem 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.result-exams {
	margin: 0.15rem 0 0;
	font-weight: 600;
	font-size: 0.98rem;
}

.result-status {
	margin: 0.15rem 0 0;
	font-size: 0.98rem;
}

.status-label {
	font-weight: 700;
	color: var(--maroon);
}

.status-label.is-announced {
	color: var(--dge-blue);
}

.status-label.is-declared {
	color: #00691c;
}

.result-status .date-pending {
	color: var(--muted);
}

.result-tentative {
	margin: 0.15rem 0 0;
	font-size: 0.92rem;
	color: var(--muted);
}

/* quick-link boxes (directorate top row) */

.quick-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	max-width: 64rem;
	margin: 1.5rem auto 0;
	text-align: center;
}

.quick-box {
	flex: 1 1 10rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-top: 4px solid var(--dge-blue);
	padding: 0.75rem 0.6rem 0.85rem;
	text-decoration: none;
	color: var(--ink);
}

.quick-box strong {
	display: block;
	font-size: 1.05rem;
	color: var(--green);
	margin-bottom: 0.15rem;
}

.quick-box span {
	font-size: 0.9rem;
	color: var(--muted);
}

.quick-box:hover {
	border-top-color: var(--purple);
}

.quick-box:hover strong {
	color: var(--green-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* two-column area with directorate-style panels */

.home-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 1.4rem;
	margin-top: 1.8rem;
}

/* Columns stretch to the row height (no align-items:start) and each
 * column is a flex column, so its last panel grows to fill the full
 * column height — the two columns read as one clean block with no
 * page-background hole under the shorter column. */
.home-main,
.home-side {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.panel {
	background: var(--white);
	border: 1px solid #b9a8c4;
	border-radius: 3px;
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	margin-bottom: 1.4rem;
}

/* The main column's only panel and the side column's last panel absorb
 * any leftover column height, so each panel's own background and border
 * run the full height of its column. */
.home-main .panel,
.home-side .panel:last-child {
	flex: 1 1 auto;
}

.panel-head {
	background: linear-gradient(to bottom, var(--dge-blue) 0%, var(--dge-blue-2) 100%);
	color: var(--white);
	font-size: 1rem;
	font-weight: 700;
	line-height: 2.3;
	padding: 0 15px;
	text-align: center;
	margin: 0;
}

.panel-head.is-purple {
	background: var(--purple);
}

.panel-body {
	background: rgba(0, 0, 0, 0.02);
	padding: 0.5rem 1.1rem 0.9rem;
}

.panel-note {
	font-size: 0.95rem;
	color: var(--muted);
	margin: 0.3rem 0 0.5rem;
}

/* dated update list */

.update-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.update-list li {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	padding: 0.6rem 0;
	border-top: 1px solid var(--line);
}

.update-list li:first-child {
	border-top: 0;
}

.update-date {
	flex: 0 0 7.2rem;
	color: var(--muted);
	font-size: 0.92rem;
	font-variant-numeric: tabular-nums;
}

.update-list a {
	font-weight: 600;
	font-size: 1.02rem;
}

/* ruled index rows (services, siblings, listings) */

.index-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.index-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.1rem;
	align-items: baseline;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--line);
}

.index-list li:last-child {
	border-bottom: 0;
}

.index-name {
	font-weight: 700;
	font-size: 1.02rem;
	flex: 1 1 13rem;
}

.index-links {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.index-links a {
	font-weight: 600;
}

/* official sources list (inside the sidebar panel) */

.official-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.official-links li {
	padding: 0.35rem 0;
}

.official-links a {
	font-weight: 700;
}

.official-links .ext-note {
	color: var(--muted);
	font-weight: 400;
	font-size: 0.9rem;
}

/* small-print note at the foot of the homepage (portal manner) */

.home-disclaimer {
	max-width: 42rem;
	margin: 0.5rem auto 0;
	padding-bottom: 0.5rem;
	text-align: center;
	font-size: 0.8rem;
	line-height: 1.55;
	color: #333333;
}

/* -------------------------------------------------------- sections */

.section {
	padding: 1.8rem 0;
}

.section.band {
	background: var(--white);
}

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

.section-head h2 {
	margin-bottom: 0.25rem;
}

.section-head p {
	color: var(--muted);
	max-width: 62ch;
	margin: 0;
}

/* ------------------------------------------------------------ prose */

.page-head {
	padding: 2rem 0 0.4rem;
}

.page-context {
	color: var(--muted);
	font-weight: 600;
	margin: 0 0 0.5rem;
}

.updated-line {
	color: var(--muted);
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
	margin-top: 0.4rem;
}

.entry-content {
	max-width: var(--measure);
	padding-bottom: 1rem;
}

.entry-content h2 {
	margin-top: 2rem;
}

.entry-content h3 {
	margin-top: 1.5rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4rem;
	margin: 0 0 1em;
}

.entry-content li {
	margin-bottom: 0.35em;
}

.entry-content table {
	border-collapse: collapse;
	width: 100%;
	margin: 1rem 0 1.4rem;
	font-size: 0.98rem;
	border: 1px solid var(--maroon);
	background: var(--white);
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--line);
	padding: 0.5rem 0.7rem;
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--green);
	color: var(--white);
}

.entry-content blockquote {
	margin: 1rem 0;
	padding: 0.4rem 0 0.4rem 1rem;
	border-left: 4px solid var(--green);
	color: var(--muted);
}

.entry-content img {
	border-radius: 6px;
}

/* sibling rail on article pages */

.page-layout {
	display: block;
}

.rail {
	margin: 1.5rem 0 2.5rem;
	max-width: var(--measure);
}

.rail h2 {
	font-size: 1.3rem;
}

.rail .index-list {
	border-top: 1px solid var(--line);
}

.rail .index-list li {
	border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------- listings */

.listing-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line);
}

.listing-list li {
	padding: 1rem 0;
	border-bottom: 1px solid var(--line);
}

.listing-title {
	font-weight: 700;
	font-size: 1.3rem;
	margin: 0 0 0.25rem;
}

.listing-title a {
	color: var(--ink);
	text-decoration: none;
}

.listing-title a:hover {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.listing-meta {
	color: var(--muted);
	font-size: 0.93rem;
	font-variant-numeric: tabular-nums;
	margin: 0 0 0.3rem;
}

.listing-excerpt {
	margin: 0;
	color: var(--ink);
	max-width: 65ch;
}

.pagination {
	margin: 1.6rem 0 2.4rem;
}

.pagination .nav-links {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.pagination a,
.pagination span {
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 0.35rem 0.8rem;
	text-decoration: none;
}

.pagination .current {
	background: var(--green);
	border-color: var(--green);
	color: var(--white);
	font-weight: 700;
}

/* post navigation */

.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	border-top: 1px solid var(--line);
	margin-top: 2rem;
	padding-top: 1rem;
	max-width: var(--measure);
}

/* ------------------------------------------------------------ 404 */

.not-found-actions {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	border-top: 1px solid var(--line);
	max-width: var(--measure);
}

.not-found-actions li {
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line);
	font-weight: 600;
	font-size: 1.1rem;
}

/* ----------------------------------------------------------- footer */

.site-foot {
	background: #f3e6f5;
	color: var(--ink);
	border-top: 3px solid var(--purple);
	margin-top: 3rem;
}

.site-foot .wrap {
	padding-top: 2.4rem;
	padding-bottom: 2rem;
}

.foot-grid {
	display: block;
}

.foot-about {
	max-width: 46ch;
	margin-bottom: 2rem;
}

.foot-about .brand-name {
	color: var(--green);
	font-size: 1.3rem;
}

.foot-about p {
	color: var(--muted);
	margin-top: 0.5rem;
}

.foot-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.6rem;
}

.foot-col h3 {
	color: var(--green);
	font-size: 1.1rem;
	margin-bottom: 0.6rem;
}

.foot-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.foot-col li {
	margin-bottom: 0.35rem;
}

.foot-col a {
	color: var(--ink);
	text-decoration: none;
}

.foot-col a:hover {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.foot-legal {
	border-top: 1px solid var(--purple);
	margin-top: 2.2rem;
	padding-top: 1.1rem;
	font-size: 0.93rem;
	color: #555560;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 2rem;
	justify-content: center;
	text-align: center;
}

.foot-legal p {
	margin: 0;
}

/* ------------------------------------------------------ responsive */

@media (max-width: 859px) {
	.menu-toggle {
		display: block;
	}

	.site-nav .wrap {
		padding: 0;
	}

	.site-nav ul {
		display: none;
		flex-direction: column;
		padding: 0 0 0.6rem;
	}

	.site-nav.is-open ul {
		display: flex;
	}

	.site-nav li a {
		padding: 0.65rem 1.25rem;
	}

	h1 {
		font-size: 1.7rem;
	}

	.brand-name {
		font-size: 1.45rem;
	}

	.update-list li {
		flex-direction: column;
		gap: 0.1rem;
	}

	.update-date {
		flex-basis: auto;
	}
}

@media (min-width: 720px) {
	.foot-cols {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 900px) {
	.home-cols {
		grid-template-columns: minmax(0, 1fr) 21rem;
	}
}

@media (min-width: 1024px) {
	.page-layout {
		display: grid;
		grid-template-columns: minmax(0, var(--measure)) 1fr;
		gap: 3rem;
		align-items: start;
	}

	.rail {
		margin-top: 2.2rem;
		max-width: none;
	}
}

/* -------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}

/* --------------------------------------- v1.1.0 — legacy shortcode repair */

.tnr-table-wrap {
	overflow-x: auto;
}

.entry-content .tnr-steps li {
	margin-bottom: 0.5em;
}

.tnr-result-button {
	display: inline-block;
	background: var(--green);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	padding: 0.6rem 1.2rem;
	border-radius: 6px;
}

.tnr-result-button:hover,
.tnr-result-button:focus-visible {
	background: var(--green-dark);
	color: #fff;
}

.tnr-calc {
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1rem 1.1rem;
	margin: 1rem 0 1.4rem;
	background: var(--mist);
}

.tnr-calc label {
	display: block;
	margin-bottom: 0.55rem;
}

.tnr-calc input[type="number"] {
	font: inherit;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--white);
	color: var(--ink);
	width: 7rem;
	margin-left: 0.4rem;
}

.tnr-calc button[type="submit"] {
	font: inherit;
	font-weight: 600;
	background: var(--green);
	color: #fff;
	border: 1px solid var(--green);
	border-radius: 6px;
	padding: 0.55rem 1.1rem;
	cursor: pointer;
	margin-top: 0.4rem;
}

.tnr-calc button[type="submit"]:hover {
	background: var(--green-dark);
}

.tnr-calc-result {
	font-weight: 700;
	margin-bottom: 0;
}
