/* =========================================================
   THEME-NEUTRAL BASELINE
   Prepended to every theme's CSS. Covers behavior that must work
   regardless of theme (anchor-scroll to the quote form under a sticky
   topbar) and a plain fallback for arbitrary site-authored HTML inside
   CONFIG["cost_body"] (tables, lists) that a theme's own CSS doesn't
   otherwise style.
========================================================= */
*{ box-sizing: border-box; }

/* Browsers default <figure> to `margin: 1em 40px`, which throws off any
   grid/flex pairing it sits in (e.g. an image beside a quote-form box) —
   the sibling box ends up looking like it "sticks out" below the image. */
figure{ margin: 0; }

html, body{ max-width: 100%; overflow-x: clip; }

html, body{
  scroll-behavior: smooth;
  scroll-padding-top: calc(110px + env(safe-area-inset-top));
}

#quote-panel{
  scroll-margin-top: calc(110px + env(safe-area-inset-top));
}

@media (min-width: 900px){
  html, body{ scroll-padding-top: 80px; }
  #quote-panel{ scroll-margin-top: 80px; }
}

[hidden]{ display: none !important; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Fallback styling for arbitrary CONFIG["cost_body"] markup (tables, lists)
   that a theme's own stylesheet doesn't specifically target. */
table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 14px 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  overflow: hidden;
}
thead th{
  background: rgba(0,0,0,.04);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.12);
  white-space: nowrap;
  font-size: 13px;
}
td{
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,.10);
  font-size: 14px;
}
tbody tr:last-child td{ border-bottom: none; }
.table-scroll{ max-width: 100%; }
@media (max-width: 640px){
  .table-scroll{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll table{ min-width: 720px; }
}

/* Feed Calendar: a feed-and-seed store's wall calendar on barn boards.
   Two-color job printing (barn red + black) on cream stock, the picture in
   full color, a stapled month pad of squares. */
:root{
  --board-a:#7b6a58; --board-b:#6c5c4b; --board-c:#857361;
  --stock:#f7f0dc; --stock-2:#efe5c9; --red:#b3261e; --red-d:#8a1b15; --ink:#1d1a16; --rule:#2a2520;
  --soft:#6b5f4e;
}
body.fcl-body{
  margin:0; color:var(--ink); font:400 16px/1.6 'Libre Franklin',system-ui,sans-serif;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 148px),
    repeating-linear-gradient(90deg, transparent 0 37px, rgba(255,255,255,.035) 37px 39px, transparent 39px 74px),
    linear-gradient(90deg, var(--board-a) 0 33%, var(--board-b) 33% 66%, var(--board-c) 66%) 0 0/444px 100%;
}
a{ color:inherit; }

/* ---------- buttons ---------- */
.fcl-btn, .btn{
  display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:8px 22px; border:0; border-radius:3px;
  background:var(--red); color:var(--stock); cursor:pointer; text-decoration:none;
  font:400 17px/1 'Ultra',Georgia,serif; letter-spacing:.03em; box-shadow:inset 0 0 0 2px var(--red), inset 0 0 0 4px var(--stock);
}
.fcl-btn:hover, .btn:hover{ background:var(--red-d); box-shadow:inset 0 0 0 2px var(--red-d), inset 0 0 0 4px var(--stock); }
.fcl-btn--big{ min-height:54px; font-size:19px; padding:10px 24px; }
.btn.ghost{ background:transparent; color:var(--ink); box-shadow:inset 0 0 0 2px var(--ink); }

