/* ==========================================================================
   HAVENWELL — Design System
   Home organization & decluttering publication
   ========================================================================== */

:root {
  /* Color: cedar green, warm linen, brass accent — tuned to match the Havenwell brand mark */
  --cedar-900: #1f3323;
  --cedar-800: #28422c;
  --cedar-700: #345539;
  --cedar-600: #456a49;
  --cedar-500: #648a67;
  --cedar-100: #e3ebe1;
  --linen-100: #fbf7ef;
  --linen-200: #f6efe1;
  --linen-300: #efe3c8;
  --linen-400: #e4d5b3;
  --brass-600: #a9793d;
  --brass-500: #c69958;
  --brass-300: #e0c186;
  --ink-900: #2a2620;
  --ink-700: #4a453c;
  --ink-500: #726c60;
  --line: #e1d5bc;
  --line-soft: #ece2cd;
  --white: #fffdf9;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 18px;

  --shadow-card: 0 1px 2px rgba(43, 38, 32, 0.04), 0 8px 24px -12px rgba(43, 38, 32, 0.18);
  --shadow-lift: 0 4px 8px rgba(43, 38, 32, 0.06), 0 20px 40px -16px rgba(43, 38, 32, 0.22);

  --content-max: 1180px;
  --reading-max: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--linen-100);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--cedar-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 3.4vw + 1rem, 3.4rem); font-weight: 560; }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.1rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1em; }

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

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--brass-600);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.ph-icon-sm { width: 20px; height: 20px; color: var(--cedar-800); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cedar-900);
  color: var(--linen-100);
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.icon-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--cedar-800), var(--cedar-600));
  border: 1.5px solid var(--brass-500);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.icon-badge .ph-icon { width: 24px; height: 24px; color: var(--linen-100); opacity: 1; margin: 0; }
.icon-badge.lg { width: 68px; height: 68px; }
.icon-badge.lg .ph-icon { width: 32px; height: 32px; }

/* ==========================================================================
   SIGNATURE MOTIF: the shelf-line
   A slender rule with a soft cast shadow beneath it, echoing a shelf edge.
   Used as a divider, an underline, and a card-hover accent throughout.
   ========================================================================== */
.shelf-rule {
  border: none;
  height: 1px;
  background: var(--line);
  position: relative;
  margin: 0;
}
.shelf-rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 1px;
  height: 8px;
  background: linear-gradient(to bottom, rgba(43,38,32,0.06), transparent);
  pointer-events: none;
}
.shelf-tick {
  display: inline-block;
  width: 34px;
  height: 3px;
  background: var(--brass-500);
  border-radius: 2px;
  margin-bottom: 14px;
  position: relative;
}
.shelf-tick::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 4px;
  height: 6px;
  background: rgba(169,128,63,0.18);
  filter: blur(2px);
  border-radius: 4px;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  max-width: var(--content-max);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--cedar-900);
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo span { color: var(--brass-600); }
.logo-mark {
  width: 40px;
  height: auto;
  flex-shrink: 0;
  display: block;
}
.footer-brand .logo-mark { width: 52px; }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  padding: 10px 14px;
  font-size: 0.96rem;
  color: var(--ink-700);
  border-radius: var(--radius-s);
  font-weight: 500;
}
.primary-nav a:hover { color: var(--cedar-800); background: var(--linen-200); }
.primary-nav a[aria-current="page"] { color: var(--cedar-900); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  border: 1px solid var(--line);
  background: var(--linen-100);
  border-radius: 999px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cedar-800);
  cursor: pointer;
}
.icon-btn:hover { background: var(--cedar-100); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--linen-100);
  border-radius: var(--radius-s);
  width: 42px; height: 40px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

.category-strip {
  background: var(--cedar-900);
  overflow-x: auto;
}
.category-strip .container { display: flex; gap: 2px; padding-top: 0; padding-bottom: 0; }
.category-strip a {
  color: var(--linen-200);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 11px 15px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.category-strip a:hover, .category-strip a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--brass-500);
}

/* Mobile nav */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 18px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
  .header-inner { flex-wrap: wrap; position: relative; }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cedar-800); color: var(--white); }
