:root {
  --ground: #FFFFFF;
  --ground-deep: #D5D9DF;
  --white: #F3F4F6;
  --hero-bg: #0E4A38;
  --hero-fg: #FFFFFF;
  --hero-accent: #BFF0C8;
  --btn-bg: #FFFFFF;
  --btn-fg: #0E4A38;
  --ink: #14201C;
  --biro: #0E6B4F;
  --serial: #B3261E;
  --rule: rgba(27, 34, 51, .28);
  --ruler: 132px;
  --gap: 48px;
  --max: 1120px;
  --printed: "Archivo", "Arial Narrow", Arial, sans-serif;
  --hand: "Nanum Pen Script", "Bradley Hand", "Segoe Print", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 19px/1.5 var(--printed);
  font-stretch: 100%;
  overflow-x: hidden;
}

a { color: var(--biro); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--biro); outline-offset: 2px; border-radius: 2px; }
.nw { white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 12px 16px; z-index: 5; }
.skip:focus { left: 8px; }

/* top strip: the head of the book page */
.top {
  max-width: var(--max); margin: 0 auto; padding: 20px 48px 16px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-bottom: 2px solid var(--ink);
}
.brand { margin: 0; font-weight: 800; font-stretch: 72%; font-size: 26px; letter-spacing: .01em; }
.serial { color: var(--serial); font-weight: 600; font-stretch: 100%; font-size: .62em; margin-left: 10px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.top-link { font-weight: 600; font-size: 17px; padding: 12px 0; }

/* the day ruler */
.day {
  max-width: var(--max); margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: var(--ruler) minmax(0, 1fr); column-gap: var(--gap);
}
.when {
  margin: 0; padding: 6px 16px 0 0; text-align: right;
  border-right: 2px solid var(--ink);
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
}
.when-n { font-weight: 800; font-stretch: 72%; font-size: 22px; }
.when-d { font-weight: 600; font-size: 16px; }
.when:not(:empty)::after {
  content: ""; position: absolute; right: -8px; top: 14px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--ground); border: 2px solid var(--ink);
}
.entry { padding: 0 0 72px; min-width: 0; }

/* headings: printed throughout, one handwritten line in the h1 */
h1, h2 { margin: 0; }
h1 { font-weight: 400; }
h2 { font-weight: 800; font-stretch: 72%; letter-spacing: -.01em; line-height: 1.02; font-size: clamp(28px, 3.6vw, 44px); max-width: 20em; text-wrap: balance; }
.printed { display: block; font-weight: 800; font-stretch: 72%; letter-spacing: -.01em; line-height: .98; text-wrap: balance; font-size: clamp(40px, 4.9vw, 70px); }
.biro { display: block; font-family: var(--hand); color: var(--biro); line-height: .9; text-wrap: balance; transform: rotate(-1.2deg); transform-origin: left center; font-size: clamp(50px, 5.9vw, 86px); margin-top: 6px; }

