/* ==============================================
   Clean Work Lab — L'Oréal-Inspired Design System
   Pure HTML/CSS/JS Static Site
   ============================================== */

/* --- Pretendard Font --- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* --- CSS Custom Properties (Light Mode Default) --- */
:root {
  /* Colors */
  --bg: #FFFFFF;
  --bg-secondary: #F7F7F7;
  --text: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #E5003E;
  --accent-hover: #C80035;
  --accent-light: rgba(229, 0, 62, 0.08);
  --border: #E5E5E5;
  --card-bg: #FFFFFF;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #1A1A1A;
  --footer-text: #CCCCCC;
  --footer-heading: #FFFFFF;
  --code-bg: #F5F5F5;
  --overlay: rgba(0, 0, 0, 0.55);

  /* Typography */
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  /* Layout */
  --max-width: 1200px;
  --content-width: 780px;
  --header-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --bg: #141414;
  --bg-secondary: #1E1E1E;
  --text: #F0F0F0;
  --text-secondary: #AAAAAA;
  --text-muted: #777777;
  --accent: #FF2D55;
  --accent-hover: #FF4D6F;
  --accent-light: rgba(255, 45, 85, 0.1);
  --border: #2A2A2A;
  --card-bg: #1E1E1E;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(20, 20, 20, 0.95);
  --footer-bg: #0A0A0A;
  --footer-text: #999999;
  --footer-heading: #F0F0F0;
  --code-bg: #2A2A2A;
  --overlay: rgba(0, 0, 0, 0.7);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

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

ul, ol {
  padding-left: 1.5em;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--content-width);
}

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

/* ==============================================
   HEADER / NAVIGATION
   ============================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background var(--transition), border-color var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header__logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color var(--transition);
  white-space: nowrap;
}

.header__logo:hover {
  color: var(--accent);
}

.header__logo span {
  color: var(--accent);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__menu {
  display: flex;
  list-style: none;
  gap: 28px;
  padding: 0;
  margin: 0;
}

.header__menu a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.header__menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.header__menu a:hover,
.header__menu a.active {
  color: var(--text);
}

.header__menu a:hover::after,
.header__menu a.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile Menu */
.header__mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
}

.header__mobile-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .header__menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .header__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header__menu a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .header__menu li:last-child a {
    border-bottom: none;
  }

  .header__menu a::after {
    display: none;
  }

  .header__mobile-toggle {
    display: flex;
  }
}

/* ==============================================
   HERO SECTION
   ============================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #0a0a0a;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  padding: 40px 24px 60px;
  max-width: 720px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero__cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.hero__cta:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ==============================================
   SECTION TITLES
   ============================================== */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  margin-bottom: 48px;
}

.section__title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ==============================================
   MAGAZINE CARD GRID
   ============================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Featured (first) card spans 2 columns */
.posts-grid .card:first-child {
  grid-column: span 2;
}

.posts-grid .card:first-child .card__image {
  height: 320px;
}

@media (max-width: 600px) {
  .posts-grid .card:first-child {
    grid-column: span 1;
  }
  .posts-grid .card:first-child .card__image {
    height: 200px;
  }
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card__body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.card:hover .card__title {
  color: var(--accent);
}

.card__excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ==============================================
   POST (Single Article) PAGE
   ============================================== */
.post-hero {
  margin-top: var(--header-height);
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, var(--bg));
}

.post {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.post__header {
  margin: -60px 0 48px;
  position: relative;
  z-index: 1;
}

.post__category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.post__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.post__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.post__content {
  line-height: 1.85;
  font-size: 1.05rem;
  color: var(--text);
}

.post__content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.post__content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
}

.post__content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

.post__content p {
  margin-bottom: 1.3em;
}

.post__content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 1.5em 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: normal;
  color: var(--text-secondary);
}

.post__content blockquote p {
  margin-bottom: 0;
}

.post__content ul, .post__content ol {
  margin-bottom: 1.3em;
}

.post__content li {
  margin-bottom: 0.4em;
}

.post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.92rem;
}

.post__content table th,
.post__content table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.post__content table th {
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text);
}

