/* Shared styles for Writing Log's guide and legal pages (the home page has its own inline CSS). */
:root {
  --bg: #FBF7F0; --surface: #FFFFFF; --surface-alt: #F2ECE0;
  --ink: #211E2B; --ink-soft: #5A5568; --ink-faint: #9A93A8;
  --amber: #F2A03D; --violet: #6C4CE0; --sprout: #2FB170; --flame: #F2683C; --dusk: #E0648A;
  --line: rgba(33,30,43,.08);
  --shadow: 0 1px 2px rgba(33,30,43,.04), 0 12px 32px -12px rgba(33,30,43,.18);
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 var(--rounded); -webkit-font-smoothing: antialiased; }
a { color: var(--violet); }
img { max-width: 100%; display: block; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1080px; }

/* Nav */
nav.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1080px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px var(--serif); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff !important; text-decoration: none;
  font-weight: 700; padding: 10px 18px; border-radius: 999px; }
.btn-amber { background: var(--amber); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Article */
main { padding: 48px 0 24px; }
.crumbs { font-size: 14px; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { color: inherit; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); margin: 0 0 10px; }
h1 { font: 700 clamp(36px, 6vw, 54px)/1.08 var(--serif); letter-spacing: -.01em; margin: 0 0 18px; }
.lede { font-size: 21px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 28px; }
.meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 36px; }
h2 { font: 700 30px/1.2 var(--serif); margin: 48px 0 14px; }
h3 { font: 700 21px/1.3 var(--serif); margin: 30px 0 8px; }
p, li { color: var(--ink-soft); }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 24px; }
li { margin: 0 0 8px; }
strong { color: var(--ink); }
.answer { background: var(--surface); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); margin: 0 0 32px; }
.answer p:last-child { margin: 0; }
.answer strong { font-size: 19px; }

/* Tables */
.table { overflow-x: auto; margin: 8px 0 24px; border-radius: 16px; box-shadow: var(--shadow); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); background: var(--surface-alt); }
td:first-child { color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; }

/* Tip cards */
.cards { display: grid; gap: 14px; margin: 8px 0 24px; }
.card { background: var(--surface); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.card p { margin: 0; }
.card .prompt { margin-top: 10px; font: italic 500 16px/1.5 var(--serif); color: var(--ink-soft); }

/* Calculator */
.calc { background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); margin: 8px 0 32px; }
.calc .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.calc label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.calc input, .calc select { width: 100%; font: 600 18px var(--rounded); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--surface-alt); border-radius: 12px; padding: 11px 12px; }
.calc input:focus, .calc select:focus { outline: 2px solid var(--amber); border-color: transparent; }
.calc .result { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--amber) 14%, var(--surface)); }
.calc .big { font: 700 34px/1.15 var(--serif); color: var(--ink); margin: 0 0 4px; }
.calc .small { margin: 0; font-size: 16px; }
.tabs { display: inline-flex; background: var(--surface-alt); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; font: 700 15px var(--rounded); color: var(--ink-soft); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(33,30,43,.12); }

/* App call-out */
.app-cta { display: flex; gap: 18px; align-items: center; background: var(--ink); color: #fff; border-radius: 24px; padding: 24px; margin: 44px 0; }
.app-cta img { width: 72px; height: 72px; border-radius: 17px; flex: none; }
.app-cta h3 { color: #fff; margin: 0 0 4px; }
.app-cta p { color: rgba(255,255,255,.75); margin: 0 0 12px; font-size: 16px; }
@media (max-width: 520px) { .app-cta { flex-direction: column; align-items: flex-start; } }

/* Related guides */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 12px 0 40px; }
.related a { display: block; background: var(--surface); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); text-decoration: none; }
.related strong { display: block; font: 700 18px/1.3 var(--serif); margin-bottom: 4px; }
.related span { color: var(--ink-soft); font-size: 15px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-faint); margin-top: 32px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1080px; }
footer nav a { color: inherit; margin-left: 16px; }
@media (max-width: 860px) { .hide-sm { display: none; } }
@media (max-width: 640px) { footer nav a { margin: 0 16px 0 0; } }

/* App promotion block (tool pages) */
.promo { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: center; background: var(--surface);
  border-radius: 28px; padding: 32px; box-shadow: var(--shadow); margin: 40px 0; }
.promo .phone { background: var(--ink); border-radius: 38px; padding: 9px; box-shadow: 0 30px 60px -24px rgba(33,30,43,.45); }
.promo .phone img { border-radius: 30px; width: 100%; height: auto; }
.promo h2 { margin: 6px 0 10px; }
.promo ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 10px; }
.promo li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.promo li b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.promo .btn { font-size: 16px; padding: 13px 22px; }
@media (max-width: 680px) { .promo { grid-template-columns: 1fr; padding: 24px; } .promo .phone { max-width: 220px; margin: 0 auto; } }
