/* Tidy Batch Studio: same palette as the shop and the pins. */
:root {
  --green: #184E48; --green-2: #1F5F57; --terra: #98462F; --terra-2: #B4583C;
  --cream: #F6F3ED; --paper: #FFFDF9; --butter: #FFF0C7; --sage: #E4EDE8;
  --ink: #1E3633; --muted: #536663; --line: #D7E2DD; --input: #FFFBEA;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 54, 51, .06), 0 8px 24px rgba(30, 54, 51, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--terra); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--green); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 2.85rem); margin: .25em 0 .4em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin: 1.8em 0 .5em; font-weight: 800; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; font-weight: 750; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.mt-0 { margin-top: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 12px; color: #fff; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 10px; }
.brand-name span { color: var(--terra); }
.brand-name, .header-row .btn { white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 20px; padding-bottom: 8px; font-size: .95rem; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--green); }
.site-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--terra); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; background: var(--green); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; }
.btn:hover { background: var(--green-2); color: #fff; }
.btn-etsy { background: var(--terra); }
.btn-etsy:hover { background: var(--terra-2); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn-ghost:hover { background: var(--sage); color: var(--green); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }

/* Sections */
.hero { padding: 44px 0 20px; }
.page-head { padding: 6px 0 4px; }
.eyebrow { font-weight: 700; color: var(--terra); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .3em; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 42em; }
.section { padding: 8px 0 24px; }
.grid { display: grid; gap: 20px; }
/* Columnas fijas para que las filas queden completas: 2 o 3 en escritorio, menos en pantallas chicas. */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card.feature { grid-column: 1 / -1; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; }
.card .btn-row { margin-bottom: 0; }
.card .shot { margin: 4px 0 14px; }
.tag { display: inline-block; background: var(--butter); color: var(--ink); font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.panel { background: var(--sage); border-radius: var(--radius); padding: 24px; }
.answer { background: var(--butter); border-left: 5px solid var(--terra); border-radius: 10px; padding: 16px 18px; margin: 1.2em 0; }
.answer p:last-child { margin-bottom: 0; }
.note { font-size: .92rem; color: var(--muted); }
.price-line { font-weight: 700; color: var(--muted); }
.shot { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
figure { margin: 1.4em 0; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; background: var(--paper); font-size: .97rem; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--sage); color: var(--green); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 800; color: var(--green); }

/* Articles */
.crumbs { font-size: .9rem; color: var(--muted); margin: 22px 0 0; }
.crumbs a { color: var(--muted); }
.article p, .article li { max-width: 68ch; }
.meta-line { font-size: .9rem; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 16px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .92rem; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .9rem; line-height: 1.7; overflow-x: auto; margin: 0 0 1em; }
.cta-box { background: var(--green); color: #fff; border-radius: var(--radius); padding: 26px; margin: 2em 0; }
.cta-box h2, .cta-box h3 { color: #fff; margin-top: 0; }
.cta-box p { color: #E4EDE8; }
.cta-box .btn { background: #fff; color: var(--green); }
.cta-box .btn:hover { background: var(--butter); }
.cta-box .btn-etsy { background: var(--terra); color: #fff; }
.cta-box .btn-etsy:hover { background: var(--terra-2); color: #fff; }
details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--green); padding: 12px 0; }
details[open] { padding-bottom: 12px; }
details[open] summary { margin-bottom: 0; }
details p:last-child { margin-bottom: 0; }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 8px 0 24px; }
.calc fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 14px 18px 4px; margin: 0 0 16px; }
.calc legend { font-family: var(--font-head); font-weight: 800; color: var(--green); padding: 0 6px; font-size: 1.05rem; }
.field { display: grid; grid-template-columns: 1fr 128px; gap: 12px; align-items: center; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: .97rem; line-height: 1.35; }
.field small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.field input { width: 100%; font: inherit; font-size: 1.05rem; padding: 9px 10px; border: 1.5px solid #B9CBC4; border-radius: 10px; background: var(--input); text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.field input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(24, 78, 72, .18); }
.field input[aria-invalid="true"] { border-color: var(--terra); background: #FCEDE8; }
.results { position: sticky; top: 16px; background: var(--green); color: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.results h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.result .k { font-weight: 600; }
.result .k small { display: block; font-weight: 400; color: #CFE0DA; font-size: .83rem; }
.result .v { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result.big .v { font-size: 2rem; color: var(--butter); }
.breakdown { list-style: none; padding: 0 0 8px; margin: 0; font-size: .88rem; color: #CFE0DA; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.breakdown li { display: flex; justify-content: space-between; margin: 0; }
.status { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .12); font-weight: 700; font-size: .95rem; }
.status.ok { background: #2D6A4F; }
.status.warn { background: #7A5A1E; }
.status.bad { background: var(--terra); }
.results .fine { font-size: .82rem; color: #CFE0DA; margin: 10px 0 0; }
.calc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.calc-actions button { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.calc-actions button:hover { background: rgba(255, 255, 255, .12); }
[hidden] { display: none !important; }

.includes { font-size: .95rem; color: var(--muted); max-width: 52em; margin-top: -.3em; }

.results .upsell { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9rem; color: #E4EDE8; }
.results .upsell a { color: var(--butter); font-weight: 700; }
.compare th[scope="row"] { font-weight: 700; color: var(--ink); white-space: nowrap; }
.compare thead th:last-child { color: var(--terra); }
@media (max-width: 520px) { .compare th[scope="row"] { white-space: normal; } }

/* Tablas anchas en el teléfono: cada fila como tarjeta, con el encabezado de cada dato. */
@media (max-width: 600px) {
  .table-wrap.stack { overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack td, .stack th[scope="row"] { display: block; width: 100%; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .stack td, .stack th[scope="row"] { border: 0; padding: 2px 0; text-align: left; }
  .stack td.num { text-align: left; }
  .stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  .stack tr > :first-child { font-weight: 700; font-size: 1.02rem; }
  .stack tr > td:first-child::before { content: none; }
  .stack tr.total { background: var(--sage); }
}

/* Recipe cost calculator */
/* Sin flechitas en los números de las filas de ingredientes: dejan lugar para los dígitos. */
.rc-row input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.rc-row input[type="number"]::-webkit-inner-spin-button, .rc-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.calc.calc-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.rc-list { display: grid; gap: 10px; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, 1.35fr) minmax(0, .7fr) 30px;
  grid-template-areas: "name price size used out del" "note note note note note note"; gap: 4px 8px; align-items: end;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.rc-cell { display: grid; gap: 3px; min-width: 0; }
.rc-name { grid-area: name; } .rc-price { grid-area: price; } .rc-size { grid-area: size; } .rc-used { grid-area: used; } .rc-out { grid-area: out; }
.rc-l { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row input, .rc-row select { width: 100%; min-width: 0; font: inherit; font-size: 1rem; padding: 8px; border: 1.5px solid #B9CBC4; border-radius: 10px; background: var(--input); color: var(--ink); }
.rc-row input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.rc-row select { background: #fff; padding: 8px 0 8px 4px; }
.rc-row input:focus, .rc-row select:focus, .rc-pieces input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(24, 78, 72, .18); }
.rc-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.6em, 1fr); gap: 4px; }
.rc-cost { display: block; padding: 9px 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.rc-del { grid-area: del; align-self: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.rc-del:hover { color: var(--terra); border-color: var(--terra); }
.rc-note { grid-area: note; margin: 4px 0 0; font-size: .85rem; color: var(--terra); font-weight: 700; }
.rc-row.rc-bad { border-color: var(--terra); background: #FCEDE8; }
.rc-add { margin: 12px 0 4px; background: #fff; color: var(--green); border: 1.5px dashed var(--green); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.rc-add:hover { background: var(--sage); }
.rc-pieces { display: grid; grid-template-columns: 1fr 96px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.rc-pieces label { font-weight: 600; }
.rc-pieces input { width: 100%; font: inherit; font-size: 1.05rem; padding: 8px 10px; border: 1.5px solid #B9CBC4; border-radius: 10px; background: var(--input); color: var(--ink); text-align: right; }
.rc-pieces input[aria-invalid="true"] { border-color: var(--terra); background: #FCEDE8; }
.results .btn-next { display: block; margin-top: 14px; text-align: center; background: var(--butter); color: var(--green); }
.results .btn-next:hover { background: #fff; }
@media (max-width: 880px) { .calc.calc-wide { grid-template-columns: 1fr; } }
/* Reserva el alto de las 5 filas del ejemplo hasta que el JS las dibuja, para que el diseño no salte (CLS). */
@media (min-width: 641px) { .rc-list:empty { min-height: 420px; } }
@media (max-width: 640px) { .rc-list:empty { min-height: 1240px; } }
@media (min-width: 641px) { .rc-row ~ .rc-row .rc-l { display: none; } }
@media (max-width: 640px) {
  .rc-row { position: relative; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "name name" "price out" "size used" "note note"; gap: 8px 10px; }
  .rc-name { padding-right: 38px; }
  .rc-del { position: absolute; top: 8px; right: 8px; }
  .rc-out .rc-cost { text-align: left; }
}

.share-row { margin-top: 8px; }
.share-row p { color: var(--muted); font-size: .95rem; border-top: 1px solid var(--line); padding-top: 14px; }

/* Order form */
.order-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 8px; margin: 8px 0 28px; box-shadow: var(--shadow); }
.of-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--green); padding-bottom: 10px; margin-bottom: 12px; }
.of-title { font-family: var(--font-head); font-weight: 800; color: var(--green); font-size: 1.4rem; margin: 0; }
.of-inline { display: flex; align-items: end; gap: 8px; font-weight: 600; min-width: 260px; flex: 0 1 360px; }
.order-form fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.order-form legend { font-family: var(--font-head); font-weight: 800; color: var(--terra); font-size: 1.05rem; padding: 0; margin-bottom: 6px; }
.of-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.of-grid label { display: grid; gap: 3px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.of-grid label small { font-weight: 400; font-size: .8rem; }
.of-wide { grid-column: 1 / -1; }
.order-form input, .order-form textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 7px 4px; border: 0; border-bottom: 1.5px solid #9DB5AD; background: transparent; border-radius: 0; }
.order-form textarea { resize: vertical; border: 1.5px solid #9DB5AD; border-radius: 6px; padding: 6px 8px; }
.order-form input:focus, .order-form textarea:focus { outline: none; border-color: var(--green); background: var(--input); }
@media (max-width: 640px) { .of-grid { grid-template-columns: 1fr; } }
@media print {
  @page { margin: 12mm; }
  .no-print, .crumbs, .share-row { display: none !important; }
  body { background: #fff; font-size: 10pt; }
  .order-form { box-shadow: none; border: 0; padding: 0; margin: 0; background: #fff; }
  .of-title { font-size: 15pt; }
  .order-form fieldset { margin-bottom: 8px; break-inside: avoid; }
  .order-form legend { font-size: 11pt; margin-bottom: 2px; }
  .of-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
  .of-print-wide { grid-column: 1 / -1; }
  .of-grid label { font-size: 8.5pt; }
  .of-grid label small { display: none; }
  .order-form input { padding: 4px 2px 1px; font-size: 10pt; border-color: #555; }
  .of-grid label { gap: 0; margin-bottom: 6px; }
  .order-form textarea { min-height: 2.8em; border-color: #555; }
  .order-form input[type="date"]:invalid, .order-form input[type="time"]:invalid { color: transparent; }
  .order-form input::-webkit-calendar-picker-indicator { display: none; }
}

/* Ajustes de la auditoría visual del 6/11. */
.cta-box a:not(.btn) { color: #fff; text-decoration: underline; }
.cta-box a:not(.btn):hover { color: var(--butter); }
.wrap.narrow { max-width: 1080px; }
.wrap.narrow > * { max-width: 740px; }
.card > :last-child { margin-bottom: 0; }
.header-row { flex-wrap: wrap; row-gap: 8px; }
.site-footer li { margin-bottom: 0; }
.site-footer li a { display: block; padding: 8px 0; }
@media (min-width: 881px) { .results { max-height: calc(100vh - 32px); overflow-y: auto; } }
/* Barra con el resultado mientras se completan los campos (solo teléfono y tableta). */
.sum-bar { display: none; }
@media (max-width: 880px) {
  .sum-bar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; justify-content: space-between; align-items: center; gap: 10px;
    background: var(--green); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 8px 24px rgba(30, 54, 51, .28); text-decoration: none; font-weight: 700; font-size: .95rem; }
  .sum-bar .sum-go { color: var(--butter); white-space: nowrap; }
}

/* Footer */
.site-footer { background: var(--green); color: #E4EDE8; margin-top: 48px; padding: 36px 0 18px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr 1fr; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer-brand img { border-radius: 8px; }
.footer-title { font-weight: 800; color: #fff; margin-bottom: .4em; }
.site-footer ul { list-style: none; padding: 0; }
.footer-note { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 12px; padding-top: 14px; font-size: .82rem; color: #B9CBC4; }

@media (max-width: 880px) {
  .calc { grid-template-columns: 1fr; }
  .results { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .field { grid-template-columns: 1fr 108px; }
  .hero { padding: 30px 0 14px; }
  .brand { font-size: 1rem; }
  .site-nav { gap: 2px 14px; font-size: .9rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
/* Teléfonos: la introducción ocupa menos para que la herramienta aparezca antes. */
@media (max-width: 520px) {
  .page-head .lede { font-size: 1.04rem; line-height: 1.5; }
  .includes { font-size: .86rem; line-height: 1.45; }
  .page-head h1 { margin-bottom: .35em; }
}
/* Objetivos táctiles cómodos en el teléfono (36 px o más). */
@media (max-width: 640px) {
  .btn-small { min-height: 36px; }
  .rc-del { width: 36px; height: 36px; }
  .rc-pair { grid-template-columns: minmax(3.8em, 1fr) 4.7em; }
  .rc-pair input, .rc-pair select { font-size: .95rem; }
  .rc-pair input { padding: 8px 6px; }
}
/* Teléfonos chicos: la marca y el botón de Etsy no se tocan. */
@media (max-width: 400px) {
  .header-row { gap: 10px; }
  .brand { gap: 7px; font-size: .95rem; }
  .brand img { width: 32px; height: 32px; }
  .header-row .btn-small { padding: 7px 11px; font-size: .84rem; }
}
@media print {
  .site-header, .site-footer, .calc-actions { display: none; }
  .results { position: static; }
}
