:root {
  --text: #192f32;
  --teal: #54d6c6;
  --gold: #d9b86f;
  --copper: #c87752;
  --green: #17675e;
  --muted: #65716a;
  --border: #c6d5cf;
  --mono: "SFMono-Regular", Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: #f4f5f0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.wrap {
  max-width: 1360px;
  width: 91%;
  margin: auto;
}
.intro,
.lessonbar,
.panehead,
.paperfoot,
.leanfoot,
.inspecthead,
.dialoghead,
.inktools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 170px;
  padding: 25px clamp(20px, 3vw, 46px);
  margin: 24px 0 22px;
  border: 1px solid #c5d8cc;
  border-radius: 4px;
  background: linear-gradient(102deg, #f0f5ed 34%, #e8f2e9 62%, #e5efdf 100%);
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0 0 0 38%;
  z-index: -1;
  background-image:
    linear-gradient(#40797118 1px, transparent 1px),
    linear-gradient(90deg, #40797118 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent, black 35%);
}
.intro > div {
  max-width: min(65%, 700px);
}
#construction {
  width: min(33%, 345px);
  height: auto;
  flex: none;
}

.intro h1 {
  font:
    650 clamp(40px, 4.6vw, 70px) / 1.02 Inter,
    system-ui,
    sans-serif;
  letter-spacing: -3px;
  margin: 0;
}
.intro p,
.explore p {
  font-size: 15px;
  line-height: 1.55;
  color: #435e59;
  margin: 8px 0 0;
}
button,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 550;
}
button:hover {
  color: var(--green);
  text-decoration: underline;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #c98c42;
  outline-offset: 3px;
}
#guide,
.lessonbar select,
.stepnav button {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fcfcf8;
  padding: 9px 12px;
}
#guide b {
  display: inline-grid;
  margin-right: 4px;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid;
  border-radius: 50%;
  font-size: 11px;
}
.lessonbar {
  justify-content: flex-start;
  margin-bottom: 13px;
}
.lessonbar label,
.label {
  font: 600 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #617267;
}
.lessonbar select {
  font-size: 1rem;
  max-width: min(65%, 480px);
  font-weight: 550;
}
#lesson optgroup {
  font:
    700 1.125rem/1.4 system-ui,
    sans-serif;
  color: #193d37;
}
#lesson option {
  font:
    400 1rem/1.45 system-ui,
    sans-serif;
  color: var(--text);
}
@supports (appearance: base-select) and selector(::picker(select)) {
  html[data-edition="static"] #lesson,
  html[data-edition="static"] #lesson::picker(select) {
    appearance: base-select;
  }
  #lesson::picker(select) {
    max-width: calc(100vw - 1.5rem);
    max-height: min(29rem, 60svh);
    background: #fffef9;
    border: 1px solid #9cafa5;
    border-radius: 5px;
    padding: 0;
    box-shadow: 0 6px 20px #193d3724;
  }
  #lesson legend {
    width: 100%;
    padding: 0.55rem 0.8rem;
    background: #e3eee7;
    font: inherit;
    color: inherit;
  }
  #lesson option {
    min-height: 2.5rem;
    padding: 0.45rem 0.8rem;
    white-space: normal;
  }
  #lesson option:is(:hover, :focus-visible) {
    background: #d3e7dc;
  }
  #lesson option:checked {
    font-weight: 650;
  }
  @media (pointer: coarse) {
    #lesson option {
      min-height: 2.75rem;
    }
  }
}
.lessonbar #new {
  margin-left: auto;
  color: var(--green);
}
.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #aebdaf;
  box-shadow: 0 8px 24px #284a3d0c;
}
.paper,
.lean {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.paper {
  background: #fffdf6;
}
.lean {
  background: #edf5f1;
  color: #183d3c;
  border-inline-start: 1px solid #bfcfc9;
}
.panehead {
  height: 59px;
  padding: 0 22px;
  flex: none;
}
.paper .panehead {
  border-bottom: 1px solid #d8dcce;
  background: #faf4e7;
  box-shadow: inset 0 3px var(--gold);
}
.lean .panehead {
  background: #dcece4;
  border-bottom: 1px solid #b9d4c9;
  box-shadow: inset 0 3px #51ac9e;
}
.panehead h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panehead h2 > span {
  color: #718570;
  font-size: 23px;
}
.panehead h2 .braces {
  font: 15px var(--mono);
  color: #276b61;
}
.modes {
  border: 1px solid #cbd2c5;
  border-radius: 6px;
  padding: 2px;
  display: flex;
}
.modes button {
  padding: 4px 10px;
  font-size: 12px;
  color: #57685d;
}
.modes button[aria-pressed="true"] {
  background: #dfeadd;
  color: #244e3c;
  border-radius: 4px;
}
.sheet {
  flex: 1;
  display: flex;
  background:
    linear-gradient(
      to right,
      transparent 18px,
      #d78a7438 18px,
      #d78a7438 19px,
      transparent 19px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      #d2d3c759 31px,
      #d2d3c759 32px
    );
  background-position: 0 8px;
}
textarea {
  width: 100%;
  min-height: 325px;
  resize: vertical;
  padding: 14px 22px 22px 31px;
  font: 19px/32px var(--serif);
  background: transparent;
  border: 0;
  outline: none;
  color: #263b2f;
  tab-size: 2;
}
.sheet:focus-within {
  box-shadow: inset 3px 0 #60917b;
}
.paperfoot,
.leanfoot {
  height: 40px;
  padding: 0 20px;
  font-size: 11px;
}
.paperfoot {
  border-top: 1px solid #d8ddcf;
  color: #65776a;
}
.paperfoot button {
  color: #426454;
}
.leanfoot {
  background: #e3efe6;
  border-top: 1px solid #bfd3c9;
}
.lean button {
  color: #275c54;
}
#copy {
  border: 1px solid #9dbeb3;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
}
#code {
  padding: 16px 0;
  flex: 1;
  overflow: auto;
  min-height: 325px;
}
.codeline {
  display: flex;
  width: max-content;
  min-width: 100%;
  white-space: pre;
  text-align: left;
  color: #203e3a;
  font: 13px/25px var(--mono);
  border-left: 3px solid transparent;
  cursor: pointer;
  padding: 0 16px 0 0;
}
button.codeline:hover,
.codeline.active {
  background: #d7e9df;
  text-decoration: none;
}
.codeline.active {
  border-color: #268779;
}
.ln {
  width: 42px;
  text-align: right;
  padding-right: 13px;
  color: #657970;
  user-select: none;
  flex: none;
}
.kw {
  color: #704073;
}
.typ {
  color: #166555;
}
.num {
  color: #874222;
}
.comment {
  color: #506c65;
}
.filetype {
  font-family: var(--mono);
  color: #506e64;
}
#state {
  display: flex;
  align-items: center;
  gap: 7px;
}
#state:before {
  content: "";
  border-radius: 50%;
  background: #e1c387;
  width: 7px;
  height: 7px;
}
#state[data-state="verified"]:before {
  background: #32826d;
}
#state[data-state="failed"]:before {
  background: #eb9177;
}
.inspect {
  margin: 23px 0 25px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fcfcf6;
}
.inspecthead {
  padding: 13px 21px;
  border-bottom: 1px solid #dbe0d5;
}
.inspect h2,
.dialoghead h2 {
  font:
    650 23px Inter,
    system-ui,
    sans-serif;
  letter-spacing: -0.7px;
  margin: 0;
}
.stepnav {
  display: flex;
  gap: 10px;
  align-items: center;
  font: 12px var(--mono);
}
.stepnav button {
  padding: 3px 8px;
}
.explore {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 26px;
  padding: 22px;
}
.explore > div + div {
  border-left: 1px solid var(--border);
  padding-left: 26px;
}
blockquote {
  margin: 11px 0 0;
  border-left: 2px solid #bd8255;
  padding-left: 14px;
  font: italic 21px/1.45 var(--serif);
}
h3 {
  font: 600 17px var(--serif);
  margin: 10px 0 0;
}
.explore p {
  font-size: 14px;
  margin-top: 5px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 var(--mono);
}
summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--green);
  margin-top: 10px;
}
dialog {
  width: min(580px, 92vw);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  color: var(--text);
  background: #fbfbf4;
  max-height: 85vh;
}
dialog::backdrop {
  background: #15251d70;
}
.dialoghead {
  margin-bottom: 20px;
}
.dialoghead button {
  font-size: 23px;
}
#dialogbody {
  font-size: 14px;
  line-height: 1.6;
}
#dialogbody code {
  background: #eaf0e6;
  padding: 2px 4px;
}
#inkbox,
#photo {
  padding: 12px;
  background: #f8f8f0;
  border-bottom: 1px solid var(--border);
}
.inktools {
  font-size: 12px;
  margin-bottom: 8px;
}
.inktools span {
  margin-right: auto;
}
#pad {
  width: 100%;
  height: 205px;
  display: block;
  background: white;
  border: 1px solid #ccd0c5;
  border-radius: 5px;
  touch-action: none;
  cursor: crosshair;
}
#photo img {
  max-height: 220px;
  max-width: 100%;
  display: block;
  margin: auto;
}
#transcript {
  padding: 10px 18px 0;
  font-size: 12px;
  color: #586f60;
}
[hidden] {
  display: none !important;
}
#notice {
  font-size: 14px;
  color: #53694e;
}
body:has(#inkbox:not([hidden])) textarea {
  min-height: 150px;
}
@media (max-width: 800px) {
  .wrap {
    width: 94%;
  }
  .panehead {
    padding: 0 12px;
  }
  .codeline {
    font-size: 12px;
  }
  .explore {
    gap: 14px;
    padding: 16px;
  }
  .explore > div + div {
    padding-left: 14px;
  }
}
@media (max-width: 650px) {
  .intro {
    padding: 22px 16px;
    align-items: center;
    min-height: 140px;
    margin-top: 14px;
  }
  .intro h1 {
    letter-spacing: -2px;
  }
  .spread,
  .explore {
    grid-template-columns: 1fr;
  }
  .explore > div + div {
    padding: 15px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  textarea,
  #code {
    min-height: 230px;
  }
  .lessonbar {
    flex-wrap: wrap;
  }
  .lessonbar select {
    max-width: 67%;
  }
  .lessonbar label {
    display: none;
  }
}
.sheet {
  position: relative;
}
#highlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: transparent;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow: hidden;
  font: 19px/32px var(--serif);
  padding: 14px 22px 22px 31px;
}
#highlight mark {
  background: #f6cdbb;
  color: transparent;
  border-bottom: 2px solid #ac5034;
}
textarea {
  position: relative;
}
#problem,
#reader {
  border: 1px solid #d6b19e;
  border-left: 4px solid #b56040;
  border-radius: 7px;
  padding: 14px 19px;
  margin-top: 12px;
  background: #fff5eb;
  font-size: 14px;
}
#reader {
  border-color: #9cb6a3;
  background: #f5f9ef;
}
.problemhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
#problem p {
  margin: 8px 0 0;
}
#evidence,
#reading {
  margin: 8px 0 0;
}
#evidence:empty,
#reading:empty {
  display: none;
}
.codeline.invalid {
  background: #fae4d9;
  border-left-color: #e99c77;
}
.codeline.invalid .ln {
  color: #883f24;
}
#applyreading {
  color: var(--green);
  margin: 8px 0;
}
#problem button {
  color: #824527;
}

