/*
Theme Name: True Life Costs
Description: A lightweight English-language editorial theme for household buying guides and cost comparisons.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: true-life-costs
*/

:root {
    color-scheme: light;
    --ink: #192927;
    --quiet: #4d6058;
    --paper: #f8f5ee;
    --white: #fffdf8;
    --line: #d6dcd2;
    --moss: #233d32;
    --lime: #dff2ad;
    --accent: #225540;
    --serif: Georgia, Cambria, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid #487048; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.frame { width: min(100% - 3.5rem, 76rem); margin-inline: auto; }
.skip-link { position: fixed; top: .5rem; left: .5rem; padding: .5rem .8rem; z-index: 3; background: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem 2rem; min-height: 4.6rem; padding-block: .85rem; }
.wordmark { display: inline-flex; gap: .62rem; align-items: center; color: var(--ink); white-space: nowrap; text-decoration: none; font: bold 1.38rem/1 var(--serif); }
.wordmark-symbol { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--moss); color: var(--lime); font-size: 1.2rem; }
.site-header ul, .site-footer ul { display: flex; gap: .65rem 1.4rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.site-header nav a { text-decoration: none; font-size: .86rem; color: var(--ink); font-weight: 650; }
.site-header nav a:hover, .site-header .current-menu-item a { text-decoration: underline; }
.cover { background: var(--moss); color: var(--white); border-bottom: 5px solid var(--lime); }
.cover-inner { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: clamp(3.2rem, 8vw, 7.6rem); }
.cover h1 { margin: 0; font: normal clamp(3rem, 6.7vw, 6.8rem)/.98 var(--serif); letter-spacing: -.05em; }
.cover p { max-width: 34rem; font-size: clamp(1rem, 1.8vw, 1.25rem); color: #e0e9dc; margin: 1.5rem 0; }
.cover a { color: var(--lime); }
.cover-cta { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; border-bottom: 1px solid var(--lime); padding-bottom: .3rem; font-weight: 650; }
.cover-note { position: relative; border: 1px solid #849481; border-radius: .4rem; padding: clamp(1.4rem, 3.8vw, 3.3rem); }
.cover-note h2 { font: 1.9rem/1.15 var(--serif); margin: .7rem 0; }
.cover-note p { margin: .75rem 0 1.2rem; font-size: 1rem; }
.notation { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--lime); color: var(--moss); font: bold 1.45rem/1 var(--serif); }
.article-directory { padding-block: clamp(2.5rem, 5.5vw, 5rem) clamp(3rem, 7vw, 6rem); }
.directory-title { font: normal clamp(2.4rem, 4.4vw, 4rem)/1.05 var(--serif); letter-spacing: -.035em; margin: 0 0 1.5rem; }
.story-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-card { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--line); border-top: 3px solid #789477; background: var(--white); border-radius: .25rem; min-width: 0; }
.topic-tag { align-self: flex-start; display: inline-block; color: var(--accent); font-size: .78rem; font-weight: 700; text-decoration: none; }
.story-card h2 { font: 1.56rem/1.17 var(--serif); letter-spacing: -.022em; margin: .7rem 0; }
.story-card h2 a { text-decoration: none; color: var(--ink); }
.story-card h2 a:hover { text-decoration: underline; }
.story-card p { font-size: .94rem; margin: 0 0 1.15rem; color: var(--quiet); }
.read-link { margin-top: auto; align-self: flex-start; font-size: .85rem; font-weight: 680; }
.reading-frame { padding-block: clamp(2.5rem, 6vw, 5rem); }
.reading-article { max-width: 48rem; margin-inline: auto; }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 1.45rem; margin-bottom: 2rem; }
.article-topic { color: var(--accent); font-weight: 680; margin-bottom: .75rem; }
.article-header h1 { font: normal clamp(2.52rem, 6vw, 4.8rem)/1.05 var(--serif); letter-spacing: -.043em; margin: 0 0 .75rem; }
.standfirst { font-size: 1.14rem; margin: .6rem 0; color: var(--quiet); }
.byline { font-size: .85rem; color: var(--quiet); margin: 1rem 0 0; }
.article-body { font-size: 1.06rem; line-height: 1.72; overflow-wrap: anywhere; }
.article-body h2, .article-body h3 { font-family: var(--serif); line-height: 1.2; margin-top: 1.6em; letter-spacing: -.02em; }
.article-body h2 { font-size: 1.95rem; }
.article-body h3 { font-size: 1.35rem; }
.table-scroll { overflow: auto; margin-block: 1.35rem; }
.article-body table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .89rem; line-height: 1.42; text-align: left; }
.article-body th, .article-body td { padding: .7rem; border: 1px solid var(--line); vertical-align: top; }
.article-body th { background: #e9eee3; }
.article-body td { background: var(--white); }
.site-footer { background: #e9eee4; border-top: 1px solid var(--line); padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.2rem 2rem; }
.footer-title { color: var(--ink); font: bold 1.4rem/1 var(--serif); text-decoration: none; }
.site-footer p { margin: .35rem 0 0; color: var(--quiet); font-size: .86rem; }
.site-footer nav a, .cookie-open { color: var(--ink); font-size: .86rem; }
.cookie-open { margin-top: .55rem; appearance: none; padding: 0; background: none; border: none; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
dialog { width: min(28rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: .4rem; padding: 1.4rem; background: var(--white); color: var(--ink); }
dialog::backdrop { background: rgb(25 41 39 / 28%); }
dialog h2 { margin: 0; font: 1.55rem var(--serif); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .75rem; }
.dialog-actions button { background: var(--white); color: var(--ink); border: 1px solid var(--accent); border-radius: .22rem; padding: .5rem .75rem; cursor: pointer; font: inherit; font-size: .9rem; }
.dialog-actions button:hover { background: #e9eee3; }
@media (max-width: 55rem) { .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 39rem) {
    .frame { width: calc(100% - 2rem); }
    .header-inner { align-items: flex-start; flex-direction: column; gap: .8rem; }
    .site-header ul { gap: .4rem .85rem; }
    .story-grid, .cover-inner { grid-template-columns: minmax(0, 1fr); }
    .cover-inner { gap: 1.65rem; }
    .cover-note { padding: 1.15rem; }
    .article-body { font-size: 1rem; }
}
