/* IneptHomeowner — modern static theme */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --sand: #f2ebdf;
  --ink: #1a2535;
  --muted: #5d6877;
  --line: #e7dfd1;
  --brand: #12413c;       /* deep teal */
  --brand-ink: #ffffff;
  --accent: #e4572e;      /* hard-hat orange */
  --accent-ink: #ffffff;
  --link: #0e6b62;
  --shadow: 0 1px 2px rgba(26,37,53,.06), 0 8px 24px rgba(26,37,53,.07);
  --radius: 14px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11181f; --surface: #18222c; --sand: #1d2a35; --ink: #eef1f4; --muted: #a2adba;
    --line: #2a3745; --brand: #1d5c54; --link: #62cdbf; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #11181f; --surface: #18222c; --sand: #1d2a35; --ink: #eef1f4; --muted: #a2adba;
  --line: #2a3745; --brand: #1d5c54; --link: #62cdbf; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo img { height: 55px; width: auto; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current] { background: var(--sand); color: var(--ink); }
.icon-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.header-tools { display: flex; gap: 8px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 8px; }
  .header-tools { margin-left: 0; }
}

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer; font-size: 15px; font-family: inherit; transition: transform .15s, box-shadow .15s; }
.btn:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(228,87,46,.35); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.chip:hover { text-decoration: underline; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.pill:hover, .pill.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* Hero */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); margin: 10px 0 16px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 0 0 24px; }
.hero-card { display: block; position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--sand); text-decoration: none; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hero-card:hover img { transform: scale(1.03); }
.hero-card .cap { position: absolute; inset: auto 0 0 0; padding: 56px 24px 22px; color: #fff; background: linear-gradient(transparent, rgba(8,14,22,.82)); }
.hero-card .cap small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 12px; color: #ffc9b5; }
.hero-card .cap b { display: block; font: 600 clamp(20px, 2.4vw, 28px)/1.2 var(--font-head); margin-top: 4px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero { padding-top: 32px; } }

/* Sections */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3.2vw, 36px); }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.band { background: var(--sand); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16/10; background: var(--sand); overflow: hidden; display: block; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 20px; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--muted); }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; text-decoration: none; background: var(--brand); display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform .4s, opacity .3s; }
.tile:hover img { transform: scale(1.05); opacity: .7; }
.tile span { position: absolute; inset: auto 0 0 0; padding: 18px; color: #fff; font: 600 22px/1.2 var(--font-head); }
.tile small { display: block; font: 500 13px var(--font-body); opacity: .85; margin-top: 2px; }

/* About strip */
.about-strip { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; }
.about-strip img { width: 190px; }
.about-strip h2 { margin: 0 0 8px; }
.about-strip p { color: var(--muted); margin: 0 0 16px; max-width: 62ch; }
@media (max-width: 640px) { .about-strip { grid-template-columns: 1fr; } .about-strip img { width: 140px; } }

/* Page heading */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 48px); margin: 6px 0 8px; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; font-size: 18px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }

/* Article */
.article-head { padding: 40px 0 8px; }
.article-head h1 { font-size: clamp(32px, 4.6vw, 50px); margin: 10px 0 14px; }
.byline { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.article-hero { margin: 24px 0 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: var(--sand); }
.article-hero img { width: 100%; max-height: 520px; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 56px; padding: 32px 0 24px; align-items: start; }
@media (max-width: 1060px) { .article-layout { grid-template-columns: 1fr; gap: 8px; } }
.toc { position: sticky; top: 88px; grid-column: 2; grid-row: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14.5px; line-height: 1.4; max-height: calc(100vh - 120px); overflow: auto; }
@media (max-width: 1060px) { .toc { position: static; grid-column: 1; grid-row: auto; max-height: none; } }
.toc summary { cursor: pointer; font: 600 13px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.toc a { display: block; padding: 5px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.toc a:hover { background: var(--sand); }
.toc a.on { background: var(--sand); color: var(--accent); font-weight: 600; }
.disclosure { font-size: 14px; color: var(--muted); background: var(--sand); border-radius: 10px; padding: 10px 14px; margin: 0 0 24px; line-height: 1.5; }
.prose { grid-column: 1; grid-row: 1; min-width: 0; font-size: 18px; }
@media (max-width: 1060px) { .prose { grid-row: auto; } }
.prose > * { max-width: 100%; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 2.1em 0 .6em; scroll-margin-top: 90px; padding-top: .4em; border-top: 1px solid var(--line); }
.prose h2:first-child { border-top: 0; margin-top: 0; }
.prose h3 { font-size: clamp(21px, 2.4vw, 26px); margin: 1.8em 0 .5em; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; } .prose li { margin: .35em 0; }
.prose figure { margin: 1.4em 0 .4em; text-align: center; }
.prose figure img { margin-inline: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.prose figcaption, .prose .wp-caption-text { font-size: 14px; color: var(--muted); margin-top: 8px; }
.prose img.alignleft, .prose .alignleft { float: left; margin: 4px 24px 12px 0; max-width: 45%; }
.prose img.alignright, .prose .alignright { float: right; margin: 4px 0 12px 24px; max-width: 45%; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; } .prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose::after { content: ""; display: block; clear: both; }
.buy { text-align: center; margin: 0 0 1.8em; }
.btn.amazon { background: #ffb43a; color: #1a1a1a; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.btn.amazon:hover { color: #1a1a1a; box-shadow: 0 6px 16px rgba(255,180,58,.5); }
.btn.amazon svg { width: 16px; height: 16px; }
.related { padding: 24px 0 64px; }

/* Articles filter */
.filter-bar { display: grid; gap: 16px; margin: 24px 0 28px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 18px; max-width: 520px; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228,87,46,.18); }
.search-box input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 10px 0; outline: none; min-width: 0; }
.empty { display: none; padding: 40px 0; color: var(--muted); text-align: center; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 24px; }
.form label { font-weight: 600; font-size: 15px; display: grid; gap: 6px; }
.form input, .form textarea { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* Footer */
.site-footer { background: var(--brand); color: #dbe9e6; margin-top: 40px; padding: 48px 0 28px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; opacity: .9; } .site-footer a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font: 700 13px var(--font-body); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.18); margin-top: 32px; padding-top: 20px; font-size: 13px; opacity: .85; line-height: 1.6; }
.foot-logo { background: #fff; border-radius: 12px; padding: 8px 12px; display: inline-block; margin-bottom: 12px; } .foot-logo img { height: 42px; }

@media print { .site-header, .site-footer, .toc, .related, .buy { display: none; } }
.search-box svg { width: 18px; height: 18px; flex: none; color: var(--muted); }

/* Consent banner */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; max-width: 760px; margin-inline: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.22); padding: 16px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 14.5px; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; }
.consent-btns { display: flex; gap: 10px; }
.consent .btn { padding: 9px 18px; font-size: 14px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: #fff; opacity: .9; cursor: pointer; text-align: left; }
.linklike:hover { opacity: 1; text-decoration: underline; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 520px; }
.prose th { background: var(--sand); }