footer {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
  font-size: 12px;
  color: var(--muted);
}
footer a {
  color: var(--green);
  font-weight: 600;
  text-underline-offset: 3px;
}

html[data-edition="static"] [data-local-only],
html[data-edition="local"] [data-reader-only] {
  display: none;
}
#passages {
  padding: 14px 22px 22px 31px;
  white-space: pre-wrap;
  font: 19px/32px var(--serif);
  color: #263b2f;
}
#passages button {
  display: inline;
  font: inherit;
  line-height: inherit;
  padding: 0;
  text-align: left;
  color: inherit;
  white-space: inherit;
  border-radius: 2px;
}
#passages button[aria-current="step"] {
  background: #e1ecdd;
  box-shadow: 0 1px 0 #799880;
}

#catalog-index {
  background: #f8fbf6;
  border: 1px solid var(--border);
  border-inline-start: 3px solid #79aa9a;
  border-radius: 4px;
  margin: 0 0 16px;
  padding: 10px 16px;
}
#catalog-index summary {
  font-weight: 600;
  margin: 0;
  line-height: 1.6;
}
#catalog-index label {
  display: block;
  margin-top: 14px;
  font-size: 1rem;
}
#method {
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}
#proof-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 24px;
  padding: 5px 0 12px;
}
#proof-index h3 {
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font:
    700 1.125rem/1.4 system-ui,
    sans-serif;
  color: #193d37;
}
#proof-index ul {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}
#proof-index li {
  line-height: 1.65;
  font-size: 1rem;
}
#proof-index a {
  color: var(--green);
  text-underline-offset: 3px;
}
.privacy p {
  color: var(--muted);
  font-size: 13px;
}
#proof-meta {
  color: #25483e;
  font:
    600 1rem/1.5 system-ui,
    sans-serif;
  margin: 0 0 12px;
}
#proof-history {
  border-inline-start: 3px solid var(--gold);
  padding: 2px 0 2px 12px;
  margin: 0 0 16px;
  font:
    400 0.95rem/1.5 system-ui,
    sans-serif;
}
#proof-history p {
  margin: 0;
  max-width: 88ch;
}
#history-date {
  margin-inline-end: 0.35em;
}
#history-link {
  display: inline-block;
  color: var(--green);
  text-underline-offset: 3px;
}
.privacy {
  margin-bottom: 20px;
}
html[data-edition="static"] #code {
  max-height: 550px;
}

