/* Hemp page (hemp.html): the two starting options, the Police/MPI notification helper, the
   congratulations screen and the legislation details. Builds on css/site.css (colours, type,
   buttons and form controls). */

/* ---------- Views ----------
   The inline script in <head> sets data-hemp-view before first paint, so only one view shows.
   Without JavaScript the attribute is never set: every view shows, one after the other, and the
   parts that need JavaScript (the form) are hidden. */
html[data-hemp-view] .hemp-view {
  display: none;
}

html[data-hemp-view="home"] #home,
html[data-hemp-view="notify"] #notify,
html[data-hemp-view="details"] #details {
  display: block;
}

html:not([data-hemp-view]) .hemp-needs-js {
  display: none !important;
}

html:not([data-hemp-view]) .hemp-view + .hemp-view {
  border-top: 1px solid var(--line);
}

.hemp-view {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}

.hemp-view [tabindex="-1"]:focus {
  outline: none;
}

.hemp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 560;
  text-decoration: none;
}

.hemp-back:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.hemp-center {
  text-align: center;
}

.hemp-fine-print {
  margin: 1rem 0 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Landing ---------- */
.hemp-home {
  padding-block: clamp(2.5rem, 8vw, 6.5rem);
}

.hemp-home-grid {
  display: grid;
  align-items: center;
  gap: clamp(2.25rem, 5vw, 4.5rem);
}

@media (min-width: 880px) {
  .hemp-home-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hemp-hero {
  margin: 0;
}

.hemp-hero-lead {
  display: block;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
}

.hemp-hero-lead em {
  font-style: normal;
  color: var(--accent);
}

.hemp-hero-date {
  display: block;
  margin: 1rem 0 0.75rem 0;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

.hemp-hero-rest {
  display: block;
  max-width: 30ch;
  color: var(--text);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

/* One option per row at every width: side by side, the text column got so narrow the headings
   wrapped onto three lines. */
.hemp-choices {
  display: grid;
  gap: 0.85rem;
}

/* Emoji on the left, the text beside it, an arrow on the right. */
.hemp-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.15rem;
  padding: 1.2rem 3.25rem 1.2rem 1.25rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
  line-height: 1.45;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hemp-choice::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  color: var(--ink);
  font-size: 1.3rem;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
}

.hemp-choice:hover,
.hemp-choice:focus-visible {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow);
  color: var(--text);
}

.hemp-choice:hover::after {
  transform: translate(3px, -50%);
}

.hemp-choice-primary,
.hemp-choice-primary:hover,
.hemp-choice-primary:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.hemp-choice-primary strong,
.hemp-choice-primary::after {
  color: #fff;
}

.hemp-choice-icon {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--bg-soft);
  font-size: 1.55rem;
  line-height: 1;
}

.hemp-choice-primary .hemp-choice-icon {
  background: rgba(255, 255, 255, 0.1);
}

.hemp-choice > :not(.hemp-choice-icon) {
  grid-column: 2;
  text-wrap: pretty;
}

.hemp-choice strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.hemp-choice-meta {
  padding-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 560;
}

.hemp-choice-primary .hemp-choice-meta {
  color: #9fd3b0;
}

/* ---------- Notification form ---------- */
.hemp-narrow {
  max-width: 44rem;
}

#notify hgroup {
  margin-bottom: 1rem;
}

#notify hgroup h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
}

#notify hgroup p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.hemp-note {
  margin: 0 0 2rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.hemp-form-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 2.75rem 0 1.25rem 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hemp-form-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hemp-form-heading:first-of-type {
  margin-top: 0.5rem;
}

.hemp-optional {
  color: var(--muted);
  font-weight: 400;
}

.hemp-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.hemp-switch input {
  margin: 0;
}

.hemp-switch-hint {
  display: block;
  margin: -0.6rem 0 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.hemp-options {
  margin-bottom: 2rem;
}

.hemp-options legend {
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.hemp-options legend small {
  color: var(--muted);
  font-weight: 400;
}

.hemp-options button.hemp-help {
  display: inline;
  margin: 0 0 0 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hemp-options > label,
.hemp-options-row > label {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 0.5rem 0;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  line-height: 1.45;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hemp-options label:hover {
  border-color: #b9b8b2;
}

.hemp-options label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hemp-options label input {
  margin-top: 0.1em;
}

.hemp-options input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

/* Indoors / Outdoors / Both sit side by side once there's room; on a phone they stack like the rest. */
@media (min-width: 576px) {
  .hemp-options-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .hemp-options-row > label {
    margin-bottom: 0;
  }
}

.hemp-options > small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.hemp-options.hemp-invalid legend {
  color: #b42318;
}

.hemp-options.hemp-invalid label {
  border-color: #e7a59e;
}

#n-production-other {
  margin-top: 0.25rem;
}

/* ---------- Send it to Police, send it to MPI ---------- */
.hemp-send {
  margin: 3rem 0 1rem 0;
  padding: clamp(1.35rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}

.hemp-send h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.5rem, 3.6vw, 1.9rem);
}

.hemp-steps {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0;
  padding: 0;
}

.hemp-steps li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  list-style: none;
}

.hemp-step-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid #b9b8b2;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hemp-step-who {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.hemp-step-who small {
  display: block;
  overflow-wrap: break-word;
  color: var(--muted);
  font-size: 0.85rem;
}