.post__content table tr:hover td {
  background: var(--accent-light);
}

.post__content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

.post__content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post__content pre {
  background: var(--code-bg);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5em 0;
}

.post__content pre code {
  background: none;
  padding: 0;
}

.post__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post__content a:hover {
  color: var(--accent-hover);
}

/* Post Tags */
.post__tags {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post__tags a {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.post__tags a:hover {
  background: var(--accent);
  color: #FFFFFF;
}

/* Post CTA */
.post-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
}

.post-cta h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-cta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.post-cta .btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.post-cta .btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Post Navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 24px;
}

.post-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.post-nav a:hover {
  color: var(--accent);
}

.post-nav__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ==============================================
   PAGE (About, Contact, Resources, Privacy)
   ============================================== */
.page {
  margin-top: var(--header-height);
  padding: 60px 0 80px;
}

.page__header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}

.page__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page__content {
  line-height: 1.85;
  font-size: 1.05rem;
}

.page__content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.page__content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.page__content p {
  margin-bottom: 1.2em;
}

/* Contact Form */
.contact-form {
  max-width: 560px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form button {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.contact-form button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Resource Cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.resource-card {
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.resource-card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

a.resource-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.resource-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  transition: color var(--transition);
}

.resource-card:hover .resource-card__title {
  color: var(--accent);
}

.resource-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Coming Soon Badge */
.resource-card--soon {
  opacity: 0.55;
  pointer-events: none;
  position: relative;
}

.badge-soon {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ==============================================
   FOOTER
   ============================================== */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 32px;
  margin-top: 80px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

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

.footer__heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-heading);
  margin-bottom: 16px;
}

.footer__about p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--footer-text);
}

.footer__links {
  list-style: none;
  padding: 0;
}

.footer__links li {
  margin-bottom: 8px;
}

.footer__links a {
  color: var(--footer-text);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: #FFFFFF;
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--footer-text);
}

.footer__bottom a {
  color: var(--footer-text);
  text-decoration: none;
}

.footer__bottom a:hover {
  color: #FFFFFF;
}

/* ==============================================
   BACK TO TOP
   ============================================== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 900;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ==============================================
   BREADCRUMB
   ============================================== */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.breadcrumb span {
  margin: 0 6px;
}

/* ==============================================
   PAGINATION
   ============================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.pagination a {
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.pagination a:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.pagination .active {
  background: var(--accent);
  color: #FFFFFF;
}

/* ==============================================
   CALCULATOR EMBED
   ============================================== */
.calculator-wrapper {
  margin-top: var(--header-height);
  padding: 40px 0 80px;
}

.calculator-wrapper iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius-lg);
  min-height: 800px;
}

/* ==============================================
   TABLE OF CONTENTS (Auto-generated)
   ============================================== */

/* Desktop: side-by-side layout with grid */
@media (min-width: 1100px) {
  .post {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0 40px;
    max-width: 1100px;
  }

  .post__header,
  .post__tags,
  .post-cta,
  .post-nav {
    grid-column: 1 / -1;
  }

  .post__content {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  .toc {
    grid-column: 2;
    grid-row: 2;
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
    margin-bottom: 0;
  }

  .toc__list {
    max-height: none;
  }

  /* Scrollbar */
  .toc::-webkit-scrollbar { width: 4px; }
  .toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
  .toc::-webkit-scrollbar-track { background: transparent; }
}

/* TOC box style (all sizes) */
.toc {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 36px;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}

.toc__title-text {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.toc__arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.toc.is-collapsed .toc__arrow {
  transform: rotate(-90deg);
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  max-height: 600px;
  overflow-y: auto;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.toc__list.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
}

.toc__item {
  margin: 0;
}

.toc__item--sub {
  padding-left: 16px;
}

.toc__link {
  display: block;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  line-height: 1.4;
}

.toc__link:hover {
  color: var(--text);
  background: var(--accent-light);
}

.toc__link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

/* ==============================================
   NO-HERO PAGE OFFSET
   ============================================== */
.page-no-hero {
  margin-top: var(--header-height);
  padding-top: 48px;
}
