/* Cert Prep Club — shared stylesheet
   One stylesheet for the whole site. No external fonts or libraries.
   Palette: deep teal #0F766E primary, navy #12324F, amber #F59E0B accent. */

:root {
  --emerald: #047857;
  --emerald-dark: #065f46;
  --emerald-soft: #ecfdf5;
  --slate: #0f172a;
  --slate-deep: #020617;
  --slate-soft: #f1f5f9;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --ink: #1f2937;
  --muted: #4b5563;
  --faint: #6b7280;
  --line: #d1d5db;
  --line-soft: #e5e7eb;
  --bg-soft: #f3f4f6;
  --white: #ffffff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.14);
  --radius: 10px;
  --radius-lg: 14px;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--emerald);
}

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

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

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

main {
  padding-bottom: 32px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--slate);
  color: var(--white);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(12, 34, 55, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--white);
  text-decoration: none;
}

.site-logo img {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--amber);
  color: var(--white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--slate);
  color: var(--white);
  text-align: center;
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner p {
  margin: 0 0 12px;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
  margin: 0 8px;
  white-space: nowrap;
}

.site-footer a:hover {
  text-decoration: underline;
  color: var(--white);
}

.site-footer nav {
  line-height: 2;
}

.footer-all {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 2;
}

.footer-all a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-all a:hover {
  color: var(--white);
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 14px !important;
}

/* ---------- Hero & search ---------- */

.hero {
  background: linear-gradient(135deg, var(--slate-deep) 0%, var(--slate) 55%, #155e57 100%);
  color: var(--white);
  padding: 48px 0 44px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.5);
  border-radius: 999px;
}

.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto 20px;
  max-width: 640px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
}

.search-box {
  width: 100%;
  max-width: 560px;
  padding: 13px 18px;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.search-box:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 22px auto 0;
  max-width: 640px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-stats strong {
  color: var(--white);
  font-size: 1.15rem;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  transition: background 0.18s ease, color 0.18s ease;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.card:hover .card-icon {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--slate);
}

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

.card .card-meta {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-dark);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.badge-live {
  background: var(--green-soft);
  color: var(--green);
}

.cert-section {
  margin-top: 36px;
}

.cert-section > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  margin-bottom: 16px;
  font-size: 1.45rem;
}

/* ---------- Buttons ---------- */

.btn,
.btn-primary {
  display: inline-block;
  background: var(--emerald);
  color: var(--white);
  font-weight: 700;
  padding: 12px 26px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn-primary:hover {
  background: var(--emerald-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.4);
}

.btn-amber {
  background: var(--amber-dark);
}

.btn-amber:hover {
  background: #92400e;
}

.btn-ghost {
  background: var(--white);
  color: var(--emerald-dark);
  border: 1px solid var(--emerald);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--emerald-soft);
  color: var(--emerald-dark);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* ---------- Content ---------- */

.content h1 {
  color: var(--slate);
  line-height: 1.2;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.content h2 {
  color: var(--slate);
  margin-top: 2rem;
  font-size: 1.5rem;
}

.content h3 {
  color: var(--slate);
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.content p {
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 24px;
}

.content li {
  margin-bottom: 6px;
}

.byline {
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.version-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--slate-soft);
  color: var(--slate);
  margin-left: 6px;
  vertical-align: middle;
}

/* Table of contents */
.toc {
  background: var(--slate-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 20px 0 28px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--slate);
}

.toc ol {
  margin: 0;
  padding-left: 22px;
}

.toc li {
  margin-bottom: 4px;
}

.toc a {
  text-decoration: none;
  color: var(--emerald-dark);
}

.toc a:hover {
  text-decoration: underline;
}

/* Exam-trap callout */
.trap-box {
  background: var(--amber-soft);
  border: 1px solid #fcd34d;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}

.trap-box h2,
.trap-box h3 {
  margin-top: 0;
  color: var(--amber-dark);
}

.trap-box ul {
  margin-bottom: 0;
}

/* Info / note box */
.note-box {
  background: var(--emerald-soft);
  border: 1px solid #99f6e4;
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}

.note-box h2,
.note-box h3 {
  margin-top: 0;
  color: var(--emerald-dark);
}

/* Exam facts table */
.facts {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 20px 0;
}

.facts h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.facts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  margin: 0;
}

.facts dt {
  font-weight: 700;
  color: var(--slate);
}

.facts dd {
  margin: 0;
}

/* Domain weight bars */
.domain-row {
  margin-bottom: 14px;
}

.domain-row .domain-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 4px;
}

.domain-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.domain-bar > div {
  height: 100%;
  background: var(--emerald);
  border-radius: 999px;
}

.domain-bar > div.weak {
  background: var(--amber);
}

.domain-bar > div.strong {
  background: var(--green);
}

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--slate);
}

