* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

:root {
  --bg: #ecefe6;
  --surface: #f6f2e8;
  --surface-soft: #f1ede2;
  --white: #ffffff;

  --text: #1a1d18;
  --text-strong: #10140f;
  --muted: #5f6659;
  --muted-dark: #434a3f;

  --border: #d8ddcf;
  --border-strong: #c4cbbd;

  --primary: #2f4f36;
  --primary-dark: #223a27;
  --primary-soft: #e1eee4;
  --primary-lift: #f2f8f3;

  --success-soft: #e1eee4;
  --warning-soft: #f4ead6;
  --danger-soft: #f6dfdc;

  --shadow-soft: 0 8px 22px rgba(30, 40, 25, 0.10);
  --shadow-card: 0 18px 45px rgba(30, 40, 25, 0.14);
  --shadow-hero: 0 26px 70px rgba(22, 31, 18, 0.18);

  --radius: 18px;
  --radius-lg: 24px;
  --container: 1100px;
}

/* ===== GLOBAL ===== */

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  color: var(--primary-dark);
}

.page {
  min-height: 70vh;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgba(47, 79, 54, 0.22);
}

/* ===== HEADER ===== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(236, 239, 230, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 29, 24, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.18s ease;
}

.nav a:hover {
  color: var(--primary);
}

/* ===== HERO ===== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  padding: 86px 0 72px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/images/hero-road.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(236, 239, 230, 0.90) 0%,
      rgba(236, 239, 230, 0.78) 38%,
      rgba(236, 239, 230, 0.42) 68%,
      rgba(236, 239, 230, 0.20) 100%
    ),
    linear-gradient(
      180deg,
      rgba(236, 239, 230, 0.18) 0%,
      rgba(236, 239, 230, 0.10) 56%,
      rgba(236, 239, 230, 0.70) 100%
    );
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 56px;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.hero-text {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 13px;
  border: 1px solid rgba(47, 79, 54, 0.10);
  border-radius: 999px;
  background: rgba(225, 238, 228, 0.94);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(30, 40, 25, 0.05);
}

.hero h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: clamp(2.55rem, 5vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: -0.058em;
  max-width: 720px;
}

.subtitle {
  margin: 20px 0 0;
  color: var(--text-strong);
  font-size: clamp(1.08rem, 1.4vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.subtext {
  margin: 15px 0 0;
  max-width: 590px;
  color: #343a30;
  font-size: clamp(1rem, 1.1vw, 1.06rem);
}

.subtext strong {
  color: var(--text-strong);
}

.price-note {
  margin: 20px 0 0;
  color: #30372d;
  font-size: 0.98rem;
  font-weight: 850;
}

.hero-note {
  max-width: 560px;
  margin-top: 12px;
  text-align: left;
}

/* Optional existing homepage utility styles */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-keypoints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.keypoint {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 14px rgba(30, 40, 25, 0.06);
}

.keypoint strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.95rem;
}

.keypoint span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.micro-trust {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ===== FORM CARD ===== */

.form-card {
  width: 100%;
  max-width: 450px;
  justify-self: end;
  padding: 30px;
  border: 1px solid rgba(216, 221, 207, 0.96);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04)),
    rgba(246, 242, 232, 0.95);
  box-shadow: var(--shadow-hero);
  backdrop-filter: blur(8px);
}

.form-card-header {
  margin-bottom: 24px;
}

.form-card-header h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.58rem;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.form-card-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-strong);
  font-size: 0.93rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8b9284;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 79, 54, 0.13);
}

.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px dashed #b7c2ad;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.custom-file-upload:hover {
  border-color: var(--primary);
  background: #fff;
}

.custom-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}

.custom-file-button:hover {
  background: #d6e8d9;
  transform: translateY(-1px);
}

.file-name-text {
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden-file-input {
  display: none;
}

.consent-group {
  margin-top: 14px;
  margin-bottom: 18px;
}

.consent-label {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  margin: 0 !important;
  color: var(--muted-dark);
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  line-height: 1.45;
}

.consent-label input {
  width: auto;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--primary);
}

.consent-label span {
  display: block;
}

.form-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

/* ===== BUTTONS ===== */

button,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: none;
  border-radius: 13px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button,
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(47, 79, 54, 0.24);
}

button:hover,
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(47, 79, 54, 0.28);
}

button:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(47, 79, 54, 0.22);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--primary-dark);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--primary-lift);
}

.btn-full {
  width: 100%;
}

/* ===== INFO SECTION ===== */

