/* Seasoned Cedar. The idea: a forestry survey. Green-ruled survey graph paper, cruise-form
   header cells, stenciled field lettering, tally marks, and one great tree-ring log end with a paint-stamped
   number on the first screen (the bold element). Spruce ink, cedar wood, tree-marking orange. */
:root {
  --tly-paper: #eef1e6;
  --tly-grid: #d3dfcd;
  --tly-spruce: #1f3326;
  --tly-moss: #4c6a50;
  --tly-cedar: #8a4a2c;
  --tly-wood: #d9a46a;
  --tly-ringc: #a5643a;
  --tly-bark: #5a3220;
  --tly-orange: #e8682a;
  --tly-white: #fbfcf8;
  --tly-stencil: "Allerta Stencil", "Arial Narrow", Arial, sans-serif;
  --tly-slab: "Zilla Slab", Rockwell, "Courier New", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
.tly-graph {
  margin: 0; color: var(--tly-spruce); font: 18px/1.55 var(--tly-slab);
  background-color: var(--tly-paper);
  background-image: linear-gradient(var(--tly-grid) 1px, transparent 1px), linear-gradient(90deg, var(--tly-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.tly-graph a { color: var(--tly-cedar); }
.tly-graph h1, .tly-graph h2, .tly-graph h3 { font-family: var(--tly-stencil); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.1; }
.tly-graph h1 { font-size: 2.6rem; margin: 0 0 0.6rem; }
.tly-graph h2 { font-size: 1.5rem; margin: 1.6rem 0 0.6rem; }
.tly-graph h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.tly-graph [hidden] { display: none !important; }
.tly-draft { background: var(--tly-orange); color: #fff; padding: 8px 16px; font: 600 0.9rem/1.4 var(--tly-slab); text-align: center; }

/* the cruise-form header: boxed cells */
.tly-formhead { display: grid; grid-template-columns: auto 1fr auto; background: var(--tly-white); border-top: 8px solid var(--tly-spruce); border-bottom: 2px solid var(--tly-spruce); }
.tly-cell { padding: 10px 18px; border-right: 2px solid var(--tly-spruce); text-decoration: none; color: var(--tly-spruce); display: flex; align-items: center; gap: 12px; min-width: 0; }
.tly-cell:last-child { border-right: 0; }
.tly-cell-k { display: block; font: 600 0.68rem/1.3 var(--tly-slab); letter-spacing: 0.18em; text-transform: uppercase; color: var(--tly-moss); margin: 0 0 2px; }
.tly-brand img { display: block; }
.tly-brand-name { display: block; font: 1.7rem/1 var(--tly-stencil); text-transform: uppercase; }
.tly-plots { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.tly-plot-row { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tly-plot { font: 600 0.92rem var(--tly-slab); text-decoration: none; color: var(--tly-spruce); border: 1.5px solid var(--tly-spruce); padding: 3px 10px; }
.tly-graph a.tly-plot { color: var(--tly-spruce); }
.tly-plot-here, .tly-graph a.tly-plot-here { background: var(--tly-spruce); color: var(--tly-white); }
.tly-tallycell { flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.tly-tallyn { font: 1.9rem/1 var(--tly-stencil); color: var(--tly-orange); }

.tly-cruise { max-width: 1240px; margin: 0 auto; padding: 30px 20px 44px; }
.tly-sheet { background: var(--tly-white); border: 2px solid var(--tly-spruce); padding: 28px 34px; margin: 0 0 30px; }
.tly-sheet-mid { max-width: 1000px; margin-left: auto; margin-right: auto; }
.tly-sheet-slim { max-width: 780px; margin-left: auto; margin-right: auto; }
.tly-lede { font-size: 1.12rem; color: var(--tly-moss); }

/* first screen: the remarks box and the great log end */
.tly-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; border: 2px solid var(--tly-spruce); background: var(--tly-white); margin: 0 0 34px; }
.tly-remarks { padding: 40px 36px; border-right: 2px solid var(--tly-spruce); display: flex; flex-direction: column; justify-content: center; }
.tly-remarks h1 { font-size: 3rem; }
.tly-hero-go { display: flex; flex-wrap: wrap; gap: 10px; }
.tly-hero-log { background: var(--tly-spruce); display: flex; align-items: center; justify-content: center; padding: 28px; }
.tly-logend { width: 100%; max-width: 560px; height: auto; display: block; }
.tly-bark { fill: var(--tly-bark); }
.tly-wood { fill: var(--tly-wood); }
.tly-ring { fill: none; stroke: var(--tly-ringc); stroke-width: 2.2; }
.tly-ring-late { stroke-width: 3.6; stroke: #95562f; }
.tly-crack { fill: none; stroke: var(--tly-bark); stroke-width: 4; stroke-linecap: round; }
.tly-pith { fill: var(--tly-bark); }
.tly-paint { font: 92px var(--tly-stencil); fill: var(--tly-orange); }

/* buttons: stenciled tags */
.tly-btn { display: inline-block; font: 600 0.95rem/1.2 var(--tly-slab); background: var(--tly-orange); color: #fff; border: 2px solid var(--tly-spruce); padding: 10px 16px; text-decoration: none; cursor: pointer; letter-spacing: 0.02em; }
.tly-graph a.tly-btn { color: #fff; }
.tly-btn:hover, .tly-btn:focus-visible { background: #c9531c; }
.tly-btn-ghost, .tly-graph a.tly-btn-ghost { background: var(--tly-white); color: var(--tly-spruce); }
.tly-btn-sm { padding: 6px 10px; font-size: 0.85rem; }
.tly-btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.tly-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.tly-btn-done { background: var(--tly-moss); }

/* three log ends */
.tly-logs { margin: 0 0 34px; }
.tly-logs > h2 { margin-top: 0; }
.tly-under { max-width: 780px; }
.tly-logrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: end; }
.tly-logbox { display: flex; flex-direction: column; align-items: center; }
.tly-logend-sm { width: 62%; height: auto; display: block; margin-bottom: -18px; position: relative; z-index: 1; }
.tly-logend-sm .tly-paint { font-size: 96px; }
.tly-logbox:nth-child(1) .tly-logend-sm { width: 48%; }
.tly-logbox:nth-child(3) .tly-logend-sm { width: 76%; }
.tly-logbox-sheet { width: 100%; background: var(--tly-white); border: 2px solid var(--tly-spruce); padding: 26px 18px 18px; }
.tly-logbox-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.tly-logbox-row b { font: 1.2rem var(--tly-stencil); }
.tly-tallymarks { display: block; }
.tly-tick { stroke: var(--tly-spruce); stroke-width: 3; stroke-linecap: round; }
.tly-tick-cross { stroke: var(--tly-orange); }
.tly-logbox-total { font: 2rem var(--tly-stencil); margin: 6px 0 2px; }
.tly-logbox-each { font-size: 0.92rem; color: var(--tly-moss); }

/* standing haul: a scale-ticket stub */
.tly-haul { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
.tly-haul h2 { margin-top: 0; }
.tly-ticketstub { border: 2px dashed var(--tly-spruce); padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; background: var(--tly-paper); }
.tly-ticketstub span { font: 600 0.75rem var(--tly-slab); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tly-moss); }
.tly-ticketstub b { font: 1.6rem var(--tly-stencil); color: var(--tly-cedar); }
.tly-boxnote { background: var(--tly-paper); border-left: 6px solid var(--tly-orange); padding: 10px 14px; }

/* field books */
.tly-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tly-book { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.tly-book img { width: 140px; height: auto; display: block; border: 2px solid var(--tly-spruce); }
.tly-book p { margin: 0 0 8px; }
.tly-book-sub { font-style: italic; color: var(--tly-moss); }
.tly-book-price { font-weight: 600; }

/* stand inventory: plot records */
.tly-plotsheet { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; }
.tly-plot-art { display: flex; justify-content: center; align-items: flex-start; padding-top: 12px; }
.tly-plot-words h2 { margin-top: 0; font-size: 2rem; }
.tly-plot-gist { color: var(--tly-moss); }
.tly-tag {
  position: relative; width: 220px; padding: 46px 18px 22px; background: #f6efe2; border: 2px solid var(--tly-cedar);
  clip-path: polygon(16% 0, 84% 0, 100% 12%, 100% 100%, 0 100%, 0 12%); display: flex; flex-direction: column; gap: 6px; transform: rotate(-3deg);
}
.tly-tag-hole { position: absolute; top: 14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 2px solid var(--tly-cedar); background: var(--tly-paper); }
.tly-tag-no { font: 1rem var(--tly-stencil); color: var(--tly-orange); }
.tly-tag-name { font: 1.5rem/1.1 var(--tly-stencil); text-transform: uppercase; }
.tly-tag-size { font-size: 0.9rem; color: var(--tly-moss); }
.tly-record { border-collapse: collapse; margin: 14px 0; width: 100%; }
.tly-record th, .tly-record td { border: 1.5px solid var(--tly-spruce); padding: 7px 10px; text-align: left; vertical-align: top; font-weight: 400; }
.tly-record th { width: 12em; background: var(--tly-paper); font: 600 0.8rem var(--tly-slab); letter-spacing: 0.08em; text-transform: uppercase; }
.tly-hours { display: block; font-size: 0.9rem; color: var(--tly-moss); }
.tly-panel { width: 100%; max-width: 560px; border-collapse: collapse; border: 3px solid #111; background: #fff; font: 0.92rem/1.35 Arial, Helvetica, sans-serif; color: #111; }
.tly-panel caption { text-align: left; font: 800 1.45rem Arial, Helvetica, sans-serif; padding: 4px 0; }
.tly-panel th, .tly-panel td { text-align: left; padding: 4px 8px; border-top: 1px solid #111; font-weight: 400; vertical-align: top; }
.tly-panel td { text-align: right; white-space: nowrap; }
.tly-panel-top th, .tly-panel-top td { border-top: 0; }
.tly-panel-cols th, .tly-panel-cols td { border-top: 8px solid #111; font-weight: 700; font-size: 0.8rem; }
.tly-panel-foot { text-align: left; font-size: 0.8rem; border-top: 4px solid #111; white-space: normal; }
.tly-other { font-size: 0.95rem; }
.tly-warn { border: 2px solid var(--tly-orange); padding: 10px 14px; font-size: 0.92rem; }
.tly-warn p { margin: 0 0 6px; }

/* scale ticket */
.tly-wide { overflow-x: auto; }
.tly-ledger { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.95rem; }
.tly-ledger th, .tly-ledger td { border: 1.5px solid var(--tly-spruce); padding: 8px 10px; text-align: left; vertical-align: top; }
.tly-ledger thead th { background: var(--tly-spruce); color: var(--tly-white); font: 600 0.8rem var(--tly-slab); letter-spacing: 0.1em; text-transform: uppercase; }
.tly-ticket h2 { border-bottom: 2px solid var(--tly-spruce); padding-bottom: 4px; }
.tly-rushline { border: 2px solid var(--tly-spruce); background: var(--tly-paper); padding: 10px 14px; }
.tly-operator { font-size: 0.9rem; color: var(--tly-moss); border-top: 2px solid var(--tly-spruce); padding-top: 12px; margin-top: 22px; }
.tly-legal { font-size: 1rem; overflow-wrap: anywhere; }

/* cruise sheet */
.tly-panelbox, .tly-haulslip { border: 2px solid var(--tly-spruce); background: var(--tly-paper); padding: 14px 16px; margin: 16px 0; }
.tly-panelbox .tly-rushline { border: 0; padding: 4px 0 0; margin: 0; }
.tly-linetable { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tly-linetable th, .tly-linetable td { border-bottom: 1.5px solid var(--tly-spruce); padding: 10px 8px; text-align: left; vertical-align: top; }
.tly-linetable th { font: 600 0.75rem var(--tly-slab); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tly-moss); }
.tly-num { text-align: right; white-space: nowrap; }
.tly-inside { display: block; font-size: 0.85rem; color: var(--tly-moss); }
.tly-rm { background: none; border: 0; padding: 0; color: var(--tly-cedar); text-decoration: underline; font: 0.85rem var(--tly-slab); cursor: pointer; }
.tly-qty { display: inline-flex; align-items: center; border: 2px solid var(--tly-spruce); }
.tly-qty button { width: 30px; height: 30px; border: 0; background: var(--tly-white); font: 600 1rem var(--tly-slab); cursor: pointer; }
.tly-qty span { min-width: 28px; text-align: center; }
.tly-sumlist { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; max-width: 520px; margin: 18px 0 18px auto; }
.tly-sumlist dt, .tly-sumlist dd { margin: 0; }
.tly-sumlist dd { text-align: right; }
.tly-sum-total { border-top: 3px solid var(--tly-spruce); padding-top: 6px; font-weight: 600; font-size: 1.1rem; }
.tly-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.tly-check input { width: 19px; height: 19px; margin-top: 5px; flex: none; accent-color: var(--tly-orange); }
.tly-grid { border: 2px solid var(--tly-spruce); background: #fff; margin: 16px 0; padding: 14px 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; min-width: 0; }
.tly-grid legend { font: 1rem var(--tly-stencil); text-transform: uppercase; padding: 0 6px; }
.tly-grid label { display: flex; flex-direction: column; gap: 4px; font: 600 0.85rem var(--tly-slab); min-width: 0; }
.tly-grid input, .tly-coupon input { font: 1rem var(--tly-slab); padding: 9px 10px; border: 1.5px solid var(--tly-spruce); background: var(--tly-paper); width: 100%; min-width: 0; }
.tly-full { grid-column: 1 / -1; }
.tly-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; }
.tly-cardlogo { display: block; }
.tly-cardbay { min-height: 150px; background: var(--tly-paper); border: 1.5px dashed var(--tly-spruce); padding: 8px; }
.tly-cardbay iframe { width: 100%; border: 0; }
.tly-cardnote { font-size: 0.9rem; color: var(--tly-moss); margin: 0; }
.tly-coupon { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; font-size: 0.9rem; }
.tly-coupon-row { display: flex; gap: 8px; max-width: 420px; }
.tly-coupon-say { min-height: 1.2em; }
.tly-chargeline { font-weight: 600; }
.tly-status { color: var(--tly-cedar); }

/* the signature block */
.tly-signoff { background: var(--tly-spruce); color: var(--tly-paper); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; border-top: 8px solid var(--tly-orange); }
.tly-signoff a { color: var(--tly-paper); }
.tly-signoff-block { padding: 24px 28px; border-right: 2px solid #3b5444; font-size: 0.95rem; }
.tly-signoff-block p { margin: 0 0 4px; }
.tly-signoff .tly-cell-k { color: #f2a679; }
.tly-signoff-who { font: 1.2rem var(--tly-stencil); text-transform: uppercase; }
.tly-signoff-small { color: #b9c7bb; font-size: 0.85rem; margin-top: 8px; }
.tly-signoff-links a { margin-right: 14px; }
.tly-signoff-fda { grid-column: 1 / -1; margin: 0; padding: 14px 28px; border-top: 2px solid #3b5444; font-size: 0.85rem; color: #c8d3c9; }

@media (max-width: 900px) {
  .tly-formhead { grid-template-columns: 1fr auto; }
  .tly-plots { grid-column: 1 / -1; grid-row: 2; border-right: 0; border-top: 2px solid var(--tly-spruce); }
  .tly-brand { border-right: 2px solid var(--tly-spruce); }
  .tly-hero { grid-template-columns: 1fr; }
  .tly-remarks { border-right: 0; border-bottom: 2px solid var(--tly-spruce); }
  .tly-logrow { grid-template-columns: 1fr; gap: 34px; }
  .tly-logend-sm, .tly-logbox:nth-child(1) .tly-logend-sm, .tly-logbox:nth-child(3) .tly-logend-sm { width: 46%; }
  .tly-books { grid-template-columns: 1fr; }
  .tly-plotsheet { grid-template-columns: minmax(0, 1fr); }
  .tly-signoff { grid-template-columns: 1fr; }
  .tly-signoff-block { border-right: 0; border-bottom: 2px solid #3b5444; }
}
@media (max-width: 560px) {
  .tly-graph { font-size: 17px; }
  .tly-graph h1, .tly-remarks h1 { font-size: 2rem; }
  .tly-cruise { padding: 18px 12px 30px; }
  .tly-sheet { padding: 20px 16px; }
  .tly-remarks { padding: 24px 18px; }
  .tly-cell { padding: 8px 12px; }
  .tly-brand-name { font-size: 1.25rem; }
  .tly-brand img { width: 34px; height: 34px; }
  .tly-plot { font-size: 0.85rem; padding: 2px 7px; }
  .tly-haul { grid-template-columns: 1fr; }
  .tly-ticketstub { max-width: 200px; }
  .tly-book { grid-template-columns: 100px 1fr; }
  .tly-book img { width: 100px; }
  .tly-grid { grid-template-columns: 1fr; }
  .tly-record th { width: auto; }
  .tly-panel td { white-space: normal; }
  .tly-panel th, .tly-panel td { padding: 4px 6px; }
  .tly-each { display: none; }
  .tly-signoff-block, .tly-signoff-fda { padding: 18px 16px; }
}
.tly-order h1 { margin-bottom: 1rem; }

/* Dzeno's art, once it is in: the logo in the brand cell, bottles on the plot records and the great log, box pictures
   over each tally sheet, the Auto Ship box beside its ticket stub */
.tly-brand-art .tly-wordmark { display: block; width: 260px; max-width: 100%; height: auto; margin-top: 4px; }
.tly-hero-log { position: relative; }
.tly-hero-bottle { position: absolute; right: 6%; bottom: 6%; width: 30%; max-width: 210px; height: auto; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45)); }
.tly-logbox-pic { position: relative; margin: 0 0 -14px; width: 100%; z-index: 1; }
.tly-boxpic { display: block; width: 100%; height: auto; background: var(--tly-white); border: 2px solid var(--tly-spruce); }
.tly-logbox-stamp { position: absolute; top: -12px; left: -10px; width: 48px; height: 48px; border-radius: 50%; background: var(--tly-orange); color: var(--tly-white); font: 1.6rem/48px var(--tly-stencil); text-align: center; transform: rotate(-8deg); }
.tly-haul-art { grid-template-columns: 180px 240px minmax(0, 1fr); }
.tly-haulpic { display: block; width: 100%; height: auto; border: 2px solid var(--tly-spruce); }
.tly-specimen { margin: 0; width: 230px; text-align: center; }
.tly-bottle { display: block; width: 100%; height: auto; }
.tly-specimen-no { display: inline-block; margin-top: 8px; font: 1rem var(--tly-stencil); color: var(--tly-white); background: var(--tly-cedar); padding: 3px 12px; transform: rotate(-3deg); }
@media (max-width: 900px) {
  .tly-haul-art { grid-template-columns: 180px minmax(0, 1fr); }
  .tly-haul-art .tly-haulpic { grid-column: 2; grid-row: 1; }
  .tly-haul-art > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tly-brand-art .tly-wordmark { width: 170px; }
  .tly-hero-bottle { width: 34%; }
  .tly-haul-art { grid-template-columns: 1fr; }
  .tly-haul-art .tly-haulpic { grid-column: auto; grid-row: auto; max-width: 320px; }
  .tly-specimen { width: 180px; }
}
