/* delbius redesign: the one stylesheet for every page. Breakpoints: 700px (two columns) and 960px (desktop). */

/* ---------- tokens and base ---------- */
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-var.woff2) format("woff2");font-weight:100 900;font-display:swap}
:root{
  --ink:#13263a; --paper:#f7f7f7; --muted:#4f5866; --line:#d5dae1; --ink-muted:#a9b6c6;
  --blue:#3e8dcb;      /* logo blue: decoration only */
  --link:#125d97;      /* link blue: everything clickable */
  --field:#7d8794;   /* form field border */
  --bar:5px;         /* blue bar under every cover image */
  --under:3px;       /* gap under every thin underline */
  --white:#fff;      /* pure white: boxes, fields and text on blue */
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --gut:16px;
  --space-sub:40px;      /* above a subheading inside a page */
  --space-section:64px;  /* above a heading that starts a new section */
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:400 17px/1.6 var(--sans);font-feature-settings:"ss01","cv11";
  display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}   /* on a short page the footer still reaches the bottom of the window */
main{flex:1 0 auto}
a{color:inherit}
img{max-width:100%;display:block}
h1{font:900 clamp(56px,17vw,148px)/.86 var(--sans);letter-spacing:-.055em;margin:0 0 18px;white-space:nowrap}
h2{margin:0}
/* every section heading and subheading on the site is defined here, once */
.sechead h2,.prose h2{font:850 clamp(26px,3.5vw,34px)/1.2 var(--sans);letter-spacing:-.02em}
.prose h3,.rsub,.touch,.prose .refs h2,.agroup h2,.rhead,.legal h2{font:700 clamp(19px,2.6vw,22px)/1.3 var(--sans);letter-spacing:0;color:var(--ink)}
/* text links in running text; :where keeps this weak, so controls and cards set their own */
:where(p,li,figure,figcaption,td,th,dd) a{color:var(--link);text-underline-offset:var(--under)}
/* small capital labels: menu, dates, categories, card types, previous/next */
.label,.nav a,.sechead a,.cats a,.wmeta,.pmeta,.rkind,.pager a span,.cover .chip{font:500 12px/1.4 var(--mono);letter-spacing:.06em;text-transform:uppercase}
/* titles and summaries of posts and cards in lists */
.post h3,.wtitle{font-weight:750;font-size:20px;line-height:1.2;letter-spacing:-.015em}
.post p,.wsum,.rgrid p{font-size:15px;line-height:1.6;color:var(--muted)}
/* the blue accent underline: "All writing", the current filter, list titles on hover */
.sechead a,.cats a[aria-current],.post:hover h3,.post:focus-visible h3,.wrow:hover .wtitle,.wrow:focus-visible .wtitle{text-decoration:underline;text-decoration-color:var(--blue);text-decoration-thickness:3px;text-underline-offset:4px}
.wrap{max-width:1180px;margin:0 auto;padding:0 var(--gut)}

/* ---------- header and footer ---------- */
.top{border-bottom:2px solid var(--ink);background:var(--paper)}
.top .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;min-height:56px}
.brand{display:flex;align-items:center;gap:10px;min-height:56px;text-decoration:none;font:800 19px/1 var(--sans);letter-spacing:-.02em}
.brand img{width:34px;height:34px}
.nav{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--ink);width:calc(100% + 2*var(--gut));margin:0 calc(-1*var(--gut))}
.nav a{display:flex;align-items:center;justify-content:center;min-height:48px;text-decoration:none;border-right:1px solid var(--ink)}
.nav a:last-child{border-right:0}
.nav a:hover,.nav a:focus-visible{background:var(--link);color:var(--white)}
footer{margin-top:56px;background:var(--ink);color:var(--paper);padding:28px 0 40px}
footer .label{color:var(--ink-muted)}
footer p{margin:6px 0 0}
.footrow{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:0 24px}
footer a{color:inherit;text-underline-offset:var(--under);padding:6px 0}
@media (max-width:699px){.footrow{font-size:14px;gap:0 16px}}

