@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;700;800;900&display=swap');

:root {
  --green: #0AE57F;
  --green-wash: #E3FBEF;
  --ink: #0B0B0C;
  --ink-2: #3B3D42;
  --ink-3: #74777E;
  --line: #E6E7EA;
  --paper: #FFFFFF;
  --soft: #F6F7F8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Onest', -apple-system, system-ui, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px 80px; }

/* Cover */
.cover {
  background: var(--green);
  color: var(--ink);
  padding: 56px 20px 64px;
}
.cover .wrap { padding-bottom: 0; }
.cover img.logo { height: 34px; display: block; margin-bottom: 72px; }
.cover .kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 10px;
}
.cover h1 {
  font-size: clamp(36px, 7vw, 60px); line-height: 1.02; font-weight: 900;
  letter-spacing: -.02em; margin: 0 0 20px;
}
.cover p.lead { font-size: 19px; max-width: 34em; margin: 0; font-weight: 500; }
.cover p.version { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 32px 0 0; }
.note.new { margin-top: 24px; }
.note.new ul { margin: 6px 0 0; padding-left: 20px; }

/* Table of contents */
nav.toc { margin: 40px 0 8px; padding: 22px 24px; background: var(--soft); border-radius: 18px; }
nav.toc h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; color: var(--ink-3); border: 0; padding: 0; }
nav.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
nav.toc li { margin: 2px 0; break-inside: avoid; }
nav.toc a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav.toc a:hover { text-decoration: underline; }

/* Sections */
section { margin-top: 56px; }
h2 {
  font-size: 30px; line-height: 1.15; font-weight: 900; letter-spacing: -.015em;
  margin: 0 0 16px; padding-top: 18px; border-top: 4px solid var(--ink);
}
h2 .num { color: var(--ink-3); font-weight: 800; margin-right: 10px; }
h3 { font-size: 20px; font-weight: 800; margin: 32px 0 8px; letter-spacing: -.005em; }
h4 { font-size: 15px; font-weight: 800; margin: 20px 0 4px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }
a { color: var(--ink); }
strong { font-weight: 700; }
.ui { font-weight: 700; white-space: nowrap; }

/* Text + phone screenshots side by side */
.row { display: grid; grid-template-columns: 1fr 210px; gap: 32px; align-items: start; margin: 18px 0 8px; }
.row.two { grid-template-columns: 1fr 210px 210px; }
.row.flip { grid-template-columns: 210px 1fr; }
.shot { margin: 0; }
/* Phone frame: same frame and screen inset as skaftgolf.com */
.phone { position: relative; width: 100%; aspect-ratio: 690 / 1400; filter: drop-shadow(0 10px 22px rgba(0,0,0,.14)); }
.phone .scr { position: absolute; left: 5.1%; top: 2.2%; width: 89.9%; height: 95.6%; object-fit: cover; object-position: top; border-radius: 13% / 6.2%; display: block; }
.phone .frm { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shot figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0 12px; }
/* Laptop frame */
.laptop { width: 100%; padding: 0 5%; filter: drop-shadow(0 12px 22px rgba(0,0,0,.14)); }
.laptop .lid { background: #111214; border-radius: 14px 14px 0 0; padding: 2.4% 2.4% 3%; position: relative; }
.laptop .lid::before { content: ''; position: absolute; top: 0.9%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #2c2e33; }
.laptop .lid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; border-radius: 2px; }
.laptop .base { height: 14px; margin: 0 -5.5%; background: linear-gradient(#26282c, #0b0b0c); border-radius: 0 0 14px 14px; position: relative; }
.laptop .base::before { content: ''; position: absolute; top: 0; left: 50%; width: 16%; margin-left: -8%; height: 5px; background: #3a3c41; border-radius: 0 0 6px 6px; }
.web { margin: 20px 0 12px; }
.web figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

/* Callouts */
.note {
  background: var(--green-wash); border-left: 5px solid var(--green);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0;
}
.note.grey { background: var(--soft); border-left-color: var(--ink); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note .label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

/* Numbered steps */
ol.steps { list-style: none; counter-reset: s; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 46px; margin: 14px 0; }
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--ink);
  font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
td:first-child { font-weight: 700; white-space: nowrap; }

.pill { display: inline-block; background: var(--green); color: var(--ink); font-weight: 800; font-size: 11px; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }

footer.end { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
footer.end img { height: 20px; display: block; margin-bottom: 10px; }

@media (max-width: 720px) {
  .row, .row.two, .row.flip { grid-template-columns: 1fr; }
  .row .shot, .row.flip .shot { max-width: 230px; }
  .row.two .shot { max-width: 230px; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  nav.toc ol { columns: 1; }
  td:first-child { white-space: normal; }
}

/* Print / PDF */
@page { size: A4; margin: 16mm 14mm 16mm; }
@page :first { margin: 0; }
@media print {
  body { font-size: 10.5pt; }
  .cover { height: 297mm; padding: 34mm 16mm 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-after: page; }
  .cover .wrap { padding: 0; }
  .cover img.logo { margin-bottom: 120mm; height: 12mm; }
  .wrap { padding: 0; max-width: none; }
  nav.toc { margin-top: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  section { margin-top: 30px; }
  h2 { font-size: 21pt; break-after: avoid; }
  h3, h4 { break-after: avoid; }
  .pb { break-before: page; }
  .row, .shots, .web, .note, table, figure, ol.steps > li { break-inside: avoid; }
  .row { grid-template-columns: 1fr 40mm; gap: 8mm; }
  .row.two { grid-template-columns: 1fr 36mm 36mm; gap: 6mm; }
  .row.flip { grid-template-columns: 40mm 1fr; }
  .shots { grid-template-columns: repeat(3, 40mm); justify-content: start; gap: 8mm; }
  .note, .pill, ol.steps > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; }
}
@media print {
  .shot figcaption { font-size: 8.5pt; }
  p, li { orphans: 3; widows: 3; }
  .phone, .laptop { filter: none; }
  .laptop .lid, .laptop .base, .laptop .base::before, .laptop .lid::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .web { width: 82%; }
  .shots .web { width: 100%; }
}
