/* ══════════════════════════════════════════════════════════════
   How to start programming — Shared Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Theme Variables ── */
:root {
  --wp--preset--color--foreground: #12141D;
  --wp--preset--color--background: #FFFFFF;
  --wp--preset--color--primary: #0B3721;
  --wp--preset--color--secondary: #061F13;
  --wp--preset--color--tertiary: #F9F8F1;
  --wp--preset--color--foreground-alt: #2E2E27;
  --wp--preset--font-family--mulish: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wp--preset--font-family--marcellus: "Marcellus", Georgia, "Times New Roman", serif;
  --wp--preset--font-size--small: 1rem;
  --wp--preset--font-size--medium: 1.25rem;
  --wp--preset--font-size--large: clamp(1.39rem, 1.39rem + ((1vw - 0.2rem) * 1.433), 2.25rem);
  --wp--preset--font-size--x-large: clamp(1.85rem, 1.85rem + ((1vw - 0.2rem) * 1.917), 3rem);
  --wp--preset--font-size--xx-large: clamp(2.25rem, 2.25rem + ((1vw - 0.2rem) * 2.5), 3.75rem);
  --wp--preset--spacing--20: 1rem;
  --wp--preset--spacing--30: clamp(1.5rem, 6vw, 2rem);
  --wp--preset--spacing--40: clamp(2rem, 8vw, 3rem);
  --wp--preset--spacing--50: clamp(2.5rem, 8vw, 4rem);
  --wp--preset--spacing--60: clamp(3.5rem, 10vw, 6rem);
  --wp--style--global--content-size: 42rem;
  --wp--style--global--wide-size: 80rem;
  --wp--style--block-gap: var(--wp--preset--spacing--20);
  --wp--custom--typography--line-height--tiny: 1.15;
  --wp--custom--typography--line-height--small: 1.2;
  --wp--custom--typography--line-height--medium: 1.4;
  --wp--custom--typography--line-height--normal: 1.6;
  --wp--custom--typography--font-weight--medium: 500;
  --wp--custom--elements--button--color--background: var(--wp--preset--color--primary);
  --wp--custom--elements--button--color--text: var(--wp--preset--color--background);
  --wp--custom--elements--button--hover--color--background: var(--wp--preset--color--foreground);
  --wp--custom--elements--button--hover--color--text: var(--wp--preset--color--background);
  --wp--custom--elements--button--border--radius: 0.375rem;
}

/* ── Base Typography ── */
body {
  font-family: var(--wp--preset--font-family--mulish);
  color: var(--wp--preset--color--foreground);
  background: var(--wp--preset--color--background);
  margin: 0; padding: 0;
  line-height: var(--wp--custom--typography--line-height--normal);
  font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.417), 1.125rem);
  font-weight: 400;
  overflow-x: hidden;               /* prevent horizontal scroll on iOS */
  -webkit-text-size-adjust: 100%;   /* stop iOS font inflation */
  text-size-adjust: 100%;
}
a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--foreground); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { font-family: var(--wp--preset--font-family--marcellus); }
h1 { font-size: var(--wp--preset--font-size--xx-large); font-weight: 500; letter-spacing: -0.02em; line-height: var(--wp--custom--typography--line-height--tiny); }
h2 { font-size: var(--wp--preset--font-size--x-large); font-weight: 500; letter-spacing: -0.02em; line-height: var(--wp--custom--typography--line-height--tiny); }
h3 { font-size: var(--wp--preset--font-size--large); font-weight: 500; letter-spacing: -0.02em; line-height: var(--wp--custom--typography--line-height--tiny); }
h4 { font-size: clamp(1.5rem, 1.5rem + ((1vw - 0.48rem) * 0.721), 1.875rem); font-weight: 500; line-height: var(--wp--custom--typography--line-height--tiny); }