.btn-primary:hover { background: var(--cedar-900); }
.btn-outline { background: transparent; border-color: var(--cedar-800); color: var(--cedar-800); }
.btn-outline:hover { background: var(--cedar-100); }
.btn-brass { background: var(--brass-600); color: var(--white); }
.btn-brass:hover { background: var(--brass-500); }
.btn-sm { padding: 9px 18px; font-size: 0.86rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 64px 0 70px;
  background: linear-gradient(180deg, var(--linen-200), var(--linen-100));
  border-bottom: 1px solid var(--line-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass-600);
  margin-bottom: 14px;
  display: block;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-700);
  max-width: 46ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero brand plate: showcases the Havenwell mark alongside the category shelf */
.hero-plate {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  padding: 30px 28px 26px;
  box-shadow: var(--shadow-lift);
  text-align: center;
}
.hero-plate img {
  width: 128px;
  height: auto;
  margin: 0 auto 10px;
}
.hero-plate .plate-caption {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cedar-900);
  margin-bottom: 2px;
}
.hero-plate .plate-sub {
  font-size: 0.84rem;
  color: var(--brass-600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
}

/* the "shelf" of category chips beside the hero copy */
.hero-shelf { display: flex; flex-direction: column; gap: 0; }
.shelf-row { position: relative; padding: 18px 0; }
.shelf-row .shelf-rule { position: absolute; bottom: 0; left: 0; right: 0; }
.shelf-items { display: flex; gap: 10px; flex-wrap: wrap; }
.shelf-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cedar-800);
  box-shadow: var(--shadow-card);
}
.shelf-item:hover { border-color: var(--brass-500); color: var(--brass-600); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--linen-200); }
.section-cedar { background: var(--cedar-900); color: var(--linen-100); }
.section-cedar h2, .section-cedar h3 { color: var(--white); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
}
.section-head p { color: var(--ink-500); margin: 6px 0 0; max-width: 56ch; }
.section-cedar .section-head p { color: var(--cedar-100); }
.section-link { font-weight: 600; color: var(--cedar-800); white-space: nowrap; font-size: 0.94rem; }
.section-link:hover { color: var(--brass-600); }
.section-cedar .section-link { color: var(--brass-300); }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 42%, var(--linen-100) 0%, var(--linen-100) 30%, transparent 31%),
    linear-gradient(155deg, var(--cedar-800) 0%, var(--cedar-600) 55%, var(--brass-500) 130%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-media::before {
  content: "";
  position: absolute;
  width: 62%; aspect-ratio: 1/1;
  border-radius: 50%;
  border: 2px solid var(--brass-500);
  box-shadow: 0 0 0 5px var(--linen-100), inset 0 0 0 1px rgba(255,255,255,0.4);
  background: var(--linen-100);
}
.card-media .ph-icon { position: relative; z-index: 1; width: 30%; max-width: 54px; height: auto; color: var(--cedar-700); opacity: 0.85; }
.card-media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.ph-icon { width: 44px; height: 44px; color: var(--cedar-600); opacity: 0.55; }
.card-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(43,59,48,0.88);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin: 0; }
.card-body h3 a:hover { color: var(--brass-600); }
.card-excerpt { color: var(--ink-500); font-size: 0.92rem; margin: 0; }
.card-meta { margin-top: auto; font-size: 0.8rem; color: var(--ink-500); padding-top: 10px; }

/* horizontal / list card */
.card-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  align-items: center;
}
.card-row .card-media { aspect-ratio: 4/5; border-radius: var(--radius-s); }

