/* =========================
   Global reset & box model
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
}

/* =========================
   Base layout (sticky footer)
   ========================= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f7f7f7;
  color: #222;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content grows to push footer down */
.main-content {
  flex: 1;
  background: #ffffff;
  margin-top: 1rem;
}

/* =========================
   Container (width only)
   ========================= */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* =========================
   Header
   ========================= */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-weight: 700;
  text-decoration: none;
  color: #111;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

/* =========================
   Footer
   ========================= */
.site-footer {
  border-top: 1px solid #e5e5e5;
  background: #f1f1f1;
  font-size: 0.9rem;
  color: #666;
}

.site-footer .container {
  padding: 1.5rem 1rem;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

/* =========================
   Forms
   ========================= */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #374151;
}

input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #fafafa;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #9ca3af;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =========================
   Buttons
   ========================= */
button {
  width: 100%;
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #2563eb;
  color: white;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

button:hover {
  background-color: #1e4ed8;
}

button:active {
  transform: translateY(1px);
}

/* Button group spacing */
.actions {
  margin-top: 1.5rem;
}

.actions button + button {
  margin-top: 0.5rem;
}

/* Secondary button */
button.secondary {
  background-color: transparent;
  color: #2563eb;
  border: 1px solid #c7d2fe;
}

button.secondary:hover {
  background-color: #eef2ff;
}

/* =========================
   Responsive tweaks
   ========================= */
@media (max-width: 640px) {
  .container {
    padding: 1.25rem 1rem;
  }
}

/* Intro paragraph */
.intro {
  font-size: 1.05rem;
  color: #374151;
  margin-bottom: 2rem;
}

/* Muted helper text */
.muted {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Button-like links (Clear button) */
.button {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.button.secondary {
  background-color: transparent;
  color: #2563eb;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
}

.button.secondary:hover {
  background-color: #eef2ff;
}

/* Actions layout */
.actions {
  margin-top: 1.5rem;
}

.actions > * + * {
  margin-top: 0.5rem;
}

/* Result section */
#result {
  margin-top: 2.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  background-color: #ffffff;
}


#result h2 {
  margin-top: 1.5rem;
}

#result p {
  line-height: 1.6;
}

#result:focus {
  outline: none; /* remove ugly default */
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Status emphasis */
.status strong {
  text-transform: capitalize;
}

/* Screen-reader only (SEO + accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clear-wrapper {
  margin-top: 0.75rem;
  text-align: left;
}

.clear-link {
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
}

.clear-link:hover {
  text-decoration: underline;
}

.faq {
  margin-top: 3rem;
}

.faq h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.faq p {
  margin-top: 0.25rem;
  line-height: 1.6;
  color: #374151;
}

/* =========================
   Color-coded status
   ========================= */
.status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
}

/* Safe */
.status-safe {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Risky */
.status-risky {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Critical */
.status-critical {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.how-it-works {
  margin-top: 3.5rem;
  position: relative;
  background-color: #f9fafb; /* extremely light gray */
  border-radius: 12px;
  padding: 2rem 1.5rem;
}

.how-it-works::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #e5e7eb; /* subtle gray */
  margin-bottom: 2rem;
}


.how-it-works h2 {
  margin-bottom: 0.75rem;
}

.how-it-works p {
  line-height: 1.6;
  color: #374151;
}