/* ---------- home: hero ---------- */
.hero{padding:52px 0 36px}
.hero-grid{display:flex;flex-direction:column}
.hero-grid>div{display:contents}
.lede{font:600 clamp(19px,4.8vw,26px)/1.3 var(--sans);letter-spacing:-.01em;margin:0 0 24px;max-width:22em}
.photo{order:1;margin:0 10px 24px 0}
.frame{position:relative}
.frame::before{content:"";position:absolute;inset:10px -10px -10px 10px;background:var(--blue)}
.photo img{position:relative;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:50% 15%;filter:grayscale(1) contrast(1.08)}
/* a photo credit, set as a label; captions in posts are sentences and use the caption style */
.photo figcaption{margin-top:20px;color:var(--muted)}
.bio{order:2}
.bio p{max-width:34em;font-size:18px;line-height:1.7;margin:0 0 1em}

/* ---------- home: latest writing ---------- */
.sec{padding:44px 0 8px}
.sechead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:2px solid var(--ink);padding-bottom:10px;margin-bottom:8px}
.sechead a{padding:12px 0}
.posts{list-style:none;margin:0;padding:0;display:grid;gap:0}
.post{display:grid;grid-template-columns:96px 1fr;gap:16px;padding:20px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.post h3{margin:2px 0 6px}
.post .meta,.wmeta,.pmeta,.rkind{color:var(--muted)}   /* dates, categories, card types */
.post p{margin:6px 0 0}
.cover{display:flex;flex-direction:column;justify-content:space-between;align-self:start;position:relative;overflow:hidden;aspect-ratio:1;background:var(--ink);color:var(--paper)}
.cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cover::after{content:"";position:absolute;left:0;right:0;bottom:0;height:var(--bar);background:var(--blue)}
.cover .chip{position:absolute;left:0;top:0;background:var(--ink);color:var(--white);font-weight:600;line-height:1;padding:7px 9px}   /* heavier: it sits on a small picture */

/* ---------- inner pages: shared title ---------- */
.wpage{padding:52px 0 64px}
.ptitle{font-size:clamp(48px,8vw,96px);margin:0 0 24px;white-space:normal}

/* ---------- writing list ---------- */
.cats{display:flex;flex-wrap:wrap;gap:4px 24px;border-bottom:2px solid var(--ink);padding-bottom:6px}
.cats a{color:var(--link);padding:12px 0;text-decoration:none}
.cats a[aria-current]{color:var(--ink)}
.wlist{list-style:none;margin:0;padding:0}
.wlist li{border-bottom:1px solid var(--line)}
.wrow{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;padding:24px 0;text-decoration:none;color:var(--ink);align-items:start}
.wcover{display:block;aspect-ratio:1;border-bottom:var(--bar) solid var(--blue);overflow:hidden}
.wcover img{width:100%;height:100%;object-fit:cover}
.wtext>span{display:block}
.wtitle{margin:6px 0}

/* ---------- posts (one set of styles for every post) ---------- */
.post-page{padding:52px 0 64px}
.narrow{max-width:760px}
.medium{max-width:960px}   /* card pages: a little wider than the reading column */
.pmeta{margin:0 0 16px}
.ptitle2{font-size:clamp(34px,6vw,60px);line-height:1.02;letter-spacing:-.035em;white-space:normal;margin:0 0 28px}
.pcover{width:100%;aspect-ratio:16/9;object-fit:cover;border-bottom:var(--bar) solid var(--blue);margin-bottom:36px}
.sharebar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:-12px 0 24px}
/* the footer starts here */
.sharebar.end{margin:48px 0 0;border-top:2px solid var(--ink);padding-top:22px}
/* a secondary action, outlined and small; the Sign up button is the main action and is filled */
.share{display:inline-flex;align-items:center;height:34px;padding:0 12px;font:400 13px/1 var(--sans);text-decoration:none;color:var(--link);background:transparent;border:1.5px solid var(--link);cursor:pointer}
.share:hover,.share:focus-visible{background:var(--link);color:var(--white)}
/* quiet text links: category filters, and "All writing" and previous/next under a post */
.back,.pager a{font:400 15px/1.35 var(--sans);color:var(--link);text-decoration:none}
.back:hover,.back:focus-visible,.pager a:hover,.pager a:focus-visible,.cats a:not([aria-current]):hover,.cats a:not([aria-current]):focus-visible{text-decoration:underline;text-underline-offset:var(--under)}
.back{margin-right:auto;align-self:center;padding:10px 0}

