/* Matches imagin8press.com: Outfit body, Aleo headings, red accent buttons, black footer. */
:root {
  --red: #D13226;
  --red-dark: #A8261C;
  --link: #2E86C1;
  --text: #212529;
  --muted: #5F6670;
  --line: #DEE2E6;
  --panel: #F5F5F5;
  --white: #FFFFFF;
  --black: #000000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: Outfit, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--link); }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { height: 48px; width: auto; display: block; }
.back-link { color: var(--black); text-decoration: none; font-size: 16px; }
.back-link:hover { color: var(--red); }
.site-footer { background: var(--black); color: var(--white); margin-top: 64px; padding: 24px 0; font-size: 16px; }
.site-footer a { color: var(--white); }

/* Type */
h1, h2, h3, h4 { font-family: Aleo, Georgia, serif; color: var(--text); }
h1 { font-weight: 500; font-size: 38px; line-height: 1.2; margin: 40px 0 16px; }
h2 { font-weight: 500; font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
h3 { font-weight: 600; font-size: 24px; margin: 40px 0 6px; }
h4 { font-weight: 600; font-size: 18px; margin: 24px 0 8px; }
.intro { margin: 0 0 28px; }
.sub { color: var(--muted); font-size: 16px; margin: 0 0 16px; }

/* Form */
.panel { background: var(--panel); border-radius: 4px; padding: 28px; }
.field { margin-bottom: 20px; }
label { display: block; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--red); }
input[type=text], input[type=email] {
  width: 100%; font: inherit; font-size: 17px; padding: 10px 12px;
  border: 1px solid #C9CED3; border-radius: 4px; background: var(--white); color: var(--text);
}
input[type=file] { font: inherit; font-size: 16px; max-width: 100%; }
input:focus { outline: 2px solid var(--link); outline-offset: 1px; }
input.invalid { border-color: var(--red); }
.hint { font-size: 15px; color: var(--muted); margin: 6px 0 0; }

.btn {
  display: inline-block; font: inherit; font-size: 17px; font-weight: 500; cursor: pointer;
  background: var(--red); color: var(--white); border: 1px solid var(--red);
  border-radius: 4px; padding: 10px 24px; text-decoration: none;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--white); color: var(--red); }
.btn-secondary:hover { background: #FDECEA; color: var(--red-dark); }

.alert { border-radius: 4px; padding: 12px 16px; margin-bottom: 20px; font-size: 16px; }
.alert-error { background: #FDECEA; border: 1px solid #F3B8B2; color: #8A1F17; }

/* Status views */
.status h2 { margin-top: 0; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid #E6D3D1; border-top-color: var(--red);
  animation: spin 0.9s linear infinite; margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
.headline { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid var(--text); padding-bottom: 16px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 16px; }
.headline h2 { margin: 0; overflow-wrap: anywhere; }
.score { text-align: right; }
.score-label { display: block; font-size: 15px; color: var(--muted); }
.score-value { display: block; font-family: Aleo, Georgia, serif; font-weight: 600; font-size: 72px; line-height: 1; color: var(--red); }
.scale-note { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.badge { border: 1px solid var(--line); border-radius: 4px; padding: 14px; text-align: center; background: var(--white); }
.badge .lvl { font-size: 15px; color: var(--muted); }
.badge .pct { font-size: 26px; font-weight: 600; line-height: 1.3; }
.badge .lbl { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.lbl-easy { background: #E6F4EA; color: #1E6B34; }
.lbl-medium { background: #FFF6DA; color: #7A5B00; }
.lbl-hard { background: #FFEBDD; color: #9A4A0C; }
.lbl-very-hard { background: #FDECEA; color: #A8261C; }

table.data { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--white); }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 600; font-size: 15px; color: var(--muted); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.scenarios tbody tr:first-child td { font-weight: 600; }
.delta-down { color: #1E6B34; }

.notes ul { margin: 0; padding-left: 22px; font-size: 16px; }
.details { margin-top: 40px; padding: 16px 20px; }
.details summary { cursor: pointer; font-weight: 500; }
.details table { margin-top: 12px; }
.email-line { margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 30px; margin-top: 28px; }
  h2 { font-size: 24px; }
  .panel { padding: 20px 16px; }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .score { text-align: left; }
  .score-value { font-size: 60px; }
  .logo { height: 38px; }
  .back-link { font-size: 14px; }
  .actions .btn { width: 100%; text-align: center; }
}
