.smart-public-page {
  background: linear-gradient(180deg, #eef5ff 0, #f7f9fc 420px);
  min-height: 70vh;
  padding-bottom: 70px;
}

.smart-public-hero { padding: 64px 0 42px; }
.smart-public-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: center;
}
.smart-public-kicker,
.smart-public-card-heading span,
.smart-public-result-head span {
  color: var(--primary);
  font-weight: 800;
  font-size: .9rem;
}
.smart-public-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.18;
  color: var(--navy);
  margin: 12px 0 16px;
}
.smart-public-hero p {
  color: #65738a;
  font-size: 1.06rem;
  line-height: 1.9;
  max-width: 760px;
}
.smart-public-trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.smart-public-trust span,
.smart-public-badges span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: #40506a;
  font-size: .86rem;
}
.smart-public-quota {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 25px;
  box-shadow: 0 18px 42px rgba(11, 29, 58, .08);
  display: grid;
  gap: 8px;
  text-align: center;
}
.smart-public-quota strong { font-size: 3rem; color: var(--primary); }
.smart-public-quota small,
.smart-public-quota span { color: #6b7890; }

.smart-public-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}
.smart-public-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 14px 38px rgba(11, 29, 58, .06);
}
.smart-public-card-heading,
.smart-public-result-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.smart-public-card h2 { color: var(--navy); margin: 7px 0 8px; }
.smart-public-card p { color: #65738a; line-height: 1.85; }
.smart-public-engine {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
}
.smart-public-engine.ready { background: #eaf9f1; color: #087843; }
.smart-public-engine.offline { background: #fff0f0; color: #9b2c2c; }

.smart-public-form { display: grid; gap: 20px; }
.smart-public-form-section {
  border: 1px solid #dbe5f1;
  border-radius: 20px;
  padding: 18px;
  background: #fff;
}
.smart-public-section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.smart-public-section-heading h3 { margin: 1px 0 4px; color: var(--navy); font-size: 1.05rem; }
.smart-public-section-heading p { margin: 0; font-size: .9rem; }
.smart-public-step {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e9f3ff;
  color: var(--primary);
  font-weight: 900;
}

.smart-public-upload { display: grid; gap: 12px; }
.smart-public-form .smart-support-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.smart-public-dropzone {
  min-height: 280px;
  border: 2px dashed #b7cce5;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff 0, #f4f8fd 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.smart-public-dropzone:hover,
.smart-public-dropzone.is-dragover {
  border-color: var(--primary);
  background: #eef6ff;
  box-shadow: 0 12px 28px rgba(0, 119, 255, .10);
}
.smart-public-dropzone.is-dragover { transform: translateY(-2px); }
.smart-public-form .smart-support-file-input:focus-visible + .smart-public-dropzone,
.smart-public-dropzone:focus-visible {
  outline: 3px solid rgba(0, 119, 255, .22);
  outline-offset: 3px;
}
.smart-public-upload-empty {
  padding: 30px 20px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: #66758d;
}
.smart-public-upload-empty strong { color: var(--navy); font-size: 1.15rem; }
.smart-public-upload-empty > span:not(.smart-public-upload-icon) { font-size: .94rem; }
.smart-public-upload-empty small { color: #78869b; }
.smart-public-upload-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #cfe0f5;
  color: var(--primary);
  font-size: 2rem;
  box-shadow: 0 10px 24px rgba(11, 29, 58, .08);
}
.smart-public-preview {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: #f1f5fa;
  position: relative;
}
.smart-public-preview[hidden],
.smart-public-upload-empty[hidden],
.smart-public-upload-summary[hidden],
.smart-public-file-actions[hidden] { display: none !important; }
.smart-public-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 520px;
  object-fit: contain;
  background: #fff;
}
.smart-public-upload-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d6e3f2;
  border-radius: 16px;
  padding: 13px 14px;
  background: #f8fbff;
}
.smart-public-file-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.smart-public-file-info > div { display: grid; gap: 2px; min-width: 0; }
.smart-public-file-info small,
.smart-public-file-info span { color: #718096; font-size: .82rem; }
.smart-public-file-info strong {
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}
.smart-public-file-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9f3ff;
  color: var(--primary);
  font-size: 1.2rem;
}
.smart-public-file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-button { color: #a32727; border-color: #efc2c2; }
.danger-button:hover { color: #8b1f1f; border-color: #dc8f8f; background: #fff7f7; }

.smart-public-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.smart-public-details-grid { grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr); }
.smart-public-field label {
  display: block;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.smart-public-field select,
.smart-public-field textarea { width: 100%; font: inherit; }
.smart-public-field select,
.smart-public-field textarea {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 12px 14px;
  background: #fff;
  color: var(--navy);
}
.smart-public-field select:focus,
.smart-public-field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(0, 119, 255, .10);
}
.smart-public-description-field textarea { min-height: 112px; resize: vertical; }

.smart-public-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #cfe0f5;
  border-radius: 14px;
  background: #f5f9ff;
  color: #40506a;
  line-height: 1.7;
}
.smart-public-consent input { margin-top: 5px; }
.smart-public-turnstile { min-height: 66px; display: flex; align-items: center; }
.smart-public-warning,
.smart-public-security,
.smart-public-review {
  padding: 16px 18px;
  border-radius: 15px;
  background: #fff8e7;
  border: 1px solid #efd490;
  color: #755611;
  line-height: 1.8;
}
.smart-public-submit { justify-self: start; min-width: 190px; border: 0; }
.smart-public-submit[disabled] { opacity: .55; cursor: not-allowed; }
.smart-public-error,
.field-error {
  color: #9b2c2c;
  background: #fff0f0;
  border: 1px solid #f0b8b8;
  border-radius: 13px;
  padding: 12px 14px;
}
.field-error { margin-top: 7px; font-size: .9rem; }

.smart-public-result-options {
  margin: 0;
  border: 1px solid #cfe0f5;
  border-radius: 16px;
  background: #f8fbff;
  padding: 15px 16px;
  display: grid;
  gap: 10px;
}
.smart-public-result-options legend { padding: 0 8px; color: var(--navy); font-weight: 800; }
.smart-public-result-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #40506a;
  line-height: 1.7;
  cursor: pointer;
}
.smart-public-result-option input { margin-top: 5px; flex: 0 0 auto; }
.smart-public-result-options small { color: #6f7d92; line-height: 1.7; }

.smart-public-side-card { position: sticky; top: 90px; }
.smart-public-side-card ol { color: #53627a; line-height: 2; padding-inline-start: 22px; }
.smart-public-side-card > p { font-size: .91rem; }
.smart-public-result { margin-top: 24px; }
.smart-public-confidence {
  min-width: 125px;
  padding: 14px;
  border-radius: 16px;
  text-align: center;
  background: #eef4fb;
}
.smart-public-confidence small,
.smart-public-confidence strong { display: block; }
.smart-public-confidence strong { font-size: 1.2rem; color: var(--navy); margin-top: 4px; }
.confidence-high { background: #eaf9f1; }
.confidence-medium { background: #fff7df; }
.confidence-low { background: #fff0f0; }
.smart-public-badges,
.smart-public-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.smart-public-badges .approved { background: #eaf9f1; color: #087843; }
.smart-public-badges .review { background: #fff3d6; color: #855e05; }
.smart-public-result-block {
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 19px;
  margin-top: 14px;
}
.smart-public-result-block h3 { color: var(--navy); margin: 0 0 10px; }
.smart-public-result-block div,
.smart-public-result-block p,
.smart-public-result-block ol { color: #53627a; line-height: 1.95; }
.smart-public-copy-head,
.smart-public-official-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.smart-public-official-link > div:last-child { display: flex; gap: 9px; flex-wrap: wrap; }
.smart-public-result pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  color: #25334a;
  line-height: 1.7;
}
.smart-public-security,
.smart-public-review { margin-top: 18px; }
.smart-public-disclaimer { font-size: .9rem; margin-top: 14px; }
.secondary-button {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.secondary-button:hover { border-color: var(--primary); color: var(--primary); }
.smart-public-details summary { cursor: pointer; color: #0b1d3a; font-weight: 800; list-style: none; }
.smart-public-details summary::-webkit-details-marker { display: none; }
.smart-public-details summary::after { content: "+"; float: left; color: #0077ff; font-size: 1.25rem; }
.smart-public-details[open] summary::after { content: "−"; }
.smart-public-details h3 { margin-top: 18px; }
.smart-public-detail-note { font-size: .9rem !important; color: #718096 !important; }
.confirmed-block { border-inline-end: 4px solid #18a765; }
.avoid-block { background: #fff8e7; border-color: #efd490; }
.avoid-block h3 { color: #805b08; }
.escalation-block { background: #f5f9ff; border-color: #bdd6f4; }
.escalation-block h3 { color: #0b5fc6; }
.smart-public-result-block ul { padding-inline-start: 24px; }
.smart-public-result-block li { margin: .45rem 0; color: #53627a; line-height: 1.8; }

.unofficial-options-block { border-inline-start: 4px solid #8b5cf6; }
.unofficial-options-notice { margin: 0 0 14px; color: #5b6475; line-height: 1.9; }
.unofficial-options-list { margin: 0; padding-inline-start: 24px; display: grid; gap: 12px; }
.unofficial-options-list li {
  background: #f8f7ff;
  border: 1px solid #ded9ff;
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.85;
}
.unofficial-options-list li b { color: #34246d; }
.unofficial-options-list li p { margin: 6px 0 0; }
.unofficial-options-list li span { font-weight: 700; }
.unofficial-options-list .unofficial-limit { color: #6b4f00; }

.smart-public-error-panel { display: grid; gap: 10px; align-items: start; }
.smart-public-error-panel strong { display: block; }
.smart-public-error-panel small { display: block; color: #7f1d1d; line-height: 1.7; }
.smart-public-error-panel .smart-public-retry { justify-self: start; text-decoration: none; background: #fff; }
.smart-public-client-error[hidden] { display: none !important; }

@media (max-width: 900px) {
  .smart-public-hero-grid,
  .smart-public-layout { grid-template-columns: 1fr; }
  .smart-public-side-card { position: static; }
  .smart-public-quota { text-align: start; }
}

@media (max-width: 650px) {
  .smart-public-page { padding-bottom: 42px; }
  .smart-public-hero { padding: 34px 0 26px; }
  .smart-public-hero h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
  .smart-public-card { padding: 16px; border-radius: 20px; }
  .smart-public-card-heading,
  .smart-public-result-head,
  .smart-public-copy-head,
  .smart-public-official-link { flex-direction: column; }
  .smart-public-form-section { padding: 14px; border-radius: 17px; }
  .smart-public-section-heading { margin-bottom: 13px; }
  .smart-public-dropzone,
  .smart-public-preview,
  .smart-public-preview img { min-height: 230px; }
  .smart-public-upload-summary { align-items: stretch; flex-direction: column; }
  .smart-public-file-info strong { max-width: min(70vw, 420px); }
  .smart-public-file-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .smart-public-file-actions button { width: 100%; }
  .smart-public-two-columns,
  .smart-public-details-grid { grid-template-columns: 1fr; }
  .smart-public-description-field { order: 2; }
  .smart-public-turnstile { overflow-x: auto; }
  .smart-public-submit { width: 100%; min-height: 50px; }
  .smart-public-confidence { width: 100%; }
  .smart-public-actions,
  .smart-public-official-link > div:last-child { display: grid; width: 100%; }
  .smart-public-actions button,
  .smart-public-official-link a,
  .smart-public-official-link button { width: 100%; text-align: center; }
  .smart-public-error-panel .smart-public-retry { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .smart-public-dropzone { transition: none; }
  .smart-public-dropzone.is-dragover { transform: none; }
}
