/* 109 E Circle Drive — remodel journal */
:root {
  --paper: #f6f2ea; --card: #fffdf9; --ink: #26231f; --muted: #756e63; --line: #e2dacb;
  --accent: #2f5d50; --accent-ink: #fff; --warm: #b8672e; --bad: #a3352b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
body.noscroll { overflow: hidden; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: 1.35rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-num { font: 600 1.15rem var(--serif); background: var(--accent); color: var(--accent-ink); padding: 6px 9px; border-radius: 4px; letter-spacing: .03em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.05rem; }
.brand-text em { font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a, nav .linkish { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: .95rem; }
nav a:hover, nav .linkish:hover { background: var(--paper); }
nav a.on { background: var(--paper); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; font: inherit; color: var(--accent); cursor: pointer; padding: 0; }
.linkish.danger { color: var(--bad); }

.hero { padding: 44px 0 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; color: var(--warm); font-weight: 600; margin: 0 0 8px; }
.hero h1 { margin-bottom: .2em; }
.hero-meta { color: var(--muted); margin: 0 0 18px; }
.total { font-variant-numeric: tabular-nums; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin-bottom: 20px; }
.card.narrow { max-width: 460px; margin: 48px auto; }
.card.empty { text-align: center; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.form-card { border-top: 3px solid var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col .card { margin-bottom: 0; }
.two-col { margin-bottom: 20px; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 7px; padding: 10px 18px; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
label small { display: block; font-weight: 400; color: var(--muted); }
.field-label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #cfc6b4; border-radius: 7px;
  background: #fff; color: var(--ink); font: 400 1rem var(--sans); }
textarea { resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row label { flex: 1 1 150px; }
.row .grow { flex: 2 1 220px; }
.row .grow2 { flex: 3 1 260px; }
.actions { display: flex; align-items: center; gap: 18px; margin-top: 6px; }
.danger-zone { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
.flash { background: #e6f0ea; border: 1px solid #bcd6c8; color: #1f4a3d; padding: 10px 14px; border-radius: 7px; margin: 18px 0; }
.flash.bad, .progress.bad { background: #f8e7e3; border-color: #e5bfb8; color: var(--bad); }
.progress { padding: 8px 12px; border-radius: 7px; background: #efe9dc; border: 1px solid var(--line); }

.drop { border: 2px dashed #cfc6b4; border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; background: #fbf8f1; font-weight: 400; }
.drop strong { display: block; font-size: 1rem; color: var(--accent); }
.drop span { color: var(--muted); font-size: .88rem; }
.drop.small { padding: 14px; }
.drop.over, .drop:hover { border-color: var(--accent); background: #f1f5f1; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.thumbs figure { position: relative; margin: 0; width: 104px; height: 104px; border-radius: 8px; overflow: hidden; background: #e9e2d3; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20,18,15,.75); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }

/* timeline */
.timeline { position: relative; }
.entry { display: grid; grid-template-columns: 84px 1fr; gap: 18px; scroll-margin-top: 80px; }
.entry-date { text-align: right; padding-top: 18px; position: relative; }
.entry-date::after { content: ""; position: absolute; right: -10px; top: 0; bottom: -20px; width: 1px; background: var(--line); }
.entry-date::before { content: ""; position: absolute; right: -14px; top: 30px; width: 9px; height: 9px; border-radius: 50%; background: var(--warm); z-index: 1; }
.d-day { display: block; font: 600 1.9rem/1 var(--serif); }
.d-mon { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 3px; }
.entry-body h2 { font-size: 1.5rem; }
.notes { margin: 0 0 14px; max-width: 68ch; }
.entry-admin { margin: 12px 0 0; font-size: .9rem; }
.grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.n1 { grid-template-columns: 1fr; }
.grid.n2 { grid-template-columns: 1fr 1fr; }
.shot { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #e9e2d3; }
.grid.n1 .shot { aspect-ratio: 16 / 10; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.shot:hover img { transform: scale(1.03); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 30px; }

/* costs */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; vertical-align: top; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars th, .plain th { font-weight: 500; }
.bars tr + tr td, .bars tr + tr th, .plain tr + tr td, .plain tr + tr th { border-top: 1px solid var(--line); }
.bar-cell { width: 34%; vertical-align: middle; }
.bar { display: block; height: 10px; border-radius: 5px; background: var(--accent); min-width: 3px; }
.table-scroll { overflow-x: auto; }
.ledger { min-width: 620px; font-size: .95rem; }
.ledger thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 2px solid var(--line); }
.ledger tbody td { border-bottom: 1px solid var(--line); }
.ledger tfoot th { padding-top: 14px; font-size: 1.05rem; }
.tag { display: inline-block; background: #efe9dc; border-radius: 99px; padding: 1px 10px; font-size: .82rem; white-space: nowrap; }
.receipt { font-size: .82rem; margin-left: 6px; white-space: nowrap; }

.foot { padding: 30px 20px 40px; color: var(--muted); font-size: .85rem; text-align: center; }

.lightbox { position: fixed; inset: 0; background: rgba(18,16,13,.93); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 4px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 26px; line-height: 1; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #d8d2c6; font-size: .9rem; }

@media (max-width: 680px) {
  .two-col { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; gap: 6px; }
  .entry-date { text-align: left; padding-top: 0; display: flex; align-items: baseline; gap: 8px; }
  .entry-date::before, .entry-date::after { display: none; }
  .d-day { font-size: 1.3rem; }
  .card { padding: 16px; }
  .hero { padding: 28px 0 16px; }
  .bar-cell { display: none; }
}
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } }
