:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --blue: #2563eb;
  --blue-soft: #f0f9ff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
  --max: 1120px;
  --logo-h: clamp(58px, 11vw, 82px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  min-height: calc(var(--logo-h) + 1rem);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.site-header .brand img {
  display: block;
  height: var(--logo-h);
  width: auto;
  max-width: min(320px, 78vw);
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.92rem;
}

.nav a {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  color: var(--muted);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: var(--bg);
}

.hero {
  padding: 2.25rem 0 1.75rem;
  background: linear-gradient(165deg, var(--brand-soft) 0%, var(--bg) 42%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1.75rem;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
}

.hero-panel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-quick {
  align-self: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
}

.hero-quick-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.hero-quick-grid {
  display: grid;
  gap: 0.45rem;
}

.hero-quick-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.hero-quick-link:hover {
  background: var(--brand-soft);
  border-color: rgba(37, 99, 235, 0.15);
  transform: translateX(2px);
}

.hero-quick-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  min-width: 2.6rem;
  text-align: center;
}

.hero-quick-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.hero-quick-arrow {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.hero-quick-link:hover .hero-quick-arrow {
  color: var(--brand);
}

.hero-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.hero-panel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel a {
  color: var(--brand);
}

.section {
  padding: 1.25rem 0 2rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-head p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.link-more {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hub-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.hub-card strong {
  font-size: 1.02rem;
}

.hub-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hub-card .tag {
  margin-top: auto;
  display: inline-block;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.hub-card.blue .tag {
  background: var(--blue-soft);
  color: var(--blue);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e2e8f0;
}

.post-card .body {
  padding: 0.85rem 0.95rem 1rem;
}

.post-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.35;
}

.post-card time {
  color: var(--muted);
  font-size: 0.8rem;
}

.tools-row,
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.tool-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.tool-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tool-card .tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.tool-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.tool-card {
  border-style: solid;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tool-card:hover {
  border-color: #fdba74;
  transform: translateY(-2px);
}

.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.footer-grid h4 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 0.35rem;
}

.footer-copy {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.exam-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.exam-portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.exam-portal-card h3 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.05rem;
}

.exam-portal-card h3 a:hover {
  color: var(--brand);
}

.exam-portal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.exam-portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.portal-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.calc-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-matrix-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.calc-matrix-label strong {
  display: block;
  font-size: 0.95rem;
}

.calc-matrix-label span {
  color: var(--muted);
  font-size: 0.82rem;
}

.calc-matrix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tool-chip-muted {
  background: #f3f4f6;
  color: var(--text);
}

.trust-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.trust-grid h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.trust-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.trust-links li + li {
  margin-top: 0.35rem;
}

.trust-links a {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 520px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: #111827;
  color: #f9fafb;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  z-index: 100;
  font-size: 0.85rem;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner a {
  color: #93c5fd;
}

.cookie-banner .btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.demo-badge {
  position: fixed;
  right: 12px;
  bottom: 12px;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  z-index: 60;
}

@media (max-width: 960px) {
  .hero-grid,
  .hub-grid,
  .post-grid,
  .tools-row,
  .tools-grid,
  .exam-portal-grid,
  .footer-grid,
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .hub-grid,
  .post-grid,
  .tools-row,
  .tools-grid,
  .exam-portal-grid,
  .footer-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.pdr-shell {
  padding-top: 0.5rem;
}

.pdr-shell-inner {
  max-width: 760px;
}

.pdr-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.pdr-breadcrumb a:hover {
  color: var(--brand);
}

.pdr-breadcrumb .sep {
  opacity: 0.5;
}

.pdr-archive-head {
  margin-bottom: 1.25rem;
}

.pdr-archive-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.pdr-archive-desc {
  color: var(--muted);
  max-width: 65ch;
}

.pdr-article-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.25;
}

.pdr-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pdr-meta a {
  color: var(--brand-dark);
}

.pdr-prose .pdr-entry {
  font-size: 1.02rem;
  line-height: 1.65;
}

.pdr-prose .pdr-entry > :first-child {
  margin-top: 0;
}

.pdr-prose .pdr-entry h2,
.pdr-prose .pdr-entry h3,
.pdr-prose .pdr-entry h4 {
  margin: 1.5rem 0 0.65rem;
  line-height: 1.3;
}

.pdr-prose .pdr-entry p {
  margin: 0 0 1rem;
}

.pdr-prose .pdr-entry ul,
.pdr-prose .pdr-entry ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.pdr-prose .pdr-entry a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pdr-prose .pdr-entry img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.pdr-prose .pdr-entry table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.pdr-prose .pdr-entry th,
.pdr-prose .pdr-entry td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
}

.pdr-prose .pdr-entry blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
}

.post-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.pdr-pagination {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.pdr-pagination a,
.pdr-pagination span {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
}

.pdr-pagination .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pdr-muted {
  color: var(--muted);
}
