/* Marmar Halim tax document forms. Two free fonts, self-hosted:
   EB Garamond Italic for the two titles, Inter for everything else. */
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #FCFAF7;
  --card: #FFFFFF;
  --line: #E5E5E5;
  --black: #000000;
  --ink: #333333;
  --muted: #707070;
  --error: #8B1E1E;
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-synthesis: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 400; font-size: 13px; line-height: 1.6; }
h1, h2, h3, strong, b, legend, th { font-weight: 400; }

.page { max-width: 640px; margin: 0 auto; padding: 40px 16px 32px; }
.logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto 40px; }

h1 { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.25; color: var(--black); text-align: center; margin: 0 0 20px; }
.intro { max-width: 52ch; margin: 0 auto 12px; text-align: center; }
.intro + .intro { color: var(--ink); }
.legend-note { text-align: center; font-size: 12px; color: var(--muted); margin: 20px 0 28px; }

.card { background: var(--card); border: 1px solid var(--line); padding: 24px 20px; margin: 0 0 16px; }
.card h2 { font-size: 12px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > legend { display: block; font-size: 12px; line-height: 1.5; color: var(--ink); margin: 0 0 6px; padding: 0; }
.req { color: var(--black); }
.opt { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0; background: var(--card);
  color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, textarea:focus-visible, button:focus-visible, .choice input:focus-visible + span, .file input:focus-visible + .file-btn { outline: 2px solid var(--black); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--error) !important; }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); cursor: pointer; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--black); flex: none; }
.choice span { font-size: 13px; color: var(--ink); }

.file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.file-name { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; flex: 1 1 160px; }
.file-name.has { color: var(--ink); }
.file-clear { background: none; border: 0; padding: 12px 4px; min-height: 44px; font: inherit; font-size: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.error { font-size: 12px; color: var(--error); margin: 6px 0 0; }
.error:empty { display: none; }
.form-error { border: 1px solid var(--error); color: var(--error); background: var(--card); padding: 12px 16px; margin: 0 0 16px; font-size: 12px; }
.form-error:empty { display: none; }

.declaration { align-items: flex-start; border: 0; padding: 0; }
.declaration input { margin-top: 2px; }

.actions { text-align: center; margin: 28px 0 0; }
.turnstile { display: flex; justify-content: center; margin: 0 0 20px; min-height: 0; }
.submit { min-width: 220px; min-height: 44px; padding: 12px 32px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.submit:hover:not(:disabled) { background: var(--ink); color: #FFFFFF; }
.submit:disabled { color: var(--muted); border-color: var(--line); cursor: default; }
.progress { font-size: 12px; color: var(--ink); margin: 14px 0 0; min-height: 20px; }

.contact { text-align: center; font-size: 12px; margin: 32px 0 0; }
.contact a { color: var(--ink); text-underline-offset: 3px; }
footer { text-align: center; font-size: 11px; color: var(--muted); margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

.thanks { text-align: center; padding: 48px 0 24px; }
.thanks p { max-width: 44ch; margin: 0 auto; }
[hidden] { display: none !important; }

@media (min-width: 750px) {
  .page { padding: 64px 24px 40px; }
  .logo { width: 260px; margin-bottom: 56px; }
  h1 { font-size: 24px; }
  .card { padding: 32px; }
  input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea { font-size: 13px; }
}
