/* Page layout shared with /calculators/recipe-cost-calculator/ (copied from its css/recipe-cost.css
   until a shared calculators/css/page.css exists): intro, calculator card, results card, app band,
   video facade, mobile summary bar. */

.intro { padding-top: 28px; padding-bottom: 18px; }
.lead { font-size: clamp(1rem, 1.3vw, 1.12rem); color: #2c2c45; max-width: 70ch; margin-top: 12px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.calc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 24px; }
.calc, .results { background: var(--card); border: 2px solid #000; border-radius: var(--radius); box-shadow: var(--shadow); }
.calc { padding: 20px; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .line input, .line select {
  font: inherit; font-size: 0.95rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #fff; width: 100%; min-width: 0;
}
.field input:focus, .line input:focus, .line select:focus, .field select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(1,3,79,0.12); }
.field input[aria-invalid="true"], .line input[aria-invalid="true"] { border-color: var(--error); }
.field .hint { font-size: 0.72rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }

.line { display: grid; gap: 8px; align-items: center; padding: 6px 0; }
.line-head { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1.5px solid var(--line); padding-bottom: 8px; }
.line .out { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }
.line .out.err { color: var(--error); font-size: 0.72rem; font-weight: 700; line-height: 1.2; }
.line .rm { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 1.1rem; line-height: 1; }
.line .rm:hover { background: #f3eee4; color: var(--error); }
.line .mlabel { display: none; }
.r { text-align: right; }
.line-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.group-title { font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); text-transform: uppercase; margin: 18px 0 2px; }
.group-title:first-child { margin-top: 0; }

/* results */
.results { padding: 20px; position: sticky; top: 84px; background: var(--navy); color: #fff; }
.results h3 { color: #fff; font-size: 1.4rem; text-transform: uppercase; margin-bottom: 10px; }
.results dl > div[hidden] { display: none; }
.results dl > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.results dt { font-size: 0.86rem; color: rgba(255,255,255,0.78); }
.results dd { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; text-align: right; }
.results .big dd { font-family: var(--font-head); font-size: 1.9rem; font-weight: 600; color: var(--yellow); }
.results .warn { margin-top: 10px; font-size: 0.8rem; color: #ffd2c2; }
.results .warn[hidden] { display: none; }
.res-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.results .btn-small { background: var(--orange); border-color: var(--orange); }
.results .btn-small.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }

/* app band */
.app-band { background: #fff; border-top: 2px solid #000; border-bottom: 2px solid #000; margin-top: 32px; padding: 48px 0; }
.app-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.app-band h2 { margin-bottom: 12px; }
.app-band p { color: #2c2c45; }
.ticks { list-style: none; margin: 14px 0 20px; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; font-weight: 600; font-size: 0.95rem; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.app-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.qr-svg { width: 112px; height: 112px; border: 2px solid #000; border-radius: 10px; }
.sheet { border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.sheet figcaption { font-size: 0.82rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); }

/* prose extras */
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.prose td.n, .prose th.n { text-align: right; font-variant-numeric: tabular-nums; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.related a { font-weight: 700; color: var(--navy); }

/* video facade */
.video { margin: 32px 0 8px; aspect-ratio: 16 / 9; border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-facade { position: relative; width: 100%; height: 100%; display: block; }
.vf-poster { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px; background-position: center; background-size: cover; background-repeat: no-repeat; }
.vf-title { font-family: var(--font-head); color: #fff; font-size: clamp(1.3rem, 3vw, 2.3rem); text-transform: uppercase; line-height: 1; text-align: left; }
.vf-play { position: absolute; left: 50%; top: 50%; width: 84px; transform: translate(-50%, -50%); transition: transform .2s; }
.video-facade:hover .vf-play { transform: translate(-50%, -50%) scale(1.1); }

/* phones/tablets: sticky summary while the form is on screen and the results card is not */
.mini { display: none; }
@media (max-width: 1080px) {
  .calc-wrap { grid-template-columns: 1fr; }
  .results { position: static; }
  .mini:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; gap: 14px; align-items: center; justify-content: space-between;
    background: var(--navy); color: #fff; text-decoration: none; border: 2px solid #000; border-radius: 14px; box-shadow: 4px 4px 0 #000; padding: 10px 14px; font-size: 0.82rem; }
  .mini b { color: var(--yellow); font-size: 1rem; font-variant-numeric: tabular-nums; margin-left: 4px; }
  .mini-go { font-weight: 700; color: rgba(255,255,255,0.8); white-space: nowrap; }
}
@media (max-width: 880px) { .app-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .intro { padding-top: 18px; padding-bottom: 14px; }
  .intro-actions .btn-orange { display: none; }
  .intro-actions .btn-line { padding: 10px 18px; font-size: 0.88rem; }
  .calc { padding: 14px; }
  .line-head { display: none; }
  .line .mlabel { display: block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 3px; }
  .line .rm { position: absolute; top: 8px; right: 8px; }
  .qr { display: none; }
  .prose table { font-size: 0.85rem; }
  .prose th, .prose td { padding: 7px 6px; }
}
@media (hover: none) and (pointer: coarse) { .qr { display: none; } }

/* --- food truck startup cost calculator --- */
.calc-head { display: grid; grid-template-columns: 1fr 130px; gap: 12px; margin-bottom: 14px; }
/* item lines: category | item | amount | remove */
.line { grid-template-columns: 196px minmax(140px, 1fr) 130px 30px; }
.line .c-amount input { text-align: right; font-variant-numeric: tabular-nums; }
.line .c-amount input::placeholder { text-align: right; }
.extras-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; margin-top: 16px; border-top: 1.5px solid var(--line); padding-top: 14px; }
.results .sub dd { color: rgba(255,255,255,0.9); }
.results .total { border-top: 2px solid rgba(255,255,255,0.5); }

@media (max-width: 720px) {
  .calc-head { grid-template-columns: 1fr 1fr; }
  .calc-head .grow { grid-column: 1 / -1; }
  /* one compact row per item: item | amount | remove, category underneath */
  .line { grid-template-columns: 1fr 108px 30px; grid-template-areas: "item amount rm" "cat cat ."; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .line .mlabel { display: none; }
  .line .c-item { grid-area: item; }
  .line .c-amount { grid-area: amount; }
  .line .c-cat { grid-area: cat; }
  .line .c-cat select { font-size: 0.78rem; padding: 4px 8px; border-color: transparent; background: #f7f3ea; width: auto; max-width: 100%; color: var(--muted); }
  .line .rm { grid-area: rm; position: static; }
  .extras-grid { grid-template-columns: 1fr 1fr; }
}
