/* Resolve the family-brand merge at the semantic layer while preserving TryCrypto's lesson layout. */
:root {
  --navy: #102a43;
  --ink: #1f2933;
  --muted: #627d98;
  --paper: #f3efe5;
  --cream: #ffffff;
  --white: #ffffff;
  --teal: #087f8c;
  --teal-bright: #2f9e9e;
  --coral: #d96c2f;
  --line: #d9e2ec;
  --soft-teal: rgba(47, 158, 158, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 88% 7%, rgba(47, 158, 158, 0.1), transparent 28rem),
    var(--paper);
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(8, 127, 140, 0.32);
  outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--teal);
}

.button.primary,
.quiz-answer-row button {
  border-color: var(--navy);
  background: var(--navy);
}

.mini-workbench,
.hash-tool {
  background: var(--white);
  box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}

.output {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.output code {
  color: var(--white);
}

.output span {
  color: var(--teal-bright);
}

footer a {
  color: var(--navy);
}

/* Final layout refinements: favor conventional vertical reading flow. */

/* Section labels are useful metadata, but they should not compete with headings. */
.content-section > .eyebrow,
.section-heading > .eyebrow,
.workbench-heading .eyebrow,
.coming-section .eyebrow,
.lesson-hero .eyebrow {
  display: none;
}

/* Keep the lesson number as the one compact piece of orientation metadata. */
.lesson-hero {
  display: block;
  min-height: 0;
  max-width: none;
}
.lesson-index {
  padding: 0;
  margin-bottom: 14px;
  font-size: 13px;
}
.lesson-hero h1 {
  max-width: 900px;
}
.lesson-hero .lede {
  margin-top: 20px;
}

/* Ordinary section headings should read like ordinary section headings. */
.content-section h2,
.workbench h2,
.coming-section h2 {
  max-width: 820px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.12;
  margin-bottom: 20px;
}

/* Explanatory prose is a reading flow, not a dashboard. */
.prose-grid {
  display: block;
  max-width: 800px;
  margin-top: 26px;
}
.prose-grid p {
  margin: 0 0 20px;
}

.workbench-heading {
  display: block;
  max-width: 850px;
}
.workbench-heading > p {
  max-width: 760px;
  margin-top: 14px;
}

.coming-section {
  display: block;
}
.coming-section > div,
.coming-section ol {
  max-width: 800px;
}
.coming-section ol {
  margin-top: 30px;
}

/* The encryption lesson uses this class for workbench steps; keep those linear too. */
.primer-grid {
  display: block !important;
}
.primer-grid > * + * {
  margin-top: 28px;
}

/* Summary guarantees read more naturally as a short vertical list. */
.principles {
  grid-template-columns: 1fr;
  max-width: 820px;
}
.principles article {
  padding: 24px 28px;
}

/* Keep deliberate interactive pairings horizontal when space allows. */
.byte-converter {
  max-width: 760px;
}

/* Clear validation for the paired byte converter. */
.field-error {
  margin: 8px 0 0;
  color: #9b2f24;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
input[aria-invalid="true"] {
  border-color: #9b2f24;
  outline-color: #9b2f24;
}

/* Kit signup belongs in the normal page flow rather than an aside/card. */
.kit-signup-host {
  max-width: 720px;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.kit-signup-host > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 18px;
}
.kit-signup-host .formkit-form {
  margin: 0 !important;
  max-width: 620px !important;
}
.kit-signup-host .formkit-fields {
  display: flex !important;
  gap: 10px !important;
  align-items: stretch !important;
}
.kit-signup-host .formkit-field {
  flex: 1 1 260px !important;
  margin: 0 !important;
}
.kit-signup-host input[type="email"],
.kit-signup-host input[type="text"] {
  min-height: 46px !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--white) !important;
  color: var(--ink) !important;
  font: inherit !important;
}
.kit-signup-host .formkit-submit,
.kit-signup-host button[type="submit"] {
  min-height: 46px !important;
  border: 1px solid var(--navy) !important;
  border-radius: 0 !important;
  background: var(--navy) !important;
  color: white !important;
  font: 700 13px Inter, ui-sans-serif, system-ui, sans-serif !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .kit-signup-host .formkit-fields {
    display: block !important;
  }
  .kit-signup-host .formkit-field,
  .kit-signup-host .formkit-submit,
  .kit-signup-host button[type="submit"] {
    width: 100% !important;
    margin: 0 0 10px !important;
  }
}
