/* ============================================================
   JAN'S RECIPES — cookbook layer on top of the shared base.css
   base.css is the SAME file the genealogy section uses (do not
   edit it here). This file holds the cookbook theme + the recipe
   components. Phone first: everything stacks under 720px.
   ============================================================ */

/* ---- Theme: indigo + plum on cool white (Jan's pick: blue / purple) ---- */
:root{
  --paper:      #f3f2fa;
  --paper-card: #ffffff;
  --ink:        #23213a;
  --muted:      #615c7c;
  --accent:     #3d3590;   /* indigo */
  --accent-2:   #7a3f9e;   /* plum */
  --line:       #dcd8ee;
  --display: "Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
}

.ic{ width:1em; height:1em; fill:none; stroke:currentColor; stroke-width:2;
     stroke-linecap:round; stroke-linejoin:round; vertical-align:-.14em; flex:none; }

/* ---- Category strip: one row, swipe sideways on a phone ---- */
.catstrip{ background:var(--paper-card); border-bottom:1px solid var(--line); }
.catstrip .wrap{ display:flex; gap:6px; overflow-x:auto; padding-top:9px; padding-bottom:9px;
                 scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
.catstrip a{ flex:none; text-decoration:none; color:var(--muted); font-size:.82rem;
             padding:5px 11px; border-radius:999px; border:1px solid transparent; white-space:nowrap; }
.catstrip a:hover{ color:var(--accent); border-color:var(--line); }
.catstrip a[aria-current]{ background:var(--accent); color:#fff; }

/* ---- Category hero: text + photo side by side, photo on top on a phone ---- */
.cat-hero{ display:grid; grid-template-columns:1.1fr 1fr; gap:34px; align-items:center; padding:40px 0 30px; }
.cat-hero .eyebrow{ font-size:.72rem; letter-spacing:.28em; text-transform:uppercase; color:var(--accent-2); margin-bottom:10px; }
.cat-hero h1{ font-size:clamp(2.3rem,6vw,3.6rem); margin:0; color:var(--accent); }
.cat-hero .context{ font-size:1.12rem; margin:12px 0 6px; max-width:40ch; }
.cat-hero .count{ color:var(--muted); font-style:italic; margin:0; }
.cat-hero-img{ margin:0; }
.cat-hero-img img{ width:100%; height:320px; object-fit:cover; object-position:50% 45%;
                   border-radius:var(--radius); box-shadow:0 12px 30px rgba(40,30,110,.18); }
.cat-hero-img figcaption{ font-size:.7rem; color:var(--muted); margin-top:6px; text-align:right; }

/* ---- Search + rating filter ---- */
.toolbar{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:14px 0;
          border-top:1px solid var(--line); }
.toolbar input{ font:inherit; font-size:1rem; padding:9px 14px; flex:1 1 220px; min-width:0;
                border:1px solid var(--line); border-radius:999px; background:var(--paper-card); color:var(--ink); }
.toolbar input:focus{ outline:2px solid var(--accent-2); outline-offset:1px; }
.rfilters{ display:flex; gap:6px; flex-wrap:wrap; }
.fbtn{ font:inherit; font-size:.82rem; display:inline-flex; gap:6px; align-items:center;
       padding:7px 12px; min-height:36px; border:1px solid var(--line); border-radius:999px;
       background:var(--paper-card); color:var(--muted); cursor:pointer; }
.fbtn span{ font-size:.72rem; opacity:.75; }
.fbtn.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* ---- Contents: every recipe on the page, with its rating ---- */
.toc{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:4px 18px;
      padding:6px 0 22px; }
.toc a{ display:flex; gap:8px; align-items:center; padding:6px 0; text-decoration:none; color:var(--ink);
        border-bottom:1px dotted var(--line); }
.toc a:hover{ color:var(--accent); }
.toc [hidden]{ display:none; }

/* ---- Rating badge ---- */
.rate{ display:inline-flex; gap:6px; align-items:center; font-size:.72rem; letter-spacing:.1em;
       text-transform:uppercase; color:var(--muted); }
.r-favorite{ color:#c0306e; }
.r-favorite.rate .ic, svg.r-favorite, [data-rfilter="favorite"] .ic{ fill:#c0306e; color:#c0306e; }
.fbtn.active .ic{ fill:none; color:#fff; }
.r-good{ color:var(--accent-2); }
.r-cut{ color:#2d6a8f; }
.r-untried{ color:var(--muted); }

/* ---- Recipe card ---- */
.recipe{ background:var(--paper-card); border:1px solid var(--line); border-radius:6px;
         margin:0 0 26px; box-shadow:0 2px 10px rgba(40,30,110,.05); scroll-margin-top:70px; }
.recipe[hidden]{ display:none; }
.toc a[hidden]{ display:none; }
.rhead{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px;
        padding:20px 24px 16px; border-bottom:1px solid var(--line); }
.rhead h2{ font-size:1.65rem; margin:6px 0 2px; color:var(--ink); }
.rhead .src{ color:var(--muted); font-style:italic; }
.ractions{ display:flex; flex-direction:column; gap:8px; align-items:stretch; }
.dlbtn.pdf, .dlbtn.share{ display:inline-flex; gap:6px; align-items:center; justify-content:center;
  font-size:.72rem; padding:9px 14px; min-height:40px; }
button.dlbtn{ font-family:inherit; background:transparent; cursor:pointer; }
.dlbtn.done{ background:var(--accent-2); color:#fff; }
.ver-src{ font-size:1.05rem; color:var(--accent); margin:0; padding:16px 24px 0; }
.ver-src + .rbody{ padding-top:8px; }
.rbody + .ver-src{ border-top:1px dashed var(--line); margin-top:4px; }

.rbody{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.45fr); gap:30px; padding:18px 24px 22px; }
.lbl{ font-family:var(--body); font-weight:normal; font-size:.7rem; letter-spacing:.18em;
      text-transform:uppercase; color:var(--accent-2); margin:0 0 8px; }
.grp{ font-family:var(--display); font-weight:600; color:var(--accent); margin:14px 0 2px; }
.ingr ul{ list-style:none; margin:0; padding:0; }
.ingr li{ padding:7px 0 7px 22px; position:relative; border-bottom:1px solid var(--line);
          line-height:1.4; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.ingr li::before{ content:""; position:absolute; left:2px; top:.8em; width:9px; height:9px;
                  border:1.5px solid var(--accent-2); border-radius:50%; }
.ingr li.got{ color:var(--muted); text-decoration:line-through; }
.ingr li.got::before{ background:var(--accent-2); }
.steps p{ margin:0 0 .9em; font-size:1.04rem; }
.mynotes{ margin:0 24px 22px; padding:12px 16px; background:var(--paper);
          border-left:3px solid var(--accent-2); border-radius:4px; }
.mynotes p{ margin:0 0 .4em; font-style:italic; }
.mynotes p:last-child{ margin-bottom:0; }

.none{ text-align:center; color:var(--muted); font-style:italic; padding:30px 0; }

/* ---- Legend ---- */
.legend{ border-top:1px solid var(--line); padding:24px 0 10px; color:var(--muted); }
.legend h3{ color:var(--ink); font-size:1.15rem; }
.legend ul{ list-style:none; padding:0; margin:0 0 10px; display:flex; flex-wrap:wrap; gap:8px 26px; }
.legend li{ display:flex; gap:8px; align-items:center; color:var(--ink); }
.legend p{ font-size:.9rem; font-style:italic; }


/* ---- Home: category cards, search, favorites ---- */
.homesearch{ display:flex; gap:8px; margin-top:18px; max-width:460px; }
.homesearch input{ font:inherit; font-size:1rem; padding:9px 14px; flex:1; min-width:0;
                   border:1px solid var(--line); border-radius:999px; background:var(--paper-card); color:var(--ink); }
.home-sec{ padding:26px 0 8px; }
.catgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.catcard{ display:block; text-decoration:none; color:var(--ink); background:var(--paper-card);
          border:1px solid var(--line); border-radius:6px; overflow:hidden;
          transition:box-shadow .15s, transform .15s; }
.catcard:hover{ color:var(--ink); box-shadow:0 10px 24px rgba(40,30,110,.14); transform:translateY(-2px); }
.catcard-img{ margin:0; }
.catcard-img img{ width:100%; height:150px; object-fit:cover; }
.catcard-text{ padding:12px 16px 16px; }
.catcard h3{ margin:0; color:var(--accent); font-size:1.25rem; display:inline; }
.catcard .n{ font-size:.75rem; color:var(--muted); margin-left:8px; }
.catcard p{ margin:6px 0 0; font-size:.9rem; color:var(--muted); line-height:1.45; }

/* ---- Recipe index ---- */
.cat-hero.solo{ grid-template-columns:1fr; padding-bottom:10px; }
.az{ display:flex; flex-wrap:wrap; gap:4px; padding:4px 0 14px; }
.az a{ text-decoration:none; min-width:32px; text-align:center; padding:5px 0; border-radius:4px;
       font-family:var(--display); font-weight:600; }
.az a:hover{ background:var(--line); }
.igroup{ scroll-margin-top:60px; }
.igroup[hidden], .irow[hidden]{ display:none; }
.igroup h2{ font-size:1.4rem; color:var(--accent-2); margin:18px 0 4px; }
.irow{ display:flex; gap:10px; align-items:baseline; padding:9px 4px; text-decoration:none; color:var(--ink);
       border-bottom:1px solid var(--line); }
.irow:hover{ background:var(--paper-card); color:var(--accent); }
.irow .t{ flex:1; }
.irow .c{ font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); white-space:nowrap; }

/* ---- About ---- */
.about{ display:grid; grid-template-columns:220px 1fr; gap:30px; align-items:start; padding:10px 0 24px; }
.about-photo{ width:220px; height:220px; object-fit:cover; border-radius:50%;
              border:4px solid var(--paper-card); box-shadow:0 8px 22px rgba(40,30,110,.18); }

.legacy{ position:relative; top:-70px; }
.site-nav a[aria-current]{ opacity:1; text-decoration:underline; }


/* ---- Want to Try ---- */
.surprise{ margin-top:16px; font-size:.95rem; padding:9px 18px; }
.trygroup h2{ display:flex; align-items:center; gap:12px; font-size:1.3rem; margin:26px 0 6px; }
.trygroup h2 a{ display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--accent); }
.trygroup h2 .n{ font-size:.8rem; color:var(--muted); font-family:var(--body); font-weight:normal; }
.trythumb{ margin:0; }
.trythumb img{ width:52px; height:40px; object-fit:cover; border-radius:4px; }
.irow.picked{ background:#efe9fb; outline:2px solid var(--accent-2); }
.trycallout{ display:flex; gap:14px; align-items:center; margin:26px 0 4px; padding:16px 20px; text-decoration:none;
             color:var(--ink); background:var(--paper-card); border:1px solid var(--line); border-left:4px solid var(--accent-2);
             border-radius:6px; }
.trycallout:hover{ color:var(--ink); box-shadow:0 8px 20px rgba(40,30,110,.12); }
.trycallout > .ic{ width:1.6em; height:1.6em; color:var(--accent-2); }
.trycallout b{ font-family:var(--display); color:var(--accent); font-size:1.15rem; margin-right:6px; }
.trycallout .go{ margin-left:auto; font-size:1.4rem; color:var(--accent-2); }

/* ---- Phone ---- */
@media (max-width:720px){
  .wrap{ padding:0 16px; }
  .site-nav .wrap{ min-height:46px; gap:14px; }
  .cat-hero{ grid-template-columns:1fr; gap:18px; padding:18px 0 20px; }
  .cat-hero-img{ order:-1; margin:0 -16px; }
  .cat-hero-img img{ height:190px; border-radius:0; box-shadow:none; }
  .cat-hero-img figcaption{ padding:0 16px; }
  .toc{ grid-template-columns:1fr; }
  .site-nav .wide{ display:none; }
  .trygroup .irow{ flex-wrap:wrap; row-gap:0; }
  .trygroup .irow .c{ flex-basis:100%; padding-left:26px; white-space:normal; font-size:.66rem; }
  .site-nav .wrap{ gap:12px; }
  .recipe{ margin:0 -16px 18px; border-radius:0; border-left:0; border-right:0; }
  .rhead{ padding:16px 16px 12px; }
  .rhead h2{ font-size:1.4rem; }
  .ver-src{ padding:14px 16px 0; }
  .rbody{ grid-template-columns:1fr; gap:14px; padding:14px 16px 18px; }
  .ingr li{ padding:9px 0 9px 24px; }
  .catgrid{ grid-template-columns:1fr 1fr; gap:12px; }
  .catcard-img img{ height:110px; }
  .catcard-text{ padding:10px 12px 12px; }
  .catcard h3{ font-size:1.05rem; display:block; }
  .catcard .n{ margin:0; }
  .catcard p{ display:none; }
  .about{ grid-template-columns:1fr; justify-items:center; }
  .about-photo{ width:170px; height:170px; }
}

@media print{
  .site-nav,.catstrip,.toolbar,.toc,.legend,.dlbtn,.cat-hero-img{ display:none !important; }
  .recipe{ break-inside:avoid; box-shadow:none; }
  .ingr li.got{ text-decoration:none; color:var(--ink); }
}
