* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-lg)/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.03em; margin: 0 0 var(--s3); line-height: 1.2; }
h2 { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; margin: var(--s5) 0 var(--s2); }
h3 { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--teal); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons: black fill is primary, outline is secondary */
button, .btn {
  font: 600 var(--fs-md)/1.2 var(--font);
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }
button.danger { color: var(--red); border-color: var(--red); }
button.link { border: 0; background: none; color: var(--teal-ink); padding: 0 6px; text-decoration: underline; font-weight: 500; }
button.block { width: 100%; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* Fields */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field > .money-input { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-lg); font-weight: 400; color: var(--ink); margin-bottom: 0; }
.money-sign { font-weight: 600; font-size: 1.1rem; }
input[type="text"], input[type="date"], select, textarea {
  font: 400 var(--fs-lg)/1.3 var(--font);
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="text"]:focus, input[type="date"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input[type="file"] { font: inherit; font-size: var(--fs-sm); color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  font: 600 var(--fs-md) var(--font); min-height: 44px; padding: 0 16px; margin-right: var(--s3);
  border-radius: var(--r-btn); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer;
}
.check { display: flex; align-items: center; gap: var(--s3); min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
