/**
 * ACSM page styling.
 *
 * Layered on top of aytict.fi's style.css, which the page also loads: the
 * hamburger menu, the hex-rain background and the site's black/magenta
 * palette all come from there, and this file only styles what is new. Colour
 * values echo the site's rgba(255,0,255,...) accents so the tool reads as
 * part of aytict.fi rather than a bolted-on subdomain.
 */

:root {
  --acsm-accent: rgba(255, 0, 255, 1);
  --acsm-accent-soft: rgba(255, 0, 255, 0.35);
  --acsm-panel: rgba(30, 0, 30, 0.82);
  --acsm-panel-solid: rgba(40, 0, 42, 0.95);
  --acsm-text: #f2eef4;
  --acsm-muted: #bda8c4;
  --acsm-good: #4ad08a;
  --acsm-warn: #f0c04a;
  --acsm-bad: #ff6b6b;
}

/* The site's .main is a three-row grid sized for the homepage; ACSM is a
   single flowing column, so override just the layout properties here. */
.acsm-main {
  display: block;
  height: auto;
  min-height: 100vh;
  padding: 0 0 40px;
}

.acsm-main .container {
  max-width: 900px;
  margin: 0 auto;
  width: 92%;
}

/* --- Header --------------------------------------------------------------- */

.acsm-header {
  padding: 64px 0 24px;
  text-align: center;
}

.acsm-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acsm-muted);
}

.acsm-title {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.45);
}

.acsm-lead {
  margin: 0 auto;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--acsm-text);
}

/* --- Cards ---------------------------------------------------------------- */

.acsm-card {
  background: var(--acsm-panel);
  border: 1px solid var(--acsm-accent-soft);
  border-radius: 12px;
  padding: 26px 28px;
  margin: 22px 0;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.acsm-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.acsm-card h3 {
  margin: 20px 0 8px;
  font-size: 15px;
  color: #fff;
}

.acsm-card p {
  color: var(--acsm-text);
  line-height: 1.65;
  margin: 0 0 12px;
}

.acsm-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acsm-accent);
  color: #1a001a;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

/* The authorization notice deliberately stands out - it is the part people
   must actually read before using this. */
.acsm-notice {
  border-left: 4px solid var(--acsm-warn);
  background: rgba(60, 40, 0, 0.45);
}

.acsm-notice h2 {
  color: var(--acsm-warn);
}

/* --- Form ----------------------------------------------------------------- */

.acsm-field {
  margin: 0 0 20px;
}

.acsm-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.acsm-field input[type="url"],
.acsm-field input[type="email"],
.acsm-field input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--acsm-text);
  background: rgba(10, 0, 12, 0.75);
  border: 1px solid var(--acsm-accent-soft);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.acsm-field input:focus {
  outline: none;
  border-color: var(--acsm-accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.18);
}

.acsm-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--acsm-muted);
  line-height: 1.55;
}

.acsm-error {
  margin: 8px 0 0;
  padding: 9px 12px;
  font-size: 14px;
  color: #ffe3e3;
  background: rgba(120, 20, 20, 0.55);
  border-left: 3px solid var(--acsm-bad);
  border-radius: 0 6px 6px 0;
}

.acsm-optional {
  margin: 0 0 20px;
  border: 1px solid rgba(255, 0, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
}

.acsm-optional summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--acsm-muted);
}

.acsm-optional summary:hover {
  color: #fff;
}

.acsm-optional[open] summary {
  margin-bottom: 14px;
  color: #fff;
}

/* --- Buttons -------------------------------------------------------------- */

.acsm-button {
  display: inline-block;
  padding: 11px 22px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  color: #1a001a;
  background: var(--acsm-accent);
  border: 1px solid var(--acsm-accent);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
}

.acsm-button:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
  color: #1a001a;
}

.acsm-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.acsm-button-secondary {
  background: transparent;
  color: #fff;
}

.acsm-button-secondary:hover:not(:disabled) {
  background: rgba(255, 0, 255, 0.18);
  color: #fff;
}

.acsm-button-plain {
  background: transparent;
  border-color: transparent;
  color: var(--acsm-muted);
}

.acsm-button-plain:hover:not(:disabled) {
  color: #fff;
  box-shadow: none;
}

.acsm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 0;
}

/* --- Verification --------------------------------------------------------- */

.acsm-host {
  color: var(--acsm-accent);
  font-family: monospace;
  word-break: break-all;
}

.acsm-proof {
  margin: 18px 0;
  padding: 16px 18px;
  background: rgba(10, 0, 12, 0.55);
  border: 1px solid rgba(255, 0, 255, 0.18);
  border-radius: 10px;
}

.acsm-proof h3 {
  margin-top: 0;
}

.acsm-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a001a;
  background: var(--acsm-good);
  border-radius: 999px;
  vertical-align: middle;
}

.acsm-record {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 10px 16px;
  margin: 12px 0 0;
}

.acsm-record dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--acsm-muted);
}

.acsm-record dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.acsm-record code {
  display: inline-block;
  padding: 5px 9px;
  font-size: 13px;
  color: #ffe9ff;
  background: rgba(15, 0, 20, 0.9);
  border: 1px solid rgba(255, 0, 255, 0.25);
  border-radius: 5px;
  word-break: break-all;
}

.acsm-copy {
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--acsm-muted);
  background: transparent;
  border: 1px solid rgba(255, 0, 255, 0.3);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.acsm-copy:hover {
  color: #fff;
  border-color: var(--acsm-accent);
}

