/* ==========================================================================
   tija-tools.css — /tools hub + the free tools (pocket money, savings goal,
   chore chart). Loaded AFTER css/tija-guide.css and extends it: same tokens
   (--g-*), same sticker/clay vocabulary, Font Awesome only.

   The chore chart preview (.cc-*) mirrors the PDF drawn by
   functions/src/tools/choreChartPdf.ts on the same 1123x794 px canvas.
   Change one, change the other.

   The site serves css with a one-year cache and no hashing: bump the ?v=
   query on the pages when this file changes.
   ========================================================================== */

:root {
    --t-confetti: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'><g opacity='.6'><path d='M21 12c0 8-4 12-11 12 7 0 11 4 11 12 0-8 4-12 11-12-7 0-11-4-11-12Z' fill='%23089888'/><circle cx='96' cy='22' r='6' fill='%23e93b7a'/><path d='M38 74c7-10 14 7 21-2s14 9 21 0' fill='none' stroke='%236858d8' stroke-width='4.5' stroke-linecap='round'/><circle cx='122' cy='98' r='9' fill='none' stroke='%23f8b808' stroke-width='4.5'/><path d='M14 112l12 20h-24z' fill='%23f28b30' transform='rotate(12 14 122)'/><circle cx='74' cy='134' r='3.5' fill='%23182868' opacity='.35'/><path d='M132 36v14M125 43h14' stroke='%230aa696' stroke-width='4' stroke-linecap='round'/><path d='M13 2c0 8-4 12-11 12 7 0 11 4 11 12 0-8 4-12 11-12-7 0-11-4-11-12Z' fill='%23f8b808' transform='translate(88 110) scale(.6)'/><circle cx='46' cy='30' r='4' fill='%236858d8' opacity='.7'/></g></svg>");
    --t-wa: #25d366;
    --t-soft-yellow: #fff4d6;
    --t-soft-yellow-line: #f4e2b4;
}

/* component display rules (.t-seg grid, .t-hint flex...) must not beat [hidden] */
.g-body [hidden] { display: none !important; }

.t-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.t-title { font-size: clamp(34px, 5.4vw, 52px); line-height: 1.08; margin: 18px 0 14px; }
.t-head { padding-top: 26px; } /* top only: shorthand would wipe the .t-wrap gutter */
.t-section { margin-top: 76px; }
.t-h2 { font-size: clamp(25px, 3.4vw, 32px); line-height: 1.2; margin: 0 0 8px; }
.t-sub { color: var(--g-ink-55); font-size: 17px; margin: 0; }

/* ---------- surfaces ---------- */

.t-card {
    background: var(--g-white);
    border: 1px solid var(--g-line);
    border-radius: var(--g-r-lg);
    box-shadow: var(--g-clay);
}
.t-lift { box-shadow: var(--g-clay-lift); }

.t-tile {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 19px;
    transform: rotate(-4deg);
    box-shadow: var(--g-sticker);
}

/* numbered step label inside a card */
.t-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
}
.t-step b {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: var(--g-teal);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    transform: rotate(-3deg);
    box-shadow: var(--g-sticker);
}
.t-step .t-hint { margin-left: auto; }

/* ---------- form controls ---------- */

.t-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
    font-size: 15.5px;
    line-height: 1.3;
    color: var(--g-ink);
}
.t-field + .t-field { margin-top: 18px; }

.t-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--g-ink-55);
}
.t-hint i { color: var(--g-teal); font-size: 12px; }

.t-input {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1.5px solid var(--g-line);
    background: #fffdf8;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.t-input:focus-within { border-color: var(--g-teal); box-shadow: 0 0 0 4px rgba(8, 152, 136, .14); background: #fff; }
.t-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--g-ink);
    padding: 0;
    height: 100%;
}
.t-input input::placeholder { color: var(--g-ink-40); }
.t-input .t-pre { font-weight: 700; font-size: 13px; color: var(--g-ink-40); }
.t-input input[type=number] { -moz-appearance: textfield; }
.t-input input::-webkit-outer-spin-button,
.t-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.g-body .t-input :focus-visible { outline: none; }

