/* ==========================================================================
   TUCKWELL PRESS — SITEWIDE DESIGN SYSTEM
   Drop-in stylesheet that re-skins the existing FrontPage-era table markup
   WITHOUT requiring any HTML/structure changes. Works on every page that
   shares the classic layout (banner image, MSFPnav buttons, font-tag text,
   bgcolor table cells, blockquote cover images, lists with id="..." etc.)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --gold:#937139;
  --gold-light:#c9a66b;
  --green:#2f5233;
  --green-dark:#1f3a22;
  --cream:#faf6ee;
  --ink:#1f1a12;
  --paper:#ffffff;
  --muted:#4a4030;
}

/* ---------- base reset / page canvas ---------- */
html{ scroll-behavior:smooth; }
body{
  background:
    radial-gradient(circle at 20% -10%, rgba(147,113,57,0.10), transparent 45%),
    radial-gradient(circle at 100% 10%, rgba(47,82,51,0.08), transparent 50%),
    var(--cream) !important;
  color:var(--ink) !important;
  font-family:'Inter', 'book antiqua', 'times new roman', times, sans-serif !important;
  line-height:1.65;
  margin:0;
  padding:0;
}

/* old <font face="book antiqua..."> wrappers inherit the new type scale */
font, p, li, td{
  font-family:'Inter', 'book antiqua', 'times new roman', times, sans-serif;
  font-size:15.5px;
  color:var(--muted);
}

a{
  color:var(--green) !important;
  text-decoration:none;
  transition:color .2s ease, opacity .2s ease;
}
a:hover{ color:var(--gold) !important; }
a:visited{ color:#6f8a73 !important; }

/* ---------- outer layout tables become invisible scaffolding ---------- */
table{
  border:0 !important;
  border-collapse:collapse;
  width:100%;
  max-width:1000px;
  margin:0 auto;
}
table table{ max-width:100%; } /* nested content tables */

/* ---------- top banner image (the GIF logo banner) ---------- */
img[src*="_bnr."], img[src*="banner"]{
  display:block;
  margin:28px auto 18px;
  filter:drop-shadow(0 10px 24px rgba(31,26,18,0.18));
  border-radius:10px;
}

/* wrap the banner row in a dark gradient strip for depth */
table:first-of-type{
  background:linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding:30px 10px 36px;
  border-radius:0 0 22px 22px;
  box-shadow:0 14px 30px rgba(31,26,18,0.18);
  margin-bottom:30px;
}
table:first-of-type font,
table:first-of-type p{ color:#fff; }

/* ---------- FrontPage nav buttons (MSFPnav1/2/3 images) ---------- */
img[name^="MSFPnav"]{
  border-radius:12px;
  background:var(--paper);
  padding:6px;
  box-shadow:0 6px 18px rgba(31,26,18,0.14);
  transition:transform .2s ease, box-shadow .2s ease;
  margin:4px 8px;
}
a:has(img[name^="MSFPnav"]){ display:inline-block; }
img[name^="MSFPnav"]:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 26px rgba(147,113,57,0.35);
}

/* ---------- headings / titles rendered via <font size="6"> or <h#> ---------- */
h1, h2, h3,
font[size="6"], font[size="5"], font[size="7"]{
  font-family:'Playfair Display', serif !important;
  color:var(--gold) !important;
  font-style:italic;
  letter-spacing:0.3px;
  line-height:1.3;
  display:inline-block;
  padding:6px 2px 12px;
  background-image:linear-gradient(90deg, var(--gold), var(--gold-light));
  background-position:bottom left;
  background-repeat:no-repeat;
  background-size:72px 4px;
}

/* ---------- book cover / content images inside blockquotes ---------- */
blockquote img,
td img:not([name^="MSFPnav"]):not([src*="_bnr"]):not([src*="tuck.gif"]){
  border-radius:10px;
  box-shadow:0 18px 36px rgba(0,0,0,0.22);
  transform:rotate(-2deg);
  transition:transform .35s ease, box-shadow .35s ease;
  max-width:100%;
}
blockquote img:hover,
td img:not([name^="MSFPnav"]):not([src*="_bnr"]):not([src*="tuck.gif"]):hover{
  transform:rotate(0deg) scale(1.03);
  box-shadow:0 22px 44px rgba(0,0,0,0.3);
}

/* small inline logo mark (tuck.gif) stays crisp, aligned */
img[src*="tuck.gif"]{
  vertical-align:middle;
  margin-right:6px;
}

/* ---------- content "cards": any td that isn't the footer strip ---------- */
td{
  padding:18px 22px;
  vertical-align:top;
}

/* ---------- footer bar (bgcolor="#336633" strip ONLY) ---------- */
td[bgcolor="#336633"]{
  background:var(--green) !important;
  border-radius:14px;
  padding:14px !important;
  margin-top:30px;
}
td[bgcolor="#336633"] font, td[bgcolor="#336633"] small{
  color:#fff !important;
  letter-spacing:0.5px;
  opacity:0.9;
}

/* ---------- section header strip (legacy mustard bgcolor="#B3A14B") ---------- */
td[bgcolor="#B3A14B"]{
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%) !important;
  border-radius:10px 10px 0 0;
  padding:14px !important;
}
td[bgcolor="#B3A14B"] font, td[bgcolor="#B3A14B"] p{
  color:#fff !important;
  font-weight:600;
  letter-spacing:0.4px;
}

