:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #1d232a;
  background: #f3f5f7;
  color-scheme: light;
}

html {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: #f3f5f7;
}

img, svg, video, canvas {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1008px;
  margin: 0 auto;
  padding: 32px 14px 64px;
}

.hero {
  width: 100%;
  background: #fff;
  padding: 28px;
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}

.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; margin: 0 0 8px; }
h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 7vw, 3rem); line-height: 1.08; overflow-wrap: anywhere; }
h2 { margin-top: 0; line-height: 1.2; overflow-wrap: anywhere; }

form,
.card {
  width: 100%;
  max-width: 100%;
}

.card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  margin: 16px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  overflow: hidden;
}

label { display: block; font-weight: 650; margin: 16px 0 7px; }
input, textarea, select {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid #bcc4cc;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(35,99,235,.18); border-color: #2363eb; }

.article-group { width: 100%; margin-top: 22px; }
.article-group > h3 { border-bottom: 1px solid #e5e8eb; padding-bottom: 8px; }
.article-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 14px;
}
.article-card {
  width: 100%;
  max-width: 100%;
  border: 2px solid #d8dde3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  color: #1d232a;
  cursor: pointer;
  transition: .15s ease;
}
.article-card:hover { transform: translateY(-2px); }
.article-card.selected { border-color: #2363eb; box-shadow: 0 0 0 3px rgba(35,99,235,.14); }
.article-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e8ebef;
}
.article-card .body { padding: 12px; text-align: center; }
.article-card strong { display: block; overflow-wrap: anywhere; }
.article-card span { color: #606b76; font-size: .9rem; }

.criterion { border-top: 1px solid #e5e8eb; padding: 20px 0; }
.criterion:first-child { border-top: 0; }
.rating-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.rating-row label { margin: 0; }
.rating-row input { position: absolute; opacity: 0; pointer-events: none; }
.rating-row span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid #bcc4cc;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
.rating-row input:checked + span { background: #2363eb; color: white; border-color: #2363eb; }

.hint { color: #606b76; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
.fit-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.fit-area { border: 1px solid #d8dde3; border-radius: 12px; padding: 14px; }
.fit-area legend { font-weight: 800; padding: 0 6px; }
.fit-area label { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; }
.fit-area input { width: auto; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.consent input { width: auto; flex: 0 0 auto; margin-top: 4px; }
button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: #1d232a;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
#status { margin-top: 14px; font-weight: 700; }
.success { color: #08783e; }
.error { color: #b42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

@media (max-width: 700px) {
  .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 10px 48px;
  }
  .hero,
  .card {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 20px;
    border-radius: 16px;
  }
  .two-columns,
  .fit-grid {
    grid-template-columns: 1fr;
  }
  .article-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .article-card {
    width: 100%;
  }
  .rating-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .container { padding-left: 8px; padding-right: 8px; }
  .hero, .card { padding: 16px; }
}