/* category tile (homepage featured categories) */
.cat-tile {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cat-tile .icon-badge { margin-bottom: 14px; }
.cat-tile h3 { font-size: 1.08rem; margin-bottom: 6px; }
.cat-tile p { color: var(--ink-500); font-size: 0.88rem; margin-bottom: 10px; }
.cat-tile .count { font-size: 0.78rem; color: var(--cedar-600); font-weight: 700; }

/* Start Here numbered steps (order carries real meaning: a sequence to follow) */
.start-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.start-step {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  padding: 24px 20px;
}
.start-step .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass-500);
  display: block;
  margin-bottom: 10px;
}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.newsletter {
  background: var(--cedar-800);
  border-radius: var(--radius-l);
  padding: 44px;
  color: var(--white);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: center;
}
.newsletter h2 { color: var(--white); }
.newsletter p { color: var(--cedar-100); }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-family: inherit;
}
.newsletter-note { font-size: 0.78rem; color: var(--cedar-100); margin-top: 10px; opacity: 0.85; }
.form-msg { margin-top: 12px; font-size: 0.9rem; font-weight: 600; }
.form-msg.success { color: var(--brass-300); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--cedar-900); color: var(--cedar-100); padding: 56px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .logo { color: var(--white); }
.footer-brand p { color: var(--cedar-100); font-size: 0.92rem; max-width: 32ch; margin-top: 12px; }
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 0.92rem; color: var(--cedar-100); }
.footer-col a:hover { color: var(--brass-300); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: 0.82rem; color: rgba(251,248,242,0.55);
  flex-wrap: wrap; gap: 10px;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs { font-size: 0.84rem; color: var(--ink-500); padding: 16px 0; }
.breadcrumbs a:hover { color: var(--cedar-800); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }

/* ==========================================================================
   CATEGORY HUB
   ========================================================================== */
.cat-hero {
  padding: 40px 0 46px;
  background: var(--linen-200);
  border-bottom: 1px solid var(--line-soft);
}
.cat-hero .icon-badge { margin-bottom: 16px; }
.cat-hero p { max-width: 68ch; color: var(--ink-700); font-size: 1.06rem; }

.subtopic-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.subtopic-row a {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--cedar-800);
}
.subtopic-row a:hover { border-color: var(--brass-500); color: var(--brass-600); }

/* ==========================================================================
   ARTICLE
   ========================================================================== */
.article-head { padding: 30px 0 10px; }
.article-cat-label {
  color: var(--brass-600);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.article-head h1 { margin-top: 10px; max-width: 22ch; }
.article-dek { font-size: 1.12rem; color: var(--ink-700); max-width: var(--reading-max); margin-top: 14px; }
.article-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: 0.88rem; color: var(--ink-500);
}
.author-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cedar-100); color: var(--cedar-800);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}
.article-meta strong { color: var(--ink-900); }

.featured-media {
  aspect-ratio: 4/5;
  max-width: 420px;
  margin: 26px auto 0;
  border-radius: var(--radius-l);
  background:
    radial-gradient(circle at 50% 42%, var(--linen-100) 0%, var(--linen-100) 34%, transparent 35%),
    linear-gradient(155deg, var(--cedar-800) 0%, var(--cedar-600) 55%, var(--brass-500) 130%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  position: relative;
}
.featured-media::before {
  content: "";
  position: absolute;
  width: 58%; aspect-ratio: 1/1;
  border-radius: 50%;
  border: 2.5px solid var(--brass-500);
  box-shadow: 0 0 0 6px var(--linen-100), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.featured-media .ph-icon { position: relative; z-index: 1; width: 22%; max-width: 90px; height: auto; opacity: 0.85; color: var(--cedar-700); }

.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 40px;
  padding: 40px 0 70px;
  align-items: start;
}
.toc {
  position: sticky; top: 96px;
  border-left: 2px solid var(--line);
  padding-left: 16px;
  font-size: 0.86rem;
}
.toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); font-family: var(--font-body); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.toc a { color: var(--ink-700); }
.toc a:hover { color: var(--cedar-800); }

