.guide-byline { font-size: .85rem; color: var(--text-3, #94a3b8); margin: -16px 0 30px; }
.guide-tool { margin: 32px 0; padding: 24px; border: 1px solid rgba(212,168,83,.35); border-radius: 16px; background: #141d30; }
.article-body .guide-tool h2 { margin-top: 0; }
.guide-tool label { display: block; margin: 16px 0 6px; font-size: .95rem; font-weight: 600; }
.guide-tool input, .guide-tool textarea { width: 100%; min-width: 0; border: 1px solid #526078; border-radius: 8px; background: #0b1220; color: #f1f5f9; font: inherit; padding: 10px 12px; }
.guide-tool textarea { min-height: 140px; resize: vertical; }
.guide-tool button { margin-top: 18px; padding: 12px 18px; border: 0; border-radius: 8px; background: #d4a853; color: #15100a; font: inherit; font-weight: 700; cursor: pointer; }
.guide-tool :focus-visible { outline: 3px solid #e8c374; outline-offset: 3px; }
.guide-tool output { display: block; margin-top: 20px; white-space: pre-line; font-variant-numeric: tabular-nums; }
.guide-tool .tool-note { font-size: .85rem; margin: 12px 0 0; color: #c3cdda; }
.guide-tool .tool-error { color: #fda4af; }
.guide-example { margin: 26px 0; padding: 22px; border-left: 3px solid #d4a853; background: #141d30; }
.guide-example table { table-layout: fixed; }
.guide-example th { text-align: left; }
@media (max-width: 400px) { .guide-tool { padding: 16px; } }

/* Current app captures shared by guides and the public/in-app manual. */
.app-screenshot{margin:28px auto;max-width:430px}.app-screenshot img{display:block;width:100%;height:auto;border:1px solid #334155;border-radius:18px}.app-screenshot figcaption{margin-top:12px;color:#94a3b8;font-size:13px;line-height:1.6;text-align:center}

/* Public tools use the existing DivIt type, navy surfaces and gold accent. */
.resource-page { color-scheme: dark; }
html:has(.resource-page) { scroll-behavior: auto; }
.resource-page .article { max-width: 1080px; margin: 0 auto; padding: 40px 24px 90px; }
.resource-page .article > h1 { max-width: 800px; font-size: clamp(2rem,4vw,2.8rem); }
.resource-page .standfirst { max-width: 65ch; margin-bottom: 24px; }
.resource-page .guide-byline { margin: 0 0 24px; }
.resource-page .article-body > :not(.guide-tool) { max-width: 740px; }
.resource-page .article-body > .app-screenshot { max-width: 360px; margin-left: 0; }
.resource-page .breadcrumb { color: var(--text-3); }
.resource-page h2[id], .resource-page #calculator { scroll-margin-top: 86px; }
.resource-page a:focus-visible, .resource-page summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.guide-jumps { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 28px; font-size: .95rem; }
.resource-page .guide-tool { padding: 28px; margin: 24px 0 48px; background: var(--surface); border-color: var(--border-strong); }
.resource-page .guide-tool h2 { font-size: 1.6rem; margin: 0 0 8px; }
.resource-page .guide-tool h3 { font-size: 1.12rem; color: var(--text); margin: 0 0 16px; }
.resource-page .guide-tool p { margin-bottom: 16px; }
.tool-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.8fr); gap: 28px; align-items: start; }
.tool-layout > *, .tool-result, .tool-person, .tool-item-fields > *, .tool-payment > * { min-width: 0; }
.guide-tool .tool-result { position: sticky; top: 86px; padding: 22px; background: var(--bg); border-radius: 12px; border: 1px solid var(--border-strong); }
.guide-tool fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 24px; }
.guide-tool legend { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.guide-tool label { margin: 0; font-size: .85rem; color: var(--text-2); }
.guide-tool label > span { overflow-wrap: anywhere; }
.guide-tool input, .guide-tool select, .guide-tool textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--text-3); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; min-height: 44px; }
.guide-tool .tool-person { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; margin-bottom: 10px; }
.guide-tool button { margin: 12px 0 0; min-height: 44px; padding: 10px 14px; font-size: .88rem; }
.guide-tool button:disabled { opacity: .5; cursor: not-allowed; }
.guide-tool .tool-secondary { background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); }
.guide-tool .tool-person button { margin: 0; }
.guide-tool .tool-item { padding: 16px; margin: 18px 0; border: 1px solid var(--border-strong); border-radius: 12px; }
.guide-tool .tool-item legend { font-size: .88rem; padding: 0 6px; margin-bottom: 0; }
.tool-item-fields { display: grid; grid-template-columns: minmax(0,1fr) 100px; gap: 12px; }
.tool-item-fields label:nth-child(3) { grid-column: 1 / -1; }
.guide-tool .tool-shares { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.guide-tool .tool-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; min-height: 44px; overflow-wrap: anywhere; }
.guide-tool .tool-chip:has(:checked) { border-color: var(--accent); color: var(--text); background: rgba(212,168,83,.12); }
.guide-tool .tool-chip input { min-height: 0; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
.guide-tool summary { cursor: pointer; color: var(--accent); font-size: .9rem; padding: 12px 0; }
.tool-weight-fields, .tool-adjustments { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.tool-payment { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 14px 0 20px; }
.guide-tool .tool-note { color: var(--text-3); font-size: .85rem; line-height: 1.65; margin-top: 12px; }
.guide-tool .tool-error { color: #fda4af; }
.guide-tool .tool-transfers { list-style: none; margin: 0; padding: 0; }
.guide-tool .tool-transfers li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; margin: 0; }
.tool-transfers span { overflow-wrap: anywhere; }
.tool-transfers strong { white-space: nowrap; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.guide-tool .tool-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border-strong); padding-top: 16px; margin: 18px 0 0; }
.tool-total strong { color: var(--accent); font-size: 1.35rem; }
.tool-table-wrap { max-width: 100%; overflow-x: auto; }
.resource-page table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; font-size: .9rem; }
.resource-page th, .resource-page td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.resource-page th { color: var(--text); }
.resource-page caption { text-align: left; font-size: .82rem; color: var(--text-3); margin: 8px 0; }
.guide-tool table { font-size: .8rem; }
.guide-tool td { white-space: nowrap; }
.guide-tool th[scope=row] { overflow-wrap: anywhere; min-width: 70px; }
.guide-tool [data-status] { font-size: .85rem; min-height: 1.6em; margin: 12px 0 0; color: var(--text-2); }
.guide-tool [data-copy] { width: 100%; }
.guide-tool .tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 16px 0; }
.guide-tool .tool-actions label { max-width: 200px; }
.resource-page .tool-result-link { display: inline-block; margin: 0 0 18px; font-size: .9rem; }
.resource-page #results { scroll-margin-top: 86px; }
.guide-tool .tool-people { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.guide-tool .tool-people legend { grid-column: 1 / -1; }
.guide-tool .tool-person { display: block; margin: 0; }
.guide-tool .tool-person button { min-height: 32px; padding: 4px 0; border: 0; font-size: .78rem; color: var(--text-3); }
.guide-tool .tool-people > button { justify-self: start; }
.guide-tool .tool-items > label { margin-bottom: 12px; }
.resource-page .guide-example { background: var(--surface); }
.resource-page .guide-example h2 { margin-top: 0; }
.resource-page .guide-example p:last-child { margin-bottom: 0; }
.resource-page .guide-example table { table-layout: auto; }
.resource-page .app-note { margin: 32px 0; border-top: 1px solid var(--border); padding-top: 20px; font-size: .95rem; }
.resource-page .reading-list { list-style: none; padding: 0; }
.resource-page .reading-list li { padding: 18px 0; }
.resource-page .reading-list a { font-weight: 700; font-size: 1.1rem; }
.resource-page .reading-list p { margin: 4px 0 0; font-size: .95rem; color: var(--text-3); }
.resource-page .article-feature { margin: 40px 0; padding: 24px 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.resource-page .article-feature p { max-width: 65ch; margin: 12px 0; }
.resource-page #split-comparison td { color: var(--text-2); font-weight: 500; }
.resource-page #split-comparison tr:last-child td { color: var(--accent); font-weight: 700; }
.resource-page .tool-feature { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.7fr); gap: 32px; padding: 28px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); margin: 28px 0; }
.resource-page .tool-feature h2 { margin: 0 0 12px; }
.resource-page .sample-receipt { margin: 0; padding: 18px; background: var(--bg); border-radius: 10px; }
.resource-page .sample-receipt strong { display: block; font-size: 1.8rem; color: var(--accent); }
.resource-page .sample-receipt p { margin: 4px 0 0; font-size: .88rem; }
.resource-page .resource-intro { max-width: 680px; }
.resource-page .resource-intro h1 { font-size: clamp(2rem,4vw,2.8rem); line-height: 1.15; margin: 0 0 18px; }
.resource-page .resource-intro .eyebrow { color: var(--accent); font-size: .8rem; font-weight: 700; margin-bottom: 12px; }
.resource-page .resource-intro .standfirst { color: var(--text-3); font-size: 1.1rem; }
.resource-page .tool-link { display: inline-block; background: var(--accent); color: #1a1305; border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 700; margin-top: 8px; }
@media(max-width:760px) {
  .tool-layout, .resource-page .tool-feature { grid-template-columns: minmax(0,1fr); }
  .guide-tool .tool-result { position: static; }
  .resource-page .article { padding: 28px 16px 60px; }
  .resource-page .guide-tool { padding: 18px 14px; }
  .resource-page .tool-feature { padding: 22px; gap: 20px; }
  .resource-page .standfirst { font-size: 1.05rem; }
}
@media(prefers-reduced-motion:reduce) { .resource-page { scroll-behavior: auto; } html:has(.resource-page) { scroll-behavior: auto; } }
@media(prefers-color-scheme:light) {
  .resource-page { color-scheme: light; --bg:#f6f7fa; --bg-2:#eef0f5; --surface:#fcfcfd; --surface-2:#edf0f5; --border:#dce1e9; --border-strong:#c4ccd8; --text:#172238; --text-2:#37455a; --text-3:#526079; --text-4:#526079; --accent:#805900; --accent-bright:#614400; }
  .resource-page header.nav { background: rgba(246,247,250,.95); }
  .resource-page .nav-cta, .resource-page .tool-link, .resource-page .guide-tool button:not(.tool-secondary) { background:#d4a853; color:#1a1305; }
  .resource-page .guide-tool .tool-error { color:#a41536; }
}