.faq-item p {
  margin: 10px 0 0;
}

.faq {
  margin: 2rem 0;
}

/* ---------- Related ---------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-decoration: none;
  color: var(--slate);
  font-weight: 700;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.related a:hover {
  transform: translateY(-3px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg);
}

/* ---------- Ad placeholder ---------- */

/* Hidden until AdSense approval. After approval, remove the display rule,
   paste the ad code into the .ad-slot divs, and add a min-height to
   reserve space and avoid layout shift. */
.ad-slot {
  display: none;
  border: 1px dashed #9ca3af;
  background: #f9fafb;
  color: var(--faint);
  text-align: center;
  padding: 20px;
  margin: 24px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--faint);
  margin: 18px 0 0;
}

.breadcrumbs a {
  color: var(--emerald);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--emerald-dark);
  text-decoration: underline;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: var(--line);
}

/* ---------- Tables & code ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

th {
  background: var(--bg-soft);
  color: var(--slate);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-success {
  background: var(--emerald-soft);
  border: 1px solid var(--emerald);
  color: var(--emerald-dark);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

.form-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

/* ---------- Quiz: practice questions ---------- */

.pq,
.mq {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.pq-q {
  font-weight: 700;
  color: var(--slate);
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.pq-num {
  color: var(--emerald-dark);
  margin-right: 6px;
}

.pq-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pq-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pq-opt:hover:not(:disabled) {
  border-color: var(--emerald);
  background: var(--emerald-soft);
}

.pq-opt:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.35);
}

.pq-opt:disabled {
  cursor: default;
  opacity: 1;
}

.pq-letter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--slate-soft);
  color: var(--slate);
  font-weight: 700;
  font-size: 0.85rem;
}

.pq-opt.is-correct {
  border-color: var(--green);
  background: var(--green-soft);
}

.pq-opt.is-correct .pq-letter {
  background: var(--green);
  color: var(--white);
}

.pq-opt.is-wrong {
  border-color: var(--red);
  background: var(--red-soft);
}

.pq-opt.is-wrong .pq-letter {
  background: var(--red);
  color: var(--white);
}

.pq-opt.is-selected {
  border-color: var(--emerald);
  background: var(--emerald-soft);
}

.pq-opt.is-selected .pq-letter {
  background: var(--emerald);
  color: var(--white);
}

.pq-explain {
  background: var(--bg-soft);
  border-left: 4px solid var(--emerald);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 16px;
}

.pq-explain p {
  margin: 0 0 8px;
}

.pq-explain p:last-child {
  margin-bottom: 0;
}

.pq-objective {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.pq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin-top: 14px;
  font-size: 0.9rem;
}

.pq-bookmark,
.mq-flag {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.pq-bookmark:hover,
.mq-flag:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
}

.pq-bookmark.is-active,
.mq-flag.is-active {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber-dark);
  font-weight: 700;
}

.pq-report {
  color: var(--faint);
  font-size: 0.9rem;
}

.pq-report:hover {
  color: var(--emerald-dark);
}

.pq-result {
  font-weight: 700;
  margin-top: 12px;
}

.pq-result.correct {
  color: var(--green);
}

.pq-result.wrong {
  color: var(--red);
}

/* ---------- Quiz: mock test ---------- */

#mock-app {
  margin: 20px 0;
}

.mock-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  background: var(--slate);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  position: sticky;
  top: 60px;
  z-index: 5;
  box-shadow: var(--shadow-md);
}

#mock-timer {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

#mock-timer.low {
  color: #fca5a5;
}

#mock-progress {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

#mock-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mock-dot {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.mock-dot:hover {
  border-color: var(--emerald);
}

.mock-dot.is-current {
  border: 2px solid var(--slate);
  background: var(--slate-soft);
}

.mock-dot.is-answered {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--white);
}

.mock-dot.is-flagged {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber-dark);
}

.mock-dot.is-answered.is-flagged {
  background: var(--emerald);
  color: var(--white);
  box-shadow: inset 0 -4px 0 var(--amber);
}

.mq {
  display: none;
}

.mq.is-active {
  display: block;
}

#mock-app.is-review .mq {
  display: block;
}

.mock-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.mock-controls .btn {
  flex: 1 1 auto;
  text-align: center;
  min-width: 120px;
}

#mock-results {
  margin-top: 24px;
}