.t-seg { display: grid; gap: 4px; background: var(--g-line-soft); border-radius: 14px; padding: 4px; }
.t-seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.t-seg--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.t-seg button {
    height: 42px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
    font-size: 15.5px;
    color: var(--g-ink-55);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.t-seg button:hover { color: var(--g-ink); }
.t-seg button[aria-pressed=true] { background: #fff; color: var(--g-teal-dark); font-weight: 600; box-shadow: var(--g-sticker); }

.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.t-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--g-line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 13px 6px 11px;
    font: 600 14px/1.3 'DM Sans', sans-serif;
    color: var(--g-ink);
    cursor: pointer;
    transition: transform .15s var(--g-spring), background .15s ease, border-color .15s ease;
}
.t-chip i { color: var(--g-teal); font-size: 13px; }
.t-chip:hover { transform: translateY(-1px); border-color: #cfeae5; }
.t-chip[aria-pressed=true] { background: var(--g-teal); border-color: var(--g-teal); color: #fff; }
.t-chip[aria-pressed=true] i { color: #fff; }
.t-chip:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* switch */
.t-switch { display: flex; align-items: center; gap: 14px; background: var(--g-paper); border-radius: 18px; padding: 14px 16px; cursor: pointer; }
.t-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-switch__track { flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: #d9d2c3; transition: background .2s ease; }
.t-switch__track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(24, 40, 104, .2); transition: transform .25s var(--g-spring); }
.t-switch input:checked + .t-switch__track { background: var(--g-teal); }
.t-switch input:checked + .t-switch__track::after { transform: translateX(20px); }
.t-switch input:focus-visible + .t-switch__track { outline: 3px solid var(--g-teal); outline-offset: 3px; }
.t-switch__text { flex: 1; font-weight: 500; font-size: 16px; line-height: 1.35; }

/* range slider */
.t-range { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; margin: 6px 0 0; cursor: pointer; }
.t-range::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--g-teal) 0 var(--fill, 50%), var(--g-line-soft) var(--fill, 50%) 100%); }
.t-range::-moz-range-track { height: 10px; border-radius: 999px; background: var(--g-line-soft); }
.t-range::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--g-teal); }
.t-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--g-teal); box-shadow: 0 8px 18px -8px rgba(24, 40, 104, .5); }
.t-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--g-teal); box-shadow: 0 8px 18px -8px rgba(24, 40, 104, .5); }
.t-range-scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--g-ink-40); margin-top: 2px; }

/* ---------- buttons ---------- */

.t-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 16.5px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--g-sticker);
    transition: transform .2s var(--g-spring), box-shadow .2s ease, background .2s ease;
}
.t-btn:hover { transform: translateY(-2px); }
.t-btn:active { transform: translateY(0) scale(.98); }
.t-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.g-body a.t-btn--teal, .t-btn--teal { background: var(--g-teal); color: #fff; box-shadow: 0 10px 22px -8px rgba(8, 152, 136, .65); }
.t-btn--teal:hover { background: var(--g-teal-dark); }
.g-body a.t-btn--line, .t-btn--line { background: #fff; color: var(--g-ink); border: 1.5px solid var(--g-line); }
.g-body a.t-btn--wa, .t-btn--wa { background: var(--t-wa); color: #fff; }
.t-btn--sm { height: 46px; padding: 0 18px; font-size: 15.5px; }
.t-btn--lg { height: 56px; font-size: 18px; }
.t-btn--icon { width: 54px; padding: 0; }

.t-msg { margin: 10px 0 0; font-size: 13.5px; color: var(--g-ink-55); }
.t-msg i { margin-right: 4px; }
.t-msg.is-ok i { color: var(--g-teal); }
.t-msg.is-err { color: #9a3412; }

/* ---------- hub ---------- */

.t-hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 40px; align-items: center; }
.t-hero .t-title { font-size: clamp(38px, 5.6vw, 60px); line-height: 1.04; margin: 20px 0 18px; }
.t-row { display: flex; flex-wrap: wrap; gap: 12px; }

.t-collage { position: relative; height: 430px; }
.t-collage > * { position: absolute; }
.t-float-a { left: 50px; top: 40px; width: 270px; padding: 18px 20px; transform: rotate(-5deg); }
.t-float-b { right: 10px; top: 118px; width: 280px; padding: 16px 18px; transform: rotate(4deg); }
.t-float-c { left: 92px; top: 250px; width: 340px; height: 170px; transform: rotate(-2deg); border-radius: 16px; box-shadow: var(--g-clay-lift); }
.t-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g-ink-55); }
.t-big { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--g-teal-dark); line-height: 1.08; }

