/*
Theme Name: Loanus Fieldnotes
Description: Editorial theme for Loanus budgeting tools and practical guides.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: loanus-fieldnotes
License: GNU General Public License v2 or later
*/

:root {
    --ink: #162536;
    --muted: #435467;
    --paper: #f9f6ec;
    --white: #fffdf6;
    --navy: #172f46;
    --mint: #cfe7d2;
    --line: #cbd1c7;
    --accent: #9c3d2c;
    --serif: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #ad4b2b; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.top, .bottom { border-block: 1px solid var(--line); }
.top-inner, .bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1rem; }
.top nav ul { display: flex; flex-wrap: wrap; gap: .45rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.top nav a { font-size: .95rem; }
.top nav a[aria-current] { color: var(--accent); font-weight: 650; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 2.75rem; height: 2.75rem; object-fit: contain; }
.brand-name { font: 760 1.42rem/1 system-ui, sans-serif; letter-spacing: -.045em; }
.skip-link { position: absolute; z-index: 3; left: 1rem; top: 1rem; padding: .6rem 1rem; background: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-main { min-height: 65vh; margin-block: clamp(2.4rem, 7vw, 6rem); }
.entry + .entry { margin-top: 3rem; }
.entry > :is(p, ul, ol, h2, h3, figure) { max-width: 43rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.07; letter-spacing: -.04em; }
h1 { font-size: clamp(3rem, 8vw, 6.6rem); margin: 0 0 1.35rem; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 2rem 0 .6rem; }
h3 { font-size: 1.55rem; margin: 1.1rem 0 .4rem; }
p { margin: 0 0 1.1rem; }
.bottom p, .bottom small { margin: 0; color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr); align-items: center; gap: clamp(1.75rem, 6vw, 5rem); padding: clamp(1.55rem, 6vw, 5rem); border-radius: 1.4rem; color: var(--white); background: var(--navy); }
.hero h1 { font-size: clamp(2.8rem, 6.25vw, 5.85rem); }
.hero p { color: #e5eee7; max-width: 35ch; }
.hero .action { display: inline-block; margin-top: .55rem; padding: .66rem 1.05rem; border-radius: .4rem; background: var(--mint); color: var(--ink); font-weight: 650; }
.hero .action:hover { background: white; }
.ledger { margin: 0; padding: clamp(1.15rem, 3vw, 2rem); background: var(--mint); border-radius: .85rem; color: var(--ink); }
.ledger figcaption { margin-bottom: 1rem; font: 1.7rem/1.1 var(--serif); letter-spacing: -.02em; }
.ledger dl { margin: 0; }
.ledger dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .6rem; border-bottom: 1px solid #aebfb0; }
.ledger dl > div:last-child { border: 0; font-weight: 700; }
.ledger dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-top: 1.4rem; }
.guide-card { min-width: 0; padding: 1.35rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--white); }
.guide-card h3 { margin-top: 0; }
.guide-card p { color: var(--muted); margin: .55rem 0 0; }
.entry .lede { max-width: 40rem; font-size: 1.2rem; color: var(--muted); }
.entry ul li + li, .entry ol li + li { margin-top: .5rem; }
.entry .ledger { max-width: 40rem; margin-block: 1.5rem; }

.worksheet { max-width: 43rem; margin-block: 1.8rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.worksheet fieldset { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.worksheet legend { margin-bottom: .8rem; padding: 0; font: 1.65rem var(--serif); }
.worksheet label { display: grid; gap: .35rem; font-size: .95rem; }
.worksheet input { width: 100%; min-width: 0; border: 1px solid #8a9a9f; border-radius: .35rem; background: white; color: var(--ink); padding: .55rem; font: inherit; }
.worksheet output { display: block; min-height: 2.7rem; margin: 1rem 0; padding: .5rem .7rem; background: var(--mint); border-radius: .35rem; font-weight: 650; }
.worksheet button { font: inherit; color: var(--ink); background: transparent; padding: .3rem .6rem; border: 1px solid #8a9a9f; border-radius: .35rem; cursor: pointer; }

.entry .loanus-el-hero { background: var(--navy); color: var(--white); }
.loanus-el-hero .elementor-heading-title { color: var(--white); font: 400 clamp(2.8rem, 6.25vw, 5.85rem)/1.07 var(--serif); letter-spacing: -.04em; }
.loanus-el-hero .elementor-widget-text-editor { color: #e5eee7; }
.loanus-el-hero .elementor-button { background: var(--mint); color: var(--ink); font-weight: 650; }
.loanus-el-hero .elementor-button:hover { background: white; color: var(--ink); }
.loanus-el-guide .elementor-heading-title { font-family: var(--serif); font-weight: 400; }
.loanus-el-text .elementor-widget-text-editor { max-width: 43rem; }
.loanus-el-text .elementor-widget-heading .elementor-heading-title { font-family: var(--serif); font-weight: 400; }

@media (max-width: 46rem) {
    .hero, .card-grid { grid-template-columns: 1fr; }
    .top-inner { align-items: flex-start; }
}

@media (max-width: 29rem) {
    .wrap { width: calc(100% - 1.5rem); }
    .worksheet fieldset { grid-template-columns: 1fr; }
}