/* long reading is 18px; lists, notes and forms elsewhere stay at the 17px body size on purpose */
.prose{font-size:18px;line-height:1.7}
.prose p,.prose ul,.prose ol{margin:0 0 1.1em}
.prose a{overflow-wrap:anywhere}
.prose a img{cursor:zoom-in}
.prose h2{margin:2em 0 .7em;padding-top:.6em;border-top:2px solid var(--ink)}
.prose h3{margin:var(--space-sub) 0 .6em}
.prose figure{margin:1.4em 0;text-align:center}
.prose img{height:auto}
/* captions, footnotes and references: back matter, small and grey */
.prose figcaption,.prose .wp-block-footnotes,.prose .refs{font-size:14px;line-height:1.6;color:var(--muted)}
.prose figcaption{margin-top:8px}
/* one quote style; .example is what the build calls an indented passage */
.prose blockquote,.prose .example{font-size:17px;background:var(--white);border-left:4px solid var(--blue);padding:18px 22px 4px;margin:1.4em 0}
/* no post has a table yet; kept for posts that bring one */
.prose table{display:block;overflow-x:auto;border-collapse:collapse}
.prose td,.prose th{border:1px solid var(--line);padding:6px 10px}
/* References: back matter, quieter than a section, whatever its format */
.prose .refs{margin-top:2.6em;overflow-wrap:anywhere}
.prose .refs h2{border:0;padding:0;margin:0 0 12px}
.prose .refs p,.prose .refs ol{margin:0 0 .8em}

/* optional: a small icon on the same line as its heading (the 7 Rules post) */
.prose .wp-block-group{min-width:0}
.prose .wp-block-group:has(img[src*="/Rule"]),.prose div:has(>figure img[src*="/Rule"]){display:flex;align-items:center;gap:18px;margin:var(--space-sub) 0 .8em}
.prose figure:has(img[src*="/Rule"]){flex:0 0 auto;margin:0}
.prose img[src*="/Rule"]{width:84px;height:84px;border-radius:16px;object-fit:cover;filter:grayscale(1);mix-blend-mode:multiply}
.prose div:has(>figure img[src*="/Rule"])>h3{margin:0;flex:1;min-width:0}

/* previous and next post, oldest to newest: quiet, below the post footer's rule */
.pager{display:grid;gap:16px;margin-top:28px}
.pager a{display:block}
.pager a span{display:block;color:var(--ink);margin-bottom:4px}
@media (min-width:700px){.pager{grid-template-columns:1fr 1fr;gap:48px}.pager .next{grid-column:2;text-align:right}}

/* ---------- appearances ---------- */
.agroup h2{margin:var(--space-section) 0 0}
.agroup ol{list-style:disc;margin:18px 0 0;padding:0 0 0 1.2em}
.agroup li{margin:0 0 16px;padding-left:4px}
.agroup li:last-child{margin-bottom:0}
.agroup li::marker{color:var(--ink)}
.agroup strong{font-weight:500}
.aphoto{margin:8px 0 0 24px} /* lines up with the bullet text it belongs to */
.aphoto img{width:100%}

