/* Shared stylesheet for the newsletter pages: the archive (weekly.html) and
   every issue page under weekly/. The pages themselves are generated by a
   script from the issue list, so edit the script, not the generated HTML.

   The token block, header, nav and footer rules are copied from the case study
   stylesheet; if those change there, change them here too. The issue body is a
   self-contained fragment with its own scoped styles under .pw-issue; the only
   rules here that touch it undo the site header padding and hide its wordmark,
   which would repeat the one in the site header directly above it. */

:root{
  --ink:#1F2421;
  --amber:#C8852B;
  --amber-soft:#E9A94A;
  --paper:#FBFBF8;
  --slate:#787C75;
  --amber-text:#956320;
  --text-muted:#666A63;
  --tint:#F3F1EA;
  --hair:#E4E1D8;
  --serif:"DM Serif Display", Georgia, serif;
  --sans:"DM Sans", system-ui, sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0;}
html{-webkit-font-smoothing:antialiased;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  line-height:1.6;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.wrap{width:100%;max-width:1000px;margin:0 auto;padding:0 32px;}
.narrow{max-width:744px;}

/* top bar */
header{padding:30px 0 0;}
header .wrap{display:flex;justify-content:space-between;align-items:baseline;}
.wordmark{font-family:var(--serif);font-size:25px;letter-spacing:-.01em;color:var(--ink);white-space:nowrap;}
.wordmark a{color:inherit;text-decoration:none;}
.wordmark .ai{color:var(--amber);}
.nav{display:flex;gap:26px;align-items:baseline;}
.nav a{font-size:14.5px;color:var(--text-muted);text-decoration:none;letter-spacing:.01em;white-space:nowrap;transition:color .2s ease;}
.nav a:hover,.nav a[aria-current="page"]{color:var(--amber-text);}
@media(max-width:680px){
  .nav{gap:16px;}
  .nav a{font-size:13.5px;}
  .nav .cta{display:none;}
  .nav .home{display:none;}
}
@media(max-width:520px){
  header .wrap{flex-direction:column;align-items:flex-start;gap:10px;}
}
@media(max-width:360px){
  /* Four links fit one row on the narrowest phones only at a slightly smaller size. */
  .nav{gap:12px;}
  .nav a{font-size:12.5px;}
}

main{flex:1;}
.eyebrow{font-weight:700;font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--amber-text);margin-bottom:16px;}

/* archive hero */
.wk-hero{padding:72px 0 40px;}
.wk-hero h1{font-family:var(--serif);font-weight:400;letter-spacing:-.01em;font-size:clamp(34px,4.4vw,50px);line-height:1.1;margin-bottom:22px;}
.wk-intro{font-size:clamp(17px,2vw,19px);color:var(--text-muted);max-width:56ch;line-height:1.55;text-wrap:pretty;}

/* sign-up form */
.wk-signup{padding:8px 0 56px;}
.wk-box{
  background:#fff;border:1px solid var(--hair);border-radius:6px;padding:28px 28px 24px;max-width:680px;
  box-shadow:0 1px 2px rgba(31,36,33,.05),0 16px 34px -18px rgba(31,36,33,.18);
}
.wk-box .eyebrow{margin-bottom:10px;}
.wk-box .wk-lead{font-size:15.5px;color:var(--text-muted);line-height:1.6;margin-bottom:20px;max-width:56ch;}
.wk-form{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px;align-items:end;}
.wk-field{display:flex;flex-direction:column;gap:6px;min-width:0;}
.wk-field.full{grid-column:1 / -1;}
.wk-field label{font-size:13.5px;font-weight:500;color:var(--ink);}
.wk-field label .opt{font-weight:400;color:var(--text-muted);}
.wk-field input{
  width:100%;font:inherit;font-size:16px;color:var(--ink);background:var(--paper);
  border:1px solid #CFCBC0;border-radius:4px;padding:11px 12px;min-height:46px;
}
.wk-field input::placeholder{color:#9A9D96;}
.wk-field input:focus{outline:2px solid var(--amber);outline-offset:1px;border-color:var(--amber);}
.wk-consent{grid-column:1 / -1;display:flex;gap:10px;align-items:flex-start;font-size:15px;line-height:1.45;cursor:pointer;}
.wk-consent input{width:20px;height:20px;margin-top:1px;flex:none;accent-color:var(--amber);}
.wk-hp{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}
.wk-go{grid-column:1 / -1;display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.wk-btn{
  font:inherit;font-weight:500;font-size:16px;letter-spacing:.01em;cursor:pointer;
  background:var(--ink);color:var(--paper);border:0;border-radius:6px;padding:15px 28px;min-height:48px;
  transition:background .2s ease, transform .2s ease;
}
.wk-btn:hover{background:var(--amber);transform:translateY(-1px);}
.wk-btn[disabled]{opacity:.6;cursor:wait;transform:none;}
.wk-status{font-size:14.5px;color:var(--text-muted);}
.wk-status.err{color:#9B3B26;}
.wk-done{font-family:var(--serif);font-size:clamp(22px,2.6vw,26px);line-height:1.3;color:var(--ink);padding:6px 0 4px;}
.wk-ask{margin-top:18px;padding-top:14px;border-top:1px solid var(--hair);font-size:14.5px;color:var(--text-muted);}
.wk-ask a{color:var(--amber-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;}

/* issue list */
.wk-list{padding:24px 0 40px;}
.wk-list h2{font-family:var(--serif);font-weight:400;font-size:clamp(26px,3.2vw,34px);line-height:1.2;margin-bottom:12px;}
.wk-issues{list-style:none;border-bottom:1px solid var(--hair);max-width:760px;}
.wk-issue{position:relative;padding:22px 0;border-top:1px solid var(--hair);}
.wk-issue .eyebrow{margin-bottom:8px;}
.wk-issue h3{font-family:var(--serif);font-weight:400;font-size:clamp(22px,2.6vw,27px);line-height:1.25;margin-bottom:6px;text-wrap:balance;}
.wk-issue h3 a{color:var(--ink);text-decoration:none;}
.wk-issue h3 a::after{content:"";position:absolute;inset:0;}
.wk-issue:hover h3 a{color:var(--amber-text);}
.wk-issue h3 a:focus-visible{outline:2px solid var(--amber);outline-offset:3px;}
.wk-issue p{font-size:15px;color:var(--text-muted);line-height:1.55;}
.wk-empty{font-size:16px;color:var(--text-muted);padding:22px 0;border-top:1px solid var(--hair);}

/* issue page */
.wk-back{padding-top:36px;}
.wk-back a{font-size:14.5px;color:var(--text-muted);text-decoration:none;}
.wk-back a:hover{color:var(--amber-text);}
.pw-issue header{padding:0;}
.pw-issue .pw-wordmark{display:none;}
.pw-issue .pw-caption{margin-top:0;}
.wk-after{padding:16px 0 56px;}

/* footer */
footer{border-top:1px solid var(--hair);}
footer .wrap{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap;padding:26px 32px 34px;}
footer .line{font-family:var(--serif);font-size:18px;color:var(--ink);}
footer .contacts{font-size:14px;color:var(--text-muted);text-align:right;line-height:1.7;}
footer .contacts b{color:var(--ink);font-weight:700;}

@media(max-width:680px){
  .wk-hero{padding:48px 0 32px;}
  .wk-box{padding:22px 18px 20px;}
  .wk-form{grid-template-columns:1fr;}
  .wk-btn{width:100%;}
}
@media(max-width:520px){
  .wrap{padding:0 20px;}
  footer .wrap{padding:26px 20px 34px;}
}
