/*
Theme Name: EduCGPA
Theme URI: https://educgpacalculator.com/
Description: Grade card theme for educgpacalculator.com: CGPA, SGPA, percentage, attendance and exam marks calculators with a value page for every CGPA.
Version: 1.0.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: educgpa
*/

@font-face { font-family: "Host Grotesk"; src: url("assets/fonts/host-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("assets/fonts/fragment-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
	--ink: #1b0f2b;
	--plum: #24113a;
	--plum-2: #3a1d5c;
	--violet: #6d35b5;
	--gold: #ffb627;
	--gold-soft: #fff1cf;
	--sky: #3fa9f5;
	--rose: #e0496b;
	--mint: #1f9d74;
	--paper: #f6f4fa;
	--card: #ffffff;
	--line: #e7e2f0;
	--muted: #675d7a;
	--r: 20px;
	--r-s: 12px;
	--shadow: 0 1px 2px rgba(36, 17, 58, .06), 0 12px 32px -12px rgba(36, 17, 58, .22);
	--shadow-lg: 0 2px 4px rgba(36, 17, 58, .08), 0 30px 60px -24px rgba(36, 17, 58, .42);
	--sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--d: var(--violet);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--plum); }
h1, h2, h3 { font-family: var(--sans); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-weight: 800; font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-weight: 750; font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-weight: 700; font-size: 1.18rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.eg-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.eg-skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.eg-skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.eg-top { background: var(--plum); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.admin-bar .eg-top { top: 32px; }
.eg-top-row { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.eg-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.eg-logo img { width: 34px; height: 34px; }
.eg-logo-word { font-weight: 650; font-size: 1.32rem; letter-spacing: -.03em; }
.eg-logo-word b { font-weight: 800; color: var(--gold); }
.eg-logo:hover { color: #fff; }
.eg-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: nowrap; overflow: hidden; }
.eg-nav a { position: relative; color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.eg-nav a::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--d); margin-right: 8px; vertical-align: 2px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.eg-nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.eg-menubtn { display: inline-flex; align-items: center; gap: 10px; flex: none; background: var(--gold); color: var(--ink); border: 0; border-radius: 999px; padding: 9px 16px 9px 12px; font: 650 .95rem var(--sans); cursor: pointer; }
.eg-menubtn:hover { background: #ffc552; }
.eg-menubtn-grid { display: grid; grid-template-columns: 6px 6px; gap: 3px; }
.eg-menubtn-grid i { width: 6px; height: 6px; border-radius: 2px; background: var(--ink); }
.eg-menubtn[aria-expanded="true"] .eg-menubtn-grid i:nth-child(2), .eg-menubtn[aria-expanded="true"] .eg-menubtn-grid i:nth-child(3) { opacity: .3; }
.eg-drawer { background: var(--plum-2); border-top: 1px solid rgba(255, 255, 255, .08); max-height: calc(100vh - 66px); overflow-y: auto; }
.eg-drawer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 28px; padding-top: 24px; padding-bottom: 28px; }
.eg-drawer-h { margin: 0 0 6px; font-weight: 700; }
.eg-drawer-h a { color: #fff; text-decoration: none; border-bottom: 2px solid var(--d); }
.eg-drawer ul { list-style: none; margin: 0 0 14px; padding: 0; }
.eg-drawer li a { display: block; color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .93rem; padding: 3px 0; }
.eg-drawer li a:hover { color: var(--gold); }

/* ------------------------------------------------------------------ hero */
.eg-hero { position: relative; color: #fff; background: radial-gradient(900px 420px at 85% -10%, rgba(255, 182, 39, .28), transparent 60%), radial-gradient(800px 500px at 0% 110%, rgba(109, 53, 181, .65), transparent 60%), var(--plum); padding: 48px 0 64px; overflow: hidden; }
.eg-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.eg-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.eg-eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.eg-eyebrow span { font: 400 .78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); }
.eg-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.7rem); line-height: .98; letter-spacing: -.045em; margin-bottom: 18px; }
.eg-hero-lede { font-size: 1.13rem; color: rgba(255, 255, 255, .84); max-width: 34em; }
.eg-hero-jump { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.eg-hero-jump a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 550; font-size: .95rem; padding: 9px 15px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); transition: background .15s, transform .15s; }
.eg-hero-jump a::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--d); }
.eg-hero-jump a:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }

/* ------------------------------------------------------------- page head */
.eg-head { position: relative; color: #fff; background: radial-gradient(700px 300px at 92% 0%, color-mix(in srgb, var(--d) 70%, transparent), transparent 70%), linear-gradient(160deg, var(--plum), var(--plum-2)); padding: 26px 0 40px; overflow: hidden; }
.eg-head::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .05); }
.eg-head--tool { padding-bottom: 86px; }
.eg-head h1 { max-width: 22em; margin-bottom: 14px; }
.eg-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .88rem; margin-bottom: 18px; color: rgba(255, 255, 255, .6); }
.eg-trail a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.eg-trail a:hover { color: var(--gold); }
.eg-head-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.eg-head-meta > * { font: 400 .78rem var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .88); text-decoration: none; }
.eg-head-meta a { background: var(--gold); color: var(--ink); }
.eg-head-meta a span { margin-right: 6px; }

/* --------------------------------------------------------- grade card tool */
.eg-toolbay { position: relative; margin-top: -62px; z-index: 2; }
.eg-tool { position: relative; background: var(--card); color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 30px 26px 24px; }
.eg-tool::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 10px; background: radial-gradient(circle at 6px -1px, var(--paper) 5px, transparent 5.5px) 0 0 / 18px 10px repeat-x; }
.eg-tool--hero { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.eg-article .eg-tool { box-shadow: var(--shadow); margin: 12px 0 24px; }
.eg-t-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.eg-t-title { margin: 0; font: 700 1.12rem var(--sans); letter-spacing: -.01em; }
.eg-t-tag { font: 400 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eg-t-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.eg-t-body--one { grid-template-columns: minmax(0, 1fr); }
.eg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 4px; background: var(--paper); border-radius: 12px; }
.eg-tabs button { flex: 1 1 auto; border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; font: 600 .9rem var(--sans); color: var(--muted); cursor: pointer; }
.eg-tabs button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(36, 17, 58, .15); }
.eg-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eg-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.eg-field { display: block; margin: 0 0 12px; }
.eg-field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.eg-tool input, .eg-tool select { width: 100%; font: 500 1.05rem var(--sans); color: var(--ink); background: #fbfaff; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 12px; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
.eg-tool input[type="number"] { font-family: var(--mono); -moz-appearance: textfield; }
.eg-tool input::-webkit-outer-spin-button, .eg-tool input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eg-tool input:focus, .eg-tool select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(109, 53, 181, .14); }
.eg-tool select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.eg-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.eg-rowhead, .eg-row { display: grid; grid-template-columns: 26px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.eg-rowhead { font-size: .75rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.eg-row > b { font: 400 .8rem var(--mono); color: var(--muted); text-align: center; }
.eg-row input, .eg-row select { min-height: 42px; padding: 8px 10px; font-size: .98rem; }
.eg-rows--3 .eg-rowhead, .eg-rows--3 .eg-row { grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, 1fr) 34px; }
.eg-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--paper); color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.eg-x:hover { background: #fde4ea; color: var(--rose); }
.eg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px 18px; background: var(--plum); color: #fff; font: 650 .95rem var(--sans); cursor: pointer; text-decoration: none; }
.eg-btn:hover { background: var(--violet); color: #fff; }
.eg-btn--ghost { background: var(--paper); color: var(--ink); }
.eg-btn--ghost:hover { background: var(--line); color: var(--ink); }
.eg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-out { position: relative; background: linear-gradient(165deg, #2b1446, var(--plum)); color: #fff; border-radius: 16px; padding: 22px 20px; min-height: 100%; overflow: hidden; }
.eg-out::after { content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 182, 39, .35), transparent 70%); }
.eg-out-k { font: 400 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin: 0 0 6px; }
.eg-out-big { font: 400 clamp(2.4rem, 6vw, 3.3rem)/1 var(--mono); letter-spacing: -.04em; color: var(--gold); margin: 0 0 6px; word-break: break-all; }
.eg-out-big small { font-size: .45em; color: rgba(255, 255, 255, .7); letter-spacing: 0; margin-left: 4px; }
.eg-out-s { color: rgba(255, 255, 255, .8); font-size: .93rem; margin: 0 0 12px; }
.eg-out-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.eg-out-list li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, .07); }
.eg-out-list b { font: 400 .95rem var(--mono); color: #fff; }
.eg-work { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); font: 400 .82rem/1.5 var(--mono); color: rgba(255, 255, 255, .8); white-space: pre-wrap; }
.eg-dialwrap { display: flex; align-items: center; gap: 16px; }
.eg-dial { --p: 0; flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); position: relative; }
.eg-dial::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #2a1444; }
.eg-dial span { position: relative; font: 400 1.65rem var(--mono); color: #fff; letter-spacing: -.04em; }
.eg-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; margin: 10px 0 4px; }
.eg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ffd884); border-radius: 99px; transition: width .3s; }
.eg-out-empty { position: relative; margin: 6px 0 0; font-size: 1.02rem; line-height: 1.45; color: rgba(255, 255, 255, .82); }
.eg-good { color: #8ff0c6; }
.eg-bad { color: #ffb3c3; }
.eg-tool-note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }

/* --------------------------------------------------------- article layout */
.eg-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-top: 40px; padding-bottom: 32px; align-items: start; }
.eg-body--narrow { grid-template-columns: minmax(0, 760px); justify-content: center; }
.eg-article { min-width: 0; }
.eg-article > *:first-child { margin-top: 0; }
.eg-intro { font-size: 1.12rem; }
.eg-intro p:first-child::first-line { font-weight: 600; }
.eg-part { margin: 40px 0 0; }
.eg-part h2, .eg-faq h2 { position: relative; padding-top: 14px; }
.eg-part h2::before, .eg-faq h2::before { content: ""; position: absolute; top: 0; left: 0; width: 42px; height: 5px; border-radius: 99px; background: var(--d); }
.eg-article h3 { margin-top: 1.4em; }
.eg-article ul, .eg-article ol { padding-left: 1.3em; }
.eg-article li { margin-bottom: .35em; }
.eg-article li::marker { color: var(--d); font-weight: 700; }
.eg-rail { position: sticky; top: 90px; display: grid; gap: 18px; }
.eg-rail-toc:empty { display: none; }
.eg-rail-toc { background: var(--card); border-radius: 16px; padding: 18px 18px 12px; box-shadow: var(--shadow); }
.eg-rail-toc p { margin: 0 0 8px; font: 400 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eg-rail-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.eg-rail-toc li { counter-increment: t; }
.eg-rail-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; color: var(--ink); text-decoration: none; font-size: .9rem; padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.35; }
.eg-rail-toc a::before { content: counter(t, decimal-leading-zero); font: 400 .74rem var(--mono); color: var(--muted); padding-top: 2px; }
.eg-rail-toc a[aria-current="true"] { color: var(--violet); font-weight: 650; }
.eg-rail-toc a[aria-current="true"]::before { color: var(--d); }

