:root {
  color-scheme: light;
  --paper: #f8f8f0;
  --ink: #203b29;
  --muted: #516550;
  --line: #dce3d3;
  --green: #436945;
  --green-dark: #305436;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: 'Aptos', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
svg { width: 1.25em; height: 1.25em; flex: 0 0 auto; }
.frame { width: min(1100px, calc(100% - 80px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 700;
  white-space: nowrap;
}
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: #e4edd8; border-radius: 50%; }
.brand-mark svg { width: 19px; height: 19px; }
.header-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .81rem; }

.dashboard { padding-top: 34px; }
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #dce4d1;
  border-radius: 26px;
  background: #e9efdd;
}
.hero-copy { align-self: center; padding: 43px 16px 43px 50px; }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0 0 19px; font-size: .72rem; font-weight: 750; letter-spacing: .15em; color: var(--green-dark); }
.eyebrow svg { width: 16px; height: 16px; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.037em; }
.hero h1 { margin: 0; font-size: clamp(2.75rem, 5.5vw, 4.8rem); line-height: .99; }
.hero h1 em { color: #466c46; }
.hero-description { max-width: 34ch; margin: 23px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.hero-art { position: relative; min-height: 100%; background: #dce8d3; }
.hero-art img { position: absolute; width: 100%; height: 100%; inset: 0; display: block; object-fit: cover; object-position: 50% 52%; }

.overview { margin-top: 33px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.28rem); line-height: 1.15; }
.currency-label { padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .13em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 17px 20px;
  background: #fdfdf8;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.stat.paid { background: #edf3e6; }
.stat.remaining { background: #dceace; border-color: #d1e0c4; }
.stat-icon { width: 41px; height: 41px; display: grid; place-items: center; background: #e9f0e1; color: var(--green-dark); border-radius: 11px; flex: 0 0 auto; }
.paid .stat-icon { background: #dceace; }
.remaining .stat-icon { background: #cadfbb; }
.stat dt { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat dd { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.55rem); line-height: 1; letter-spacing: -.04em; }
.remaining dd { font-weight: 700; }

.progress-panel { padding: 18px 21px; border: 1px solid var(--line); border-radius: 17px; background: #f1f4e9; }
.progress-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: .89rem; font-weight: 700; }
.progress-heading span { color: var(--green-dark); }
progress { display: block; width: 100%; height: 9px; appearance: none; border: 0; border-radius: 10px; background: #dce5d4; overflow: hidden; margin-top: 12px; }
progress::-webkit-progress-bar { background: #dce5d4; }
progress::-webkit-progress-value { background: #628956; border-radius: 10px; }
progress::-moz-progress-bar { background: #628956; border-radius: 10px; }
.progress-panel p { margin: 10px 0 0; color: var(--muted); font-size: .79rem; }
.site-footer { margin-top: 23px; padding: 15px 0 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.site-footer span:first-child { font-weight: 700; }

.admin-page { padding-block: 45px; }
.admin-card { max-width: 620px; margin-inline: auto; padding: clamp(22px, 6vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: #fdfdf8; }
.admin-card h1 { margin: 0 0 18px; font-size: clamp(1.85rem, 5vw, 2.6rem); line-height: 1.1; }
.admin-card .section-heading h1 { margin-bottom: 0; }
.admin-card h2 { margin: 30px 0 8px; font-size: 1.7rem; }
.admin-balance { color: var(--muted); margin: 14px 0 25px; }
.admin-balance strong { color: var(--ink); }
.admin-card form { display: grid; gap: 8px; }
.admin-card label { font-size: .9rem; font-weight: 650; }
.admin-card input:not([type='hidden']) { width: 100%; margin-bottom: 8px; min-height: 42px; border: 1px solid #aabda4; border-radius: 8px; padding: 8px 12px; color: var(--ink); background: var(--paper); font: inherit; }
button { justify-self: start; min-height: 42px; padding: 7px 15px; border-radius: 8px; border: 1px solid var(--green-dark); background: var(--green-dark); color: white; font: inherit; font-weight: 650; cursor: pointer; }
button:hover { background: #244329; }
button.secondary { background: #eef3e9; border-color: #bfceb7; color: var(--green-dark); white-space: nowrap; font-size: .8rem; }
button.secondary:hover { background: #ddebd4; }
:focus-visible { outline: 3px solid #608757; outline-offset: 3px; }
.form-error { margin: 12px 0; color: #88352b; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; }
.history small { display: block; color: var(--muted); margin-top: 3px; }
.history li > span { white-space: nowrap; }

@media (max-width: 800px) {
  .frame { width: calc(100% - 44px); }
  .hero { min-height: 310px; }
  .hero-copy { padding-left: 28px; }
  .stat { padding: 12px; gap: 9px; min-height: 88px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat-icon svg { width: 16px; height: 16px; }
}

@media (max-width: 600px) {
  .frame { width: calc(100% - 32px); }
  .header-inner { min-height: 62px; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 30px; height: 30px; }
  .header-note { font-size: .67rem; gap: 5px; }
  .dashboard { padding-top: 20px; }
  .hero { grid-template-columns: minmax(0, 1fr); border-radius: 19px; }
  .hero-copy { padding: 25px 23px; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .eyebrow { margin-bottom: 10px; }
  .hero-description { margin-top: 14px; font-size: .9rem; }
  .hero-art { min-height: 0; aspect-ratio: 1.8; }
  .overview { margin-top: 24px; }
  .stats { gap: 7px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; border-radius: 12px; padding: 10px 8px; }
  .stat dt { font-size: .68rem; }
  .stat dd { font-size: clamp(1rem, 4.5vw, 1.5rem); }
  .progress-panel { padding: 14px 12px; }
}