/* ---------- the hanging calendar ---------- */
.fcl-wall{ position:relative; padding:24px 20px 60px; }
.fcl-nail{ position:absolute; top:18px; left:50%; width:16px; height:16px; margin-left:-8px; border-radius:50%;
  background:radial-gradient(circle at 40% 35%, #d9d9d9, #6f6f6f 70%); box-shadow:0 3px 3px rgba(0,0,0,.5); z-index:51; }
.fcl-cal{
  position:relative; max-width:940px; margin:0 auto; background:var(--stock); padding:0 0 0;
  box-shadow:0 30px 50px -24px rgba(0,0,0,.75), 0 2px 0 rgba(0,0,0,.15);
}
.fcl-hole{ position:absolute; top:-26px; left:50%; width:22px; height:22px; margin-left:-11px; border-radius:50%;
  background:radial-gradient(circle, transparent 0 6px, #c9c2b1 6px 9px, transparent 9px); z-index:51; }
.fcl-cal::before{ /* string from nail to the punched hole */
  content:""; position:absolute; top:-38px; left:50%; width:2px; height:28px; margin-left:-1px; background:#3b3326; z-index:51; }

/* die-cut tabs along the top edge, on a strip of wall that stays pinned
   while the calendar scrolls (the wall pattern only varies across, so the
   full-width strip matches it exactly) */
.fcl-tabs{
  position:sticky; top:0; z-index:50; display:flex; align-items:flex-end; gap:8px; height:40px;
  margin:0 -20px; padding:0 max(42px, calc(50% - 428px));
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 148px),
    repeating-linear-gradient(90deg, transparent 0 37px, rgba(255,255,255,.035) 37px 39px, transparent 39px 74px),
    linear-gradient(90deg, var(--board-a) 0 33%, var(--board-b) 33% 66%, var(--board-c) 66%) 0 0/444px 100%;
}
.fcl-tabs .fcl-tab--red{ margin-left:auto; }
.fcl-tab{
  display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:6px 18px 4px; border-radius:10px 10px 0 0;
  background:var(--stock-2); color:var(--ink); text-decoration:none; font:800 14px 'Libre Franklin',sans-serif; letter-spacing:.14em; text-transform:uppercase;
  box-shadow:inset 0 -5px 6px -5px rgba(0,0,0,.35);
}
.fcl-tab[aria-current="page"]{ background:var(--stock); box-shadow:none; }
.fcl-tab--red{ background:var(--red); color:var(--stock); letter-spacing:.06em; font:400 15px 'Ultra',Georgia,serif; text-transform:none; }
.fcl-tab--red:hover{ background:var(--red-d); }

/* the picture */
.fcl-pic{ padding:26px 26px 0; }
.fcl-pic img{ display:block; width:100%; height:auto; aspect-ratio:12/5; object-fit:cover; border:1px solid rgba(0,0,0,.25); }

/* the two-color imprint */
.fcl-imprint{
  margin:18px 26px 0; padding:16px 0 22px; text-align:center; border-top:6px solid var(--red); border-bottom:2px solid var(--ink);
  box-shadow:0 -10px 0 -7px var(--ink) inset;
}
.fcl-brand{ display:inline-flex; flex-direction:column; align-items:center; gap:6px; margin:6px 0 4px; text-decoration:none; color:var(--red);
  font:400 clamp(28px, 4.6vw, 52px)/1.05 'Ultra',Georgia,serif; letter-spacing:.01em; }
.fcl-brand img{ display:block; width:46px; height:46px; border-radius:50%; border:3px solid var(--red); background:#fff; flex:0 0 auto; }
.fcl-imprint h1{ margin:6px auto 16px; max-width:760px; font:800 clamp(18px, 2.1vw, 23px)/1.3 'Libre Franklin',sans-serif; letter-spacing:.12em; text-transform:uppercase; color:var(--ink); overflow-wrap:break-word; }
.fcl-order{ max-width:560px; margin:0 auto; }
.fcl-order__lbl{ display:block; margin:0 0 8px; font:600 14px/1.35 'Libre Franklin',sans-serif; letter-spacing:.06em; text-transform:uppercase; color:var(--soft); }
.fcl-ziprow{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.fcl-zip{
  flex:0 1 190px; min-width:0; width:100%; height:54px; padding:0 14px; border:2px solid var(--ink); border-radius:3px; background:#fffdf5;
  font:400 26px 'Ultra',Georgia,serif; letter-spacing:.14em; color:var(--ink); text-align:center;
}
.fcl-zip::placeholder{ color:#b9ad92; letter-spacing:.04em; }
.fcl-zip:focus{ outline:3px solid var(--red); outline-offset:2px; }
.fcl-order--call{ display:flex; flex-direction:column; align-items:center; }

/* ---------- month pad ---------- */
.fcl-pad{ position:relative; display:block; margin:26px 26px 0; padding:26px 0 0; border-top:1px dashed #b8ab8c; }
.fcl-staple{ position:absolute; top:-5px; width:44px; height:6px; border-radius:2px; background:linear-gradient(#e2e4e6, #8f9499); box-shadow:0 1px 1px rgba(0,0,0,.4); }
.fcl-staple--l{ left:22%; } .fcl-staple--r{ right:22%; }
.fcl-memo{ padding:14px 0; border-bottom:1px solid var(--ink); }
.fcl-memo p{ margin:0; font-size:19px; line-height:1.55; }
.fcl-days{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); border-left:1px solid var(--ink); border-top:3px solid var(--ink); }
.fcl-day{ min-width:0; padding:14px 14px 14px; border-right:1px solid var(--ink); border-bottom:1px solid var(--ink); background:var(--stock); }
.fcl-day h2{ margin:0 0 8px; font:800 18px/1.3 'Libre Franklin',sans-serif; color:var(--ink); }
.fcl-day p{ margin:0 0 8px; font-size:15px; line-height:1.55; }
.fcl-day ul{ margin:0 0 8px; padding:0; list-style:none; }
.fcl-day li{ position:relative; padding:3px 0 3px 18px; font-size:15px; line-height:1.5; }
.fcl-day li::before{ content:""; position:absolute; left:2px; top:10px; width:8px; height:8px; background:var(--red); transform:rotate(45deg); }
.fcl-day h3{ margin:10px 0 4px; font:800 15px 'Libre Franklin',sans-serif; color:var(--red); }
.fcl-day--red h2{ color:var(--red); }
.fcl-day--red{ background:linear-gradient(var(--stock), var(--stock)) padding-box, var(--stock); }
.fcl-day--red strong{ position:relative; display:inline-block; padding:0 6px; color:var(--red); font:400 20px 'Ultra',Georgia,serif; }
.fcl-day--red strong::after{ /* red pencil circle */
  content:""; position:absolute; inset:-4px -3px; border:2px solid var(--red); border-radius:50%; transform:rotate(-4deg);
}
.fcl-day--blank{ background:repeating-linear-gradient(-45deg, transparent 0 9px, rgba(42,37,32,.05) 9px 10px), var(--stock); min-height:110px; }
/* a lone wide square for long cost-page content */
.fcl-day:has(.table-scroll){ grid-column:1 / -1; }
.table-scroll table{ background:#fffdf5; border:2px solid var(--ink); border-radius:0; }
.table-scroll thead th{ background:var(--ink); color:var(--stock); font:800 12px 'Libre Franklin',sans-serif; letter-spacing:.12em; text-transform:uppercase; }
.table-scroll td{ font-size:15px; border-bottom:1px solid rgba(0,0,0,.15); }

/* ---------- trade area ---------- */
.fcl-trade{ margin:26px 26px 0; padding:14px 0 6px; border-top:3px solid var(--ink); }
.fcl-trade h2{ margin:0 0 2px; font:400 24px 'Ultra',Georgia,serif; color:var(--red); }
.muted{ margin:0 0 6px; color:var(--soft); font-size:15px; }
.fcl-cities{ columns:3 240px; column-gap:26px; }
.city-group__title{ break-after:avoid; margin:10px 0 2px; font:800 13px 'Libre Franklin',sans-serif; letter-spacing:.16em; text-transform:uppercase; color:var(--red); }
.city-grid{ list-style:none; margin:0 0 6px; padding:0; }
.city-grid li{ display:inline; font-size:14px; line-height:1.85; white-space:nowrap; }
.city-grid li:not(:last-child)::after{ content:" \2014"; color:#b8ab8c; }
.city-grid a{ text-decoration:none; }
.city-grid a:hover{ color:var(--red); text-decoration:underline; }
hr{ border:0; border-top:2px solid var(--ink); }

/* ---------- footer: bottom of the calendar ---------- */
.fcl-foot{ margin:26px 0 0; padding:20px 26px 24px; text-align:center; background:var(--red); color:var(--stock); }
.fcl-foot .fcl-btn{ background:var(--stock); color:var(--red); box-shadow:inset 0 0 0 2px var(--stock), inset 0 0 0 4px var(--red); }
.fcl-foot__links{ display:flex; justify-content:center; gap:20px; margin:14px 0 2px; font-size:14px; }
.fcl-foot__copy{ margin:0; font-size:14px; }

/* ---------- estimate / legal ---------- */
.est-body{ margin:0; font:400 16px/1.55 'Libre Franklin',sans-serif; color:var(--ink);
  background:repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 148px), linear-gradient(90deg, var(--board-a) 0 33%, var(--board-b) 33% 66%, var(--board-c) 66%) 0 0/444px 100%; }
.est-page{ max-width:980px; margin:36px auto 30px; background:var(--stock); box-shadow:0 30px 50px -24px rgba(0,0,0,.75); }
.topbar--estimate{ padding:18px 24px 14px; text-align:center; border-bottom:6px solid var(--red); }
.topbar-inner--estimate{ display:flex; justify-content:center; }
.brand--estimate{ display:inline-flex; align-items:center; gap:12px; text-decoration:none; color:var(--red); font:400 24px 'Ultra',Georgia,serif; }
.brand-logo--estimate{ display:block; width:40px; height:40px; border-radius:50%; border:2px solid var(--red); background:#fff; }
.est-main{ padding:24px; }
.est-weave{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:26px; align-items:start; }
.est-weave-media img{ display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; border:1px solid rgba(0,0,0,.25); }
.est-shell{ min-width:0; }
.est-title{ margin:0 0 12px; font:400 32px/1.1 'Ultra',Georgia,serif; color:var(--red); }
.est-form{ border:1px solid var(--ink); padding:18px; background:#fffaea; }
.est-header{ margin-bottom:12px; }
.est-progress{ height:12px; border:1px solid var(--ink); background:var(--stock); }
.est-bar{ height:100%; width:20%; background:var(--red); transition:width .25s; }
.est-error{ margin:10px 0; padding:8px 10px; border:2px solid var(--red); color:var(--red); font-weight:600; }
.est-panel label{ display:block; margin:12px 0; font:800 12px 'Libre Franklin',sans-serif; letter-spacing:.16em; text-transform:uppercase; color:var(--soft); }
.est-panel input, .est-panel select, .est-panel textarea{
  display:block; width:100%; margin-top:6px; padding:11px 12px; border:2px solid var(--ink); border-radius:3px; background:#fffdf5;
  font:400 17px 'Libre Franklin',sans-serif; color:var(--ink); letter-spacing:0; text-transform:none;
}
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:3px solid var(--red); outline-offset:2px; }
.est-textarea{ resize:vertical; }
.est-row{ display:grid; grid-template-columns:1fr 100px 110px; gap:12px; }
.est-tcpa{ margin:10px 0 0; font-size:11px; line-height:1.45; color:var(--soft); }
.est-actions{ display:flex; justify-content:space-between; gap:12px; margin-top:16px; }
.est-actions #est-next{ margin-left:auto; }
.est-thanks{ padding:16px; border:2px solid var(--red); color:var(--red); font:400 20px 'Ultra',Georgia,serif; }
.legal-copy p{ margin:0 0 12px; }
.est-page footer{ padding:16px 24px; text-align:center; background:var(--red); color:var(--stock); font-size:14px; }

/* ---------- small screens ---------- */
@media (max-width:820px){
  .fcl-days{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .fcl-day--blank{ display:none; }
}
@media (max-width:600px){
  .fcl-wall{ padding:16px 8px 30px; }
  .fcl-tabs{ height:42px; align-items:flex-start; margin:0 -8px; padding:0 16px; gap:5px; }
  .fcl-tab{ padding:6px 11px 4px; font-size:13px; letter-spacing:.08em; }
  .fcl-tab--red{ font-size:14px; letter-spacing:0; }
  .fcl-hole, .fcl-cal::before{ display:none; }
  .fcl-pic{ padding:14px 14px 0; }
  .fcl-pic img{ aspect-ratio:3/2; }
  .fcl-imprint{ margin:14px 14px 0; padding:12px 0 18px; }
  .fcl-brand img{ width:44px; height:44px; }
  .fcl-imprint h1{ letter-spacing:.06em; }
  .fcl-zip{ flex:1 1 100%; }
  .fcl-ziprow .fcl-btn{ flex:1 1 100%; }
  .fcl-pad, .fcl-trade{ margin-left:14px; margin-right:14px; }
  .fcl-days{ grid-template-columns:1fr; }
  .fcl-memo p{ font-size:17px; }
  .fcl-day p, .fcl-day li{ font-size:16px; }
  .fcl-cities{ columns:1; }
  .fcl-foot{ padding:18px 14px 22px; }
  .est-page{ margin:0; min-height:100vh; }
  .est-main{ padding:16px 12px; }
  .est-weave{ grid-template-columns:1fr; }
  .est-row{ grid-template-columns:1fr; }
}

/* keep a wide (min-width:720px) cost table from widening its grid column;
   it scrolls inside its wrapper instead */
.table-scroll{ contain:inline-size; }

/* ---------- sticky nav: shadow ----------
   A drop shadow fades in under the pinned tab strip once the calendar
   passes under it (scroll-driven where supported). */
.topbar--estimate{ position:sticky; top:0; z-index:50; background:var(--stock); }
@supports (animation-timeline: scroll()){
  .fcl-tabs, .topbar--estimate{ animation:fcl-lift linear both; animation-timeline:scroll(root); animation-range:0 80px; }
  @keyframes fcl-lift{ to{ box-shadow:0 8px 16px -10px rgba(0,0,0,.55); } }
}
@supports not (animation-timeline: scroll()){
  .fcl-tabs, .topbar--estimate{ box-shadow:0 8px 16px -10px rgba(0,0,0,.55); }
}