/* ── WordPress Block Styles ── */
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.has-global-padding { padding-right: var(--wp--preset--spacing--30); padding-left: var(--wp--preset--spacing--30); }
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--wp--style--global--content-size); margin-left: auto !important; margin-right: auto !important;
}
.is-layout-constrained > .alignwide { max-width: var(--wp--style--global--wide-size); }
.is-layout-constrained > .alignfull { max-width: none; }
body .is-layout-flex { display: flex; flex-wrap: wrap; align-items: center; }
.is-layout-flex > * { margin: 0; }
.is-layout-flow > * + * { margin-block-start: var(--wp--preset--spacing--20); }
.is-layout-flow > :first-child { margin-block-start: 0; }
.wp-block-group { box-sizing: border-box; }
:where(.wp-block-group.has-background) { padding: 1.25em 2.375em; }
.wp-block-columns { box-sizing: border-box; display: flex; flex-wrap: wrap !important; align-items: normal !important; }
@media (min-width: 782px) { .wp-block-columns { flex-wrap: nowrap !important; } }
@media (max-width: 781px) { .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important; } }
.wp-block-column { flex-grow: 1; min-width: 0; overflow-wrap: break-word; }
.wp-block-separator { border: none; border-bottom: 2px solid; margin-left: auto; margin-right: auto; }
.wp-block-separator.has-alpha-channel-opacity { opacity: 1; }
.wp-block-separator.is-style-wide { width: 100%; }
.wp-block-spacer { clear: both; }
.wp-element-button, .wp-block-button__link {
  background-color: var(--wp--custom--elements--button--color--background);
  border-radius: var(--wp--custom--elements--button--border--radius);
  border-width: 0; border-style: solid;
  color: var(--wp--custom--elements--button--color--text);
  font-family: inherit; font-size: inherit; font-weight: var(--wp--custom--typography--font-weight--medium);
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
  text-decoration: none; cursor: pointer;
  display: inline-block;
}
.wp-element-button:hover, .wp-block-button__link:hover {
  background-color: var(--wp--custom--elements--button--hover--color--background);
  color: var(--wp--custom--elements--button--hover--color--text);
}
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-primary-color { color: var(--wp--preset--color--primary) !important; }
.has-secondary-color { color: var(--wp--preset--color--secondary) !important; }
.has-background-color { color: var(--wp--preset--color--background) !important; }
.has-foreground-color { color: var(--wp--preset--color--foreground) !important; }
.has-foreground-alt-color { color: var(--wp--preset--color--foreground-alt) !important; }
.has-primary-background-color { background-color: var(--wp--preset--color--primary) !important; }
.has-secondary-background-color { background-color: var(--wp--preset--color--secondary) !important; }
.has-tertiary-background-color { background-color: var(--wp--preset--color--tertiary) !important; }
.has-foreground-background-color { background-color: var(--wp--preset--color--foreground) !important; }
.has-background-background-color { background-color: var(--wp--preset--color--background) !important; }
.has-small-font-size { font-size: var(--wp--preset--font-size--small) !important; }
.has-medium-font-size { font-size: var(--wp--preset--font-size--medium) !important; }
.has-large-font-size { font-size: var(--wp--preset--font-size--large) !important; }
.has-x-large-font-size { font-size: var(--wp--preset--font-size--x-large) !important; }
.has-xx-large-font-size { font-size: var(--wp--preset--font-size--xx-large) !important; }
.wp-block-heading { overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
@supports (text-wrap: balance) { .wp-block-heading { text-wrap: balance; } }

/* ── Header & Footer ── */
.preview-header { padding: var(--wp--preset--spacing--30); }
.preview-header-inner { max-width: var(--wp--style--global--wide-size); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.preview-header-brand { display: flex; align-items: center; gap: 24px; }
.preview-header-brand img { width: 48px; height: 48px; border-radius: 4px; }
.preview-header-brand h1 { font-size: var(--wp--preset--font-size--large); font-weight: 700; margin: 0; line-height: var(--wp--custom--typography--line-height--tiny); }
.preview-header-brand h1 a { text-decoration: none; color: inherit; }
.preview-nav { display: flex; gap: 1.5rem; font-size: var(--wp--preset--font-size--small); }
.preview-nav a { text-decoration: none; color: var(--wp--preset--color--foreground); font-weight: 500; }
.preview-nav a:hover { text-decoration: underline; }
.preview-nav a.active { color: var(--wp--preset--color--primary); border-bottom: 2px solid var(--wp--preset--color--primary); padding-bottom: 2px; }
.preview-footer { background-color: var(--wp--preset--color--foreground); color: var(--wp--preset--color--background); padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30); }
.preview-footer-inner { max-width: var(--wp--style--global--wide-size); margin: 0 auto; }
.preview-footer h3 { color: var(--wp--preset--color--background); font-size: var(--wp--preset--font-size--medium); }
.preview-footer a { color: var(--wp--preset--color--background); text-decoration: none; }
.preview-footer a:hover { text-decoration: underline; }
.preview-footer-cols { display: flex; gap: 3rem; flex-wrap: nowrap; padding-bottom: 1rem; }
@media (max-width: 781px) { .preview-footer-cols { flex-direction: column; gap: 2rem; } }
.preview-footer-cols > div:first-child { flex-basis: 33.3%; }
.preview-footer-cols > div:last-child { flex-grow: 1; }
.preview-footer-cols ul { list-style: none; padding: 0; margin: 0; }
.preview-footer-cols li { margin-bottom: 0; }
/* 44px min touch target on footer links for mobile */
.preview-footer-cols a {
  display: flex;
  align-items: center;
  min-height: 40px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 768px) { .preview-footer-cols a { min-height: 44px; } }
.preview-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; margin-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: var(--wp--preset--font-size--small); flex-wrap: wrap; gap: 1rem; }