/* ---------- resources ---------- */
.notify{color:var(--muted);margin:0}
.rhead{margin:var(--space-section) 0 0}
.rsub{margin:var(--space-section) 0 18px}
.notify+.rsub{margin-top:var(--space-sub)}
.rgrid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:32px 28px}
.rgrid li{display:flex;flex-direction:column}
.rthumb{display:block;aspect-ratio:4/3;overflow:hidden}
.rthumb img{width:100%;height:100%;object-fit:cover}
.rkind{margin-top:14px}
.rgrid h3{font:400 20px/1.3 var(--sans);margin:6px 0}   /* regular weight on purpose: resource cards, not posts */
.rgrid p{margin:0}
.elsew{max-width:40em}
.elsew ul{padding-left:1.2em;margin:0 0 1.4em}
.elsew li{margin:0 0 8px;padding-left:4px}

/* ---------- sign up ---------- */
.touch{margin:0 0 28px}
.signup{max-width:440px}
.signup label{display:block;margin:0 0 6px;font-size:15px}
.signup input[type=email],.signup input[type=text]{display:block;width:100%;height:48px;margin:0 0 20px;padding:0 12px;font:400 17px var(--sans);color:var(--ink);background:var(--white);border:1px solid var(--field);border-radius:0}
.signup input:focus-visible{outline:3px solid var(--blue);outline-offset:1px}
.signup button{height:48px;padding:0 28px;font:400 16px var(--sans);color:var(--white);background:var(--link);border:0;cursor:pointer}
.signup button:hover,.signup button:focus-visible{background:var(--ink)}
.hp{position:absolute;left:-5000px}

/* ---------- privacy ---------- */
.legal h2{margin:var(--space-sub) 0 12px}
.legal p{margin:0 0 1em}

/* ---------- breakpoints ---------- */
@media (max-width:699px){
  /* phones: both buttons on one line, "All writing" on its own line under them */
  .sharebar.end{justify-content:flex-start}
  .sharebar.end .back{order:2;flex-basis:100%}
  .cover .chip{font-size:9px;padding:5px 6px}   /* smaller on purpose: it sits on a 96px thumbnail */
  .prose img[src*="/Rule"]{width:60px;height:60px}
  .prose div:has(>figure img[src*="/Rule"]){gap:14px}
}
@media (min-width:600px){.rgrid{grid-template-columns:1fr 1fr}}
@media (min-width:700px){
  :root{--gut:32px}
  .hero{padding-top:56px}
  .hero-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:32px;row-gap:0;align-items:start}
  .hero-grid h1{grid-column:1;grid-row:1;margin-bottom:22px;font-size:clamp(48px,7.5vw,72px)}
  .hero-grid .lede{grid-column:1;grid-row:2}
  .hero-grid .bio{grid-column:1;grid-row:3}
  .hero-grid .photo{grid-column:2;grid-row:1/span 3;margin:0 10px 0 0;width:auto}
  .post{grid-template-columns:140px 1fr;gap:24px}
  .wrow{grid-template-columns:260px minmax(0,1fr);gap:28px}
  .wcover{aspect-ratio:16/9}
  .wtitle{font-size:24px}   /* full-width rows take bigger titles than the three-across home cards */
  .post p,.wsum,.rgrid p{font-size:16px}
  .wsum{max-width:38em}
}
@media (min-width:960px){
  :root{--gut:40px}
  .top .wrap{min-height:72px}
  .nav{border-top:0;display:flex;gap:0;width:auto;margin:0}
  .nav a{padding:0 16px;border-right:0;min-height:44px}
  /* the whole hero fits the window: the portrait gets shorter and the name scales with height */
  .hero-grid h1{font-size:clamp(60px,min(8vw,12vh),104px)}
  .hero-grid .photo{max-width:440px;justify-self:end;width:100%}
  .photo img{aspect-ratio:auto;height:clamp(300px,calc(100vh - 193px),580px)}
  .posts{grid-template-columns:repeat(3,1fr);gap:28px}
  .post{grid-template-columns:1fr;border-bottom:0;padding:24px 0 0}
  .cover{aspect-ratio:16/9}
  .wrow{grid-template-columns:340px minmax(0,1fr);gap:40px;padding:32px 0}
  .wtitle{font-size:30px}
  .rgrid{grid-template-columns:repeat(3,1fr)}
}
.preview-note{margin:12px 0 0;font-weight:600}   /* only the staging copy fills it */