/* day 0 */
.day-0 { padding-top: 56px; }
.open { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.lede { max-width: 34em; font-size: 21px; margin: 28px 0 0; }
.deal { margin: 20px 0 0; font-size: 22px; max-width: 30em; }
.deal b { font-weight: 800; font-stretch: 72%; font-size: 26px; background: var(--white); padding: 2px 8px; margin-right: 4px; }
.actions { margin: 28px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.aside { font-size: 17px; }

.btn {
  display: inline-block; background: var(--biro); color: #fff; text-decoration: none;
  font: 700 19px/1 var(--printed); padding: 18px 26px; min-height: 44px;
  border: 0; border-radius: 2px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover { background: #0A533D; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .6; cursor: default; }

/* sheets of paper */
.sheet {
  background: var(--white); border-radius: 2px; padding: 28px 32px 22px; position: relative;
  box-shadow: 4px 5px 0 var(--ground-deep);
}
.sheet::before { /* perforation */
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px;
  background: radial-gradient(circle, var(--ground-deep, #C5CEDA) 1.6px, transparent 1.9px) 0 0 / 14px 4px repeat-x;
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; border-bottom: 2px solid var(--ink); padding: 10px 0; }
.sheet-firm { margin: 0; font-weight: 800; font-stretch: 72%; font-size: 28px; overflow-wrap: anywhere; }
.sheet-kind { margin: 0; font-weight: 600; font-size: 17px; }
.sheet-kind .serial { font-size: 14px; margin-left: 8px; }
.sheet-foot { margin: 14px 0 0; font-size: 15px; color: rgba(27, 34, 51, .78); }

.quote { margin-top: 12px; max-width: 640px; transform: rotate(-.6deg); }
.lines { margin: 0; }
.lines div { display: grid; grid-template-columns: 76px 1fr; align-items: baseline; border-bottom: 1px solid var(--rule); padding: 12px 0 10px; }
.lines dt { font-weight: 600; font-size: 15px; }
.lines dd { margin: 0; font-weight: 600; line-height: 1.3; }

/* the fortnight */
.fortnight .entry { padding-bottom: 20px; max-width: 640px; }
.fortnight .entry.head { padding-bottom: 28px; max-width: none; }
.fortnight .answer .entry { padding-bottom: 72px; }
.note { margin: 20px 0 0; max-width: 30em; font-size: 18px; }
.note.after { margin-top: 16px; max-width: 34em; }

.picker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.picker button {
  font: 600 17px/1.2 var(--printed); color: var(--ink); background: transparent;
  border: 2px solid var(--ink); border-radius: 2px; padding: 12px 16px; min-height: 48px; cursor: pointer;
}
.picker button b { font-weight: 800; margin-left: 6px; font-variant-numeric: tabular-nums; }
.picker button:hover { background: rgba(27, 34, 51, .08); }
.picker button[aria-pressed=true] { background: var(--ink); color: #fff; }

.slip {
  background: var(--white); border-radius: 2px; padding: 18px 22px 24px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), 97% 100%, 93% calc(100% - 6px), 88% 100%, 82% calc(100% - 5px), 76% 100%, 70% calc(100% - 6px), 63% 100%, 57% calc(100% - 5px), 50% 100%, 44% calc(100% - 6px), 37% 100%, 30% calc(100% - 5px), 24% 100%, 17% calc(100% - 6px), 10% 100%, 5% calc(100% - 5px), 0 100%);
}
.slip p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.slip.reply { background: var(--ink); color: var(--white); }

.stamp {
  display: inline-block; margin-left: 6px; padding: 3px 10px 2px;
  border: 2px solid var(--serial); color: var(--serial); border-radius: 3px;
  font-weight: 800; font-stretch: 72%; font-size: 19px; letter-spacing: .03em; transform: rotate(-3deg);
}

/* price: a white band across the page */
.band { background: var(--white); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding-top: 56px; }
.band .entry { padding-bottom: 56px; }
.band .when:not(:empty)::after { background: var(--white); }
.price { margin: 24px 0 0; max-width: 44em; }
.price div { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.price div:first-child { border-top: 2px solid var(--ink); }
.price dt { font-weight: 800; font-stretch: 72%; font-size: 22px; }
.price dd { margin: 0; }

/* questions */
.plain { padding-top: 64px; }
.faq { margin-top: 28px; max-width: 40em; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 20px; padding: 16px 40px 14px 0; min-height: 48px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-family: var(--hand); font-size: 40px; color: var(--biro); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 18px; max-width: 34em; }

/* the ask */
.form { margin-top: 28px; max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; padding-top: 36px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 16px; }
.field input, .field select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 6px 2px;
  background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  font: 600 20px/1.2 var(--printed);
}
.field select { font-weight: 400; font-size: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { margin: 6px 0 0; color: var(--serial); font-weight: 600; font-size: 16px; }
.err:empty { display: none; }
input[aria-invalid=true] { border-bottom-color: var(--serial); }
.small { font-size: 16px; margin: 16px 0 0; max-width: 34em; }
.small.alt { margin-top: 0; }
.small.alt a, .foot a { display: inline-block; padding: 11px 0; }
.form-msg { margin: 12px 0 0; font-weight: 600; }
.form-msg:empty { display: none; }
.form-msg.ok { font-weight: 800; font-stretch: 72%; font-size: 24px; line-height: 1.1; color: var(--biro); }
.form-msg.bad { color: var(--serial); }

.foot { max-width: var(--max); margin: 0 auto; padding: 20px 48px 48px; border-top: 2px solid var(--ink); font-size: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 32px; }
.foot p { margin: 0; max-width: 40em; }

/* tablet */
@media (max-width: 900px) {
  :root { --ruler: 100px; --gap: 28px; }
  .top, .day, .foot { padding-left: 32px; padding-right: 32px; }
  .when-n { font-size: 18px; }
  .when-d { font-size: 15px; }
  .open { grid-template-columns: 1fr; gap: 28px; }
  .price div { grid-template-columns: 1fr; gap: 4px; }
}

/* phone: the ruler becomes a label above each entry */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .top, .day, .foot { padding-left: 20px; padding-right: 20px; }
  .top { padding-top: 10px; padding-bottom: 6px; }
  .brand { font-size: 22px; }
  .brand .serial { display: none; }
  .day { display: block; }
  .when { flex-direction: row; align-items: baseline; gap: 10px; text-align: left; border-right: 0; padding: 0 0 6px; }
  .when:empty { display: none; }
  .when:not(:empty)::after { display: none; }
  .when-n { font-size: 19px; }
  .entry { padding-bottom: 44px; }

  .day-0 { padding-top: 16px; }
  .day-0 .entry { padding-bottom: 40px; }
  .biro { font-size: 46px; }
  .lede { font-size: 18px; margin-top: 16px; }
  .deal { font-size: 18px; margin-top: 16px; }
  .deal b { display: table; font-size: 22px; margin: 0 0 6px; }
  .actions { margin-top: 18px; gap: 10px; }
  .btn { width: 100%; text-align: center; }
  .open { gap: 24px; }
  .sheet { padding: 26px 18px 16px; }
  .quote { transform: none; margin-top: 0; }
  .sheet-firm { font-size: 24px; }
  .lines div { grid-template-columns: 60px 1fr; padding: 9px 0 7px; }
  .sheet-foot { margin-top: 10px; }

  .fortnight .entry { padding-bottom: 18px; }
  .fortnight .entry.head { padding-bottom: 24px; }
  .fortnight .answer .entry { padding-bottom: 40px; }
  .note { font-size: 17px; margin-top: 12px; }
  .picker { flex-wrap: nowrap; gap: 8px; }
  .picker button { flex: 1 1 0; padding: 8px 6px; font-size: 15px; text-align: center; }
  .picker button b { display: block; margin: 2px 0 0; }
  .slip { padding: 14px 16px 20px; }

  .band { padding-top: 28px; }
  .band .entry { padding-bottom: 28px; }
  .price { margin-top: 16px; }
  .price div { padding: 12px 0; }
  .plain { padding-top: 32px; }
  .plain .entry { padding-bottom: 36px; }
  .faq { margin-top: 16px; }
  .faq summary { font-size: 18px; }
  .ask .when { border-top: 2px solid var(--ink); padding-top: 10px; }
  .form { grid-template-columns: 1fr; margin-top: 20px; gap: 16px; padding-top: 30px; }
  .foot { padding-bottom: 32px; }
}

/* green hero block behind the top strip and day 0 */
.top, .day-0 { background: var(--hero-bg); color: var(--hero-fg); box-shadow: 0 0 0 100vmax var(--hero-bg); clip-path: inset(0 -100vmax); }
.top { border-bottom-color: rgba(255, 255, 255, .35); }
.top a { color: var(--hero-fg); }
.top .serial { color: var(--hero-accent); }
.day-0 .when { border-right-color: rgba(255, 255, 255, .6); }
.day-0 .when::after { background: var(--hero-bg); border-color: var(--hero-fg); }
.day-0 .biro { color: var(--hero-accent); }
.day-0 .sheet { background: #FFFFFF; color: var(--ink); box-shadow: 5px 6px 0 rgba(0, 0, 0, .28); }
.day-0 .deal b { background: #FFFFFF; color: var(--ink); }
.day-0 .btn { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 3px 3px 0 rgba(0, 0, 0, .4); }
.day-0 :focus-visible, .top :focus-visible { outline-color: var(--hero-fg); }
.fortnight { padding-top: 56px; }
.band { background: var(--white); }
.band .when:not(:empty)::after { background: var(--white); }
.form { background: var(--white); }
@media (max-width: 600px) { .fortnight { padding-top: 32px; } }

.brand .tag { font-weight: 600; font-stretch: 100%; font-size: 15px; letter-spacing: 0; margin-left: 10px; color: var(--hero-accent); }
@media (max-width: 600px) { .brand .tag { display: none; } }
