/* Farm Data Detectives */
.dd-svg { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; }
.dd-fig { margin: 0; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 10px 10px 6px; box-shadow: var(--shadow); min-width: 0; }
.dd-fig--small { box-shadow: none; }
.dd-cap { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; align-items: center; }
.dd-madeup { display: inline-block; background: #fff3c7; border: 1px dashed #c9a227; color: #6b5200; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 800; }
.dd-madeup--block { display: block; border-radius: 12px; padding: 6px 10px; font-size: 14px; text-align: center; margin: 8px 0 0; }
.dd-hl { stroke: #c0392b; stroke-width: 3; }
.mf-body { display: grid; gap: 12px; min-width: 0; }

/* case intro */
.dd-case { background: linear-gradient(#fffaf0, #fff3d6); border: 3px solid #d9b56a; border-radius: 18px; padding: 16px; text-align: center; box-shadow: var(--shadow); position: relative; }
.dd-case::before { content: 'CASE FILE'; position: absolute; top: -12px; left: 16px; background: #c43d2c; color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .1em; padding: 2px 10px; border-radius: 6px; }
.dd-case__emoji { font-size: 56px; line-height: 1.1; }
.dd-case__title { margin: 4px 0 6px; font-size: 24px; }
.dd-case__text { margin: 0 0 8px; font-size: 18px; line-height: 1.45; }
.dd-case__steps { margin: 0; font-weight: 800; color: var(--ink-2); }

/* tally board */
.dd-board { background: #fffdf2; border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.dd-board__title { margin: 0 0 6px; font-weight: 900; }
.dd-board__row { display: grid; grid-template-columns: minmax(96px, auto) 1fr 32px; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); min-height: 36px; }
.dd-board__lab { font-weight: 800; }
.dd-board__n { text-align: right; font-size: 20px; }
.dd-tally { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.dd-tg { position: relative; display: inline-flex; gap: 4px; height: 24px; align-items: stretch; }
.dd-tg i { display: block; width: 3px; background: var(--ink); border-radius: 2px; }
.dd-tg b { position: absolute; left: -3px; right: -3px; top: 10px; height: 3px; background: #c0392b; transform: rotate(-22deg); border-radius: 2px; }
.dd-lab { display: inline-flex; align-items: center; gap: 6px; }
.dd-swatch { display: inline-block; width: 18px; height: 22px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; border: 2px solid #8a6a4a; }

/* count scene */
.dd-progress { margin: 0; font-weight: 800; color: var(--ink-2); }
.dd-scene { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px; padding: 10px; border-radius: 18px; background: radial-gradient(circle at 20% 20%, #a6dc7c, #7cc35a 60%, #6aae4c); border: 4px solid #9c6b3a; }
.dd-scene__cell { display: flex; align-items: center; justify-content: center; min-height: 52px; }
.dd-critter { width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .25); font-size: 32px; line-height: 1; cursor: pointer; position: relative; transition: transform .15s; }
.dd-critter.is-counted { background: rgba(255, 255, 255, .7); opacity: .55; }
.dd-critter.is-counted::after { content: '✓'; position: absolute; right: -2px; top: -4px; font-size: 16px; font-weight: 900; color: #fff; background: var(--green); border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }

/* tally stream */
.dd-photo { background: #22303c; color: #fff; border-radius: 18px; padding: 12px; text-align: center; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid #fff; box-shadow: var(--shadow); }
.dd-photo__n { margin: 0 0 6px; font-weight: 800; opacity: .85; }
.dd-photo__pic { font-size: 76px; line-height: 1.1; animation: dd-pop .25s ease-out; }
.dd-photo__done { font-size: 22px; font-weight: 900; margin: 0; }
.dd-egg { display: block; width: 70px; height: 90px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; border: 3px solid #8a6a4a; animation: dd-pop .25s ease-out; }
@keyframes dd-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.dd-cat { font-size: 18px; }

/* gauge */
.dd-gauge { display: grid; justify-items: center; background: linear-gradient(#dff3ff, #fff); border: 2px solid var(--line); border-radius: 16px; padding: 8px; }
.dd-gauge__day { margin: 0; font-weight: 900; font-size: 18px; }
.dd-gaugesvg { width: 200px; max-width: 70vw; height: auto; }
.dd-tablewrap { overflow-x: auto; max-width: 100%; }
.dd-table { border-collapse: collapse; margin: 0 auto; font-size: 16px; }
.dd-table th, .dd-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.dd-table thead th, .dd-table--row tr:first-child th { background: #f3efe3; }
.dd-table tbody th { text-align: left; background: #faf8f1; }
.dd-table .is-now { background: #ffe89a !important; outline: 2px solid #d4a200; }
.dd-table--small { font-size: 13px; }
.dd-table--small th, .dd-table--small td { padding: 4px 5px; }

/* build */
.dd-build { display: grid; gap: 8px; }
.dd-build__row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 88px 52px; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px 8px; }
.dd-build__row.is-wrong { border-color: #c0392b; background: #fdeceb; }
.dd-build__row.is-wrong .dd-build__lab::after { content: ' ✗'; color: #c0392b; font-weight: 900; }
.dd-build__lab { font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dd-build__val { text-align: center; font-weight: 900; font-size: 18px; }
.dd-step { width: 52px; height: 52px; border-radius: 14px; border: 2px solid #2f7fd1; background: #eaf3fd; font-size: 28px; font-weight: 900; color: #1f5fa8; cursor: pointer; }
.dd-step:active { transform: scale(.94); }

/* picture graph */
.dd-pg { display: grid; gap: 6px; }
.dd-pg__row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; border-bottom: 1px dashed var(--line); min-height: 36px; }
.dd-pg__lab { font-weight: 800; }
.dd-pg__pics { display: flex; flex-wrap: wrap; gap: 2px; font-size: 24px; line-height: 1.2; }
.dd-pg__key { margin: 4px 0 0; font-weight: 800; background: #eaf3fd; border-radius: 10px; padding: 4px 8px; justify-self: start; }

/* lists, dot plot, order */
.dd-card { margin: 0; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 18px; text-align: center; }
.dd-card__v { font-size: 26px; color: #1f5fa8; }
.dd-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 40px; }
.dd-list__v { background: #eaf3fd; border: 2px solid #b9d4f2; border-radius: 10px; padding: 4px 8px; font-weight: 800; }
.dd-list__v.is-mid { background: #ffe89a; border-color: #d4a200; transform: scale(1.12); }
.dd-list--built { background: #fffdf2; border: 2px dashed var(--line); border-radius: 14px; padding: 8px; }
.dd-tiles { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.dd-tile.is-placed { visibility: hidden; }
.dd-nums .mf-choice, .dd-num { font-size: 22px; padding-left: 0; padding-right: 0; min-width: 0; }

/* plot */
.dd-plotctl { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.dd-arrow { font-size: 18px; }
.dd-pt { animation: dd-pulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dd-pulse { 50% { transform: scale(1.2); } }

/* percent grid */
.dd-grid { display: grid; grid-template-columns: repeat(var(--cols), 56px); gap: 6px; justify-content: center; }
.dd-box { width: 56px; height: 56px; border-radius: 10px; border: 2px solid #8a9aa9; background: #fff; cursor: pointer; }
.dd-box.is-on { background: #e0833a; border-color: #a85a1c; }
.dd-box.is-on::after { content: '🐄'; font-size: 24px; }

/* misleading */
.dd-abwrap { display: grid; gap: 10px; }
@media (min-width: 700px) { .dd-abwrap { grid-template-columns: 1fr 1fr; } }
.dd-ab { margin: 0 0 4px; font-weight: 900; font-size: 18px; text-align: center; }
.dd-q2 { margin: 4px 0 0; font-weight: 900; font-size: 18px; }
.mf-choices[style*="--cols: 1"] .mf-choice, .mf-choices[style*="--cols:1"] .mf-choice { font-size: 17px; text-align: left; align-items: flex-start; line-height: 1.35; padding: 10px 14px; }

/* recommend stamp */
.dd-stamp { justify-self: center; font-weight: 900; font-size: 28px; letter-spacing: .12em; color: #c0392b; border: 5px solid #c0392b; border-radius: 12px; padding: 6px 18px; transform: rotate(-8deg); animation: dd-stamp .35s ease-out; background: rgba(255, 255, 255, .8); }
@keyframes dd-stamp { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }

/* home badges */
.dd-hero { width: 100%; text-align: center; }
.dd-hero__title { margin: 0 0 8px; font-weight: 900; font-size: 18px; }
.dd-badges { display: grid; grid-template-columns: repeat(5, minmax(0, 52px)); gap: 8px; justify-content: center; }
.dd-badge { width: 52px; height: 52px; border-radius: 50%; background: #e9e4d6; display: flex; align-items: center; justify-content: center; font-size: 22px; opacity: .7; }
.dd-badge.is-got { background: radial-gradient(circle, #ffe89a, #f2b705); font-size: 28px; opacity: 1; box-shadow: 0 3px 0 #b88a00; }
@media (prefers-reduced-motion: reduce) { .dd-pt, .dd-stamp, .dd-photo__pic, .dd-egg { animation: none; } }
.dd-mm { font-size: 19px; white-space: nowrap; padding-left: 2px; padding-right: 2px; }