.hemp-step-status {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: 0.1em;
}

.hemp-steps li.is-done {
  border-color: #cfe1d4;
}

.hemp-steps li.is-done .hemp-step-mark {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0;
}

.hemp-steps li.is-done .hemp-step-mark::after {
  content: "\2713";
  font-size: 1rem;
}

.hemp-steps li.is-done .hemp-step-status {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.hemp-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.hemp-send-button:hover {
  background: #2b2b2b;
  color: #fff;
  transform: translateY(-1px);
}

.hemp-send-button-done {
  background: var(--accent);
}

.hemp-send-button-done:hover {
  background: #255a39;
}

#send-confirm p {
  margin-bottom: 0.9rem;
}

.hemp-send-alt {
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.hemp-send-alt a {
  font-weight: 600;
}

.hemp-copy {
  margin: 1.25rem 0 0 0;
}

.hemp-copy summary {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 560;
  cursor: pointer;
}

.hemp-copy summary:hover {
  color: var(--ink);
}

.hemp-copy > .hemp-fine-print {
  margin-top: 0.75rem;
}

.hemp-copy-mail {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.hemp-copy-mail h3 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.hemp-copy-mail textarea {
  margin: 0 0 0.6rem 0;
  font-size: 0.8rem;
}

/* ---------- Congratulations ---------- */
.hemp-congrats {
  padding: 0.5rem 0;
  text-align: center;
}

.hemp-congrats-emoji {
  font-size: clamp(4.5rem, 20vw, 6.5rem);
  line-height: 1;
  animation: hemp-pop 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.hemp-congrats h1 {
  margin: 0.75rem 0 0.75rem 0;
  /* Small enough that "Congratulations!" stays on one line on a 320px phone. */
  font-size: clamp(1.6rem, 8.2vw, 3.6rem);
}

.hemp-congrats-lead {
  max-width: 32rem;
  margin: 0 auto 1.75rem auto;
  font-size: 1.2rem;
}

.hemp-pass {
  max-width: 26rem;
  margin: 0 auto 1.75rem auto;
  padding: 1.1rem 1.35rem;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  text-align: left;
}

.hemp-pass-title {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hemp-pass dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
}

.hemp-pass dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.hemp-pass dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hemp-congrats-next {
  max-width: 32rem;
  margin: 0 auto 2rem auto;
  text-align: left;
}

.hemp-congrats-next li {
  margin-bottom: 0.5rem;
}

.hemp-congrats-actions {
  display: grid;
  gap: 0.75rem;
  max-width: 26rem;
  margin: 0 auto;
}

.hemp-congrats-actions > * {
  width: 100%;
  margin: 0;
}

@keyframes hemp-pop {
  0% {
    transform: scale(0.3) rotate(-20deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.hemp-confetti {
  position: fixed;
  inset: 0;
  z-index: 10001;
  overflow: hidden;
  pointer-events: none;
}

.hemp-confetti i {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: hemp-confetti-fall 3s cubic-bezier(0.25, 0.4, 0.5, 1) forwards;
}

@keyframes hemp-confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0);
  }

  100% {
    transform: translate3d(var(--drift, 0), 105vh, 0) rotate(var(--spin, 360deg));
  }
}

/* ---------- Details view ---------- */
.hemp-details-head {
  max-width: 52rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.hemp-details-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.hemp-effective {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 1.25rem 0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 650;
}

.hemp-effective::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hemp-details-head .lead {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
}

/* minmax(0, 1fr): a wide table scrolls inside its box instead of stretching the page on a phone. */
.hemp-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

/* The free clone offer sits beside the text on a wide screen and stays in view while you read. */
@media (min-width: 1000px) {
  .hemp-details-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
    gap: 4rem;
  }

  .hemp-aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.hemp-promo {
  padding: 1.5rem;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.hemp-promo-title {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.hemp-promo p {
  font-size: 0.95rem;
}

.hemp-prose .callout {
  font-size: 0.975rem;
}

.hemp-prose h2 {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.hemp-table td:first-child {
  width: 32%;
}

.hemp-prose .faq-group {
  margin-top: 3rem;
}

.hemp-cta {
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.hemp-cta p {
  font-size: 1.15rem;
}

.hemp-cta strong {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .hemp-choice,
  .hemp-congrats-emoji {
    transition: none;
    animation: none;
  }

  .hemp-confetti {
    display: none;
  }
}