/* ------------------------------------------------------------ components */
.eg-key { margin: 26px 0; }
.eg-key-h { font: 400 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.eg-key ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.eg-key li { margin: 0; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--d); }
.eg-key-name { margin: 0 0 4px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.eg-key-val { font-weight: 650; font-size: 1.02rem; line-height: 1.35; }
.eg-formula, .eg-article .formula { position: relative; margin: 24px 0; padding: 22px 22px 18px; border-radius: 18px; background: var(--plum); color: #fff; overflow: hidden; }
.eg-formula::before, .eg-article .formula::before { content: "Formula"; display: block; font: 400 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.eg-formula-expr { font: 400 clamp(1.05rem, 2.6vw, 1.35rem)/1.45 var(--mono); margin: 0 0 10px; color: #fff; }
.eg-formula-where, .eg-article .formula p { color: rgba(255, 255, 255, .8); font-size: .95rem; margin: 0; }
.eg-article .formula strong, .eg-article .formula b { color: var(--gold); font-family: var(--mono); font-weight: 400; }
.eg-formula a, .eg-article .formula a { color: var(--gold); }
.eg-steps { margin: 26px 0; padding: 0; list-style: none; counter-reset: s; }
.eg-steps li, .eg-article .steps li { position: relative; counter-increment: s; padding: 0 0 18px 50px; margin: 0; }
.eg-steps li::before, .eg-article .steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 11px; background: var(--gold); color: var(--ink); font: 400 .95rem/34px var(--mono); text-align: center; }
.eg-steps li::after, .eg-article .steps li::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 2px; background: var(--line); }
.eg-steps li:last-child::after, .eg-article .steps li:last-child::after { display: none; }
.eg-article .steps ol, .eg-article .steps ul { list-style: none; padding: 0; counter-reset: s; }
.eg-article .example { margin: 20px 0; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1.5px dashed color-mix(in srgb, var(--d) 45%, var(--line)); }
.eg-article .example::before { content: "Worked example"; display: block; font: 400 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--d); margin-bottom: 6px; }
.eg-article .example p:last-child, .eg-article .note p:last-child { margin-bottom: 0; }
.eg-article .note { margin: 20px 0; padding: 16px 18px 16px 52px; border-radius: 16px; background: var(--gold-soft); position: relative; }
.eg-article .note::before { content: "i"; position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink); font: 700 .9rem/24px var(--sans); text-align: center; }
.eg-table, .eg-chart { margin: 18px 0 22px; overflow-x: auto; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.eg-table table, .eg-chart table, .eg-article table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.eg-article table caption, .eg-chart caption { text-align: left; padding: 14px 16px 4px; font-weight: 700; caption-side: top; }
.eg-article th, .eg-article td, .eg-index th, .eg-index td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.eg-article thead th, .eg-index thead th { background: #f1edf8; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.eg-article tbody tr:last-child > *, .eg-index tbody tr:last-child > * { border-bottom: 0; }
.eg-article tbody tr:hover { background: #faf8fe; }
.eg-article td b, .eg-chart td { font-family: var(--mono); font-weight: 400; }
.eg-chart { max-height: 560px; overflow: auto; }
.eg-chart thead th { position: sticky; top: 0; z-index: 1; }
.eg-chart th[scope="row"] a { font-family: var(--mono); font-weight: 400; text-decoration: none; }
.eg-faq { margin: 44px 0 0; }
.eg-faq details { background: var(--card); border-radius: 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.eg-faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; }
.eg-faq summary::-webkit-details-marker { display: none; }
.eg-faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 8px; background: var(--paper); text-align: center; font: 400 1.1rem/26px var(--mono); color: var(--d); }
.eg-faq details[open] summary::after { content: "−"; background: var(--d); color: #fff; }
.eg-faq-a { padding: 0 18px 14px; }
.eg-toc-inline { display: none; margin: 22px 0; background: var(--card); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); }
.eg-toc-inline p { margin: 0 0 6px; font: 400 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eg-toc-inline ol { margin: 0; padding-left: 1.3em; }
.eg-toc-inline a { text-decoration: none; }
.eg-ad { margin: 28px 0; text-align: center; }

/* answer card on value pages */
.eg-answer { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 26px; display: grid; gap: 4px; }
.eg-answer-k { margin: 0; font: 400 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eg-answer-big { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; font-family: var(--mono); }
.eg-answer-big span { font-size: clamp(2rem, 6vw, 3rem); color: var(--ink); }
.eg-answer-big i { font-style: normal; color: var(--muted); font-size: 1.6rem; }
.eg-answer-big b { font-weight: 400; font-size: clamp(2.6rem, 8vw, 4rem); color: var(--violet); letter-spacing: -.04em; }
.eg-answer-s { margin: 4px 0 0; color: var(--muted); }

/* related and index */
.eg-next { margin: 26px 0 40px; }
.eg-next ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.eg-next a { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; height: 100%; background: var(--card); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.eg-next a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.eg-next-g { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--d) 14%, #fff); color: var(--d); display: grid; place-items: center; font: 400 1.25rem var(--mono); }
.eg-next b { font-weight: 700; line-height: 1.25; }
.eg-next small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.eg-rail .eg-next ul { grid-template-columns: 1fr; }
.eg-index { margin: 44px 0 8px; }
.eg-index-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.eg-index-head h2 { margin: 0; }
.eg-filter { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); }
.eg-filter span { font: 400 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eg-filter input { border: 0; font: 500 1rem var(--sans); padding: 9px 10px; min-width: 240px; background: transparent; color: var(--ink); }
.eg-filter input:focus { outline: none; }
.eg-index-desk { margin: 0 0 18px; }
.eg-index-desk h3 { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.eg-index-desk h3 span { width: 34px; height: 34px; border-radius: 10px; background: var(--d); color: #fff; display: grid; place-items: center; font: 400 1rem var(--mono); }
.eg-index-desk h3 small { font: 400 .8rem var(--mono); color: var(--muted); }
.eg-index table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.eg-index td:first-child { width: 34%; font-weight: 650; }
.eg-index td:first-child a { color: var(--ink); text-decoration: none; border-bottom: 2px solid color-mix(in srgb, var(--d) 50%, transparent); }
.eg-index td:first-child a:hover { color: var(--d); }
.eg-index td:last-child { color: var(--muted); }
.eg-vgrid, .eg-near { background: var(--card); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.eg-vgrid h2, .eg-near h2 { font-size: 1.1rem; margin-bottom: 6px; }
.eg-vgrid p { font-size: .9rem; color: var(--muted); }
.eg-vgrid ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.eg-vgrid a { display: block; text-align: center; padding: 7px 0; border-radius: 8px; background: var(--paper); font: 400 .88rem var(--mono); color: var(--ink); text-decoration: none; }
.eg-vgrid a:hover { background: var(--gold); }
.eg-near ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.eg-near a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; background: var(--paper); text-decoration: none; color: var(--ink); font-family: var(--mono); font-size: .9rem; }
.eg-near a span { color: var(--muted); }
.eg-near a:hover { background: var(--gold-soft); }

/* blog */
.eg-postlist { display: grid; gap: 12px; }
.eg-postrow { background: var(--card); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.eg-postrow h2 { font-size: 1.25rem; margin: 0 0 4px; }
.eg-postrow h2 a { color: var(--ink); text-decoration: none; }
.eg-date { font: 400 .8rem var(--mono); color: var(--muted); }
.eg-pager { margin: 22px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.eg-pager a, .eg-pager span { padding: 7px 12px; border-radius: 9px; background: var(--card); text-decoration: none; }
.eg-latest { margin: 20px auto 40px; }
.eg-latest ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.eg-latest a { display: block; background: var(--card); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.eg-latest small { display: block; color: var(--muted); font-family: var(--mono); font-size: .78rem; margin-top: 4px; }
.eg-article--post img { border-radius: 12px; }
.eg-article--post .wp-block-image { margin: 20px 0; }

/* ---------------------------------------------------------------- footer */
.eg-foot { background: #ece7f5; color: var(--ink); padding: 52px 0 26px; margin-top: 30px; position: relative; }
.eg-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #6d35b5, #e09a00, #1f9d74, #2b8bd9, #e0496b, #e86f24); }
.eg-foot-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.eg-foot-word { margin: 0; font-weight: 650; font-size: clamp(3rem, 9vw, 5.6rem); line-height: .9; letter-spacing: -.06em; color: var(--plum); }
.eg-foot-word b { font-weight: 800; color: var(--violet); }
.eg-foot-line { max-width: 30em; color: var(--muted); margin: 0; }
.eg-foot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px; padding: 26px 0; border-top: 1px solid #d9d1e8; border-bottom: 1px solid #d9d1e8; }
.eg-foot-h { margin: 0 0 8px; font-weight: 750; }
.eg-foot-h a { color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--d); }
.eg-foot-col ul { list-style: none; margin: 0; padding: 0; }
.eg-foot-col li a { color: var(--muted); text-decoration: none; font-size: .9rem; display: block; padding: 2px 0; }
.eg-foot-col li a:hover { color: var(--violet); }
.eg-foot-more { font-weight: 650; color: var(--violet) !important; }
.eg-foot-note { font-size: .85rem; color: var(--muted); margin: 18px 0 12px; max-width: 60em; }
.eg-foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; }
.eg-foot-legal a { color: var(--ink); text-decoration: none; }
.eg-foot-legal a:hover { color: var(--violet); }
.eg-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--plum); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; font-size: .92rem; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
	.eg-nav a { padding: 8px 9px; font-size: .9rem; }
	.eg-nav a::before { display: none; }
}
@media (max-width: 980px) {
	.eg-nav { display: none; }
	.eg-menubtn { margin-left: auto; }
	.eg-hero-grid { grid-template-columns: 1fr; gap: 30px; }
	.eg-body { grid-template-columns: 1fr; gap: 24px; }
	.eg-rail { position: static; }
	.eg-rail-toc { display: none; }
	.eg-toc-inline { display: block; }
}
@media (max-width: 720px) {
	body { font-size: 16.5px; }
	.eg-wrap { padding: 0 16px; }
	.admin-bar .eg-top { top: 0; }
	.eg-top-row { min-height: 58px; }
	.eg-menubtn span:last-child { font-size: .88rem; }
	.eg-hero { padding: 30px 0 40px; }
	.eg-head { padding: 18px 0 30px; }
	.eg-head--tool { padding-bottom: 72px; }
	.eg-tool { padding: 24px 14px 16px; border-radius: 18px; }
	.eg-tool::before { left: 14px; right: 14px; }
	.eg-t-body { grid-template-columns: 1fr; }
	.eg-t-tag { display: none; }
	.eg-grid3 { grid-template-columns: 1fr 1fr; }
	.eg-rowhead { display: none; }
	.eg-row, .eg-rows--3 .eg-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 32px; }
	.eg-row > input:first-of-type { grid-column: 2 / 5; }
	.eg-rows--3 .eg-row > input:first-of-type { grid-column: 2 / 4; }
	.eg-row > b { grid-row: span 2; align-self: start; padding-top: 10px; }
	.eg-row .eg-x { grid-column: 4; grid-row: 1; }
	.eg-row > input:first-of-type { grid-column: 2 / 4; }
	.eg-rows--3 .eg-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 32px; }
	.eg-rows--3 .eg-row > input:first-of-type, .eg-rows--3 .eg-row .eg-x { grid-column: auto; grid-row: auto; }
	.eg-rows--3 .eg-row > b { grid-row: auto; padding-top: 0; align-self: center; }
	.eg-dial { width: 92px; height: 92px; }
	.eg-filter { width: 100%; }
	.eg-filter input { min-width: 0; width: 100%; }
	.eg-index td:first-child { width: 42%; }
	.eg-index th, .eg-index td, .eg-article th, .eg-article td { padding: 9px 10px; }
	.eg-vgrid ul { grid-template-columns: repeat(5, 1fr); }
	.eg-answer { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* exam sections inside the marks tool */
.eg-exsec { padding: 12px 14px 2px; margin: 0 0 10px; border-radius: 14px; background: var(--paper); }
.eg-exsec .eg-field span b { color: var(--ink); }
.eg-exsec input { background: #fff; }
