/* Skin & Beauty Daily — shared stylesheet */

:root {
  --bg: #FAF7F2;
  --bg-alt: #F2EEE6;
  --surface: #FFFFFF;
  --text: #1C1C1B;
  --text-soft: #5A5A57;
  --text-muted: #8A8A85;
  --rule: #E6E2D8;
  --green: #3F6B4A;
  --green-soft: #E4ECDF;
  --coral: #D97B6C;
  --coral-soft: #F7E2DC;
  --blue: #34608A;
  --blue-soft: #DCE7F0;
  --stone: #E6E3DD;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  --maxw-prose: 720px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20,20,18,0.04), 0 4px 14px rgba(20,20,18,0.04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; color: var(--text); margin: 0 0 0.4em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.25rem; margin-top: 1.4em; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
small { color: var(--text-muted); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.site-header .row { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; gap: 1rem; }
.brand { font-family: var(--serif); font-size: 1.4rem; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.brand span { color: var(--green); }
.nav-primary { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.nav-primary a { text-decoration: none; font-size: 0.93rem; color: var(--text-soft); }
.nav-primary a:hover { color: var(--text); }
.nav-cta { background: var(--text); color: var(--bg) !important; padding: 0.45rem 0.9rem; border-radius: var(--radius); }
.nav-cta:hover { background: var(--green); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--bg-alt); margin-top: 4rem; padding: 3rem 0 2rem; font-size: 0.92rem; color: var(--text-soft); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.footer-grid h4 { color: var(--text); margin-bottom: 0.8em; font-size: 0.85rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 0.4em; }
.footer-grid a { color: var(--text-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); }

/* Hero */
.hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--rule); }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: 1.2rem; color: var(--text-soft); max-width: 50ch; margin: 0.5em 0 1.5em; }
.hero .cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-block; padding: 0.7rem 1.2rem; border-radius: var(--radius); text-decoration: none; font-weight: 500; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--green); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--text); color: var(--bg); }

/* Section */
.section { padding: 3rem 0; border-bottom: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: 0.9rem; color: var(--text-soft); text-decoration: none; }
.section-head .more:hover { color: var(--green); }

.eyebrow { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); font-weight: 600; }

/* Card grids */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 1.15rem; }
.card .meta { font-size: 0.85rem; color: var(--text-muted); }
.card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.card a { text-decoration: none; color: inherit; }
.card .tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.5rem; }

/* Badges */
.badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.4; }
.badge-strong { background: var(--green-soft); color: var(--green); }
.badge-moderate { background: var(--blue-soft); color: var(--blue); }
.badge-emerging { background: var(--coral-soft); color: var(--coral); }
.badge-weak { background: var(--stone); color: var(--text-soft); }
.badge-low { background: var(--green-soft); color: var(--green); }
.badge-med { background: var(--blue-soft); color: var(--blue); }
.badge-high { background: var(--coral-soft); color: var(--coral); }
.badge-cat { background: var(--bg-alt); color: var(--text-soft); }

/* Article / guide pages */
.article-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--rule); }
.article-header .eyebrow { display: block; margin-bottom: 0.6rem; }
.article-header h1 { max-width: 22ch; }
.article-header .dek { font-size: 1.15rem; color: var(--text-soft); max-width: 60ch; margin-top: 0.6em; }
.article-header .meta-row { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.88rem; margin-top: 1rem; }

.article-body { padding: 2.5rem 0; }
.article-body h2 { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.article-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* Fact box / disclosure */
.factbox { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--green); padding: 1.25rem 1.4rem; border-radius: var(--radius); margin: 1.5rem 0; }
.factbox h4 { margin-top: 0; color: var(--green); }
.factbox p:last-child { margin-bottom: 0; }

.disclosure { background: var(--bg-alt); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: 0.88rem; color: var(--text-soft); margin: 1.5rem 0; }
.disclosure strong { color: var(--text); }

/* Spec table for ingredient / review pages */
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec-table th { font-weight: 600; color: var(--text-soft); width: 38%; background: var(--bg-alt); }

/* Newsletter signup block */
.newsletter { background: linear-gradient(135deg, var(--green-soft), var(--bg-alt)); padding: 3rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.newsletter .inner { max-width: 640px; margin: 0 auto; text-align: center; padding: 0 1.25rem; }
.newsletter h2 { margin-top: 0; }
.newsletter form { display: flex; gap: 0.5rem; margin-top: 1.2rem; flex-wrap: wrap; justify-content: center; }
.newsletter input[type="email"] { flex: 1 1 240px; padding: 0.75rem 1rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); font-size: 1rem; font-family: inherit; color: var(--text); }
.newsletter input[type="email"]:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.newsletter .privacy { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.8rem; }