/* Light studio navigation and the geometric construction on the notebook cover. */
.studio-header {
  background: #fafbf7;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 24px;
}
.studio-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  text-decoration: none;
}
#studio-nav {
  display: flex;
  gap: clamp(12px, 2.2vw, 32px);
  align-items: center;
}
#studio-nav a {
  display: block;
  padding: 21px 0 18px;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 560;
  color: #3f5956;
  text-decoration: none;
}
#studio-nav a[aria-current="page"] {
  color: #155c53;
  border-bottom-color: #299384;
}
#studio-nav a:hover {
  color: #154f48;
  border-bottom-color: var(--gold);
}
#nav-toggle {
  display: none;
}
#skip {
  position: absolute;
  top: -80px;
  left: 1rem;
  z-index: 3;
  background: white;
  color: var(--green);
  padding: 10px;
}
#skip:focus {
  top: 6px;
}
a:focus-visible {
  outline: 2px solid #926132;
  outline-offset: 3px;
}
.lessonbar #guide {
  margin-left: auto;
  white-space: nowrap;
}
.lessonbar #new + #guide {
  margin-left: auto;
}
html[data-edition="local"] .lessonbar #new {
  margin-left: 0;
}
.codeline:not(button) {
  cursor: default;
}
button.codeline[data-setup] .kw {
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
#dialogtitle {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .nav-inner {
    min-height: 52px;
    flex-wrap: wrap;
    gap: 0;
  }
  #nav-toggle {
    display: block;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--green);
  }
  #nav-toggle[aria-expanded="false"] + #studio-nav {
    display: none;
  }
  #studio-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 16px;
    padding-bottom: 10px;
  }
  #studio-nav a {
    padding: 10px 2px;
  }
}
@media (max-width: 650px) {
  .intro > div {
    max-width: 75%;
  }
  #construction {
    position: absolute;
    right: -10%;
    width: 42%;
    z-index: -1;
    opacity: 0.8;
  }
  .intro p {
    font-size: 14px;
  }
  .lean {
    border-inline-start: 0;
    border-top: 1px solid var(--border);
  }
  .lessonbar #guide {
    padding: 8px;
  }
}
@media (max-width: 430px) {
  .lessonbar {
    gap: 6px;
  }
  .lessonbar select {
    min-width: 0;
    max-width: 100%;
    flex: 1;
  }
  .lessonbar #guide {
    font-size: 12px;
  }
}
.mobile-panes {
  display: none;
}
@media (max-width: 650px) {
  html[data-edition="static"] .mobile-panes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    background: #dde8df;
    border: 1px solid #bbcfc3;
    border-radius: 6px;
    margin: 0 0 8px;
  }
  .mobile-panes button {
    min-height: 44px;
    font-size: 15px;
    color: #35584f;
    border-radius: 4px;
  }
  .mobile-panes button[aria-pressed="true"] {
    background: #fffdf7;
    color: #164f49;
    box-shadow: 0 1px 4px #2d53452b;
  }
  html[data-edition="static"] .spread[data-mobile-pane="proof"] .lean,
  html[data-edition="static"] .spread[data-mobile-pane="lean"] .paper {
    display: none;
  }
  html[data-edition="static"] #code {
    max-height: 55svh;
    min-height: 175px;
    overscroll-behavior: contain;
  }
  #code .codeline {
    max-width: 100%;
    min-width: 100%;
    width: 100%;
    line-height: 1.65;
    font-size: 13px;
    padding-block: 3px;
    padding-right: 10px;
  }
  #code .codeline > span:last-child {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-width: 0;
  }
  #code .codeline .ln {
    width: 32px;
    padding-right: 8px;
  }
  #passages {
    padding: 12px 16px 18px 26px;
    font-size: 18px;
    line-height: 1.55;
  }
  .panehead {
    height: 50px;
  }
  .lessonbar select,
  #method {
    font-size: 16px;
    min-height: 44px;
  }
  #guide,
  #nav-toggle,
  .stepnav button,
  #catalog-index summary,
  #copy,
  #dialog button,
  .privacy summary,
  #goalbox summary {
    min-height: 44px;
  }
  #catalog-index {
    padding: 0 12px;
  }
  #catalog-index summary {
    line-height: 44px;
  }
  .stepnav button {
    min-width: 44px;
  }
  #dialog {
    max-height: 85svh;
    padding: 18px;
  }
  #dialogbody {
    font-size: 16px;
  }
  .inspect {
    margin-top: 14px;
  }
  .inspecthead {
    padding: 8px 12px;
  }
  .explore {
    padding: 14px;
  }
  .explore p {
    font-size: 15px;
  }
  .lessonbar select {
    min-width: 0;
    max-width: 100%;
    flex: 1;
  }
  #proof-index a {
    display: inline-block;
    padding-block: 5px;
  }
  #passages button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .lessonbar {
    align-items: center;
  }
}
@media (max-width: 365px) {
  .intro > div {
    max-width: 83%;
  }
  .intro h1 {
    font-size: 36px;
  }
  #construction {
    right: -18%;
    opacity: 0.65;
  }
}

.paper .panehead {
  min-height: 59px;
  height: auto;
  padding-block: 12px;
}
.step-reading blockquote {
  margin: 0;
  color: #234d45;
}
.step-reading pre {
  padding: 12px;
  background: #e7f0e9;
  border-radius: 4px;
  color: #214a40;
  font-size: 14px;
}
@media (max-width: 650px) {
  .intro h1 {
    font-size: clamp(32px, 8vw, 42px);
    letter-spacing: -1.5px;
  }
  .intro > div {
    max-width: 77%;
  }
  .intro {
    min-height: 128px;
  }
  .paper .panehead {
    min-height: 46px;
    padding-block: 10px;
  }
  .paper .panehead h2 {
    font: 650 18px/1.25 var(--serif);
  }
  #dialog .step-reading summary {
    align-content: center;
  }
}
