/* The blog (15-blog.html, 16-article.html). The index is the register a shop keeps by the till:
   a date in the margin, what it was about, and how long it takes on the right. An article is a
   sheet out of it. Loaded after scroll.css and day.css. */
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
.norail main{padding-left:0}

/* ---------- index: the head, and who keeps the book ---------- */
.bhero{display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr);gap:24px 48px;align-items:end;padding-bottom:24px}
.bhero .head2{max-width:none;margin:0}
.bhero h1{font-size:clamp(34px,4.6vw,60px);margin:12px 0 14px}
.seek{position:relative;max-width:520px;margin-top:24px}
.seek input{width:100%;font:500 16px Karla,system-ui,sans-serif;color:var(--ink);padding:13px 46px 13px 16px;border:2px solid var(--ink);border-radius:12px;background:#fff}
.seek input:focus{outline:0;border-color:#0b6e63;box-shadow:0 0 0 4px rgba(43,191,161,.25)}
.seek kbd{position:absolute;right:11px;top:10px;padding:2px 9px;pointer-events:none}
#found{min-height:1.5em;margin-top:10px;font:13.5px var(--mono);color:var(--ink-2)}
/* the owner at the desk, built from the film's own cut-outs */
.writer{height:300px;background:url(monitor.webp) calc(50% + 70px) 44px/150px auto no-repeat,url(owner.webp) calc(50% - 96px) 100%/auto 262px no-repeat,url(desk.webp) calc(50% + 78px) 100%/290px auto no-repeat}

/* ---------- index: the newest three, taped above the book ---------- */
.fresh{padding-block:24px 40px}
.pinned{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.pinned a{position:relative;display:flex;flex-direction:column;gap:8px;padding:26px 22px 20px;background:#fff;color:inherit;text-decoration:none;box-shadow:var(--shadow);rotate:-.6deg}
.pinned a:nth-child(2){rotate:.5deg;background:var(--sand)}
.pinned a:nth-child(3){rotate:-.2deg}
.pinned a::before{content:"";position:absolute;top:-10px;left:50%;width:84px;height:22px;translate:-50% 0;rotate:-3deg;background:rgba(43,191,161,.38)}
.pinned span{font:12.5px var(--mono);color:var(--ink-2)}
.pinned h3{font-size:19px;line-height:1.25;letter-spacing:-.02em}
.pinned p{font-size:15px;line-height:1.45;color:var(--ink-2)}
.pinned b{margin-top:auto;padding-top:6px;font:700 12.5px var(--mono);color:var(--teal-d)}
.pinned a:hover h3,.pinned a:focus-visible h3{text-decoration:underline}

/* ---------- the register ---------- */
.book{position:relative;background:var(--card);border-left:14px solid var(--ink);border-radius:4px 10px 10px 4px;box-shadow:var(--shadow)}
/* the margin rule runs the height of the page, the way a ruled register's does */
.book::before{content:"";position:absolute;z-index:1;top:0;bottom:0;left:104px;width:2px;background:rgba(43,191,161,.55);pointer-events:none}
.tabs{display:flex;gap:6px;padding:12px 16px 0 118px;overflow-x:auto;scrollbar-width:none;background:var(--paper);border-radius:0 10px 0 0}
.tabs a{flex:none;display:flex;gap:8px;align-items:baseline;padding:9px 16px 8px;border-radius:10px 10px 0 0;background:var(--c);color:inherit;text-decoration:none;font:600 14px var(--disp)}
.tabs b{font:700 12px var(--mono);color:var(--ink-2)}
.part,.tabs a{--c:#dff1ec}
#how-to,.tabs a[href="#how-to"]{--c:#e2eefb}
#operations,.tabs a[href="#operations"]{--c:#ece6f7}
#technology,.tabs a[href="#technology"]{--c:var(--sand)}
.part{scroll-margin-top:8px}                    /* the page already stops jumps below the header */
.part-head{padding:22px 24px 18px 124px;background:var(--c)}
.part-head h2{font-size:clamp(22px,2.6vw,30px);margin-bottom:6px}
.part-head p{max-width:80ch;font-size:15.5px;color:var(--ink-2)}
.entries{list-style:none;margin:0;padding:0}
.entry{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:2px 44px;align-items:baseline;padding:15px 24px 15px 0;border-bottom:1px solid rgba(30,111,190,.2);color:inherit;text-decoration:none}
.entry time{font:12.5px var(--mono);color:var(--ink-2);text-align:right;white-space:nowrap}
.entry b{font:600 17.5px/1.3 var(--disp);letter-spacing:-.015em}
.entry span span{display:block;margin-top:3px;font-size:15px;line-height:1.45;color:var(--ink-2)}
.entry i{font:700 12.5px var(--mono);font-style:normal;color:var(--teal-d);white-space:nowrap}
/* the line you're on is run over with the highlighter */
.entry:hover b,.entry:focus-visible b{background:linear-gradient(transparent 58%,rgba(43,191,161,.3) 58%)}
.sum,.grand{display:flex;justify-content:flex-end;gap:18px;padding:10px 24px 22px;font:12.5px var(--mono);color:var(--ink-2)}
.grand{padding:16px 24px;border-top:2px solid var(--ink);color:var(--ink);font-weight:700}
.seeking .sum,.seeking .grand{display:none}
/* where the rail is hidden the tabs ride along under the header, and a section stops below them */
@media (max-width:1179px){.tabs{position:sticky;z-index:5;top:var(--head)} .part{scroll-margin-top:50px}}
@media (hover:none){.seek kbd{display:none}}        /* no key to press on a touch screen */

/* ---------- article: the head ---------- */
/* how far down the sheet you are; where the browser can't tie an animation to the scroll, there is no bar */
/* (the live site draws it with the header's own #progress bar, which starts at scaleX(0)) */
@supports (animation-timeline:scroll()){
  .article #progress{animation:prog linear both;animation-timeline:scroll()}
  @keyframes prog{to{transform:scaleX(1)}}
}
.ahero{max-width:calc(1018px + 2 * clamp(16px,4vw,56px));padding-bottom:28px}
.back{font:600 14px var(--disp);color:var(--teal-d);text-decoration:none}
.back:hover{text-decoration:underline}
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:22px 0 0;font:12.5px var(--mono);color:var(--ink-2)}
.ahero h1{font-size:clamp(30px,4.4vw,54px);margin:14px 0 16px}
.dek{font-size:clamp(18px,1.6vw,21px);line-height:1.5;color:var(--ink-2);max-width:60ch}
.byline{display:flex;align-items:center;gap:14px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line);font-size:14.5px;color:var(--ink-2)}
.byline img{width:44px;height:44px;border-radius:50%;background:#dff1ec;object-fit:cover;object-position:50% 4%}
.byline b{color:var(--ink);font:600 15px var(--disp)}
.share{margin-left:auto;display:flex;gap:8px}
.share a{padding:7px 14px;border-radius:99px;background:var(--card);box-shadow:0 1px 3px rgba(30,44,76,.14);color:var(--ink);text-decoration:none;font:600 13px var(--disp)}

/* ---------- article: the contents slip and the sheet ---------- */
.leaf{display:grid;grid-template-columns:230px minmax(0,740px);gap:0 48px;justify-content:center;padding-top:8px}
.toc{position:sticky;top:calc(var(--head) + 28px);align-self:start;display:grid;gap:2px;padding:26px 18px 18px;background:#fff;box-shadow:var(--shadow);rotate:-.6deg}
.toc::before{content:"";position:absolute;top:-10px;left:50%;width:74px;height:22px;translate:-50% 0;rotate:-3deg;background:rgba(43,191,161,.38)}
.toc h2{font:600 12px var(--disp);letter-spacing:.14em;text-transform:uppercase;color:var(--teal-d);margin-bottom:8px}
.toc a{padding:5px 0;font-size:14.5px;line-height:1.35;color:var(--ink-2);text-decoration:none;border-bottom:1px dashed var(--line)}
.toc a:hover,.toc a.on{color:var(--ink)}           /* .on: the heading you are reading (app.js) */
.toc p{margin-top:10px;font:12px var(--mono);color:var(--ink-2)}
@media (max-height:640px){.toc{position:static}}
.prose{background:var(--card);border-radius:6px;box-shadow:var(--shadow);padding:44px clamp(20px,5vw,56px) 48px;font-size:17.5px;line-height:1.7}
.prose > :first-child{margin-top:0}
.prose p,.prose ul,.prose ol{margin:0 0 18px}
.prose .lead{font-size:20.5px;line-height:1.55}
.prose h2{font-size:clamp(23px,2.5vw,29px);margin:44px 0 14px;scroll-margin-top:calc(var(--head) + 20px)}
.prose h3{font-size:19.5px;margin:30px 0 10px}
.prose ul,.prose ol{padding-left:24px}
.prose li{margin-bottom:8px}
.prose li::marker{color:var(--teal-d);font-weight:700}
.prose a{color:var(--teal-d);text-underline-offset:3px}
.prose code{font:.9em var(--mono);padding:1px 6px;border-radius:5px;background:#eef2f7}
/* an aside is a note taped into the page */
.prose blockquote,.prose .note{position:relative;margin:30px 0;padding:22px 24px 18px;background:var(--sand);color:#5f4307;font-size:16px;line-height:1.55;box-shadow:0 6px 16px rgba(30,44,76,.1)}
.prose blockquote::before,.prose .note::before{content:"";position:absolute;top:-9px;left:28px;width:70px;height:20px;rotate:-3deg;background:rgba(43,191,161,.38)}
.prose .note > :last-child{margin-bottom:0}
.prose figure{margin:30px 0}
.prose figure img{display:block;width:100%;height:auto;border:5px solid var(--ink);border-radius:10px;background:#f1f4f8}
.prose figure.phone-shot img{max-width:300px;margin-inline:auto}
.prose figcaption{margin-top:10px;font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.prose .scroll-x{overflow-x:auto;margin:0 0 22px}
.prose table{width:100%;border-collapse:collapse;font-size:16px}
.prose th{padding:10px 14px;background:var(--ink);color:#fff;text-align:left;font:600 14px var(--disp)}
.prose td{padding:9px 14px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
.prose tbody tr:nth-child(even) td{background:#f6f8fb}
.prose .cta-box{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 24px;margin:34px 0 26px;padding:22px 24px;border-radius:10px;background:#e6f1ee}
.prose .cta-box p{margin:0;flex:1;min-width:220px}
.prose .cta-box .btn{color:#fff}

/* more from the same part of the book */
.rel-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 24px;margin-bottom:22px}
.rel-head h2{font-size:clamp(24px,3vw,36px)}
.rel-head a{font:600 15px var(--disp);color:var(--teal-d)}

@media (max-width:900px){
  .leaf{grid-template-columns:minmax(0,1fr)}
  .toc{position:static;rotate:none;margin-bottom:28px}
}
@media (max-width:760px){
  .bhero{grid-template-columns:1fr;padding-bottom:8px}
  .writer{height:210px;background-size:105px auto,auto 184px,204px auto;background-position:calc(50% + 50px) 31px,calc(50% - 68px) 100%,calc(50% + 55px) 100%}
  .pinned{grid-template-columns:1fr;gap:26px}
  .pinned a{rotate:none !important}
  .book{border-left-width:8px}
  .book::before{left:14px}
  .tabs{padding-left:10px}
  .part-head{padding:18px 16px 16px 28px}
  .entry{grid-template-columns:1fr auto;gap:4px 16px;padding:14px 16px 14px 28px}
  .entry time{text-align:left}
  .entry > span{grid-column:1 / -1;grid-row:2}
  .sum,.grand{padding-inline:16px}
  .byline{flex-wrap:wrap}
  .share{margin-left:0;width:100%}
  .prose{font-size:17px;padding-top:32px}
  .prose .lead{font-size:19px}
}
/* the search hides things that have a display of their own */
[hidden]{display:none !important}
.bhero h1 em{font-style:normal;color:var(--teal-d)}
