:root {
  color-scheme: light;
  --canvas: #f6f6ef;
  --paper: #fffefa;
  --ink: #192a22;
  --muted: #53655a;
  --line: #dce3d8;
  --green: #234335;
  --mint: #e6efdf;
  --radius: 18px;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #427651;
  outline-offset: 3px;
}
h1, h2, p, ul, dl, dd { margin: 0; }
h1 { font-size: clamp(2.15rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -.065em; font-weight: 700; }
h2 { font-size: 1.22rem; letter-spacing: -.03em; }
.container { width: min(66rem, calc(100% - 3rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .68rem; font-weight: 720; font-size: 1.13rem; letter-spacing: -.04em; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; border-radius: .54rem; background: var(--green); position: relative; display: inline-block; }
.brand-mark::before, .brand-mark span { content: ""; position: absolute; top: 50%; width: .12rem; height: .73rem; border-radius: 1rem; background: #def0d2; transform: translateY(-50%) rotate(31deg); }
.brand-mark::before { left: .52rem; }
.brand-mark span:first-child { left: .86rem; transform: translateY(-50%) rotate(-31deg); }
.brand-mark span:last-child { left: 1.21rem; }

.entry { display: grid; justify-items: center; padding-block: clamp(2.4rem, 9vw, 7rem); }
.entry-panel { width: min(100%, 30rem); padding: clamp(1.5rem, 5vw, 2.8rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.entry-panel h1 { font-size: clamp(2rem, 5vw, 3rem); }
.lede { color: var(--muted); margin-top: .75rem; }
.stack { margin-top: 1.7rem; display: grid; gap: 1rem; }
.stack > div:has(input, select) { display: grid; gap: .35rem; }
.stack > label + input { margin-top: -.65rem; }
label { font-size: .875rem; font-weight: 650; }
input:not([type=hidden]), select { width: 100%; min-height: 2.85rem; padding: .55rem .75rem; border: 1px solid #bfcbbf; border-radius: .55rem; background: var(--paper); color: var(--ink); }
input::placeholder { color: var(--muted); }
.hint, .helptext { color: var(--muted); font-size: .83rem; }
.stack > .hint { margin-top: -.65rem; }
.button { min-height: 2.85rem; padding: .6rem 1rem; border: 1px solid var(--green); border-radius: .55rem; background: var(--green); color: #fff; font-weight: 660; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.button:hover { background: #315745; }
.button:disabled { opacity: .65; cursor: wait; }
.button-quiet { min-height: 2.4rem; border-color: #bfcbbf; background: transparent; color: var(--green); }
.button-quiet:hover { background: var(--mint); }
.form-error, .errorlist { color: #9e3432; font-size: .86rem; }
.errorlist { padding-left: 1.2rem; }
.sign-out { position: relative; }
.sign-out .form-error { position: absolute; inset: auto 0 auto auto; z-index: 1; width: 13rem; padding: .6rem .75rem; background: var(--paper); border: 1px solid var(--line); border-radius: .55rem; }
.break-word { overflow-wrap: anywhere; }

.dashboard { padding-block: clamp(2rem, 6vw, 4rem); }
.overview { display: grid; grid-template-columns: 1fr minmax(14rem, 19rem); gap: 1.5rem; align-items: end; margin-bottom: 2rem; }
.section-label { color: var(--muted); font-size: .77rem; font-weight: 710; letter-spacing: .09em; text-transform: uppercase; }
.overview h1 { margin-top: .55rem; }
.balance { background: var(--mint); border: 1px solid #d3e3ce; border-radius: var(--radius); padding: 1.2rem 1.5rem; }
.balance-value { font-size: 3.5rem; line-height: 1.02; font-weight: 670; letter-spacing: -.085em; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.balance-note { color: var(--muted); font-size: .875rem; margin-top: .25rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.project-form { display: grid; margin-top: 1rem; gap: .48rem; }
.project-input { display: flex; gap: .5rem; }
.project-input input { min-width: 0; }
.rows { list-style: none; padding: 0; margin-top: 1rem; }
.rows li { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; border-top: 1px solid var(--line); padding: .74rem 0; }
.rows li:last-child { padding-bottom: 0; }
.rows strong { font-size: .9rem; font-weight: 650; }
.rows time, .credit { font-size: .81rem; color: var(--muted); white-space: nowrap; }
.activity time { display: block; margin-top: .18rem; }
.credit { color: var(--green); font-weight: 700; }
.empty { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.contact { margin-top: 1.6rem; }
.contact h2 { font-size: 1rem; }
.contact dl { display: flex; gap: .65rem; flex-wrap: wrap; color: var(--muted); font-size: .875rem; margin-top: .3rem; }

@media (max-width: 700px) {
  .container { width: calc(100% - 2rem); }
  .overview, .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .project-input { flex-direction: column; }
}