/* ── Search ── */
.hsp-search-wrap { position: relative; max-width: 560px; margin: 0 auto 2rem; }
.hsp-search-input-wrap { display: flex; align-items: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: 0.375rem; overflow: hidden; transition: border-color 0.25s, background 0.25s; }
.hsp-search-input-wrap:focus-within { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.5); }
.hsp-search-icon { padding: 0 0 0 1rem; display: flex; align-items: center; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.hsp-search-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hsp-search-input { flex: 1; background: transparent; border: none; outline: none; padding: 12px 14px; color: #fff; font-family: inherit; font-size: 0.9375rem; font-weight: 400; }
.hsp-search-input::placeholder { color: rgba(255,255,255,0.45); }
.hsp-search-clear { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.45); padding: 0 14px; font-size: 1.25rem; display: none; align-items: center; line-height: 1; }
.hsp-search-clear.visible { display: flex; }
.hsp-search-clear:hover { color: rgba(255,255,255,0.8); }
.hsp-search-kbd { padding: 0 14px; color: rgba(255,255,255,0.3); font-size: 0.75rem; font-family: inherit; flex-shrink: 0; display: flex; align-items: center; }
@media (max-width: 600px) { .hsp-search-kbd { display: none; } }
.hsp-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--wp--preset--color--background); border: 1px solid #e5e5e0; border-radius: 0.375rem; box-shadow: 0 12px 40px rgba(0,0,0,0.15); max-height: 420px; overflow-y: auto; z-index: 9999; display: none; }
.hsp-search-results.open { display: block; }
.hsp-search-results-header { padding: 12px 16px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--wp--preset--color--foreground-alt); border-bottom: 1px solid #f0efe8; display: flex; justify-content: space-between; align-items: center; }
.hsp-search-results-header span { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0.6; }
.hsp-search-result-item { display: block; padding: 14px 16px; text-decoration: none; color: var(--wp--preset--color--foreground); border-bottom: 1px solid #f5f4ee; transition: background 0.15s; }
.hsp-search-result-item:last-child { border-bottom: none; }
.hsp-search-result-item:hover { background: var(--wp--preset--color--tertiary); }
.hsp-search-result-item h4 { font-family: var(--wp--preset--font-family--marcellus); font-size: 0.9375rem; font-weight: 500; margin: 0 0 4px; color: var(--wp--preset--color--primary); line-height: 1.3; }
.hsp-search-result-item p { font-size: 0.8125rem; color: var(--wp--preset--color--foreground-alt); margin: 0; opacity: 0.7; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsp-search-result-meta { display: flex; gap: 0.75rem; margin-top: 6px; font-size: 0.6875rem; color: var(--wp--preset--color--foreground-alt); opacity: 0.5; text-transform: uppercase; letter-spacing: 0.03em; }
.hsp-search-loading, .hsp-search-empty { padding: 2rem 1rem; text-align: center; color: var(--wp--preset--color--foreground-alt); font-size: 0.875rem; }
.hsp-search-loading::before { content: ''; display: inline-block; width: 18px; height: 18px; border: 2px solid #e5e5e0; border-top-color: var(--wp--preset--color--primary); border-radius: 50%; animation: hsp-spin 0.6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes hsp-spin { to { transform: rotate(360deg); } }
.hsp-search-view-all { display: block; text-align: center; padding: 12px 16px; font-size: 0.8125rem; font-weight: 600; color: var(--wp--preset--color--primary); text-decoration: none; border-top: 1px solid #f0efe8; transition: background 0.15s; }
.hsp-search-view-all:hover { background: var(--wp--preset--color--tertiary); }

/* ── Latest Tutorials Grid ── */
.hsp-latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1rem, 2vw, 1.25rem); }
.hsp-latest-card { border: 1px solid #e5e5e0; padding: clamp(1.25rem, 2.5vw, 1.5rem); text-decoration: none; color: inherit; display: block; transition: border-color 0.2s, box-shadow 0.2s; }
.hsp-latest-card:hover { border-color: var(--wp--preset--color--primary); box-shadow: 0 4px 16px rgba(11,55,33,0.06); }
.hsp-latest-card h4 { font-family: var(--wp--preset--font-family--marcellus); font-size: 1rem; font-weight: 500; margin: 0 0 0.4rem; color: var(--wp--preset--color--primary); line-height: 1.3; }
.hsp-latest-card p { font-size: 0.8125rem; color: var(--wp--preset--color--foreground-alt); margin: 0 0 0.5rem; opacity: 0.7; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsp-latest-meta { font-size: 0.6875rem; color: var(--wp--preset--color--foreground-alt); opacity: 0.5; display: flex; gap: 0.75rem; }
.hsp-cat-badge { display: inline-block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 0.25rem; margin-bottom: 0.5rem; background: var(--wp--preset--color--primary); color: #fff; }
.hsp-topic-count { display: inline-block; font-size: 0.6875rem; font-weight: 600; color: var(--wp--preset--color--foreground-alt); opacity: 0.5; margin-left: 4px; }
.hsp-skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: hsp-shimmer 1.5s infinite; border-radius: 4px; }
@keyframes hsp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Below-fold paint containment (Chrome/Edge only — Safari ignores gracefully) ── */
@supports (content-visibility: auto) {
  .hsp-deferred-section { content-visibility: auto; contain-intrinsic-size: auto 600px; }
}

/* ── Topic Cards ── */
.hsp-topic-card { display:block;text-decoration:none;border:1px solid #e5e5e0;padding:clamp(1.5rem,3vw,2rem);transition:box-shadow 0.25s,border-color 0.25s; }
.hsp-topic-card:hover { border-color:var(--wp--preset--color--primary);box-shadow:0 4px 16px rgba(11,55,33,0.06); }
.hsp-topic-icon { font-size:2rem;display:block;margin-bottom:0.75rem; }
.hsp-topic-title { font-size:1.25rem;margin:0 0 0.5rem; }
.hsp-topic-desc { font-size:0.875rem;color:var(--wp--preset--color--foreground-alt);margin:0 0 1rem;line-height:1.6; }
.hsp-topic-link { font-size:0.8125rem;font-weight:600;color:var(--wp--preset--color--primary); }

/* ── Interview Cards ── */
.hsp-interview-card { display:block;text-decoration:none;background:var(--wp--preset--color--background);border:1px solid #e5e5e0;padding:1.25rem;transition:border-color 0.25s; }
.hsp-interview-card:hover { border-color:var(--wp--preset--color--primary); }
.hsp-interview-card h4 { font-size:0.9375rem;margin:0 0 0.35rem;color:var(--wp--preset--color--secondary); }
.hsp-interview-card p { font-size:0.8125rem;color:var(--wp--preset--color--foreground-alt);margin:0;opacity:0.65; }

/* ── Learning Path Steps ── */
.hsp-path-step { display:flex;align-items:center;gap:0.75rem;padding:0.6rem 0;border-bottom:1px solid #f5f4ee;font-size:0.875rem; }
.hsp-path-step:last-child { border-bottom:none; }
.hsp-path-num { width:26px;height:26px;border-radius:50%;background:var(--wp--preset--color--primary);color:#fff;font-size:0.75rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0; }
.hsp-path-link { color:var(--wp--preset--color--primary);text-decoration:none;font-weight:500; }
.hsp-path-link:hover { text-decoration:underline; }

/* ── Popular Tutorial Cards ── */
.hsp-popular-col { display:flex;flex-direction:column; }
.hsp-popular-card { display:flex;flex-direction:column;text-decoration:none;background:var(--wp--preset--color--tertiary);border:1px solid #e8e7df;border-radius:0.375rem;padding:clamp(1.25rem,2.5vw,1.75rem);transition:border-color 0.2s,box-shadow 0.2s;height:100%;box-sizing:border-box; }
.hsp-popular-card:hover { border-color:var(--wp--preset--color--primary);box-shadow:0 4px 16px rgba(11,55,33,0.08); }
.hsp-popular-card .hsp-cat-badge { align-self:flex-start; }
.hsp-popular-card h4 { font-size:1.1rem;margin:0 0 0.4rem;color:var(--wp--preset--color--primary);line-height:1.3; }
.hsp-popular-card p { font-size:0.8125rem;color:var(--wp--preset--color--foreground-alt);margin:0;opacity:0.75;line-height:1.5;margin-top:auto; }

/* ── Complexity Table (Algorithm page) ── */
.hsp-complexity-table { width:100%;border-collapse:collapse;font-size:0.875rem;margin:1rem 0; }
.hsp-complexity-table th { background:var(--wp--preset--color--primary);color:#fff;padding:0.75rem 1rem;text-align:left;font-weight:600; }
.hsp-complexity-table td { padding:0.65rem 1rem;border-bottom:1px solid #e8e7df; }
.hsp-complexity-table tr:hover { background:var(--wp--preset--color--tertiary); }
.hsp-complexity-table code { background:#f0efe8;padding:2px 6px;border-radius:3px;font-size:0.8125rem; }

/* ── SQL Keyword Badge (Database page) ── */
.hsp-sql-keyword { display:inline-block;background:var(--wp--preset--color--primary);color:#fff;font-family:monospace;font-size:0.8125rem;padding:2px 8px;border-radius:3px;font-weight:600;letter-spacing:0.02em; }

/* ── Provider Badge (Terraform page) ── */
.hsp-provider-badge { display:inline-flex;align-items:center;gap:6px;background:var(--wp--preset--color--tertiary);border:1px solid #e8e7df;border-radius:0.375rem;padding:6px 14px;font-size:0.8125rem;font-weight:600;color:var(--wp--preset--color--primary); }

/* ── Contact Form (Contact page) ── */
.hsp-contact-form { max-width: 600px; margin: 0 auto; }
.hsp-form-group { margin-bottom: 1.25rem; }
.hsp-form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.4rem; color: var(--wp--preset--color--foreground); }
.hsp-form-input,
.hsp-form-textarea,
.hsp-form-select { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e5e5e0; border-radius: 0.375rem; font-family: inherit; font-size: 1rem; /* 16px min prevents iOS auto-zoom */ color: var(--wp--preset--color--foreground); background: var(--wp--preset--color--background); transition: border-color 0.2s; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.hsp-form-input:focus,
.hsp-form-textarea:focus,
.hsp-form-select:focus { outline: none; border-color: var(--wp--preset--color--primary); box-shadow: 0 0 0 3px rgba(11,55,33,0.1); }
.hsp-form-textarea { min-height: 160px; resize: vertical; }
.hsp-form-submit { background: var(--wp--preset--color--primary); color: #fff; border: none; border-radius: 0.375rem; padding: 0.85rem 2rem; font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; width: 100%; }
.hsp-form-submit:hover { background: var(--wp--preset--color--foreground); }
.hsp-form-note { font-size: 0.8125rem; color: var(--wp--preset--color--foreground-alt); opacity: 0.6; margin-top: 0.75rem; text-align: center; }
.hsp-form-success { display: none; text-align: center; padding: 2rem; }
.hsp-form-success.show { display: block; }
.hsp-form-success h3 { color: var(--wp--preset--color--primary); margin: 0 0 0.5rem; }
.hsp-form-success p { color: var(--wp--preset--color--foreground-alt); opacity: 0.7; }

/* ── Contact Info Cards (Contact page) ── */
.hsp-contact-info { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; border: 1px solid #e5e5e0; border-radius: 0.375rem; margin-bottom: 1rem; transition: border-color 0.2s; }
.hsp-contact-info:hover { border-color: var(--wp--preset--color--primary); }
.hsp-contact-info-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--wp--preset--color--tertiary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.25rem; }
.hsp-contact-info h4 { font-size: 0.9375rem; margin: 0 0 0.25rem; color: var(--wp--preset--color--primary); }
.hsp-contact-info p { font-size: 0.8125rem; color: var(--wp--preset--color--foreground-alt); margin: 0; opacity: 0.7; }

/* ── Mobile Navigation — Hamburger ── */
.hsp-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  order: 3;
  border-radius: 4px;
  transition: background 0.2s;
  min-width: 44px;                /* iOS/Android 44px minimum touch target */
  min-height: 44px;
  touch-action: manipulation;    /* prevents 300ms tap delay on iOS */
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  z-index: 1001;
}
.hsp-nav-toggle:hover,
.hsp-nav-toggle:focus-visible { background: rgba(0,0,0,0.07); outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }
.hsp-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--wp--preset--color--foreground);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}
.hsp-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hsp-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hsp-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hsp-nav-toggle { display: flex; }
  .preview-header-inner { flex-wrap: wrap; position: relative; }

  /* Keep as display:flex always — max-height drives open/close animation.
     display:none blocks CSS transitions, max-height does not. */
  .preview-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 3;
    flex-basis: 100%;
    /* Solid background — readable over any header colour */
    background: var(--wp--preset--color--background, #fff);
    border-top: 2px solid var(--wp--preset--color--primary, #0B3721);
    border-bottom: 0px solid transparent;
    margin-top: 0.5rem;
    gap: 0;
    /* Closed state — collapsed */
    max-height: 0;
    overflow: hidden;
    /* Smooth slide on both iOS Safari and Android Chrome */
    transition: max-height 0.3s ease, border-bottom-width 0.3s ease;
    /* Hide from assistive tech when closed */
    visibility: hidden;
  }
  .preview-nav.open {
    /* 600px covers 8 links × 48px + padding — never overflows viewport */
    max-height: 600px;
    border-bottom: 1px solid #e8e7df;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: visible;
  }

  .preview-nav a {
    display: flex;
    align-items: center;
    /* 48px — above Apple/Google 44px HIG minimum */
    min-height: 48px;
    padding: 0 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--wp--preset--color--foreground);
    text-decoration: none;
    border-bottom: 1px solid #f0efe8;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
    gap: 0;
  }
  .preview-nav a:last-child { border-bottom: none; }
  .preview-nav a:hover,
  .preview-nav a:focus-visible { background: var(--wp--preset--color--tertiary, #f5f4ee); }
  .preview-nav a.active {
    color: var(--wp--preset--color--primary, #0B3721);
    font-weight: 700;
    background: var(--wp--preset--color--tertiary, #f5f4ee);
    border-left: 3px solid var(--wp--preset--color--primary, #0B3721);
    padding-left: calc(1rem - 3px);
    border-bottom-color: #e8e7df;
  }
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ══════════════════════════════════════════════════════════════
   NEW COMPONENTS — Category pages
   ══════════════════════════════════════════════════════════════ */

/* ── Site name in header ── */
.site-name { font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: var(--wp--custom--typography--line-height--tiny); }
.site-name a { text-decoration: none; color: inherit; }

/* ── Spacer ── */
.hsp-spacer { height: var(--wp--preset--spacing--50); }

/* ── Breadcrumb ── */
.hsp-breadcrumb { font-size: 0.8125rem; color: rgba(255,255,255,0.55); margin: 0 0 0.5rem; }
.hsp-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.hsp-breadcrumb a:hover { text-decoration: underline; }

/* ── Tag bar (hero filters) ── */
.hsp-tag-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.hsp-tag-bar a { display: inline-block; padding: 6px 16px; border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.8125rem; font-weight: 500; border-radius: 2rem; transition: background 0.2s, border-color 0.2s; }
.hsp-tag-bar a:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); }

/* ── Table of Contents ── */
.hsp-toc-box { background: var(--wp--preset--color--tertiary); border: 1px solid #e8e7df; padding: 1.5rem 2rem !important; }
.hsp-toc-heading { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; color: var(--wp--preset--color--primary); font-family: var(--wp--preset--font-family--mulish); }
.hsp-toc-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hsp-toc-grid a { display: inline-block; padding: 6px 14px; border: 1px solid var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); font-size: 0.8125rem; font-weight: 600; text-decoration: none; border-radius: 2rem; transition: background 0.2s, color 0.2s; }
.hsp-toc-grid a:hover { background: var(--wp--preset--color--primary); color: #fff; }

/* ── Section header ── */
.hsp-section-header { margin-bottom: 2rem; }
.hsp-section-header h2 { margin: 0 0 0.35rem; }
.hsp-section-header p { margin: 0 0 0.75rem; font-size: 0.9375rem; }
.hsp-accent-bar { width: 48px; height: 3px; background: var(--wp--preset--color--primary); border-radius: 2px; }

/* ── Count badge ── */
.hsp-count-badge { display: inline-block; font-size: 0.75rem; font-family: var(--wp--preset--font-family--mulish); font-weight: 600; background: var(--wp--preset--color--tertiary); color: var(--wp--preset--color--foreground-alt); border: 1px solid #e8e7df; padding: 2px 10px; border-radius: 2rem; vertical-align: middle; margin-left: 0.5rem; }

/* ── Background alt ── */
.hsp-bg-alt { background: var(--wp--preset--color--tertiary); border-top: 1px solid #e8e7df; border-bottom: 1px solid #e8e7df; padding: clamp(2rem,4vw,3rem) !important; }
:where(.wp-block-group.has-background).hsp-bg-alt { padding: clamp(2rem,4vw,3rem) 2rem; }

/* ── View all button & row ── */
.hsp-view-all-row { text-align: center; padding: 1.5rem 0 0; }
.hsp-view-all-btn { display: inline-block; padding: 10px 24px; background: var(--wp--preset--color--primary); color: #fff; text-decoration: none; font-size: 0.9rem; font-weight: 600; border-radius: 0.375rem; transition: background 0.2s; }
.hsp-view-all-btn:hover { background: var(--wp--preset--color--foreground); color: #fff; }

/* ── All posts details/summary ── */
.hsp-all-posts-details { margin-top: 1.5rem; border: 1px solid #e8e7df; border-radius: 0.375rem; }
.hsp-all-posts-details > summary { padding: 0.85rem 1.25rem; cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--primary); list-style: none; -webkit-user-select: none; user-select: none; }
.hsp-all-posts-details > summary::-webkit-details-marker { display: none; }
.hsp-all-posts-details > summary::before { content: '▶  '; font-size: 0.7em; transition: transform 0.2s; display: inline-block; }
.hsp-all-posts-details[open] > summary::before { content: '▼  '; }
.hsp-all-posts-details > summary:hover { background: var(--wp--preset--color--tertiary); }

/* ── Post list ── */
.hsp-post-list { list-style: none; padding: 0.5rem 1.25rem 1rem; margin: 0; }
.hsp-post-list li { padding: 0.45rem 0; border-bottom: 1px solid #f5f4ee; font-size: 0.875rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hsp-post-list li:last-child { border-bottom: none; }
.hsp-post-list a { color: var(--wp--preset--color--primary); text-decoration: none; font-weight: 500; }
.hsp-post-list a:hover { text-decoration: underline; }
.hsp-post-date { font-size: 0.75rem; color: var(--wp--preset--color--foreground-alt); opacity: 0.5; white-space: nowrap; flex-shrink: 0; }

/* ── Learning path grid (3 columns) ── */
.hsp-path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }
.hsp-path-col h3 { font-size: 1rem; font-weight: 700; font-family: var(--wp--preset--font-family--mulish); color: var(--wp--preset--color--primary); margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--wp--preset--color--primary); }

/* ── Read Next ── */
.hsp-read-next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.hsp-read-next-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; border: 1px solid #e5e5e0; text-decoration: none; color: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.hsp-read-next-card:hover { border-color: var(--wp--preset--color--primary); box-shadow: 0 3px 12px rgba(11,55,33,0.07); }
.hsp-rn-icon { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }
.hsp-read-next-card strong { display: block; font-weight: 700; font-family: var(--wp--preset--font-family--mulish); color: var(--wp--preset--color--primary); margin-bottom: 0.25rem; }
.hsp-read-next-card p { font-size: 0.8125rem; color: var(--wp--preset--color--foreground-alt); margin: 0; opacity: 0.7; }

/* ── Interview page ── */
.hsp-interview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.hsp-filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 0.5rem; }
.hsp-pill { padding: 7px 18px; min-height: 44px; border: 1px solid #e5e5e0; background: var(--wp--preset--color--background); color: var(--wp--preset--color--foreground); font-size: 0.8125rem; font-weight: 600; font-family: inherit; cursor: pointer; border-radius: 2rem; transition: background 0.2s, border-color 0.2s, color 0.2s; -webkit-appearance: none; appearance: none; touch-action: manipulation; display: inline-flex; align-items: center; justify-content: center; }
.hsp-pill:hover { border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); }
.hsp-pill.active { background: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); color: #fff; }

/* ── Hero search on interview page ── */
.hsp-search-wrap { position: relative; max-width: 560px; margin: 0 auto 0.5rem; }
.hsp-search-input { width: 100%; padding: 0.85rem 1.25rem 0.85rem 3rem; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); border-radius: 0.375rem; color: #fff; font-family: inherit; font-size: 1rem; /* 16px — prevents iOS Safari auto-zoom */ box-sizing: border-box; outline: none; transition: background 0.2s, border-color 0.2s; -webkit-appearance: none; appearance: none; }
.hsp-search-input:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); }
.hsp-search-input::placeholder { color: rgba(255,255,255,0.5); }
.hsp-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; pointer-events: none; }

/* ── Footer cols adjust for 3 columns ── */
.preview-footer-cols { gap: 2rem; }
.preview-footer-cols > div { flex: 1; min-width: 160px; }

/* ── Responsive tweaks for new components ── */
@media (max-width: 600px) {
  .hsp-path-grid { grid-template-columns: 1fr; }
  .hsp-read-next-grid { grid-template-columns: 1fr; }
  .hsp-latest-grid { grid-template-columns: 1fr; }
  .hsp-interview-grid { grid-template-columns: 1fr; }
  .hsp-agent-grid { grid-template-columns: 1fr; }
  .hsp-tool-grid { grid-template-columns: 1fr; }
  .hsp-toc-grid { flex-direction: column; }
  .hsp-tag-bar { gap: 0.4rem; }
  .hsp-bg-alt { padding: 1.5rem 1rem !important; }
  .preview-footer-cols { flex-direction: column; gap: 1.5rem; }
  .hsp-filter-pills { gap: 0.4rem; }
  .hsp-section-header h2 { font-size: clamp(1.4rem, 5vw, 1.85rem); }
  .hsp-latest-card, .hsp-interview-card, .hsp-popular-card { min-width: 0; }
  .hsp-code-block { font-size: 0.75rem; }
  .hsp-local-step-group { padding: 1rem; }
}

/* ── Safe-area insets for iPhone notch / Dynamic Island ── */
.preview-header { padding-left: max(var(--wp--preset--spacing--30), env(safe-area-inset-left)); padding-right: max(var(--wp--preset--spacing--30), env(safe-area-inset-right)); }
.preview-footer { padding-bottom: max(var(--wp--preset--spacing--30), env(safe-area-inset-bottom)); }

/* ── FAQ list ── */
.hsp-faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.hsp-faq-item { background: var(--wp--preset--color--tertiary); border-radius: 8px; border: 1px solid #e8e7df; overflow: hidden; }
.hsp-faq-item summary { cursor: pointer; padding: 1rem 1.25rem; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.hsp-faq-item summary::-webkit-details-marker { display: none; }
.hsp-faq-item summary::after { content: '+'; font-size: 1.25rem; font-weight: 700; color: var(--wp--preset--color--primary); flex-shrink: 0; margin-left: 1rem; }
.hsp-faq-item[open] summary::after { content: '−'; }
.hsp-faq-item p { padding: 0 1.25rem 1rem; margin: 0; color: var(--wp--preset--color--foreground-alt); line-height: 1.65; }

/* ── AI Agent Cards ── */
.hsp-agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.hsp-agent-card { background: #fff; border: 1px solid #e8e7df; border-radius: 12px; padding: 1.5rem; position: relative; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: box-shadow .2s; }
.hsp-agent-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.hsp-agent-logo { font-size: 2.25rem; line-height: 1; }
.hsp-agent-card h3 { margin: 0; font-size: 1.15rem; color: var(--wp--preset--color--primary); }
.hsp-agent-maker { margin: 0; font-size: 0.8rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.hsp-agent-features { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.875rem; }
.hsp-agent-badge { display: inline-block; margin-top: auto; padding: 0.25em 0.75em; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.hsp-badge-best      { background: #0B3721; color: #fff; }
.hsp-badge-docs      { background: #7c3aed; color: #fff; }
.hsp-badge-free      { background: #1d7c34; color: #fff; }
.hsp-badge-local     { background: #d97706; color: #fff; }
.hsp-badge-reasoning { background: #0e7490; color: #fff; }
.hsp-badge-eu        { background: #1949a5; color: #fff; }

/* ── AI Tool Cards ── */
.hsp-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.hsp-tool-card { background: #fff; border: 1px solid #e8e7df; border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: box-shadow .2s; }
.hsp-tool-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.hsp-tool-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.hsp-tool-icon { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }
.hsp-tool-card h3 { font-size: 1.05rem; color: var(--wp--preset--color--primary); }
.hsp-tool-price { font-size: 0.78rem; color: #888; font-weight: 600; }
.hsp-tool-card p { margin: 0; font-size: 0.875rem; color: var(--wp--preset--color--foreground-alt); line-height: 1.55; }
.hsp-tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.hsp-tool-link { display: inline-block; margin-top: auto; font-size: 0.875rem; font-weight: 700; color: var(--wp--preset--color--primary); text-decoration: none; }
.hsp-tool-link:hover { text-decoration: underline; }

/* ── Code block ── */
.hsp-code-block { background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 1rem 1.25rem; font-family: "Fira Code", "Cascadia Code", Consolas, monospace; font-size: 0.82rem; line-height: 1.6; overflow-x: auto; margin: 0; white-space: pre; }
.hsp-code-block code { background: none; padding: 0; font-size: inherit; }

/* ── Local step group ── */
.hsp-local-step-group { background: #fff; border: 1px solid #e8e7df; border-radius: 12px; padding: 1.5rem; margin-bottom: 0; }