.acsm-consent {
  margin: 22px 0 0;
  padding: 14px 16px;
  background: rgba(10, 0, 12, 0.5);
  border: 1px solid rgba(255, 0, 255, 0.2);
  border-radius: 8px;
}

.acsm-consent label {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--acsm-text);
  cursor: pointer;
}

.acsm-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--acsm-accent);
  cursor: pointer;
}

.acsm-checks {
  margin: 20px 0 0;
  padding: 14px 16px;
  background: rgba(10, 0, 12, 0.5);
  border-radius: 8px;
}

.acsm-check-ok {
  color: var(--acsm-good);
  font-weight: 600;
  margin: 0 0 10px;
}

.acsm-check-pending {
  color: var(--acsm-warn);
  font-weight: 600;
  margin: 0 0 10px;
}

.acsm-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.acsm-check-list li {
  padding: 7px 0 7px 22px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--acsm-muted);
  border-top: 1px solid rgba(255, 0, 255, 0.12);
}

.acsm-check-list li::before {
  position: absolute;
  left: 0;
  top: 7px;
  font-weight: 700;
}

.acsm-check-list li.is-pass::before {
  content: "\2713";
  color: var(--acsm-good);
}

.acsm-check-list li.is-fail::before {
  content: "\2022";
  color: var(--acsm-muted);
}

.acsm-check-list strong {
  color: #fff;
}

/* --- Progress ------------------------------------------------------------- */

.acsm-progress-target {
  font-family: monospace;
  font-size: 14px;
  color: var(--acsm-accent);
  word-break: break-all;
}

.acsm-progress {
  height: 10px;
  background: rgba(10, 0, 12, 0.8);
  border: 1px solid rgba(255, 0, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 10px;
}

.acsm-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(160, 0, 160, 1), var(--acsm-accent));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.acsm-stage {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--acsm-muted);
}

.acsm-modules {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.acsm-modules li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 14px;
  color: var(--acsm-muted);
  transition: color 0.2s;
}

.acsm-modules li::before {
  content: "\25CB";
  position: absolute;
  left: 2px;
  color: rgba(255, 0, 255, 0.3);
}

.acsm-modules li.is-done {
  color: var(--acsm-text);
}

.acsm-modules li.is-done::before {
  content: "\2713";
  color: var(--acsm-good);
}

.acsm-modules li.is-active {
  color: #fff;
  font-weight: 600;
}

.acsm-modules li.is-active::before {
  content: "\25CF";
  color: var(--acsm-accent);
  animation: acsm-pulse 1.4s ease-in-out infinite;
}

@keyframes acsm-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* --- Result --------------------------------------------------------------- */

.acsm-done {
  border-left: 4px solid var(--acsm-good);
}

.acsm-done h2 {
  color: var(--acsm-good);
}

.acsm-failed {
  border-left: 4px solid var(--acsm-bad);
}

.acsm-failed h2 {
  color: var(--acsm-bad);
}

.acsm-downloads {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.acsm-download {
  text-decoration: none;
}

/* --- Explainer ------------------------------------------------------------- */

.acsm-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 16px 0;
}

.acsm-module-grid article {
  padding: 16px 18px;
  background: rgba(10, 0, 12, 0.5);
  border: 1px solid rgba(255, 0, 255, 0.15);
  border-radius: 10px;
}

.acsm-module-grid h3 {
  margin: 0 0 10px;
  color: var(--acsm-accent);
  font-size: 15px;
}

.acsm-module-grid p {
  font-size: 13.5px;
  margin-bottom: 10px;
}

.acsm-limit {
  color: var(--acsm-muted);
  font-size: 13px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 0, 255, 0.12);
  margin-bottom: 0;
}

.acsm-explainer a {
  color: var(--acsm-accent);
}

/* --- Footer --------------------------------------------------------------- */

.acsm-footer {
  padding: 28px 0 10px;
  text-align: center;
  font-size: 13px;
  color: var(--acsm-muted);
}

.acsm-footer a {
  color: var(--acsm-muted);
}

.acsm-footer a:hover {
  color: var(--acsm-accent);
}

/* --- Narrow screens -------------------------------------------------------- */

@media (max-width: 600px) {
  .acsm-header {
    padding-top: 78px;   /* clear the fixed hamburger button */
  }

  .acsm-title {
    font-size: 26px;
  }

  .acsm-card {
    padding: 20px 18px;
  }

  .acsm-record {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .acsm-record dd {
    margin-bottom: 10px;
  }

  .acsm-actions,
  .acsm-downloads {
    flex-direction: column;
  }

  .acsm-actions .acsm-button,
  .acsm-downloads .acsm-button {
    width: 100%;
    text-align: center;
  }
}

/* Respect a reader's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .acsm-progress-bar,
  .acsm-button {
    transition: none;
  }

  .acsm-modules li.is-active::before {
    animation: none;
  }
}

/* --- Required-field marking ------------------------------------------------ */

.acsm-required-note {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--acsm-muted);
}

.acsm-required-mark {
  color: var(--acsm-accent);
  font-weight: 700;
}

/* A field the browser itself knows is empty and required. :not(:placeholder-shown)
   keeps this from firing on an untouched form - nobody wants a page that opens
   already scolding them. */
.acsm-field input:required:invalid:not(:placeholder-shown) {
  border-color: var(--acsm-bad);
}