.section-light {
  padding: 12px 0 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.info-card h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

/* ===== GENERIC PAGE / CARD STYLES ===== */

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card h2 {
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.card h3 {
  margin: 18px 0 8px;
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.card p {
  margin-top: 0;
}

.muted-text {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== RESULT PAGE SUPPORT ===== */

.result-page {
  padding: 48px 0 70px;
}

.result-wrapper {
  width: min(100% - 32px, 1180px);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.main-column,
.side-column {
  display: grid;
  gap: 20px;
}

.side-column {
  position: sticky;
  top: 96px;
}

.result-status-card {
  border-color: rgba(47, 79, 54, 0.16);
  background:
    linear-gradient(135deg, rgba(225, 238, 228, 0.96), rgba(246, 242, 232, 0.96));
}

.status-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-value {
  color: var(--primary-dark);
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.result-subtitle {
  margin: 12px 0 0;
  color: var(--muted-dark);
  font-size: 1rem;
}

.status-meta,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.status-meta div,
.metric-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.status-meta span,
.metric-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.status-meta strong,
.metric-value {
  display: block;
  color: var(--text-strong);
  font-size: 1.02rem;
  font-weight: 850;
}

.metric-value.small {
  font-size: 0.92rem;
  line-height: 1.35;
}

.case-data-list {
  display: grid;
  gap: 10px;
}

.case-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(216, 221, 207, 0.86);
}

.case-row:last-child {
  border-bottom: 0;
}

.case-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.case-row strong {
  color: var(--text-strong);
  font-size: 0.94rem;
  line-height: 1.4;
  word-break: break-word;
}

.result-list,
.result-steps {
  margin: 12px 0 0;
  padding-left: 20px;
}

.result-list li,
.result-steps li {
  margin: 8px 0;
}

.deadline-card {
  border-left: 4px solid rgba(95, 102, 89, 0.45);
}

.deadline-ok {
  border-left-color: rgba(47, 79, 54, 0.80);
}

.deadline-warning {
  border-left-color: rgba(190, 128, 20, 0.80);
}

.deadline-expired {
  border-left-color: rgba(160, 54, 48, 0.78);
}

.legal-list {
  list-style: none;
  padding-left: 0;
}

.legal-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 221, 207, 0.75);
}

.legal-item:last-child {
  border-bottom: 0;
}

.prepared-textarea,
.prepared-text {
  width: 100%;
  min-height: 240px;
  resize: vertical;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: #e8ecdf;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--muted-dark);
  font-weight: 700;
}

.footer a:hover {
  color: var(--primary-dark);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr 410px;
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 5vw, 3.8rem);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
    top: auto;
  }
}

@media (max-width: 880px) {
  .header-inner {
    min-height: 66px;
  }

  .nav {
    gap: 14px;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding: 58px 0 58px;
    align-items: flex-start;
  }

  .hero::after {
    background:
      linear-gradient(
        180deg,
        rgba(236, 239, 230, 0.94) 0%,
        rgba(236, 239, 230, 0.78) 50%,
        rgba(236, 239, 230, 0.86) 100%
      );
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-text {
    max-width: 720px;
  }

  .hero-note {
    text-align: left;
  }

  .form-card {
    justify-self: start;
    max-width: 560px;
  }

  .info-grid,
  .hero-keypoints {
    grid-template-columns: 1fr;
  }

  .status-meta,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .container,
  .result-wrapper {
    width: min(100% - 24px, var(--container));
  }

  .header {
    position: relative;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
    padding: 14px 0;
    gap: 10px;
  }

  .nav {
    width: 100%;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    white-space: nowrap;
  }

  .hero {
    padding: 42px 0 48px;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 0.78rem;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.05rem);
    letter-spacing: -0.055em;
  }

  .subtitle {
    margin-top: 16px;
    font-size: 1.02rem;
  }

  .subtext {
    font-size: 0.97rem;
  }

  .price-note {
    font-size: 0.93rem;
  }

  .form-card {
    max-width: none;
    padding: 22px;
    border-radius: 22px;
  }

  .form-card-header h2 {
    font-size: 1.42rem;
  }

  input,
  textarea {
    font-size: 16px;
  }

  .custom-file-upload {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .custom-file-button {
    width: 100%;
  }

  .file-name-text {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .consent-label {
    font-size: 0.8rem !important;
  }

  button,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .status-meta,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .case-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card {
    padding: 20px;
    border-radius: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 22px 0;
  }
}

@media (max-width: 420px) {
  .container,
  .result-wrapper {
    width: min(100% - 20px, var(--container));
  }

  .hero h1 {
    font-size: 2.08rem;
  }

  .form-card {
    padding: 20px;
  }

  .form-note {
    font-size: 0.78rem;
  }
}