/* GTM Planning: ported from the Lovable theme (SHYFT brand: #F7F7F7 canvas, #333 ink, teal, orange) */
:root {
  --bg: #f7f7f7;
  --ink: #333333;
  --card: #ffffff;
  --panel: #efeeea;
  --border: #d9d9d9;
  --muted: #777777;
  --teal: #23aeaa;
  --orange: #e48653;
  --green: #2e9e5b;  --green-soft: #e4f4ea;
  --yellow: #b8860f; --yellow-soft: #fbf1d6;
  --red: #c8384b;    --red-soft: #fbe4e7;
  --p1: #2a9a94; --p2: #3bbfc2; --p3: #f1c04a; --p4: #f08a3c;
  --p5: #c93a58; --p6: #d63a9b; --p7: #a3a3a3; --p8: #4a4a4a;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5;
}
h1, h2, h3, h4 { font-family: "Poppins", ui-sans-serif, system-ui, sans-serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
img { max-width: 100%; height: auto; }
a { color: inherit; }

.topbar { display: flex; height: 6px; width: 100%; }
.topbar-main { flex: 1; background: var(--orange); }
.topbar-end { width: 15%; background: var(--teal); }

.shell { max-width: 42rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; }
@media (min-width: 640px) { .shell { padding: 2.5rem 2rem 5rem; } }

.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { height: 3.5rem; width: auto; margin: 0.25rem 0 0.5rem 0; }
.eyebrow { margin: 0; font-family: "Poppins", sans-serif; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3em; color: var(--orange); }

.intro { border-bottom: 1px solid var(--border); padding-bottom: 2.5rem; }
.intro h1 { margin-top: 2rem; font-size: 1.875rem; line-height: 1.2; }
.start-h1 { margin-top: 2.5rem; font-size: 1.875rem; line-height: 1.2; }
.intro-lead { margin: 1.25rem 0 0; font-size: 1.0625rem; line-height: 1.6; }
@media (min-width: 640px) { .intro h1, .start-h1 { font-size: 2.25rem; } .intro-lead { font-size: 1.125rem; } }

.btn-outline {
  display: inline-block; margin-top: 1.5rem; padding: 0.75rem 1.25rem; border: 1px solid var(--teal); border-radius: 8px;
  color: var(--teal); font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
.btn-outline:hover { background: var(--teal); color: #fff; }

.panel { margin-top: 2rem; background: var(--panel); padding: 1.5rem; border-radius: 2px; }
.panel h2 { margin-top: 1rem; font-size: 1.125rem; }
.panel p { margin: 0.75rem 0 0; font-size: 0.875rem; line-height: 1.6; }
.panel-bar { height: 4px; width: 3.5rem; background: var(--orange); }
.panel-bar.dark { background: var(--p8); margin-top: 2.5rem; }
@media (min-width: 640px) { .panel { padding: 2rem; } }

/* Questions */
.questions { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.q-card { background: var(--card); border: 1px solid var(--border); border-top-width: 6px; border-radius: 2px; padding: 1.25rem; }
@media (min-width: 640px) { .q-card { padding: 1.5rem; } }
.pillar-1 { border-top-color: var(--p1); } .pillar-1 .q-num { color: var(--p1); }
.pillar-2 { border-top-color: var(--p2); } .pillar-2 .q-num { color: var(--p2); }
.pillar-3 { border-top-color: var(--p3); } .pillar-3 .q-num { color: var(--p3); }
.pillar-4 { border-top-color: var(--p4); } .pillar-4 .q-num { color: var(--p4); }
.pillar-5 { border-top-color: var(--p5); } .pillar-5 .q-num { color: var(--p5); }
.pillar-6 { border-top-color: var(--p6); } .pillar-6 .q-num { color: var(--p6); }
.pillar-7 { border-top-color: var(--p7); } .pillar-7 .q-num { color: var(--p7); }
.pillar-8 { border-top-color: var(--p8); } .pillar-8 .q-num { color: var(--p8); }
.q-pillar { margin: 0; font-family: "Poppins", sans-serif; font-size: 1.125rem; font-weight: 600; }
.q-num { margin-right: 0.5rem; font-weight: 400; }
.q-text { margin-top: 0.75rem; font-size: 1.125rem; line-height: 1.35; }
@media (min-width: 640px) { .q-text { font-size: 1.25rem; } }
.q-ready { margin: 0.75rem 0 0; font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.q-ready strong { color: var(--ink); }

.ratings { margin-top: 1.25rem; display: grid; gap: 0.5rem; }
@media (min-width: 640px) { .ratings { grid-template-columns: repeat(3, 1fr); } }
.rating {
  text-align: left; cursor: pointer; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  padding: 0.75rem; color: var(--ink); font: inherit; transition: background .15s, border-color .15s;
}
.r-label { display: block; font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; }
.r-help { display: block; margin-top: 2px; font-size: 0.75rem; line-height: 1.35; opacity: 0.8; }
.r-green:hover { border-color: var(--green); background: var(--green-soft); }
.r-yellow:hover { border-color: var(--yellow); background: var(--yellow-soft); }
.r-red:hover { border-color: var(--red); background: var(--red-soft); }
.rating[aria-pressed="true"] { color: #fff; }
.r-green[aria-pressed="true"] { background: var(--green); border-color: var(--green); }
.r-yellow[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); }
.r-red[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.rating:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Progress */
.progress { position: sticky; bottom: 0; margin-top: 2rem; padding: 1rem 0; border-top: 1px solid var(--border); background: rgba(247,247,247,0.95); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.progress p { margin: 0; font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; }
.progress-track { height: 6px; width: 8rem; overflow: hidden; border-radius: 999px; background: #e7e7e7; }
@media (min-width: 640px) { .progress-track { width: 12rem; } }
.progress-bar { height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width .2s; }

/* Results */
.results { margin-top: 3rem; scroll-margin-top: 1.5rem; }
.results[hidden] { display: none; }
.results-panel { margin-top: 0; }
.results-panel h2 { font-size: 1.5rem; }
.results-panel h3 { margin-top: 1rem; font-size: 1.125rem; }
.tiles { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; text-align: center; }
.tile { border: 1px solid; border-radius: 8px; padding: 1rem; }
.tile p { margin: 0; }
.tile-n { font-family: "Poppins", sans-serif; font-size: 1.5rem; font-weight: 600; }
.tile-l { margin-top: 0.25rem !important; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.t-green { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.t-yellow { border-color: var(--yellow); background: var(--yellow-soft); color: var(--yellow); }
.t-red { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.top3 { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.top3 li { border-left: 2px solid var(--teal); padding-left: 1rem; }
.top3 .t-pillar { margin: 0; font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; }
.top3 .t-q { margin: 0.25rem 0 0; font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.results-note { margin-top: 2rem !important; }
.actions { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .actions { flex-direction: row; } }

/* Buttons */
.btn-cta, .btn-primary {
  display: inline-block; border: 0; cursor: pointer; border-radius: 8px; padding: 0.75rem 1.25rem; text-align: center;
  font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: opacity .15s;
}
.btn-cta { background: var(--orange); color: #fff; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-cta:hover, .btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.full { width: 100%; margin-top: 1.5rem; }

/* Email form + status */
.email-form { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.email-form[hidden], .status[hidden], .err[hidden] { display: none; }
.email-label { font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; }
.email-help { color: var(--muted); }
.email-row { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 640px) { .email-row { flex-direction: row; } }
input[type="text"], input[type="email"] {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 0.75rem 1rem;
  font: inherit; font-size: 0.875rem; color: var(--ink); outline: none;
}
input:focus { border-color: var(--teal); }
.status { margin: 0.5rem 0 0 !important; }
.status.ok { color: var(--green); }
.status.bad { color: var(--red); }

/* Start page */
.points { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.points li { border-left: 2px solid var(--teal); padding-left: 1rem; font-size: 0.875rem; line-height: 1.6; }
.start-form { margin-top: 2.5rem; }
.fields { margin-top: 1.25rem; display: grid; gap: 1rem; }
.fields label { font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; }
.fields input { margin-top: 0.25rem; }
.err { margin: 0.25rem 0 0 !important; font-size: 0.75rem !important; color: var(--red); }

/* Footer */
.page-foot { margin-top: 3.5rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.foot-text { margin: 0; font-size: 1rem; line-height: 1.6; }
.foot-actions { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .foot-actions { flex-direction: row; align-items: center; gap: 1.25rem; } }
.text-link { font-family: "Poppins", sans-serif; font-size: 0.875rem; font-weight: 600; color: var(--teal); text-decoration: underline; text-decoration-color: rgba(35,174,170,0.4); text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: var(--teal); }
.badge-row { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; }
.partner-badge { height: 3.5rem; width: auto; flex: none; }
.fine { margin: 0; font-size: 0.75rem; color: var(--muted); }
.fine + .fine { margin-top: 0.25rem; }

@media print {
  .no-print { display: none !important; }
  html, body { background: #fff; color: #000; font-size: 10.5pt; }
  .print-compact { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
  .print-page { page-break-inside: avoid; }
}

.email-fields { display: grid; gap: 0.5rem; margin-bottom: 0.5rem; }
@media (min-width: 640px) { .email-fields { grid-template-columns: 1fr 1fr; } }
.email-fields input { width: 100%; }
