@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --green: #22403E;
  --orange: #D6683C;
  --orange-dark: #B9542C;
  --cream: #F6F3EC;
  --ink: #1D2B2A;
  --muted: #4F5E5C;
  --line: #DCD6C8;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  /* Footer stays at the bottom of the window on tall screens */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--orange-dark); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--green); color: #fff; padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; }

header.site {
  background: var(--green);
  color: var(--cream);
}
header.site .wrap {
  max-width: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 2rem;
}
header.site a { color: var(--cream); text-decoration: none; }
header.site a:hover { color: #fff; text-decoration: underline; }
header.site .brand { font-weight: 700; letter-spacing: 0.01em; }
header.site nav { display: flex; gap: 1.25rem; font-size: 1rem; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

main { padding: 2.5rem 0 3rem; flex: 1 0 auto; }

h1, h2, h3 { color: var(--green); line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.6rem; }

.hero {
  display: grid; grid-template-columns: minmax(0, 15rem) 1fr;
  gap: 2rem; align-items: start;
}
.hero img {
  width: 100%; height: auto; display: block;
  box-shadow: 0 10px 28px rgba(34, 64, 62, 0.28);
}
.subtitle { font-size: 1.3rem; color: var(--green); margin: 0 0 0.6rem; font-weight: 500; }
.author { color: var(--muted); margin: 0 0 1.2rem; }
.onsale {
  display: inline-block; border: 2px solid var(--green); color: var(--green);
  font-weight: 600; padding: 0.35rem 0.8rem; margin: 0.4rem 0 0;
}

.button {
  display: inline-block; background: var(--orange); color: #fff;
  font-weight: 700; font-size: 1.15rem; text-decoration: none;
  padding: 0.9rem 1.4rem; border-radius: 6px; border: 0; cursor: pointer;
}
.button:hover, .button:focus { background: var(--orange-dark); color: #fff; }
.button.secondary { background: var(--green); }
.button.secondary:hover { background: #18302E; }

.starter {
  margin-top: 2.5rem; padding: 1.5rem; background: #fff;
  border-left: 6px solid var(--orange);
}
.starter p { margin: 0 0 1rem; }

pre {
  background: #fff; border: 1px solid var(--line); padding: 1rem;
  white-space: pre-wrap; word-break: break-word; font-size: 1rem; margin: 0.5rem 0;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.copy { font-size: 0.95rem; padding: 0.45rem 0.9rem; }
.copied { color: var(--green); font-weight: 600; margin-left: 0.6rem; }

ol li { margin-bottom: 0.5rem; }

form { display: grid; gap: 1rem; max-width: 32rem; }
label { font-weight: 600; color: var(--green); display: block; margin-bottom: 0.3rem; }
input, textarea {
  width: 100%; font: inherit; padding: 0.7rem; border: 1px solid #B9B2A2;
  border-radius: 4px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, a:focus, .button:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
textarea { min-height: 10rem; resize: vertical; }
.hp { position: absolute; left: -5000px; }
.note { color: var(--muted); font-size: 1rem; }

footer.site {
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem;
  padding: 1.5rem 0 2.5rem;
}
footer.site a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2rem; }
  .hero { grid-template-columns: 1fr; }
  .hero img { max-width: 13rem; margin: 0 auto; }
  header.site .wrap { padding: 0.9rem 1.25rem; }
  header.site nav { gap: 0.9rem; }
}
