/* Fonts are served by the application; see the bundled OFL licenses. */
@font-face { font-family: "Manrope"; src: url("/assets/Manrope-07c3f1b0.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/DMSans-bda18895.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }

/* Shared foundation */
:root {
  --ink: #192b26; --muted: #596b61; --paper: #f6f8f3; --white: #fff;
  --line: #dbe3d8; --green: #246443; --green-dark: #174c31; --lime: #d6edb2;
  --success-bg: #edf5e6; --warning-bg: #fff3de; --danger: #9b3525; --danger-bg: #fff0e9;
  --radius: 14px; --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 "DM Sans", system-ui, sans-serif; }
a { color: var(--green); text-underline-offset: 4px; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, .wordmark { font-family: "Manrope", system-ui, sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.15; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; line-height: 1.35; margin: 0 0 1rem; }
h3 { font-size: 1.08rem; margin: 0 0 .65rem; }
h4 { margin: 1rem 0 .5rem; }
p { margin: .4rem 0 1rem; overflow-wrap: anywhere; }
small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 4px; }
[hidden] { display: none !important; }

/* Application shells and navigation */
.site-header { max-width: 1240px; margin: auto; padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 26px; font-weight: 700; text-decoration: none; color: var(--ink); min-height: 44px; }
.wordmark img { width: 216px; height: 48px; }
.wordmark-small { font-size: 19px; }
.wordmark-small img { width: 162px; height: 36px; }
nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 14px; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
nav form { margin: 0; }
.container { max-width: 1168px; margin: 40px auto; padding: 0 24px; min-height: 68vh; }
.site-footer { border-top: 1px solid var(--line); padding: 28px; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1240px; margin: auto; }
.site-footer p { margin: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(1.75rem, 3vw, 2.2rem); }
.breadcrumbs { margin-bottom: 20px; font-size: 14px; }
.tabs { border-bottom: 1px solid var(--line); margin: 24px 0; gap: 8px; padding-bottom: 8px; }
.tabs a { padding: 8px 14px; border-radius: 8px; }
.tabs a[aria-current="page"] { background: var(--green); color: white; text-decoration: none; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 10px; top: 10px; background: white; padding: 10px; z-index: 10; }

/* Shared components */
.eyebrow { color: var(--green); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.muted { color: var(--muted); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
.button, button, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; border: 1px solid var(--green); background: var(--green); color: white; border-radius: 9px; padding: 10px 18px; text-decoration: none; font-weight: 600; white-space: normal; max-width: 100%; text-align: center; }
.button-secondary { background: var(--white); color: var(--green); }
button.button-quiet { border: 0; background: none; color: var(--green); padding: 8px 4px; font-size: 14px; }
.button:hover, button:hover, input[type="submit"]:hover { background: var(--green-dark); color: white; }
button:disabled, input[type="submit"]:disabled { cursor: wait; opacity: .7; }
.card { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; min-width: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.card-link:hover { border-color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid .card, .grid-two .card { margin: 0; }
.home-features, .project-summary { margin-bottom: 20px; }
.badge { display: inline-block; background: var(--success-bg); color: var(--green-dark); border-radius: 20px; padding: 4px 11px; font-size: 13px; font-weight: 600; }
.badge-private { background: var(--warning-bg); color: #735020; }
.metric { font-family: "Manrope", system-ui, sans-serif; font-size: 26px; font-weight: 700; margin: 12px 0 0; }
.flash { border: 1px solid #adc99c; background: var(--success-bg); padding: 16px 20px; border-radius: 10px; margin-bottom: 24px; overflow-wrap: anywhere; }
.flash-alert { background: var(--danger-bg); border-color: #d58c76; }
.empty { padding: 32px; text-align: center; border: 1px dashed #a8b9a2; border-radius: var(--radius); margin: 20px 0; }
.attention-card { border-left: 4px solid var(--green); }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.summary-list li:first-child { border-top: 0; padding-top: 0; }
.summary-list p:last-child { margin-bottom: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

/* Forms and feedback */
.form-card { max-width: 720px; margin: auto; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 20px 0 8px; margin: 20px 0 0; min-width: 0; }
legend { font-family: "Manrope", system-ui, sans-serif; font-size: 1.1rem; font-weight: 700; padding-right: 12px; }
label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 14px; }
input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 11px 13px; border: 1px solid #829487; border-radius: 8px; background: white; color: var(--ink); }
textarea { min-height: 105px; resize: vertical; }
form .actions { margin-top: 24px; }
.field-hint { font-size: 14px; color: var(--muted); margin-top: 5px; }
.field-error { color: var(--danger); font-size: 14px; }
.field_with_errors input, .field_with_errors textarea, .field_with_errors select, [aria-invalid="true"] { border-color: var(--danger); }
.check-label { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; min-height: 44px; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 4px 0; flex-shrink: 0; accent-color: var(--green); }
.review-confirmation { border-top: 3px solid var(--green); margin-top: 24px; }

/* Agreements, invoices, and project records */
.document { max-width: 850px; margin: 0 auto 24px; padding: 40px; }
.document-header { border-bottom: 2px solid var(--green); padding-bottom: 24px; margin-bottom: 30px; }
.document-brand { margin-bottom: 24px; }
.document-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.document-item { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.record-meta { color: var(--muted); font-size: 14px; }

/* Public product preview */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 32px 0 64px; }
.hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); }
.hero-description { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero-panel { background: #e7edde; border-radius: 24px; padding: 24px; min-width: 0; }
.hero-panel .card { margin-bottom: 0; }
.preview-header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; }
.preview-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview-facts dt { font-size: 13px; color: var(--muted); }
.preview-facts dd { margin: 4px 0 0; font-weight: 700; }
.preview-action { background: var(--success-bg); padding: 16px; border-radius: 10px; margin-top: 24px; }
.preview-action p:last-child { margin: 0; }
.preview-caption { font-size: 13px; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* Responsive and alternate output */
@media (max-width: 900px) { .hero { gap: 24px; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .site-header { padding: 16px 20px; flex-wrap: wrap; gap: 8px; }
  nav { gap: 12px; } .container { margin-top: 24px; padding: 0 20px; }
  .grid, .grid-two, .hero { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding: 8px 0 32px; }
  .hero-panel { padding: 16px; } .card { padding: 20px; }
  .page-heading { flex-direction: column; gap: 12px; }
  .document { padding: 20px; } .tabs { gap: 4px; }
  .tabs a { padding: 8px 10px; }
  .site-footer { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .actions, .tabs, .flash, .no-print, .skip-link { display: none !important; }
  body { background: white; color: #000; font-size: 11pt; }
  .container { margin: 0; padding: 0; } .document { border: 0; padding: 0; max-width: none; }
  .document-header, .document-brand { break-inside: avoid; }
  a { color: #000; } h2, h3 { break-after: avoid; }
}
