@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #18232c;
  --muted: #667782;
  --line: #dce4e8;
  --paper: #ffffff;
  --ground: #f2f5f6;
  --accent: #087f78;
  --accent-dark: #066761;
  --soft: #eef7f6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 38px 18px 64px;
  color: var(--ink);
  background: var(--ground);
  font: 16px/1.55 'DM Sans', Arial, sans-serif;
}
.page { width: min(1320px, 100%); max-width: none; margin: 34px auto 70px; padding: clamp(14px, 2vw, 24px); border: 1px solid #cde7d5; border-radius: 18px; }
.account-save-alert { display: flex; margin-bottom: 18px; padding: 13px 16px; align-items: center; gap: 12px; border: 1px solid #bfe8d0; border-radius: 11px; background: #eefaf2; color: #246748; font-size: 13px; }
.account-save-alert > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d7f2e1; font-weight: 800; }
.account-save-alert p { flex: 1; margin: 0; }
.account-save-alert a, .account-save-result a { color: #087f78; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.account-save-result { margin: 0 0 16px; padding: 12px 15px; border: 1px solid #bfe8d0; border-radius: 10px; background: #eefaf2; color: #246748; font-size: 13px; }
.account-save-result.error { border-color: #f2c7c5; background: #fff3f2; color: #9b302c; }
.entry-signature { display: none; }
.page-header {
  position: relative;
  margin-bottom: 24px;
  padding: 64px 42px 35px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-align: center;
}
.page-header::before { position: absolute; inset: 0 0 auto; height: 7px; background: var(--accent); content: ''; }
.document-place { position: absolute; top: 22px; right: 28px; display: grid; min-width: 190px; color: var(--muted); font-size: 13px; text-align: right; }
.document-place span { min-height: 22px; border-bottom: 1px dotted #7c898f; color: var(--ink); }
.document-place small { padding-top: 3px; font-size: 11px; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: 'Manrope', 'DM Sans', Arial, sans-serif; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 39px); line-height: 1.18; letter-spacing: -.035em; text-transform: uppercase; }
.intro { max-width: 620px; margin: 14px auto 0; color: var(--muted); }
.mobile-break { display: none; }
.panel { margin: 0 0 20px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: 0 4px 15px rgb(24 35 44 / 3%); }
.panel h2 { margin: 0 0 20px; font-size: 19px; line-height: 1.35; letter-spacing: -.02em; }
.person-panel h2 { min-height: 52px; margin-bottom: 17px; }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; }
.field { display: grid; gap: 6px; min-width: 0; color: #35454e; font-size: 13px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid #cfd9de; border-radius: 8px; outline: none; background: #fff; color: var(--ink); font: 15px/1.45 'DM Sans', Arial, sans-serif; transition: border-color .15s, box-shadow .15s; }
.field input { min-height: 44px; }
.field textarea { min-height: 88px; resize: vertical; }
.panel > .field { margin-top: 2px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(8 127 120 / 12%); }
.field input::placeholder { color: #99a6ad; font-weight: 400; }
.panel > .field textarea { min-height: 136px; }
.diagram-block { margin-top: 22px; padding: 19px; border: 1px solid #e3e9ec; border-radius: 11px; background: #fbfcfc; }
.diagram-block h3 { margin: 0; font-size: 15px; }
.hint { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.vehicle-diagram { display: block; width: min(100%, 570px); height: auto; margin: 0 auto; cursor: crosshair; touch-action: manipulation; }
.vehicle-diagram .body { fill: #f6f8f9; stroke: #63727a; stroke-width: 2.3; stroke-linejoin: round; }
.vehicle-diagram .glass { fill: #e2ebed; stroke: #7e8d94; stroke-width: 1.6; }
.vehicle-diagram .detail { fill: none; stroke: #8c999f; stroke-width: 1.5; }
.vehicle-diagram .tire { fill: #43525a; stroke: #2d3940; stroke-width: 1; }
.vehicle-diagram .damage-mark { cursor: pointer; }
.vehicle-diagram .damage-mark circle { fill: #fff; fill-opacity: .9; stroke: #c23e32; stroke-width: 2.4; }
.vehicle-diagram .damage-mark path { stroke: #c23e32; stroke-width: 2.8; stroke-linecap: round; }
.signature-note { background: var(--soft); border-color: #cde7e3; }
.signature-note p { margin: -8px 0 0; color: #4d6867; }
.submit-row, .toolbar { display: flex; justify-content: center; gap: 12px; margin: 25px 0; }
.button { min-height: 46px; padding: 11px 20px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font: 700 14px 'DM Sans', Arial, sans-serif; cursor: pointer; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); background: var(--accent-dark); }
.button.secondary { border-color: var(--line); background: #fff; color: #40515a; }
.button.secondary:hover { background: #f6f8f9; }
.result-list { margin: 0; }
.result-row { display: grid; grid-template-columns: minmax(190px, 32%) 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid #edf0f2; }
.result-row:first-child { border-top: 0; }
.result-row dt, .result-row strong { color: #62717a; font-size: 13px; font-weight: 600; }
.result-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.empty { color: #9aa6ac; font-style: italic; }
.signature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 55px 15px 40px; text-align: center; }
.signature-grid div { min-height: 62px; padding-top: 44px; border-top: 1px solid #74828a; color: #53616a; font-size: 13px; }
.privacy-note { padding: 13px 16px; border-radius: 8px; background: #edf6f5; color: #496967; font-size: 13px; text-align: center; }
footer { padding: 16px; color: #87949b; font-size: 12px; text-align: center; }
.topbar { margin: -38px -18px 24px; }
.topbar-inner { padding: 0; }
body { padding: 0 18px 64px; }

@media (max-width: 760px) {
  body { padding: 14px 10px 35px; }
  .topbar { margin: -14px -10px 18px; }
  .page-header { padding: 83px 20px 26px; border-radius: 13px; }
  .page { width: 100%; margin: 18px auto 35px; padding: 12px; }
  .account-save-alert { align-items: flex-start; flex-wrap: wrap; }
  .account-save-alert p { flex: 1 1 calc(100% - 44px); }
  .account-save-alert a { margin-left: 38px; }
  .document-place { top: 17px; right: 20px; }
  .mobile-break { display: block; }
  .intro { font-size: 14px; }
  .people-grid { grid-template-columns: 1fr; gap: 0; }
  .panel { padding: 21px 18px; border-radius: 12px; }
  .person-panel h2 { min-height: 0; }
}
@media (max-width: 460px) {
  .field-grid { grid-template-columns: 1fr; }
  .submit-row, .toolbar { flex-direction: column; }
  .button { width: 100%; }
  .result-row { grid-template-columns: 1fr; gap: 3px; }
  .signature-grid { gap: 20px; margin-inline: 0; }
  .diagram-block { padding: 12px 8px; }
}
@media print {
  @page { size: A4 portrait; margin: 8mm 10mm; }
  .topbar { display: none !important; }
  html, body { width: auto; margin: 0; padding: 0; background: #fff; color: #111; font: 9pt/1.2 Arial, sans-serif; }
  .page { width: 100%; max-width: none; margin: 0; }
  .page { padding: 0; border: 0; border-radius: 0; }
  .document-place-input, .hint, .submit-row, .toolbar, .privacy-note, footer { display: none !important; }
  .page-header, .panel { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  .page-header { margin: 0 0 2mm; padding: 10mm 3mm 3mm; overflow: visible; }
  .page-header::before { display: none; }
  .page-header h1 { font: bold 15pt/1.15 Arial, sans-serif; letter-spacing: 0; }
  .document-place { top: 1mm; right: 3mm; min-width: 52mm; color: #111; font: 8pt Arial, sans-serif; }
  .document-place span { min-height: 5mm; }
  .panel { margin: 0 0 1mm; padding: 1.5mm 0; break-inside: avoid; page-break-inside: avoid; }
  .panel h2 { margin: 0 0 1mm; font: bold 10pt/1.15 Arial, sans-serif; letter-spacing: 0; }
  .people-grid { display: block; }
  .people-grid .panel { margin: 0; padding: 1mm 0; }
  .person-panel h2 { min-height: 0; margin: 0 0 .5mm; }
  .field { gap: .5mm; min-width: 0; color: #111; font: 7.5pt/1.1 Arial, sans-serif; }
  .field input, .field textarea { min-width: 0; width: 100%; margin: 0; padding: .5mm 0; border: 0; border-bottom: 1px dotted #555; border-radius: 0; outline: 0; background: transparent; color: #111; box-shadow: none; font: 8pt/1.15 Arial, sans-serif; }
  .field input { min-height: 5mm; height: 5mm; }
  .field textarea { min-height: 0; overflow: hidden; resize: none; border-bottom: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 5mm, #888 5.15mm, transparent 5.3mm); line-height: 5mm; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4mm; }
  .person-panel .field { grid-template-columns: minmax(34mm, 42%) minmax(0, 1fr); align-items: end; gap: .5mm; font-size: 6.8pt; line-height: 1; }
  .person-panel .field span { overflow: hidden; white-space: nowrap; font-size: 6.5pt; }
  .person-panel .field input { min-height: 4.7mm; height: 4.7mm; font-size: 7.5pt; }
  .circumstances-panel > .field textarea { min-height: 0; height: 32mm; }
  .damage-panel { margin-top: 0; break-before: page; page-break-before: always; break-inside: auto; page-break-inside: auto; }
  .damage-panel > .field textarea[rows="5"] { min-height: 0; height: 25mm; }
  .damage-panel > .field textarea[rows="3"] { min-height: 0; height: 15mm; }
  .diagram-block { margin: 1mm 0 0; padding: 0; border: 0; background: #fff; break-inside: avoid; page-break-inside: avoid; }
  .diagram-block h3 { margin: 0; font: bold 8pt/1.1 Arial, sans-serif; }
  .vehicle-diagram { width: auto; max-width: 88mm; max-height: 37mm; }
  .signature-grid { gap: 24mm; margin: 8mm 5mm 0; break-inside: avoid; page-break-inside: avoid; }
  .signature-grid div { min-height: 12mm; padding-top: 8mm; font: 8pt Arial, sans-serif; }
  .entry-signature { display: grid !important; }
  .result-row { padding: 1mm 0; }
  .result-row dt, .result-row strong { color: #333; font-size: 7pt; }
  .no-print { display: none !important; }
}