/* Today / news feed */
.today-list { display: flex; flex-direction: column; gap: 0; }
.today-item { display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.today-item:last-child { border-bottom: 0; }
.today-item .date { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.today-item h3 { margin: 0 0 0.3em; font-size: 1.15rem; }
.today-item p { margin: 0; color: var(--text-soft); font-size: 0.94rem; }
.today-item a { text-decoration: none; color: inherit; }
.today-item a:hover h3 { color: var(--green); }

/* Forms */
form .field { display: block; margin-bottom: 1rem; }
form label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-soft); }
form input[type="text"], form input[type="email"], form textarea, form select { width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); font: inherit; color: var(--text); }
form textarea { min-height: 140px; resize: vertical; }
form input:focus, form textarea:focus, form select:focus { outline: 2px solid var(--green); outline-offset: 2px; }


/* Ad / affiliate placeholders */
.ad-slot { background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 10px, var(--bg) 10px, var(--bg) 20px); border: 1px dashed var(--rule); padding: 1.2rem; text-align: center; color: var(--text-muted); font-size: 0.82rem; border-radius: var(--radius); margin: 1.5rem 0; letter-spacing: 0.08em; text-transform: uppercase; }
.affiliate-box { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--coral); border-radius: var(--radius); padding: 1.2rem; margin: 1.5rem 0; }
.affiliate-box .label { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); font-weight: 600; }
.affiliate-box h4 { margin: 0.3rem 0 0.4rem; font-size: 1.05rem; }
.affiliate-box .price { color: var(--text-soft); font-size: 0.9rem; }
.affiliate-box a.btn { margin-top: 0.6rem; }

/* Calculator tool widgets */
.calc-tool { margin: 2rem 0; }
.calc-grid { display: grid; gap: 1.5rem; }
.calc-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.calc-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem 1.6rem; }
.calc-card h3 { margin-top: 0; font-size: 1.1rem; }
.calc-field { display: block; margin-bottom: 1rem; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-soft); }
.calc-field input, .calc-field select { width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); font: inherit; color: var(--text); box-sizing: border-box; }
.calc-field input:focus, .calc-field select:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.calc-row { display: flex; gap: 1rem; }
.calc-row > div { flex: 1; }
.calc-catrow { display: flex; align-items: center; gap: 1rem; margin: 0.7rem 0; }
.calc-catrow label { flex: 1; font-weight: 600; font-size: 0.9rem; margin: 0; color: var(--text-soft); }
.calc-catrow input { width: 110px; padding: 0.5rem 0.6rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); font: inherit; }
.calc-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.calc-list input { padding: 0.65rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); font: inherit; color: var(--text); }
.calc-actions { margin-top: 1.4rem; display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.calc-result { margin-top: 1.5rem; padding: 1.4rem 1.6rem; border-radius: var(--radius); background: var(--green-soft); border: 1px solid var(--rule); display: none; }
.calc-result.show { display: block; }
.calc-result .calc-big { font-size: 1.7rem; font-weight: 700; color: var(--green); font-family: var(--serif); line-height: 1.2; }
.calc-result table { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.calc-result td { padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--rule); }
.calc-result td:last-child { text-align: right; }
.calc-note { font-size: 0.88rem; color: var(--text-soft); margin-top: 0.5rem; }
.calc-winner { font-weight: 600; margin-top: 0.75rem; color: var(--green); }

/* Search */
.search-box { display: flex; gap: 0.5rem; margin: 1.5rem 0; }
.search-box input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); font: inherit; }

/* Breadcrumb */
.crumbs { font-size: 0.86rem; color: var(--text-muted); padding: 1rem 0 0; }
.crumbs a { color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs span { margin: 0 0.4rem; color: var(--text-muted); }

/* Live newsletter edition (newsletter/newsletter.js) */
.nl-edition { margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.nl-edition .meta-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.nl-edition h2 { margin-top: 0.2em; }
.nl-edition-body h2 { font-size: 1.3rem; margin-top: 1.8rem; }
.nl-edition-body h3 { font-size: 1.05rem; margin-top: 1.2rem; }
.nl-edition-body p, .nl-edition-body li { color: var(--text-soft); }
.nl-archive-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.nl-archive-list li { border-bottom: 1px solid var(--rule); padding: 0.6rem 0; }
.nl-archive-list a { color: var(--text-soft); text-decoration: none; font-size: 0.94rem; }
.nl-archive-list a:hover { color: var(--green); }

/* Mobile */
@media (max-width: 720px) {
  .nav-primary { gap: 0.8rem; font-size: 0.88rem; }
  .nav-primary .nav-extra { display: none; }
  .today-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .footer-base { flex-direction: column; }
}
