/* CottageLedger — brand stylesheet (see 04-brand/brand-guidelines.md) */
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/Fraunces-var.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/Fraunces-Italic-var.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #FAF5EC;
  --card: #FFFDF8;
  --ink: #2B2926;
  --ink-faded: #6B675F;
  --green: #3D5A43;
  --green-hover: #334C38;
  --terracotta: #C4674A;
  --terracotta-hover: #B05A3F;
  --honey: #E8A83D;
  --sage: #8BA48F;
  --line: #E7DFCF;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.5px; }
h1 { font-size: clamp(32px, 6vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 22px; }
p  { max-width: 62ch; }
a  { color: var(--green); }
a:hover { color: var(--terracotta); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  padding: 13px 26px; border-radius: 8px; transition: background .15s ease;
}
.btn-primary { background: var(--green); color: var(--paper); }
.btn-primary:hover { background: var(--green-hover); color: var(--paper); }
.btn-cta { background: var(--terracotta); color: var(--paper); }
.btn-cta:hover { background: var(--terracotta-hover); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* cards & layout */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; box-shadow: 0 1px 2px rgba(43,41,38,.08);
}
.grid { display: grid; gap: 20px; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav img.logo { height: 40px; }
.nav .links { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav .links a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav .links a:hover { color: var(--terracotta); }
.badge { white-space: nowrap; }
@media (max-width: 680px) {
  .nav .links a:not(.btn), .nav .links .badge { display: none; }
  .nav img.logo { height: 34px; }
}

/* ledger ruling motif */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 30px, var(--line) 30px, var(--line) 31px);
}

/* tables — ruled like ledger paper */
table.ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
table.ledger th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-faded); font-weight: 600; padding: 8px 10px;
  border-bottom: 2px solid var(--line);
}
table.ledger td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.ledger td.money, table.ledger th.money { text-align: right; font-variant-numeric: tabular-nums; }
table.ledger td.neg { color: var(--terracotta); }
table.ledger td.pos { color: var(--green); }
table.ledger tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: none; }

/* labels, badges */
.eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faded); font-weight: 600;
}
.badge {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 12px;
  border-radius: 999px; background: rgba(139,164,143,.18); color: var(--green);
}
.disclaimer { font-size: 13px; color: var(--ink-faded); }

/* forms */
input[type="text"], input[type="number"], input[type="date"], select {
  font-family: var(--body); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
label { font-size: 13px; font-weight: 600; color: var(--ink-faded); display: block; margin-bottom: 4px; }

/* app tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 18px 0 24px; flex-wrap: wrap; }
.tabs button {
  font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--ink-faded);
  background: none; border: none; padding: 10px 18px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--green); border-bottom-color: var(--terracotta); }
.tabs button:hover { color: var(--terracotta); }

/* stat tiles */
.stat { padding: 18px 20px; }
.stat .num { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.5px; }
.stat .lbl { font-size: 13px; color: var(--ink-faded); margin-top: 2px; }

/* bar chart rows */
.bar-row { display: grid; grid-template-columns: 170px 1fr 110px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.bar-row .track { background: rgba(231,223,207,.6); border-radius: 6px; height: 22px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 6px; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* dropzone */
.dropzone {
  border: 2px dashed var(--sage); border-radius: 12px; padding: 44px 24px;
  text-align: center; background: rgba(139,164,143,.07); cursor: pointer;
  transition: background .15s ease;
}
.dropzone.dragover, .dropzone:hover { background: rgba(139,164,143,.16); }

/* toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 8px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 99;
}
#toast.show { opacity: 1; }

/* print — Schedule C report */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 48px; }
footer .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
footer p, footer li { font-size: 14px; color: var(--ink-faded); }