/* ---------- title-list rows (legacy bgcolor="#E6D09E") become clean cards ---------- */
td[bgcolor="#E6D09E"]{
  background:var(--paper) !important;
  border-bottom:1px solid rgba(147,113,57,0.15);
  padding:13px 20px !important;
  transition:background .18s ease, padding-left .18s ease;
}
td[bgcolor="#E6D09E"]:hover{
  background:var(--cream) !important;
  padding-left:26px !important;
}
td[bgcolor="#E6D09E"] a{
  font-weight:600;
  font-size:15px;
}
/* empty trailing legacy rows (blank spacer cells) collapse cleanly */
td[bgcolor="#E6D09E"]:empty,
td[bgcolor="#E6D09E"]:has(font:empty){
  padding:4px !important;
  border-bottom:none;
}

/* list tables (New Titles, Subject List etc.) get a card shell + caption styling */
table[width="227"], table[cellspacing="2"]{
  max-width:620px;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 16px 40px rgba(31,26,18,0.10);
  margin:10px auto 30px;
}
table caption{
  text-align:center;
  padding:4px 0 14px;
}
table caption font{
  font-family:'Playfair Display', serif !important;
  color:var(--gold) !important;
  font-style:italic;
  font-size:26px !important;
  display:inline-block;
  padding:0 6px 10px;
  background-image:linear-gradient(90deg, var(--gold), var(--gold-light));
  background-position:bottom;
  background-repeat:no-repeat;
  background-size:100% 4px;
}

/* ---------- highlighted gold body copy (font color="#937139") ---------- */
font[color="#937139"], font[color="#997B40"]{
  color:var(--muted) !important;
}

/* ---------- lists: keep structure/ids/symbols intact, just restyle ---------- */
ul, ol{
  margin:14px 0 14px 22px;
  padding:0;
}
ul li, ol li{
  margin-bottom:8px;
}
ul[id] { /* numbered/symbol ids from legacy markup are preserved, only visuals change */
  list-style:none;
  padding-left:4px;
}
ul[id] li{
  position:relative;
  padding-left:20px;
}
ul[id] li::before{
  content:"»";
  color:var(--gold);
  position:absolute;
  left:0;
  font-weight:700;
}

/* ---------- generic call-to-action look for text links grouped at page end ---------- */
p a, li a{
  font-weight:600;
  border-bottom:1px solid transparent;
}
p a:hover, li a:hover{
  border-bottom:1px solid var(--gold);
}

/* ---------- responsive behavior ---------- */
@media (max-width:720px){
  table[width], table[width] td{
    width:100% !important;
    display:block;
  }
  td[width="298"], td[width="299"], td[width="300"]{
    width:100% !important;
  }
  blockquote img, td img{
    margin:0 auto;
    display:block;
  }
}

/* ---------- neutralize legacy fixed pixel heights (fixes mail.html etc.) ---------- */
table[height], tr[height], td[height]{
  height:auto !important;
}

/* ---------- two-column info layout (image + text, e.g. mail.html) ---------- */
td[width="35%"]{
  text-align:center;
  padding:30px 20px;
}
td[width="35%"] blockquote{
  margin:0;
}

/* ---------- larger legacy copy sizes used for addresses/contact blocks ---------- */
font[size="4"], font[size="3"]{
  font-size:15.5px !important;
  line-height:1.7;
}
font[face*="GillSans"]{
  font-family:'Playfair Display', serif !important;
}

/* wrap bold intro labels like "SEND YOUR ORDERS..." into a small eyebrow tag look */
b font[size="4"], b > font{
  font-family:'Inter', sans-serif !important;
  font-size:13px !important;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--green) !important;
  font-weight:700 !important;
}

/* the organisation name line (size 5, GillSans) reads as a sub-heading */
b font[size="5"]{
  font-family:'Playfair Display', serif !important;
  font-size:24px !important;
  color:var(--gold) !important;
  font-style:italic;
  font-weight:700 !important;
  display:block;
  margin-top:4px;
}

/* turn the whole address/contact paragraph into a soft card */
td > font > font > p:has(b){
  background:linear-gradient(135deg, rgba(47,82,51,0.05), rgba(147,113,57,0.07));
  border-left:4px solid var(--gold);
  border-radius:10px;
  padding:18px 22px;
  margin:18px 0;
}

/* ---------- subtle page-load polish ---------- */
body{
  animation:fadeIn .4s ease-in;
}
@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}
