/*
Theme Name: Dru Riley 2026
Description: One-column redesign of druriley.com (front page Model A, essay page, book pages). Child of Independent Publisher 2; its own templates replace the parent's layout. Built in products/druriley-com/theme/druriley/ (flywheel repo).
Template: independent-publisher-2-wpcom
Version: 0.1.5
Text Domain: druriley
*/

:root{--bg:#fbfaf7;--ink:#1c1b19;--muted:#6f6b63;--line:#e7e3da;--accent:#0b6bcb;--card:#fff;--chip:#f1eee7}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit}
.col{max-width:680px;margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute;left:-9999px}

/* top bar (essays, pages, archives) */
.top{display:flex;align-items:center;justify-content:space-between;padding:22px 0;border-bottom:1px solid var(--line)}
.me{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:600;font-size:16px}
.me img{width:32px;height:32px;border-radius:50%;object-fit:cover}
.icons{display:flex;gap:2px}
.icons a{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9px;color:#8a857b;transition:color .15s,background .15s}
.icons a:hover{background:var(--chip);color:var(--brand)}
.icons a.ok{color:#2e7d32}
.icons svg{width:18px;height:18px;fill:currentColor}

/* front page hero */
header.hero{padding:64px 0 28px}
.who{display:flex;align-items:center;gap:16px;margin-bottom:22px}
.who img{width:72px;height:72px;border-radius:50%;object-fit:cover}
.who h1{font-size:28px;line-height:1.15;margin:0;letter-spacing:-.01em}
.who .sub{color:var(--muted);font-size:15px}
.line{font-size:21px;line-height:1.5;margin:0 0 18px;letter-spacing:-.005em}
.line b{background:linear-gradient(transparent 62%,#ffe08a 62%)}
header.hero .icons a{width:40px;height:40px}
header.hero .icons svg{width:20px;height:20px}

/* sections and lists */
section.s{padding:28px 0;border-top:1px solid var(--line)}
h2.k{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 14px;font-weight:600}
ol.list,ul.list{list-style:none;margin:0;padding:0}
.list li{padding:7px 0;display:flex;gap:10px;align-items:baseline}
.list .em{width:1.4em;flex:none;text-align:center}
.list .t{flex:1;text-decoration:none}
.list .t:hover{color:var(--accent)}
.list .d{color:var(--muted);font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}
details summary{cursor:pointer;color:var(--accent);font-weight:500;margin-top:10px;list-style:none}
details summary::-webkit-details-marker{display:none}
.month{font-size:13px;color:var(--muted);margin:18px 0 4px;font-weight:600}
iframe.pod{width:100%;height:180px;border:0;border-radius:12px}

/* most popular: emoji tiles with rank */
.pop-tiles ol{list-style:none;margin:0;padding:0}
.pop-tiles li{display:flex;gap:14px;align-items:center;padding:7px 0}
.pop-tiles .et{position:relative;width:44px;height:44px;flex:none;border-radius:12px;background:var(--chip);display:flex;align-items:center;justify-content:center;font-size:22px}
.pop-tiles .et i{position:absolute;right:-5px;bottom:-5px;font:600 11px/18px Inter,sans-serif;font-style:normal;min-width:18px;height:18px;border-radius:9px;background:var(--ink);color:#fff;text-align:center}
.pop-tiles a{font-weight:500;text-decoration:none}
.pop-tiles a:hover{color:var(--accent)}

/* books: bars on one shared baseline */
.bookbars li{display:grid;grid-template-columns:1.6em 8.5em 1fr 2.6em 6.6em;align-items:center;gap:10px;padding:5px 0}
.bookbars a{text-decoration:none}
.bookbars .track{height:8px;background:var(--chip);border-radius:4px;overflow:hidden}
.bookbars .bar{display:block;height:100%;background:var(--accent);opacity:.45;border-radius:4px}
.bookbars .n{text-align:right;font-variant-numeric:tabular-nums;font-size:14px}
.bookbars .u{color:var(--muted);font-size:13px;white-space:nowrap}
.bookbars li.solo a{grid-column:2/-1}

/* interviews and projects */
.art{width:32px;height:32px;border-radius:7px;object-fit:cover;flex:none;align-self:center;background:var(--chip)}
.iv li{align-items:center}
.proj{display:block;padding:10px 0;text-decoration:none}
.proj b{display:block}
.proj span{color:var(--muted);font-size:15px}

/* email asks */
.ask{margin:28px 0 0;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:24px;text-align:center}
.ask p{margin:0 0 14px;font-size:20px;font-weight:600;line-height:1.35}
.ask form{display:flex;gap:8px;max-width:420px;margin:0 auto}
.ask input{flex:1;min-width:0;font:inherit;font-size:16px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.ask button{font:inherit;font-size:16px;font-weight:600;padding:10px 16px;border:0;border-radius:10px;background:var(--ink);color:#fff;white-space:nowrap;cursor:pointer}
.ask.lead{margin:0 0 4px;padding:18px 20px}
.ask.lead p{font-size:17px;margin-bottom:12px}

/* essay */
.single h1,.page-title{font-size:38px;line-height:1.15;letter-spacing:-.015em;margin:40px 0 14px}
.meta{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:14px;margin:0 0 22px}
.inbooks{font-size:14px;color:var(--muted);margin:-12px 0 24px}
.inbooks a{color:var(--muted)}
.inbooks a:hover{color:var(--ink)}
.inbooks .rest{display:none}
.inbooks.open .rest{display:inline}
.inbooks.open .more{display:none}
.inbooks .more{border:0;background:none;font:inherit;color:var(--muted);text-decoration:underline;cursor:pointer;padding:0 0 0 4px}
.listen{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:0 0 26px}
.listen .lab{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.listen audio{flex:1;min-width:220px;height:36px}
.listen .apps{font-size:13px;color:var(--muted)}
.listen .apps a{color:var(--muted)}
.body{font-size:18px;line-height:1.7}
.body figure{margin:0 0 26px}
.body iframe{width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:12px}
.body h2,.body h3{line-height:1.3;margin:40px 0 10px}
.body h2{font-size:24px}
.body h3{font-size:20px}
.body p{margin:0 0 18px}
.body blockquote{margin:24px 0;padding:2px 0 2px 18px;border-left:3px solid var(--line);color:#3d3a35;font-style:italic}
.body blockquote cite{display:block;font-style:normal;font-size:14px;color:var(--muted);margin-top:4px}
.body ul,.body ol{padding-left:22px}
.body li{margin:4px 0}
.body img{max-width:100%;height:auto;border-radius:10px}
.body table{border-collapse:collapse;width:100%;font-size:16px}
.body td,.body th{border-bottom:1px solid var(--line);padding:6px 8px;text-align:left}
.has-text-align-center,.aligncenter{text-align:center}
.has-text-align-right{text-align:right}
.has-text-align-left{text-align:left}
.endshare{display:flex;align-items:center;gap:10px;margin:36px 0 0;padding-top:18px;border-top:1px solid var(--line);font-size:14px;color:var(--muted)}
.keep{margin:36px 0 0}
.keep li a{text-decoration:none}

/* book pages: numbered chapters */
.page .body ol{padding-left:2.2em}
.page .body ol li{padding:3px 0}
.page .body ol li a{text-decoration:none}
.page .body ol li a:hover{color:var(--accent);text-decoration:underline}

/* archives, search, 404 */
.archive-list{list-style:none;margin:24px 0;padding:0}
.archive-list li{display:flex;gap:12px;align-items:baseline;padding:8px 0;border-bottom:1px solid var(--line)}
.archive-list a{flex:1;text-decoration:none;font-weight:500}
.archive-list .d{color:var(--muted);font-size:13px;white-space:nowrap}
.pager{display:flex;justify-content:space-between;margin:20px 0;font-size:15px}
.pager a{color:var(--accent);text-decoration:none}

.site-foot{margin:56px 0 40px;padding-top:20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:14px}
.site-foot a{color:var(--muted);text-decoration:none}

@media (max-width:520px){
  body{font-size:16px}
  .line{font-size:19px}
  header.hero{padding:40px 0 20px}
  .ask form{flex-direction:column}
  .list .d{display:none}
  .bookbars li{grid-template-columns:1.4em 7.2em 1fr 2.4em}
  .bookbars .u{display:none}
  .single h1,.page-title{font-size:30px}
  .body{font-size:17px}
  .meta{flex-wrap:wrap;gap:6px}
}

/* The old bottom subscription bar (inline script on the site, Kit form 9074729) is replaced by this
   theme's asks. Hidden here so it goes away exactly when the theme is activated; the more specific
   selector beats the bar's own #dru-sub-bar{... !important} rules. Remove its script from WordPress
   after go-live. */
html body div#dru-sub-bar{display:none !important}

/* continuous reading: design A, one book with a picker (Dru, 2026-11-24) */
.chapter{margin:40px 0 0}
.chapter .where{font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 10px}
.chapter .where a{color:inherit;text-decoration:none}
.chapter .where a:hover{color:var(--ink)}
.chapter .next{display:block;text-decoration:none;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;transition:border-color .15s}
.chapter .next:hover{border-color:var(--ink)}
.chapter .next small{display:block;font-size:13px;color:var(--muted);margin:0 0 2px}
.chapter .next b{display:flex;justify-content:space-between;gap:16px;font-size:20px;line-height:1.3}
.chapter .next b:after{content:"\2192";flex:none}
.chapter .prev{display:inline-block;margin:12px 0 0;font-size:15px;color:var(--muted);text-decoration:none}
.chapter .prev:hover{color:var(--ink)}
.chapter .switch{margin:14px 0 0;font-size:14px;color:var(--muted)}
.chapter select{font:inherit;font-size:14px;color:var(--ink);background:var(--chip);border:0;border-radius:8px;padding:5px 8px;margin-left:4px;max-width:100%}
@media (max-width:520px){.chapter .next b{font-size:18px}}

/* No divider right under the front page's email card: the card's own border already closes it, and a rule
   4px below read as a stray line (Dru, 2026-11-24). */
.ask.lead + section.s{border-top:0;padding-top:24px}

/* An in-essay Transistor player keeps its own height (the 16:9 rule is for video). */
.body iframe[src*="transistor"]{aspect-ratio:auto;height:180px}
/* The highlighted streak never splits across lines ("310 / days in a row"). */
.line b{white-space:nowrap}