.mock-score {
  text-align: center;
  background: var(--slate-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.mock-score .score-big {
  font-size: 3rem;
  font-weight: 800;
  color: var(--slate);
  line-height: 1.1;
}

.mock-score .score-verdict {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 8px;
}

.mock-score .score-verdict.pass {
  color: var(--green);
}

.mock-score .score-verdict.fail {
  color: var(--red);
}

.mock-score p {
  color: var(--muted);
  margin: 8px 0 0;
}

.retake-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.mock-review-heading {
  color: var(--slate);
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

/* ---------- Readiness & countdown widgets ---------- */

.widget-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 20px 0;
}

.widget-box h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.widget-box p {
  margin: 0 0 10px;
}

.widget-box p:last-child {
  margin-bottom: 0;
}

.readiness-overall {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate);
  margin-bottom: 12px;
}

.countdown-days {
  font-size: 2rem;
  font-weight: 800;
  color: var(--emerald-dark);
  line-height: 1.2;
}

.countdown-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
}

.countdown-form .form-group {
  margin-bottom: 0;
  flex: 1 1 180px;
}

/* ---------- Review deck page ---------- */

.review-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.review-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--white);
}

.review-item .review-qid {
  font-weight: 700;
  color: var(--slate);
}

.review-item .review-domain {
  font-size: 0.85rem;
  color: var(--muted);
}

.review-remove {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.review-remove:hover {
  border-color: var(--red);
  color: var(--red);
}

.empty-note {
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 24px;
}

/* ---------- Glossary ---------- */

.glossary dt {
  font-weight: 700;
  color: var(--slate);
  margin-top: 16px;
}

.glossary dd {
  margin: 4px 0 0 0;
  color: var(--muted);
}

/* ---------- Prev / next guide nav ---------- */

.guide-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

.guide-nav a {
  text-decoration: none;
  font-weight: 700;
}

/* ---------- Intro paragraph under H1 ---------- */

.page-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero {
    padding: 36px 0 32px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 6px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }

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

  .site-nav a {
    margin-left: 0;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
  }

  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .content h1 {
    font-size: 1.7rem;
  }

  .pq,
  .mq {
    padding: 16px;
  }

  .mock-top {
    top: 58px;
    padding: 10px 14px;
  }

  #mock-timer {
    font-size: 1.25rem;
  }

  .mock-dot {
    width: 34px;
    height: 34px;
  }

  .facts dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facts dd {
    margin-bottom: 8px;
  }
}

/* ================= Asira Tools — tool widgets ================= */

.tool-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.tool-box > h2 {
  margin-top: 0;
}

.tool-box .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

@media (max-width: 600px) {
  .tool-box .form-row {
    grid-template-columns: 1fr;
  }
}

.results {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.result-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--slate);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span {
  color: var(--muted);
}

.result-row strong {
  text-align: right;
  color: var(--slate);
}

.result-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line-soft);
  margin: 16px 0 8px;
}

.result-bar-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.result-bar .seg-a {
  background: var(--slate);
}

.result-bar .seg-b {
  background: var(--emerald);
}

.result-bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-bar-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: baseline;
}

.dot-a {
  background: var(--slate);
}

.dot-b {
  background: var(--emerald);
}

.formula-box {
  background: var(--emerald-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 20px;
  font-size: 0.95rem;
}

.formula-box p {
  margin: 6px 0;
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.9rem;
}

.share-msg {
  font-size: 0.9rem;
  color: var(--emerald-dark);
  font-weight: 600;
  align-self: center;
}

.tool-note {
  font-size: 0.9rem;
  color: var(--faint);
  margin-top: 12px;
}

/* File drop zone (image / audio / video tools). */
.drop-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--emerald);
  background: var(--emerald-soft);
}

.drop-zone input[type="file"] {
  display: none;
}

/* Two-column input/output (text tools). */
.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .io-grid {
    grid-template-columns: 1fr;
  }
}

textarea.code-box {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  min-height: 160px;
  white-space: pre;
}

.output-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

/* Stat tiles (word counter, character counter). */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 1.5rem;
  color: var(--slate);
}

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

/* Currency selector row on money tools. */
.currency-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.currency-row label {
  font-weight: 700;
  margin: 0;
}

.currency-row select {
  width: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
}

/* Image preview + QR output. */
.img-preview {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
}

.qr-output {
  text-align: center;
  margin-top: 16px;
}

.qr-output img,
.qr-output canvas {
  max-width: 260px;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--white);
}

/* Progress bar (ffmpeg / conversion jobs). */
.progress-wrap {
  margin-top: 16px;
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--emerald);
  transition: width 0.2s ease;
}

.progress-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Category tag on tool cards. */
.card-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
