.tic {
  --tic-ink: #19333b;
  --tic-muted: #5b6b70;
  --tic-brand: #087f8c;
  --tic-soft: #edf7f7;
  --tic-line: #d6e3e4;
  --tic-danger: #b42318;
  max-width: 900px;
  margin: 2rem auto;
  color: var(--tic-ink);
  font-family: inherit;
}

.tic *, .tic *::before, .tic *::after { box-sizing: border-box; }
.tic__header, .tic__result { padding: clamp(1.25rem, 3vw, 2.5rem); background: linear-gradient(135deg, #f5fbfb, #e5f4f4); border: 1px solid var(--tic-line); border-radius: 20px; }
.tic h2 { margin: .15rem 0 .6rem; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; }
.tic__eyebrow { margin: 0; color: var(--tic-brand); font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tic__privacy { display: inline-block; margin-bottom: 0; padding: .45rem .7rem; background: white; border-radius: 999px; color: var(--tic-muted); font-size: .9rem; }
.tic__chooser { margin: 1rem 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--tic-line); border-radius: 16px; background: white; }
.tic__chooser h3, .tic__form-heading h3 { margin: 0 0 .75rem; }
.tic__choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.tic__choice { display: grid; gap: .45rem; padding: 1.25rem; border: 2px solid var(--tic-line); border-radius: 14px; background: white; color: var(--tic-ink); font: inherit; text-align: left; cursor: pointer; transition: .15s ease; }
.tic__choice:hover, .tic__choice:focus-visible { border-color: var(--tic-brand); background: var(--tic-soft); outline: none; }
.tic__choice strong { font-size: 1.1rem; }
.tic__choice span, .tic__form-heading p { color: var(--tic-muted); }
.tic__form-heading { margin: 1rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--tic-brand); background: var(--tic-soft); }
.tic__back { margin-bottom: .8rem; padding: .35rem 0; border: 0; background: transparent; color: var(--tic-brand); font: inherit; font-weight: 700; cursor: pointer; }
.tic__progress { position: sticky; z-index: 2; top: 1rem; margin: 1rem 0; padding: .75rem 1rem; background: rgba(255,255,255,.96); border: 1px solid var(--tic-line); border-radius: 12px; box-shadow: 0 8px 22px rgba(25,51,59,.08); }
.tic__progress { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; }
.tic__progress-track { grid-column: 1 / -1; height: 7px; overflow: hidden; background: #e8eeee; border-radius: 999px; }
.tic__progress-track span { display: block; width: 0; height: 100%; background: var(--tic-brand); transition: width .2s ease; }
.tic__questions { margin: 0; padding: 0; list-style: none; }
.tic__question { margin: 1rem 0; padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--tic-line); border-radius: 16px; background: white; }
.tic__question--missing { border-color: var(--tic-danger); box-shadow: 0 0 0 2px rgba(180,35,24,.1); }
.tic fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.tic legend { width: 100%; margin-bottom: 1rem; font-size: 1.05rem; font-weight: 700; }
.tic__number { display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-right: .45rem; border-radius: 50%; background: var(--tic-soft); color: var(--tic-brand); }
.tic__options { display: grid; gap: .5rem; }
.tic__options--thi { grid-template-columns: repeat(3, 1fr); }
.tic__options--tfi { grid-template-columns: repeat(11, 1fr); gap: .3rem; }
.tic__options input { position: absolute; opacity: 0; pointer-events: none; }
.tic__options label { display: grid; place-items: center; min-height: 68px; padding: .6rem .3rem; border: 1px solid var(--tic-line); border-radius: 10px; cursor: pointer; text-align: center; transition: .15s ease; }
.tic__options label:hover { border-color: var(--tic-brand); background: var(--tic-soft); }
.tic__options input:focus-visible + label { outline: 3px solid rgba(8,127,140,.3); outline-offset: 2px; }
.tic__options input:checked + label { border-color: var(--tic-brand); background: var(--tic-brand); color: white; }
.tic__options small { opacity: .75; }
.tic__prompt { display: block; margin: 0 0 .65rem; color: var(--tic-muted); font-size: .9rem; font-weight: 600; }
.tic__scale-ends { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .45rem; color: var(--tic-muted); font-size: .82rem; }
.tic__scale-ends span:last-child { text-align: right; }
.tic__submit, .tic__secondary { min-height: 48px; padding: .75rem 1.15rem; border: 0; border-radius: 10px; font: inherit; font-weight: 750; cursor: pointer; }
.tic__submit { width: 100%; background: var(--tic-brand); color: white; }
.tic__secondary { border: 1px solid var(--tic-brand); background: white; color: var(--tic-brand); }
.tic__error { color: var(--tic-danger); font-weight: 700; }
.tic__result { margin-top: 1rem; text-align: center; }
.tic__score strong { font-size: clamp(4rem, 15vw, 7rem); line-height: 1; }
.tic__score span { color: var(--tic-muted); font-size: 1.5rem; }
.tic__notice { margin: 1.25rem 0; padding: 1rem; border-left: 4px solid var(--tic-brand); background: white; color: var(--tic-muted); text-align: left; }
.tic__domains { margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--tic-line); border-radius: 12px; background: white; text-align: left; }
.tic__domains h3 { margin-top: 0; }
.tic__domain-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) 2.5rem; align-items: center; gap: .75rem; margin: .7rem 0; }
.tic__domain-row > div { height: 9px; overflow: hidden; border-radius: 999px; background: #e8eeee; }
.tic__domain-row i { display: block; height: 100%; border-radius: inherit; background: var(--tic-brand); }
.tic__domain-row strong { text-align: right; }
.tic__domain-note { margin-bottom: 0; color: var(--tic-muted); font-size: .85rem; }
.tic__actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.tic__print-sheet { display: none; }

@media (max-width: 700px) {
  .tic__choices { grid-template-columns: 1fr; }
  .tic__options--thi { grid-template-columns: 1fr; }
  .tic__options--thi label { min-height: 48px; grid-template-columns: 1fr auto; padding-inline: .9rem; text-align: left; }
  .tic__options--tfi { grid-template-columns: repeat(6, 1fr); }
  .tic__options--tfi label { min-height: 48px; }
}

@media print {
  body.tic-printing > *:not(.tic__print-sheet) { display: none !important; }
  body.tic-printing .tic__print-sheet {
    display: block !important;
    max-width: none;
    margin: 0;
    color: #19333b;
  }
  body.tic-printing .tic__print-sheet .tic__result {
    display: block !important;
    margin: 0;
    border: 1px solid #777;
    background: white;
    box-shadow: none;
  }
  body.tic-printing .tic__print-sheet .tic__actions { display: none !important; }
}