.t-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } /* 4 tools: 2x2, no orphan */
.t-toolcard {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px;
    color: var(--g-ink);
    text-decoration: none;
    transition: transform .22s var(--g-spring), box-shadow .22s ease;
}
.g-body a.t-toolcard { color: var(--g-ink); }
.t-toolcard:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--g-clay-lift); }
.t-toolcard__well { height: 196px; border-radius: 20px; padding: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.t-toolcard__body { padding: 18px 10px 8px; display: flex; flex-direction: column; flex: 1; }
.t-toolcard h3 { font-size: 23px; line-height: 1.2; margin: 0; }
.t-toolcard p { font-size: 15.5px; line-height: 1.6; color: var(--g-ink-70); margin: 12px 0 16px; }
.t-toolcard__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.t-tag { font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--g-ink-40); }
.t-go { width: 40px; height: 40px; border-radius: 50%; background: var(--g-teal); color: #fff; display: grid; place-items: center; font-size: 15px; }
.t-badge { position: absolute; right: 26px; top: 26px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: var(--g-pink); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; transform: rotate(4deg); box-shadow: var(--g-sticker); }

.t-soon { margin-top: 22px; border: 2px dashed #e0d8c6; border-radius: var(--g-r-lg); padding: 18px 22px; display: flex; align-items: center; gap: 16px; background: rgba(255, 255, 255, .45); }
.t-soon strong { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; line-height: 1.3; }
.t-soon span { font-size: 15px; color: var(--g-ink-70); }
.t-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.t-pill--yellow { background: #fdf0c8; color: #8a6400; }
.t-pill--teal { background: var(--g-teal-soft); color: var(--g-teal-dark); }

.t-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.t-guides .g-tool { margin: 0; }

/* CTA band: horizontal on wide screens */
.t-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.t-cta p { margin-bottom: 0; }
.t-cta .g-cta__row { flex: none; }
.g-body main a.g-btn--ghost { color: #fff; }

/* ---------- calculators ---------- */

.t-calc { border-radius: var(--g-r-xl); overflow: hidden; margin-top: 34px; }
.t-calc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t-calc__in { padding: 34px 38px; display: flex; flex-direction: column; gap: 24px; }
.t-calc__out { position: relative; padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.t-calc__out::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--t-confetti); opacity: .37; }
.t-calc__out--yellow { background: var(--t-soft-yellow); align-items: center; text-align: center; }
.t-calc__out--teal { background: var(--g-teal-soft); }
.t-calc__out .t-big { font-size: clamp(44px, 5.4vw, 66px); margin-top: 8px; }
.t-per { font-size: 17px; color: var(--g-ink-55); }

.t-agebadge { display: inline-block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 28px; color: var(--g-teal-dark); background: var(--g-teal-soft); border-radius: 14px; padding: 0 14px; transform: rotate(-2deg); }

.t-split { width: 100%; max-width: 420px; margin-top: 20px; text-align: left; background: #fff; border: 1px solid var(--t-soft-yellow-line); border-radius: 20px; padding: 16px 18px; }
.t-split__bar { display: flex; gap: 3px; height: 14px; margin: 10px 0; }
.t-split__bar span { border-radius: 999px; }
.t-split__legend { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 1.35; }
.t-split__legend span span { color: var(--g-ink-55); }

.t-progress { background: #fff; border: 1px solid #cfeae5; border-radius: 20px; padding: 16px 18px; margin-top: 20px; }
.t-progress__top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; color: var(--g-ink-55); margin-bottom: 8px; }
.t-bar { height: 14px; border-radius: 999px; background: var(--g-line-soft); overflow: hidden; }
.t-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0aa696, var(--g-teal)); transition: width .5s var(--g-spring); }
.t-coins { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.t-coins span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(24, 40, 104, .22); }
.t-coins-cap { font-size: 13px; color: var(--g-ink-55); margin: 14px 0 8px; }

.t-nudge { display: flex; gap: 10px; align-items: center; background: var(--t-soft-yellow); border: 1px solid var(--t-soft-yellow-line); border-radius: 16px; padding: 12px 14px; margin-top: 14px; font-size: 15px; line-height: 1.45; }
.t-nudge i { color: #b3591a; font-size: 18px; }

.t-emailbar { border-top: 1px solid var(--g-line); background: #fbf9f3; padding: 22px 36px; display: flex; align-items: center; gap: 22px; }
.t-emailbar__copy { flex: 1 1 240px; min-width: 0; }
.t-emailbar strong { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.3; }
.t-emailbar small { display: block; font-size: 14.5px; color: var(--g-ink-70); line-height: 1.5; }
.t-emailbar form { flex: 0 1 auto; display: grid; grid-template-columns: minmax(220px, 300px) auto; gap: 8px 10px; align-items: center; }
.t-emailbar .t-input { background: #fff; }
.t-emailbar .t-msg { grid-column: 1 / -1; margin: 0; }

.t-tablewrap .g-table tr.is-you td { background: var(--t-soft-yellow); }
.t-tablewrap .g-table .t-pill { margin-left: 8px; padding: 2px 9px; font-size: 12px; background: var(--g-yellow); color: var(--g-ink); }

.t-qa { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }
.t-qa .g-faq { margin: 18px 0 0; }
.t-qa__side h2 { font-size: 20px; margin: 10px 0 16px; }
.t-qa__side .g-tool { margin: 0 0 12px; }

.t-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.t-steps .t-card { padding: 24px; }
.t-steps i.t-num { font-style: normal; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; color: #fff; background: var(--g-teal); transform: rotate(-3deg); box-shadow: var(--g-sticker); margin-bottom: 12px; }
.t-steps h3 { font-size: 20px; margin: 0 0 6px; }
.t-steps p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--g-ink-70); }

/* ---------- chore chart maker ---------- */

.cm { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 34px; }
.cm__controls, .cm__side { display: flex; flex-direction: column; gap: 18px; }
.cm__controls .t-card { padding: 24px; }
.cm__side { position: sticky; top: 100px; }

.cm-rows { display: flex; flex-direction: column; gap: 10px; }
.cm-row { display: flex; align-items: center; gap: 10px; position: relative; }
.cm-row .t-input { height: 46px; padding: 0 12px; }
.cm-row .cm-name { flex: 1; min-width: 0; }
.cm-row .cm-reward { width: 108px; flex: none; }
.cm-icon {
    flex: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--g-sticker);
    transform: rotate(-3deg);
    transition: transform .2s var(--g-spring);
}
.cm-row:nth-child(even) .cm-icon { transform: rotate(3deg); }
.cm-icon:hover { transform: rotate(0) scale(1.06); }
.cm-del { flex: none; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 8px; color: var(--g-ink-40); cursor: pointer; font-size: 16px; }
.cm-del:hover { color: #c2410c; background: #fff1e6; }

.cm-picker {
    position: absolute;
    left: 0;
    top: 50px;
    z-index: 20;
    width: 280px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    background: #fff;
    border: 1px solid var(--g-line);
    border-radius: 18px;
    box-shadow: var(--g-clay-lift);
    padding: 10px;
}
.cm-picker button { aspect-ratio: 1; border: 0; border-radius: 11px; background: var(--g-paper); color: var(--g-ink); cursor: pointer; font-size: 16px; }
.cm-picker button:hover, .cm-picker button[aria-pressed=true] { background: var(--g-teal); color: #fff; }

.cm-add { width: 100%; height: 46px; margin-top: 12px; border-radius: 14px; border: 2px dashed #cfeae5; background: transparent; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 15.5px; color: var(--g-teal-dark); cursor: pointer; }
.cm-add:hover { background: rgba(8, 152, 136, .05); }
.cm-add:disabled { opacity: .5; cursor: not-allowed; }
.cm-quick { margin: 18px 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g-ink-40); }
.cm-note { margin: 14px 0 0; font-size: 13.5px; color: var(--g-ink-55); line-height: 1.5; }

.cm-preview { padding: 18px; }
.cm-preview__head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 14px; }
.cm-preview__head strong { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 19px; }
.cm-preview__head .t-hint { margin-left: auto; }
.cm-well { background: #efe9dc; border-radius: 18px; padding: 22px; }
.cm-stage { position: relative; width: 100%; aspect-ratio: 1123 / 794; overflow: hidden; border-radius: 10px; box-shadow: 0 18px 36px -18px rgba(24, 40, 104, .45); }
.cm-stage .cc { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--cc-scale, .5)); }

.cm-total { display: flex; align-items: center; gap: 14px; background: var(--t-soft-yellow); border: 1px solid var(--t-soft-yellow-line); border-radius: 22px; padding: 14px 20px; }
.cm-total__coin { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--g-yellow); color: #6b4c00; display: grid; place-items: center; font-size: 18px; transform: rotate(-6deg); box-shadow: var(--g-sticker); }
.cm-total__copy { flex: 1; font-size: 16px; line-height: 1.4; color: var(--g-ink-70); }
.cm-total__amt { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 30px; color: var(--g-teal-dark); white-space: nowrap; }
.cm-total__per { font-size: 15px; color: var(--g-ink-55); white-space: nowrap; }

.cm-actions { display: flex; gap: 12px; }
.cm-actions .t-btn--teal { flex: 1; }

.cm-email { background: var(--g-teal-soft); border: 1px solid #cfeae5; border-radius: var(--g-r-lg); padding: 22px 24px; }
.cm-email__head { display: flex; gap: 14px; align-items: flex-start; }
.cm-email__head .t-tile { background: #fff; color: var(--g-teal-dark); }
.cm-email h3 { font-size: 21px; line-height: 1.3; margin: 0; }
.cm-email p { font-size: 15.5px; color: var(--g-ink-70); line-height: 1.5; margin: 2px 0 0; }
.cm-email form { display: flex; gap: 10px; margin-top: 16px; }
.cm-email .t-input { flex: 1; background: #fff; }
.cm-email__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.cm-email__foot .t-chip { flex: none; white-space: nowrap; background: rgba(255, 255, 255, .7); cursor: default; }
.cm-email__foot .t-chip i { color: var(--g-pink); }
.cm-email__foot .t-chip:hover { transform: none; border-color: var(--g-line); }
.cm-email .t-msg { margin: 0; text-align: right; }

.cm-bar { display: none; }

/* ---------- chore chart replica (1123 x 794, see choreChartPdf.ts) ---------- */

.cc {
    position: relative;
    width: 1123px;
    height: 794px;
    overflow: hidden;
    background: #fff6e3;
    color: #182868;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.2;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    --rh: 60px;
    --tile: 44px;
    --name: 21px;
    --chip: 16px;
    --gap: 8px;
}
.cc::before { content: ''; position: absolute; inset: -200px; background: var(--t-confetti); transform: rotate(-8deg); }
.cc-panel { position: absolute; left: 28px; top: 26px; right: 34px; bottom: 32px; background: #fff; border: 3px solid #182868; border-radius: 30px; box-shadow: 7px 7px 0 #182868; padding: 24px 30px 20px; display: flex; flex-direction: column; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.cc-head__text { min-width: 0; }
.cc-kick { font-weight: 500; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(24, 40, 104, .55); }
.cc-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 52px; line-height: 1.02; margin: 4px 0 8px; white-space: nowrap; color: #182868; letter-spacing: 0; }
.cc-title .n { color: #037a6b; }
.cc-title .m { background: linear-gradient(transparent 58%, rgba(248, 184, 8, .53) 58%, rgba(248, 184, 8, .53) 90%, transparent 90%); }
.cc-sub { font-size: 17px; color: rgba(24, 40, 104, .74); line-height: 1.4; margin: 0; }
.cc-badges { display: flex; align-items: flex-start; gap: 18px; margin-right: 6px; flex: none; }
.cc-week { margin-top: 14px; background: #fff; border: 2.5px solid #182868; border-radius: 999px; padding: 7px 16px; display: flex; align-items: flex-end; gap: 8px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px; transform: rotate(-2deg); box-shadow: 3px 3px 0 #182868; }
.cc-week i { color: #6858d8; font-size: 16px; align-self: center; }
.cc-line { display: inline-block; border-bottom: 2.5px dashed rgba(24, 40, 104, .45); height: 18px; }
.cc-coin { position: relative; flex: none; width: 128px; height: 128px; margin-top: -10px; border-radius: 50%; background: #f8b808; border: 3px solid #182868; box-shadow: 4px 4px 0 #182868; display: grid; place-items: center; text-align: center; transform: rotate(8deg); font-family: 'Fredoka', sans-serif; line-height: 1.05; }
.cc-coin::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 2px dashed rgba(24, 40, 104, .35); }
.cc-coin small { display: block; font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13px; }
.cc-coin b { display: block; font-weight: 700; font-size: 27px; white-space: nowrap; }

.cc-cols { display: grid; grid-template-columns: 280px 92px repeat(7, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 0 6px 0 8px; }
.cc-th { margin-bottom: 8px; align-items: end; }
.cc-th > span:nth-child(-n+2) { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 1.1px; text-transform: uppercase; color: rgba(24, 40, 104, .55); }
.cc-th > span:nth-child(2) { text-align: center; }
.cc-day { height: 36px; border-radius: 12px; border: 2.5px solid #182868; display: grid; place-items: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px; color: #fff; }
.cc-rows { display: flex; flex-direction: column; gap: var(--gap); }
.cc-row { height: var(--rh); border-radius: 18px; }
.cc-row:nth-child(odd) { background: #fbf8f1; }
.cc-chore { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cc-tile { flex: none; width: var(--tile); height: var(--tile); border-radius: 14px; border: 2.5px solid #182868; box-shadow: 3px 3px 0 #182868; display: grid; place-items: center; color: #fff; font-size: calc(var(--tile) * .46); transform: rotate(-4deg); }
.cc-row:nth-child(even) .cc-tile { transform: rotate(4deg); }
.cc-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: var(--name); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-chip { justify-self: center; max-width: 100%; overflow: hidden; background: #f8b808; border: 2.5px solid #182868; border-radius: 999px; padding: 3px 10px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: var(--chip); line-height: 1.3; white-space: nowrap; }
.cc-box { height: calc(var(--rh) - 12px); border-radius: 14px; border: 2.5px dashed; background: #fff; display: grid; place-items: center; }
.cc-box i { font-size: min(20px, calc(var(--rh) * .36)); opacity: .16; }
.cc-foot { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: center; }
.cc-earned { height: 64px; background: #fff4d6; border: 2.5px solid #182868; border-radius: 18px; padding: 0 16px; display: flex; align-items: center; gap: 12px; transform: rotate(-1deg); }
.cc-earned > i { color: #f28b30; font-size: 27px; }
.cc-earned div { flex: 1; font-family: 'Fredoka', sans-serif; font-weight: 600; }
.cc-earned div > span:first-child { display: block; font-size: 16px; line-height: 1.2; }
.cc-earned div > span:last-child { display: flex; align-items: flex-end; gap: 6px; font-size: 18px; }
.cc-earned .cc-line { flex: 1; height: 20px; }
.cc-motto { display: flex; justify-content: center; align-items: center; gap: 8px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px; white-space: nowrap; }
.cc-motto .d1 { color: #089888; }
.cc-motto .d2 { color: #e93b7a; }
.cc-motto svg { flex: none; }
.cc-sign { display: flex; flex-direction: column; gap: 6px; }
.cc-sign > span:first-child { display: flex; align-items: flex-end; gap: 8px; font-weight: 500; font-size: 15px; }
.cc-sign .cc-line { flex: 1; }
.cc-sign > span:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; color: rgba(24, 40, 104, .55); }
.cc-sign img { height: 20px; width: auto; }

/* ---------- holiday outing planner (/tools/holiday-planner) ---------- */

.hp-select {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 16px;
    border-radius: 14px;
    border: 1.5px solid var(--g-line);
    background: #fffdf8 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23182868' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 16px center;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 16px;
    color: var(--g-ink);
    cursor: pointer;
}
.hp-select:focus { border-color: var(--g-teal); box-shadow: 0 0 0 4px rgba(8, 152, 136, .14); outline: none; }
.hp-geo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 10px; }
.hp-geo .t-hint { flex: 1 1 200px; line-height: 1.4; }
.hp-locate { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 4px 0; font: 600 14px/1.3 'DM Sans', sans-serif; color: var(--g-teal-dark); cursor: pointer; }
.hp-locate:hover { text-decoration: underline; }
.hp-locate:disabled { opacity: .55; cursor: progress; text-decoration: none; }
.hp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-stepper { display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 6px; border-radius: 14px; border: 1.5px solid var(--g-line); background: #fffdf8; }
.hp-stepper button { flex: none; width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--g-line-soft); color: var(--g-ink); font-size: 14px; cursor: pointer; }
.hp-stepper button:hover { background: var(--g-teal); color: #fff; }
.hp-stepper output { flex: 1; text-align: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 19px; }

.hp-out { justify-content: flex-start; }
.hp-out .t-big { font-size: clamp(34px, 4vw, 46px); }
.hp-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hp-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #cfeae5; border-radius: 18px; padding: 10px 12px; }
.hp-item:nth-child(even) .t-tile { transform: rotate(4deg); }
.hp-item .t-tile { width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }
.hp-item__main { flex: 1; min-width: 0; }
.g-body a.hp-item__name, .hp-item__name { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 16.5px; line-height: 1.25; color: var(--g-ink); text-decoration: none; }
.hp-item__name:hover { color: var(--g-teal-dark); text-decoration: underline; }
.hp-item__meta { font-size: 13px; color: var(--g-ink-55); line-height: 1.4; }
.hp-item__cost { flex: none; text-align: right; font-size: 13px; font-weight: 700; color: var(--g-teal-dark); white-space: nowrap; }
.hp-item__cost small { display: block; font-weight: 500; color: var(--g-ink-40); }
.hp-empty { margin-top: 18px; background: #fff; border: 1.5px dashed #cfeae5; border-radius: 18px; padding: 18px; font-size: 15px; line-height: 1.5; color: var(--g-ink-70); }

.hp-fund { margin-top: 16px; background: #fff; border: 1px solid #cfeae5; border-radius: 20px; padding: 16px 18px; }
.hp-fund__top { display: flex; align-items: center; gap: 12px; }
.hp-fund__top .t-tile { background: var(--g-yellow); color: #6b4c00; width: 40px; height: 40px; border-radius: 50%; }
.hp-fund strong { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px; line-height: 1.3; }
.hp-fund p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--g-ink-70); }
.hp-fund .t-row { margin-top: 12px; }

.hp-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--g-ink-55); }
.hp-note i { color: var(--g-orange); margin-right: 4px; }

.hp-app { margin-top: 16px; display: flex; align-items: center; gap: 14px; background: var(--g-ink); color: #fff; border-radius: 20px; padding: 14px 16px; }
.hp-app .t-tile { background: var(--g-yellow); color: var(--g-ink); width: 40px; height: 40px; border-radius: 13px; }
.hp-app__copy { flex: 1; font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.hp-app__copy b { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 16.5px; color: #fff; }
.g-body a.hp-app__btn, .hp-app__btn { flex: none; background: #fff; color: var(--g-ink); height: 44px; padding: 0 16px; font-size: 15px; }

.hp-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.hp-region { padding: 22px 24px; }
.hp-region h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 0 0 12px; }
.hp-region ul { list-style: none; margin: 0; padding: 0; }
.hp-region li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--g-line-soft); font-size: 15px; line-height: 1.4; }
.hp-region li:first-child { border-top: 0; }
.hp-region li span { flex: none; color: var(--g-ink-55); font-size: 13.5px; }
.hp-region .t-pill { padding: 2px 9px; font-size: 12px; margin-left: 6px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
    /* One column: flatten the side column so the preview leads, the
       controls follow it, and the email card comes last. */
    .cm { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .cm__side { display: contents; }
    .cm-preview { order: 1; }
    .cm-total { order: 2; }
    .cm-actions { order: 3; }
    #actionMsg { order: 4; margin: -6px 0 0; }
    .cm__controls { order: 5; }
    .cm-email { order: 6; }
    .t-hero { grid-template-columns: minmax(0, 1fr); }
    .t-collage { height: 440px; max-width: 560px; margin: 0 auto; width: 100%; }
    .t-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .t-guides { grid-template-columns: minmax(0, 1fr); }
    .t-qa { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .t-calc__grid { grid-template-columns: minmax(0, 1fr); }
    .t-emailbar { flex-direction: column; align-items: stretch; padding: 22px; }
    .t-emailbar__copy { flex: none; }
    .t-emailbar form { grid-template-columns: minmax(0, 1fr) auto; }
    .t-steps { grid-template-columns: minmax(0, 1fr); }
    .t-cta { flex-direction: column; align-items: flex-start; }
    .hp-regions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .t-wrap { padding: 0 16px; }
    .t-section { margin-top: 56px; }
    .t-tools { grid-template-columns: minmax(0, 1fr); }
    .t-collage { display: none; }
    .t-calc__in, .t-calc__out { padding: 24px 20px; }
    .t-calc { border-radius: var(--g-r-lg); }
    .t-emailbar form { grid-template-columns: minmax(0, 1fr); }
    .t-emailbar .t-btn { width: 100%; }
    .t-soon { flex-wrap: wrap; }
    .cm__controls .t-card { padding: 18px; }
    .cm-row { gap: 8px; }
    .cm-row .cm-reward { width: 84px; }
    .cm-row .t-input { padding: 0 10px; font-size: 15px; }
    .cm-icon { width: 38px; height: 38px; }
    .cm-picker { width: 250px; }
    .cm-well { padding: 12px; }
    .cm-preview { padding: 12px; }
    .cm-actions { display: none; }
    .cm-email form { flex-direction: column; }
    .cm-email .t-input { flex: none; }
    .cm-email__foot { flex-direction: column; align-items: flex-start; }
    .cm-email .t-msg { text-align: left; }
    .cm-total__amt { font-size: 24px; }
    .hp-app { flex-wrap: wrap; }
    .hp-app__btn { width: 100%; }
    .hp-region { padding: 18px; }
    .cm-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(247, 244, 236, .95); border-top: 1px solid var(--g-line); box-shadow: 0 -10px 26px -14px rgba(24, 40, 104, .3); }
    .cm-bar .t-btn--teal { flex: 1; }
    .cm-page { padding-bottom: 90px; }
}

/* ---------- print: just the chart, A4 landscape ---------- */

@media print {
    @page { size: A4 landscape; margin: 0; }
    html, body { background: #fff !important; }
    .g-body::before { display: none; }
    body * { visibility: hidden; }
    .cm-stage, .cm-stage * { visibility: visible; }
    .cm-stage { position: fixed; left: 0; top: 0; width: 1123px; height: 794px; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
    .cm-stage .cc { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .t-bar span, .t-switch__track::after { transition: none; }
}
