/* THC Habitat: uses the child theme's palette tokens (same fallbacks as THC Anatomy, Names and the Range Finder).
   Dark follows THC Core's Display switch: Core flips the palette tokens on html[data-thc-theme="dark"], and the few
   literal colours below are restated for that attribute. The device's own dark setting is left alone, as everywhere
   else on the site. No fixed, sticky or floating elements, no overlays. The child theme may restyle any .thc-hab class. */

.thc-hab {
  --hab-canvas: var(--wp--preset--color--base, #f7f1e4);
  --hab-raised: var(--wp--preset--color--accent-5, #fcf8ef);
  --hab-muted: var(--wp--preset--color--accent-4, #ece4d9);
  --hab-border: var(--wp--preset--color--accent-6, #d9d0bc);
  --hab-text: var(--wp--preset--color--contrast, #332d25);
  --hab-leaf: var(--wp--preset--color--accent-1, #5e7d53);
  --hab-deep: var(--wp--preset--color--accent-3, #3f5c3b);
  --hab-sage: var(--wp--preset--color--accent-2, #a8b79a);
  --hab-stroke: var(--wp--preset--color--control-stroke, #8a7f66);
  --hab-quiet: #675d4b; /* small secondary text: passes 4.5:1 on every light surface */
  --hab-on-leaf: #fff;
  --hab-food: #e3ebd9;
  --hab-food-ink: #3b5634;
  --hab-gold: #f3e4b3;
  --hab-gold-ink: #5e470c;
  --hab-warn: #8a2f1f;
  --hab-care-bg: #faf1e6;
  --hab-tint: color-mix(in srgb, var(--hab-sage) 22%, var(--hab-raised));
  --hab-radius: 14px;
  --hab-shadow: 0 1px 2px rgba(51, 45, 37, .06), 0 4px 14px rgba(51, 45, 37, .06);
  color: var(--hab-text);
  margin-block: var(--wp--preset--spacing--md, 1rem) 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
:root[data-theme="dark"] .thc-hab, :root[data-thc-theme="dark"] .thc-hab {
  --hab-quiet: #b3a994;
  --hab-on-leaf: #15130f;
  --hab-food: #2f3d2a;
  --hab-food-ink: #c6dcb9;
  --hab-gold: #4a3f22;
  --hab-gold-ink: #f0d99a;
  --hab-warn: #f0a49d;
  --hab-care-bg: #322a22;
  --hab-shadow: none;
}
:root[data-thc-contrast="high"] .thc-hab { --hab-quiet: #000; --hab-food: #efefef; --hab-food-ink: #000; --hab-gold: #efefef; --hab-gold-ink: #000; }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .thc-hab { --hab-tint: #eef0e6; }
  :root[data-theme="dark"] .thc-hab, :root[data-thc-theme="dark"] .thc-hab { --hab-tint: #2c3027; }
}

.thc-hab *, .thc-hab *::before, .thc-hab *::after { box-sizing: border-box; }
.thc-hab [hidden], .thc-hab[hidden] { display: none !important; }
.thc-hab__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0; }
.thc-hab a { color: var(--hab-deep); text-underline-offset: .15em; }
.thc-hab button { font: inherit; }
.thc-hab :focus-visible { outline: 3px solid var(--hab-leaf); outline-offset: 2px; }
.thc-hab [tabindex="-1"]:focus { outline: none; }
.thc-hab [tabindex="-1"]:focus-visible { outline: 3px solid var(--hab-leaf); outline-offset: 3px; border-radius: 4px; }

/* What shows when: no JavaScript = the full list; with it, the questions, a plan or the browse view. */
.thc-hab--nojs [data-hab-js] { display: none !important; }
.thc-hab:not(.thc-hab--nojs):not(.is-plan):not(.is-browse) .thc-hab__results { display: none; }
.thc-hab.is-plan .thc-hab__qs, .thc-hab.is-browse .thc-hab__qs { display: none; }
.thc-hab:not(.is-plan) [data-hab-plan-only] { display: none !important; }
.thc-hab:not(.is-browse) [data-hab-browse-only] { display: none !important; }
.thc-hab.is-plan [data-hab-noplan] { display: none; }

/* ---------- type ---------- */
.thc-hab__h2 { margin: .2rem 0 .5rem; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; }
.thc-hab__lead { margin: 0 0 1.4rem; font-size: var(--wp--preset--font-size--large, 1.2rem); line-height: 1.45; max-width: 46rem; }
.thc-hab__h3 { margin: 0 0 .35rem; font-size: clamp(1.2rem, 2.4vw, 1.4rem); line-height: 1.25; color: var(--hab-deep); }
.thc-hab__sub { margin: 0 0 1rem; color: var(--hab-quiet); font-size: .98rem; max-width: 44rem; }
.thc-hab__intro { margin: 0 0 1rem; max-width: 46rem; }

/* ---------- buttons ---------- */
.thc-hab__btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .55em 1.25em; border: 1px solid var(--hab-leaf); border-radius: 999px; background: var(--hab-leaf); color: var(--hab-on-leaf); font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; max-width: 100%; }
.thc-hab__btn:hover { background: var(--hab-deep); border-color: var(--hab-deep); color: var(--hab-on-leaf); }
.thc-hab__btn--ghost { background: transparent; color: var(--hab-deep); border-color: var(--hab-stroke); }
.thc-hab__btn--ghost:hover { background: var(--hab-muted); color: var(--hab-deep); border-color: var(--hab-deep); }
.thc-hab__btn--warn { background: var(--hab-warn); border-color: var(--hab-warn); color: #fff; }
.thc-hab__btn--warn:hover { background: var(--hab-text); border-color: var(--hab-text); color: var(--hab-raised); }
:root[data-theme="dark"] .thc-hab .thc-hab__btn--warn, :root[data-thc-theme="dark"] .thc-hab .thc-hab__btn--warn { color: #15130f; }
.thc-hab__btn--big { min-height: 52px; padding: .7em 1.8em; font-size: 1.08rem; }
.thc-hab__btn:disabled { opacity: .5; cursor: not-allowed; }
.thc-hab__linkbtn { background: none; border: 0; padding: .4em .2em; min-height: 44px; min-width: 44px; color: var(--hab-deep); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; font-size: .92rem; }
.thc-hab__row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 0; }

/* ---------- questions ---------- */
.thc-hab__qs { display: grid; gap: 1.6rem; }
.thc-hab__welcome { margin: 0; padding: .6rem .9rem; border-radius: 10px; background: var(--hab-tint); color: var(--hab-deep); font-weight: 600; }
.thc-hab__q { margin: 0; }
.thc-hab__qh { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin: 0 0 .8rem; font-size: clamp(1.25rem, 2.8vw, 1.55rem); line-height: 1.25; }
.thc-hab__qn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; height: 2rem; border-radius: 999px; background: var(--hab-deep); color: var(--hab-raised); font-size: 1rem; font-weight: 700; }
.thc-hab__opt { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hab-quiet); padding: .15em .6em; border: 1px solid var(--hab-border); border-radius: 999px; }
.thc-hab__qhint { margin: -.3rem 0 .8rem; color: var(--hab-quiet); }
.thc-hab__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16.5rem, 100%), 1fr)); gap: .6rem; }
.thc-hab__tile { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 64px; padding: .75rem 1rem; border: 1.5px solid var(--hab-border); border-radius: var(--hab-radius); background: var(--hab-raised); color: var(--hab-text); text-align: left; cursor: pointer; box-shadow: var(--hab-shadow); position: relative; }
.thc-hab__tile:hover { border-color: var(--hab-stroke); background: var(--hab-tint); }
.thc-hab__tile[aria-pressed="true"] { border-color: var(--hab-deep); background: var(--hab-tint); box-shadow: inset 0 0 0 1.5px var(--hab-deep); }
.thc-hab__tile[aria-pressed="true"]::after { content: ""; position: absolute; top: .55rem; right: .6rem; width: 1.35rem; height: 1.35rem; border-radius: 999px; background: var(--hab-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat; }
.thc-hab__tile[aria-disabled="true"] { cursor: not-allowed; background: transparent; box-shadow: none; border-style: dashed; color: var(--hab-quiet); }
.thc-hab__tile[aria-disabled="true"]:hover { background: transparent; border-color: var(--hab-border); }
.thc-hab__tt { display: grid; gap: .15rem; min-width: 0; padding-right: 1.4rem; }
.thc-hab__tl { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.thc-hab__th { font-size: .9rem; color: var(--hab-quiet); line-height: 1.3; }
.thc-hab__no { font-size: .85rem; font-style: italic; color: var(--hab-quiet); }
.thc-hab__ico { flex: none; color: var(--hab-deep); }
.thc-hab__tile[aria-pressed="true"] .thc-hab__ico { color: var(--hab-leaf); }
.thc-hab__meter { flex: none; }
.thc-hab__meter .is-on { fill: var(--hab-leaf); }
.thc-hab__meter .is-off { fill: var(--hab-border); }
.thc-hab__tile[aria-disabled="true"] .thc-hab__meter .is-on { fill: var(--hab-stroke); opacity: .5; }
.thc-hab__tiles--levels { grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); }
.thc-hab__flags { display: flex; flex-wrap: wrap; gap: .5rem; }
.thc-hab__flag { min-height: 44px; padding: .45em 1em; border: 1.5px solid var(--hab-border); border-radius: 999px; background: var(--hab-raised); color: var(--hab-text); cursor: pointer; text-align: left; line-height: 1.25; max-width: 100%; }
.thc-hab__flag:hover { border-color: var(--hab-stroke); background: var(--hab-tint); }
.thc-hab__flag[aria-pressed="true"] { background: var(--hab-deep); border-color: var(--hab-deep); color: var(--hab-raised); font-weight: 600; }
.thc-hab__flag[aria-pressed="true"]::before { content: "\2713\00a0"; }
.thc-hab__go { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.thc-hab__browse { margin: 0; font-size: .95rem; }
.thc-hab__browse a { display: inline-block; padding: .55rem 0; }

/* ---------- results header, note, tools ---------- */
.thc-hab__results { margin: 0; }
.thc-hab__head { padding: 1rem 1.1rem; margin: 0 0 1rem; border-radius: var(--hab-radius); background: var(--hab-tint); border: 1px solid var(--hab-border); }
.thc-hab.is-plan .thc-hab__head { border-left: 5px solid var(--hab-leaf); }
.thc-hab:not(.is-plan) .thc-hab__head { background: transparent; border: 0; padding: 0; }
.thc-hab__rh { margin: 0; font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 1.25; }
.thc-hab__also { margin: .3rem 0 0; color: var(--hab-quiet); font-size: .95rem; }
.thc-hab__headbtns { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .7rem 0 0; }
.thc-hab:not(.is-plan):not(.is-browse) .thc-hab__headbtns { display: none; }
.thc-hab__jump { display: inline-flex; align-items: center; gap: .3em; min-height: 44px; font-weight: 600; }
.thc-hab__note { margin: 0 0 1.2rem; padding: .7rem 1rem; border-left: 4px solid var(--hab-sage); background: var(--hab-raised); border-radius: 0 10px 10px 0; font-size: .95rem; max-width: 50rem; }
.thc-hab__note p { margin: .2rem 0; }
.thc-hab__note p + p { color: var(--hab-quiet); }
.thc-hab__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; margin: 0 0 1.4rem; }
.thc-hab__switch { display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer; min-height: 44px; padding: .3rem 0; }
.thc-hab__switch input { flex: none; width: 1.3rem; height: 1.3rem; margin: .15rem 0 0; accent-color: var(--hab-leaf); }
.thc-hab__switch small { display: block; color: var(--hab-quiet); font-size: .86rem; }
.thc-hab__progress { margin: 0; color: var(--hab-deep); font-weight: 600; font-size: .95rem; }

/* ---------- Start here ---------- */
.thc-hab__start { margin: 0 0 2rem; }
.thc-hab__startlist { display: grid; gap: .8rem; counter-reset: habstart; max-width: 54rem; }
.thc-hab__startlist > .thc-hab__card { counter-increment: habstart; border-color: var(--hab-sage); }
.thc-hab__startlist .thc-hab__ct { display: flex; align-items: flex-start; gap: .6rem; font-size: 1.12rem; }
.thc-hab__startlist .thc-hab__ct::before { content: counter(habstart); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; margin-top: -.1rem; border-radius: 999px; background: var(--hab-leaf); color: var(--hab-on-leaf); font-weight: 700; font-size: .92rem; }
.thc-hab__empty { margin: 0; padding: .8rem 1rem; border-radius: 10px; background: var(--hab-tint); }

/* ---------- cards ---------- */
.thc-hab__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr)); gap: .8rem; align-items: start; }
.thc-hab__card { position: relative; display: flex; flex-direction: column; gap: .55rem; min-width: 0; padding: 1rem 1.1rem .4rem; background: var(--hab-raised); border: 1px solid var(--hab-border); border-radius: var(--hab-radius); box-shadow: var(--hab-shadow); scroll-margin-top: 6rem; }
.thc-hab__card.is-doing { border-color: var(--hab-sage); background: var(--hab-tint); }
.thc-hab__ct { margin: 0; font-size: 1.04rem; line-height: 1.3; }
.thc-hab__what { margin: 0; font-size: .97rem; line-height: 1.5; }
.thc-hab__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.thc-hab__chip { display: inline-flex; align-items: center; gap: .3em; padding: .2em .65em; border-radius: 999px; background: var(--hab-muted); color: var(--hab-text); font-size: .8rem; font-weight: 600; line-height: 1.35; }
.thc-hab__chip--food { background: var(--hab-food); color: var(--hab-food-ink); }
.thc-hab__chip--food::before { content: ""; flex: none; width: .95em; height: .95em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M14 2C7 2 2.5 5.5 2.5 10.5c0 1.2.3 2.3.9 3.3C5 10 8 7.5 11 6.2 8.2 8 6 10.5 4.6 14c.9.4 1.9.6 3 .6C11.8 14.6 14 10 14 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M14 2C7 2 2.5 5.5 2.5 10.5c0 1.2.3 2.3.9 3.3C5 10 8 7.5 11 6.2 8.2 8 6 10.5 4.6 14c.9.4 1.9.6 3 .6C11.8 14.6 14 10 14 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.thc-hab__chip--ease { background: transparent; color: var(--hab-quiet); box-shadow: inset 0 0 0 1px var(--hab-border); font-weight: 500; }
.thc-hab__chip--rent { background: var(--hab-gold); color: var(--hab-gold-ink); }
.thc-hab__marks { display: flex; flex-wrap: wrap; gap: .45rem; margin: .1rem 0 0; }
.thc-hab__mark { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; padding: .4em 1em; border: 1.5px solid var(--hab-stroke); border-radius: 999px; background: transparent; color: var(--hab-deep); font-weight: 600; font-size: .92rem; cursor: pointer; }
.thc-hab__mark::before { content: ""; width: .95em; height: .95em; border: 1.5px solid currentColor; border-radius: 4px; flex: none; }
.thc-hab__mark--list::before { border-radius: 999px; }
.thc-hab__mark:hover { background: var(--hab-muted); border-color: var(--hab-deep); }
.thc-hab__mark[aria-pressed="true"] { background: var(--hab-deep); border-color: var(--hab-deep); color: var(--hab-raised); }
.thc-hab__mark[aria-pressed="true"]::before { border-color: transparent; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='%23fcf8ef' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
:root[data-theme="dark"] .thc-hab .thc-hab__mark[aria-pressed="true"]::before, :root[data-thc-theme="dark"] .thc-hab .thc-hab__mark[aria-pressed="true"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='%2325221d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.thc-hab__more { margin: 0 -.3rem; border-top: 1px solid var(--hab-border); }
.thc-hab__more > summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: .2rem .3rem; cursor: pointer; color: var(--hab-deep); font-weight: 600; font-size: .92rem; list-style: none; }
.thc-hab__more > summary::-webkit-details-marker { display: none; }
.thc-hab__more > summary::before, .thc-hab__tdet > summary::after, .thc-hab__mld > summary::before { content: ""; flex: none; width: .55em; height: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin: 0 .25em 0 .1em; }
.thc-hab__more[open] > summary::before, .thc-hab__mld[open] > summary::before { transform: rotate(45deg); }
.thc-hab__body { padding: .1rem .3rem .8rem; font-size: .94rem; line-height: 1.5; }
.thc-hab__body p { margin: .45rem 0; }
.thc-hab__body ol, .thc-hab__body ul { margin: .3rem 0 .5rem; padding-left: 1.3rem; }
.thc-hab__body li { margin: .2rem 0; }
.thc-hab__dt { font-weight: 700; margin-bottom: .1rem !important; }
.thc-hab__why { font-size: .97rem; }
.thc-hab__care { padding: .45rem .7rem; border-left: 3px solid var(--hab-warn); background: var(--hab-care-bg); border-radius: 0 8px 8px 0; }
.thc-hab__srcs { font-size: .86rem; color: var(--hab-quiet); }
.thc-hab__srcs ul { list-style: disc; }
.thc-hab__srcs a { color: var(--hab-deep); }
.thc-hab__by { color: var(--hab-quiet); }

/* ---------- themes ---------- */
.thc-hab__themes { display: grid; gap: .8rem; margin: 0 0 1.2rem; }
.thc-hab__themes > .thc-hab__sub { margin: 0; }
.thc-hab__theme, .thc-hab__ifyou { margin: 0; }
.thc-hab__tdet { background: var(--hab-canvas); border: 1px solid var(--hab-border); border-radius: var(--hab-radius); }
.thc-hab__tdet > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .8rem; row-gap: .1rem; min-height: 56px; padding: .8rem 1rem; cursor: pointer; list-style: none; border-radius: var(--hab-radius); }
.thc-hab__tdet > summary::-webkit-details-marker { display: none; }
.thc-hab__tdet > summary::after { grid-column: 2; grid-row: 1 / span 2; transform: rotate(45deg); width: .7em; height: .7em; margin: 0 .3rem; color: var(--hab-deep); }
.thc-hab__tdet[open] > summary::after { transform: rotate(-135deg); }
.thc-hab__tdet > summary:hover { background: var(--hab-muted); }
.thc-hab__tdet[open] > summary { border-bottom: 1px solid var(--hab-border); border-radius: var(--hab-radius) var(--hab-radius) 0 0; }
.thc-hab__th3 { grid-column: 1; margin: 0; font-size: 1.12rem; line-height: 1.3; color: var(--hab-text); display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.thc-hab__count { font-family: var(--wp--preset--font-family--fira-sans, "Segoe UI", Arial, sans-serif); font-size: .8rem; font-weight: 700; color: var(--hab-deep); background: var(--hab-muted); border-radius: 999px; padding: .15em .65em; white-space: nowrap; }
.thc-hab__blurb { grid-column: 1; color: var(--hab-quiet); font-size: .92rem; line-height: 1.4; }
.thc-hab__tdet > .thc-hab__grid, .thc-hab__tdet > div > .thc-hab__ifg { padding: .9rem; }
.thc-hab__tdet > .thc-hab__grid { padding: .9rem; }
.thc-hab__morebar { margin: 0; padding: 0 .9rem .9rem; }
.thc-hab__ifg { padding: .9rem .9rem 0; }
.thc-hab__ifg:last-child { padding-bottom: .9rem; }
.thc-hab__ifh { margin: 0 0 .6rem; font-weight: 700; color: var(--hab-deep); }

/* ---------- ready for more ---------- */
.thc-hab__next { margin: 1.5rem 0 0; padding: 1.1rem 1.2rem; border: 1.5px dashed var(--hab-sage); border-radius: var(--hab-radius); background: var(--hab-raised); }
.thc-hab__next p { margin: 0 0 .8rem; max-width: 44rem; }

/* ---------- My list ---------- */
.thc-hab__mylist { margin: 2rem 0 0; padding: 1.1rem 1.2rem 1rem; border: 1px solid var(--hab-border); border-radius: var(--hab-radius); background: var(--hab-raised); scroll-margin-top: 6rem; }
.thc-hab__mylist:focus { outline: none; }
.thc-hab__mylist:focus-visible { outline: 3px solid var(--hab-leaf); outline-offset: 2px; }
.thc-hab__mlh { margin: 1rem 0 .3rem; font-size: 1rem; color: var(--hab-deep); }
.thc-hab__ml { list-style: none; margin: 0; padding: 0; }
.thc-hab__mli { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 .6rem; border-bottom: 1px solid var(--hab-border); }
.thc-hab__mld { flex: 1 1 14rem; min-width: 0; }
.thc-hab__mld > summary { display: flex; align-items: center; gap: .3rem; min-height: 44px; padding: .25rem 0; cursor: pointer; list-style: none; font-weight: 600; }
.thc-hab__mld > summary::-webkit-details-marker { display: none; }
.thc-hab__mld > summary::before { color: var(--hab-deep); }
.thc-hab__mlbody { padding: 0 0 .7rem 1.2rem; font-size: .93rem; }
.thc-hab__mlbody .thc-hab__what { margin: 0 0 .3rem; }
.thc-hab__confirm { margin: .9rem 0 0; padding: .8rem 1rem; border: 1.5px solid var(--hab-warn); border-radius: 10px; background: var(--hab-care-bg); }
.thc-hab__confirm p { margin: 0; }
.thc-hab__status { margin: .5rem 0 0; min-height: 1.4em; font-weight: 600; color: var(--hab-deep); }
.thc-hab__printurl { display: none; }

/* ---------- share ---------- */
.thc-hab__share { margin: 1.6rem 0 0; }
.thc-hab__share .thc-share-bar { margin: 0; }
.thc-hab__sharefb { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.thc-hab__sharelabel { font-weight: 600; }

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .thc-hab__tile { padding: .7rem .85rem; gap: .7rem; }
  .thc-hab__head { padding: .85rem .9rem; }
  .thc-hab__card { padding: .9rem .9rem .35rem; }
  .thc-hab__note { font-size: .9rem; padding: .6rem .8rem; }
  .thc-hab__tools { margin-bottom: 1rem; }
  .thc-hab__tdet > summary { padding: .75rem .85rem; }
  .thc-hab__tdet > .thc-hab__grid { padding: .7rem; }
  .thc-hab__morebar { padding: 0 .7rem .8rem; }
  .thc-hab__ifg { padding: .7rem .7rem 0; }
  .thc-hab__mylist { padding: .9rem .9rem .8rem; }
  .thc-hab__mark { flex: 1 1 auto; justify-content: center; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-thc-motion="reduce"]) .thc-hab__tile, html:not([data-thc-motion="reduce"]) .thc-hab__mark, html:not([data-thc-motion="reduce"]) .thc-hab__flag { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  html:not([data-thc-motion="reduce"]) .thc-hab__card.is-new { animation: thc-hab-in .5s ease-out; }
  html:not([data-thc-motion="reduce"]) .thc-hab__q:not([hidden]) { animation: thc-hab-fade .3s ease-out; }
}
@keyframes thc-hab-in { from { opacity: 0; transform: translateY(10px); box-shadow: 0 0 0 3px var(--hab-sage); } to { opacity: 1; transform: none; } }
@keyframes thc-hab-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- print ---------- */
@media print {
  .thc-hab__qs, .thc-hab__noprint, .thc-hab__marks, .thc-hab__morebar, .thc-hab__linkbtn, .thc-hab__share { display: none !important; }
  .thc-hab__card, .thc-hab__mli, .thc-hab__tile { break-inside: avoid; box-shadow: none; }
  .thc-hab__printurl { display: block; margin: 1rem 0 0; font-size: .85rem; }
  .thc-hab__mylist, .thc-hab__head, .thc-hab__card, .thc-hab__tdet { background: none !important; border-color: #999 !important; }
  .thc-hab a { color: inherit; }
  /* Print my plan: only the plan header, My list (or the Start here steps when nothing is marked yet) and the address. */
  html.thc-hab-printing body *:not(:has(.thc-hab__print)):not(.thc-hab__print):not(.thc-hab__print *) { display: none !important; }
  html.thc-hab-printing .thc-hab__mylist { border: 0 !important; padding: 0; margin-top: 1rem; }
}