.article-body { max-width: var(--reading-max); }
.article-intro { margin-bottom: 0.4em; }
.recognition-hook {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--cedar-900);
  line-height: 1.5;
  border-left: 3px solid var(--brass-500);
  padding-left: 18px;
  margin-bottom: 1.1em;
}
.article-body h2 { margin-top: 1.9em; padding-top: 0.2em; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin-top: 1.4em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.article-body li { margin-bottom: 0.5em; }
.article-body strong { color: var(--ink-900); }

.callout {
  background: var(--cedar-100);
  border-left: 3px solid var(--cedar-700);
  border-radius: var(--radius-s);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.96rem;
}
.callout strong { color: var(--cedar-900); }
.callout-brass { background: #f5ead9; border-left-color: var(--brass-600); }

.mistake-list li::marker { color: #b25c4a; }
.checklist { list-style: none; padding-left: 0; }
.checklist li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.checklist li:last-child { border-bottom: none; }
.checklist .box {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
  border: 2px solid var(--cedar-700); border-radius: 4px;
}

.faq-item { border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 700; color: var(--ink-900);
  font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brass-600); font-size: 1.3rem; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: 10px; color: var(--ink-700); }

.ad-slot {
  border: 1px dashed var(--line);
  background: var(--linen-200);
  color: var(--ink-500);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-s);
  margin: 26px 0;
}

.article-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  padding: 18px;
}
.sidebar-box h4 { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); font-family: var(--font-body); margin-bottom: 12px; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sidebar-box a { font-size: 0.9rem; font-weight: 600; color: var(--cedar-800); }
.sidebar-box a:hover { color: var(--brass-600); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; }
.article-tags a {
  background: var(--linen-200); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--ink-700);
}

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 40px 0; }
.pn-card { border: 1px solid var(--line-soft); border-radius: var(--radius-m); padding: 16px 18px; background: var(--white); }
.pn-card .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); }
.pn-card h4 { margin-top: 6px; font-size: 1rem; }
.pn-next { text-align: right; }

.back-to-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--cedar-800); }
.back-to-cat:hover { color: var(--brass-600); }

@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; border-left: none; padding-left: 0; }
  .article-sidebar { position: static; flex-direction: row; overflow-x: auto; }
  .sidebar-box { min-width: 240px; }
}

/* ==========================================================================
   FORMS (Contact / generic)
   ========================================================================== */
.form-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 7px; color: var(--ink-900); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--linen-100);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-hint { font-size: 0.8rem; color: var(--ink-500); margin-top: 4px; }
.form-note {
  background: var(--cedar-100); border-radius: var(--radius-s);
  padding: 12px 16px; font-size: 0.86rem; color: var(--cedar-900); margin-top: 18px;
}

/* ==========================================================================
   SEARCH
   ========================================================================== */
.search-panel {
  position: fixed; inset: 0; background: rgba(43,38,32,0.5);
  display: none; align-items: flex-start; justify-content: center;
  padding: 80px 20px; z-index: 200;
}
.search-panel.open { display: flex; }
.search-box {
  background: var(--white); border-radius: var(--radius-l);
  width: 100%; max-width: 620px; padding: 22px;
  box-shadow: var(--shadow-lift); max-height: 78vh; overflow: auto;
}
.search-box input {
  width: 100%; padding: 14px 16px; font-size: 1.05rem;
  border: 1px solid var(--line); border-radius: var(--radius-m);
  font-family: inherit; margin-bottom: 14px;
}
.search-results { display: flex; flex-direction: column; gap: 4px; }
.search-result { padding: 12px 10px; border-radius: var(--radius-s); }
.search-result:hover { background: var(--linen-200); }
.search-result .r-cat { font-size: 0.72rem; color: var(--brass-600); font-weight: 700; text-transform: uppercase; }
.search-result h4 { margin: 3px 0 0; font-size: 0.98rem; color: var(--ink-900); }
.search-empty { color: var(--ink-500); font-size: 0.9rem; padding: 10px; }
.search-close { float: right; background: none; border: none; cursor: pointer; color: var(--ink-500); font-size: 1.3rem; line-height: 1; }

/* ==========================================================================
   MISC PAGES
   ========================================================================== */
.page-head { padding: 46px 0 20px; }
.legal-body { max-width: var(--reading-max); padding: 10px 0 70px; }
.legal-body h2 { margin-top: 1.6em; }
.legal-updated { color: var(--ink-500); font-size: 0.88rem; }

.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 10px; }
.value-card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius-m); padding: 22px; }
.value-card .ph-icon { width: 26px; height: 26px; color: var(--brass-600); margin-bottom: 10px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .start-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter { grid-template-columns: 1fr; padding: 30px; }
  .about-values { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .card-grid, .card-grid.cols-3, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .start-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 44px 0; }
  .hero { padding: 44px 0 46px; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
}
