/* Taalkrak Toolspagina - opmaak overgenomen van /taalkrak-tools/ */

  .tk-tools-page,
  .tk-tools-page * {
    box-sizing: border-box;
  }

  .tk-tools-page {
    --tk-purple: #b155e4;
    --tk-purple-dark: #8631bb;
    --tk-yellow: #ffb716;
    --tk-blue: #5170ff;
    --tk-green: #22c55e;
    --tk-ink: #172323;
    --tk-muted: #5d6666;
    --tk-border: #eadff0;
    width: auto;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: clamp(26px, 4vw, 54px);
    overflow: hidden;
    color: var(--tk-ink);
    background:
      radial-gradient(circle at 5% 8%, rgba(177, 85, 228, 0.14), transparent 28%),
      radial-gradient(circle at 96% 30%, rgba(255, 183, 22, 0.14), transparent 25%),
      #fffdfb;
    border-radius: 0;
    font-family: "Lexia", sans-serif;
  }

  .tk-tools-page h1,
  .tk-tools-page h2,
  .tk-tools-page h3,
  .tk-tools-page p,
  .tk-tools-page a,
  .tk-tools-page span,
  .tk-tools-page strong,
  .tk-tools-page b,
  .tk-tools-page i,
  .tk-tools-page em {
    font-family: "Lexia", sans-serif !important;
  }

  .tk-tools-page a {
    text-decoration: none;
  }

  .tk-tools-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
    gap: clamp(34px, 6vw, 84px);
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 510px;
    margin: 0 auto;
    padding: clamp(34px, 5vw, 70px) clamp(8px, 2vw, 22px);
  }

  .tk-tools-label,
  .tk-tool-card__eyebrow,
  .tk-tools-help__label {
    font-weight: 800;
    letter-spacing: 0.075em;
  }

  .tk-tools-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 21px;
    padding: 10px 17px;
    color: var(--tk-purple-dark);
    background: rgba(177, 85, 228, 0.1);
    border: 1px solid rgba(177, 85, 228, 0.26);
    border-radius: 999px;
    font-size: 13px;
  }

  .tk-tools-label svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tk-tools-hero h1 {
    max-width: 720px;
    margin: 0 0 20px;
    color: var(--tk-ink);
    font-size: clamp(39px, 5.3vw, 64px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.025em;
  }

  .tk-tools-intro {
    max-width: 670px;
    margin: 0 0 28px;
    color: var(--tk-muted);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.7;
  }

  .tk-tools-hero__button,
  .tk-tool-card__button,
  .tk-tools-help > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border-radius: 16px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .tk-tools-hero__button {
    min-height: 56px;
    padding: 14px 23px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--tk-purple), var(--tk-purple-dark));
    box-shadow: 0 10px 24px rgba(134, 49, 187, 0.22);
  }

  .tk-tools-hero__button:hover,
  .tk-tool-card__button:hover,
  .tk-tools-help > a:hover {
    transform: translateY(-2px);
  }

  .tk-tools-hero__visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 390px;
  }

  .tk-tools-hero__visual::before {
    content: "";
    position: absolute;
    width: min(100%, 385px);
    aspect-ratio: 1;
    background: linear-gradient(145deg, rgba(177, 85, 228, 0.13), rgba(255, 183, 22, 0.17));
    border: 1px solid rgba(177, 85, 228, 0.17);
    border-radius: 42% 58% 54% 46% / 48% 43% 57% 52%;
    transform: rotate(-7deg);
  }

  .tk-tools-hero__visual img {
    position: relative;
    z-index: 2;
    display: block;
    width: min(78%, 330px);
    aspect-ratio: 1;
    object-fit: cover;
    border: 9px solid #fff;
    border-radius: 34px;
    box-shadow: 0 24px 60px rgba(69, 30, 84, 0.17);
    transform: rotate(3deg);
  }

  .tk-tools-shape,
  .tk-tools-spark {
    position: absolute;
    z-index: 3;
  }

  .tk-tools-shape {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    box-shadow: 0 12px 25px rgba(56, 28, 69, 0.13);
  }

  .tk-tools-shape--one {
    top: 30px;
    right: 3%;
    background: var(--tk-yellow);
    transform: rotate(14deg);
  }

  .tk-tools-shape--two {
    bottom: 34px;
    left: 1%;
    background: var(--tk-blue);
    transform: rotate(-13deg);
  }

  .tk-tools-spark {
    font-size: 28px;
    font-weight: 900;
  }

  .tk-tools-spark--one {
    top: 8%;
    left: 10%;
    color: var(--tk-purple);
  }

  .tk-tools-spark--two {
    right: 1%;
    bottom: 16%;
    color: var(--tk-yellow);
  }

  .tk-tools-spark--three {
    right: 11%;
    top: 21%;
    color: var(--tk-blue);
    font-size: 18px;
  }

  .tk-tools-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    max-width: none;
    margin: 0 auto clamp(72px, 9vw, 112px);
  }

  .tk-tools-benefit {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 21px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--tk-border);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(60, 25, 75, 0.055);
  }

  .tk-tools-benefit__icon {
    display: grid;
    flex: 0 0 46px;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .tk-tools-benefit__icon--purple {
    color: var(--tk-purple-dark);
    background: rgba(177, 85, 228, 0.13);
  }

  .tk-tools-benefit__icon--yellow {
    color: #a76b00;
    background: rgba(255, 183, 22, 0.18);
  }

  .tk-tools-benefit__icon--blue {
    color: #3452df;
    background: rgba(81, 112, 255, 0.13);
  }

  .tk-tools-benefit__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tk-tools-benefit strong {
    display: block;
    margin-bottom: 3px;
    color: var(--tk-ink);
    font-size: 16px;
  }

  .tk-tools-benefit p {
    margin: 0;
    color: var(--tk-muted);
    font-size: 14px;
    line-height: 1.5;
  }

  .tk-tools-overview {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    scroll-margin-top: 25px;
  }

  .tk-tools-section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
  }

  .tk-tools-section-heading > span {
    display: inline-block;
    margin-bottom: 11px;
    color: var(--tk-purple-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.09em;
  }

  .tk-tools-section-heading h2,
  .tk-tools-help h2 {
    margin: 0 0 14px;
    color: var(--tk-ink);
    font-size: clamp(31px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
  }

  .tk-tools-section-heading p {
    margin: 0;
    color: var(--tk-muted);
    font-size: 17px;
    line-height: 1.65;
  }

  .tk-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
  }

  .tk-tool-card {
    --card-accent: var(--tk-purple);
    --card-dark: var(--tk-purple-dark);
    --card-soft: #faf3fd;
    --card-border: #ecdafa;
    --card-button-text: #fff;
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--tk-border);
    border-radius: 25px;
    box-shadow: 0 14px 34px rgba(60, 25, 75, 0.07);
  }

  .tk-tool-card__art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    overflow: hidden;
    background:
      radial-gradient(circle at 86% 12%, rgba(177, 85, 228, 0.13), transparent 28%),
      linear-gradient(145deg, var(--card-soft), #fff);
    border-bottom: 1px solid var(--card-border);
  }

  .tk-tool-card__art::before {
    content: "";
    position: absolute;
    width: 165px;
    height: 165px;
    background: rgba(177, 85, 228, 0.07);
    border-radius: 42% 58% 53% 47% / 47% 42% 58% 53%;
    transform: rotate(-9deg);
  }

  .tk-tool-card__content {
    display: flex;
    flex: 1;
    align-items: flex-start;
    flex-direction: column;
    padding: 27px 27px 29px;
  }

  .tk-tool-card__eyebrow {
    display: block;
    margin-bottom: 11px;
    color: var(--card-dark);
    font-size: 11px;
  }

  .tk-tool-card__content h3 {
    max-width: 100%;
    margin: 0 0 13px;
    color: var(--tk-ink);
    font-size: clamp(25px, 2.3vw, 31px);
    font-weight: 800;
    line-height: 1.16;
    overflow-wrap: break-word;
  }

  .tk-tool-card__content > p {
    margin: 0 0 19px;
    color: var(--tk-muted);
    font-size: 15px;
    line-height: 1.65;
  }

  .tk-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
  }

  .tk-tool-tags span {
    padding: 7px 10px;
    color: var(--card-dark);
    background: var(--card-soft);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
  }

  .tk-tool-card__button {
    width: 100%;
    min-height: 51px;
    margin-top: auto;
    padding: 13px 15px;
    color: var(--card-button-text) !important;
    background: linear-gradient(135deg, var(--card-accent), var(--card-dark));
    box-shadow: 0 8px 19px rgba(63, 37, 82, 0.15);
    font-size: 14px;
    text-align: center;
  }

  .tk-tools-more {
    grid-column: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 135px;
    margin-top: 0;
    padding: 25px clamp(28px, 5vw, 48px);
    text-align: left;
    background:
      radial-gradient(circle at 100% 0, rgba(81, 112, 255, 0.12), transparent 35%),
      #fff;
    border: 1px dashed var(--tk-border);
    border-radius: 24px;
  }

  .tk-tools-more__icon {
    display: grid;
    flex: 0 0 58px;
    place-items: center;
    width: 58px;
    height: 58px;
    color: var(--tk-blue);
    background: rgba(81, 112, 255, 0.1);
    border: 1px solid rgba(81, 112, 255, 0.2);
    border-radius: 18px;
    font-size: 31px;
    font-weight: 400;
  }

  .tk-tools-more h3 {
    margin: 0 0 6px;
    color: var(--tk-ink);
    font-size: 22px;
    font-weight: 800;
  }

  .tk-tools-more p {
    max-width: 660px;
    margin: 0;
    color: var(--tk-muted);
    font-size: 15px;
    line-height: 1.65;
  }

  .tk-tools-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    width: 100%;
    max-width: none;
    margin: clamp(70px, 9vw, 110px) auto 10px;
    padding: clamp(30px, 5vw, 52px);
    background:
      radial-gradient(circle at 0 100%, rgba(255, 183, 22, 0.2), transparent 34%),
      linear-gradient(135deg, #fbf3ff, #fff9e9);
    border: 1px solid rgba(177, 85, 228, 0.2);
    border-radius: 28px;
  }

  .tk-tools-help > div {
    max-width: 760px;
  }

  .tk-tools-help__label {
    display: block;
    margin-bottom: 10px;
    color: var(--tk-purple-dark);
    font-size: 12px;
  }

  .tk-tools-help h2 {
    font-size: clamp(28px, 3.5vw, 39px);
  }

  .tk-tools-help p {
    margin: 0;
    color: var(--tk-muted);
    font-size: 16px;
    line-height: 1.65;
  }

  .tk-tools-help > a {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 14px 22px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--tk-blue), #3957dc);
    box-shadow: 0 10px 24px rgba(81, 112, 255, 0.22);
  }

  @media (max-width: 1050px) {
    .tk-tools-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tk-tools-more {
      grid-column: auto;
    }
  }

  @media (max-width: 950px) {
    .tk-tools-hero {
      grid-template-columns: 1fr;
      min-height: 0;
      text-align: center;
    }

    .tk-tools-hero__content {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .tk-tools-hero__visual {
      min-height: 350px;
    }

    .tk-tools-benefits {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 700px) {
    .tk-tools-page {
      padding: 30px 15px;
      border-radius: 0;
    }

    .tk-tools-hero {
      padding-top: 25px;
    }

    .tk-tools-hero h1 {
      font-size: clamp(36px, 11vw, 47px);
    }

    .tk-tools-hero__visual {
      min-height: 310px;
    }

    .tk-tools-hero__visual img {
      width: min(78%, 280px);
      border-width: 7px;
      border-radius: 27px;
    }

    .tk-tools-shape {
      width: 49px;
      height: 49px;
      border-radius: 14px;
    }

    .tk-tools-grid {
      grid-template-columns: 1fr;
    }

    .tk-tool-card__art {
      min-height: 180px;
    }

    .tk-tools-more {
      flex-direction: column;
      min-height: 220px;
      text-align: center;
    }

    .tk-tools-help {
      flex-direction: column;
      align-items: flex-start;
    }

    .tk-tools-help > a,
    .tk-tools-hero__button {
      width: 100%;
    }
  }

  /* Wisselen tussen taal en wiskunde */
  .tk-tools-page [hidden] { display: none !important; }
  .tk-tools-page .tk-tools-tabs {
    display: flex; gap: 10px; width: min(100%, 520px);
    margin: 0 auto 28px; padding: 8px; border: 1px solid var(--tk-border);
    border-radius: 23px; background: #fff;
    box-shadow: 0 10px 28px rgba(60,25,75,.06);
  }
  .tk-tools-page .tk-tools-tab {
    display: flex; flex: 1 1 0; align-items: center; justify-content: center;
    gap: 10px; min-width: 0; min-height: 62px; padding: 12px 14px;
    margin: 0; border: 2px solid transparent; border-radius: 17px;
    background: transparent; color: var(--tk-muted); font-family: "Lexia", sans-serif;
    font-size: 18px; font-weight: 800; line-height: 1.2; text-transform: none;
    letter-spacing: normal; cursor: pointer; box-shadow: none;
    transition: background .2s ease, color .2s ease;
  }
  .tk-tools-page .tk-tools-tab:hover { background: #f7f3fa; color: var(--tk-ink); }
  .tk-tools-page .tk-tools-tab--taal[aria-selected="true"] {
    color: #fff; background: var(--tk-purple-dark); border-color: var(--tk-purple-dark);
  }
  .tk-tools-page .tk-tools-tab--wiskunde[aria-selected="true"] {
    color: #fff; background: #3452df; border-color: #3452df;
  }
  .tk-tools-page :is(button, a, [tabindex]):focus-visible {
    outline: 3px solid #172323; outline-offset: 4px;
  }
  .tk-tools-panel { margin-bottom: 28px; }
  .tk-tools-category-heading { margin: 0 0 24px; text-align: center; }
  .tk-tools-category-heading h3 { margin: 0 0 8px; font-size: clamp(22px,3vw,28px); line-height: 1.3; }
  .tk-tools-category-heading p { margin: 0; color: var(--tk-muted); font-size: 15px; line-height: 1.65; }
  .tk-tools-overview > .tk-tools-more { margin-top: 26px; }
  @media (max-width: 420px) {
    .tk-tools-page .tk-tools-tab { gap: 6px; padding: 10px 7px; font-size: 15px; }
    .tk-tools-page .tk-tools-tabs { gap: 6px; padding: 6px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tk-tools-page *, .tk-tools-page *::before, .tk-tools-page *::after { transition: none !important; }
  }

  /* Compacte kaartjes: afbeelding, titel en uitklapbare informatie. */
  .tk-tools-page .tk-tools-grid { align-items: start; }
  .tk-tools-page .tk-tool-card__content { display: block; padding: 22px 24px 18px; }
  .tk-tools-page .tk-tool-card__content h3 {
    min-height: 2.32em; margin-bottom: 14px; font-size: clamp(23px,2vw,28px);
  }
  .tk-tool-details { width: 100%; margin: 0; padding: 0; border: 0; background: none; }
  .tk-tools-page .tk-tool-details__toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
    color: var(--card-dark); background: var(--card-soft);
    border: 1px solid var(--card-border); border-radius: 13px;
    font-family: "Lexia", sans-serif; font-size: 14px; font-weight: 800;
    line-height: 1.4; list-style: none; cursor: pointer;
  }
  .tk-tool-details__toggle::-webkit-details-marker { display: none; }
  .tk-tool-details__toggle::marker { content: ""; }
  .tk-tools-page .tk-tool-details__toggle::before,
  .tk-tools-page .tk-tool-details__toggle::after { display: none; }
  .tk-tools-page .tk-tool-details__toggle:hover { border-color: var(--card-dark); }
  .tk-tools-page .tk-tool-details__toggle:focus-visible { outline: 3px solid #172323; outline-offset: 4px; }
  .tk-tool-details__chevron {
    flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor;
    stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
    transition: transform .2s ease;
  }
  .tk-tool-details[open] .tk-tool-details__chevron { transform: rotate(180deg); }
  .tk-tool-details__less,
  .tk-tool-details[open] .tk-tool-details__more { display: none; }
  .tk-tool-details[open] .tk-tool-details__less { display: inline; }
  .tk-tool-details__body { padding-top: 20px; }
  .tk-tool-details__body > p { margin: 0 0 19px; color: var(--tk-muted); font-size: 15px; line-height: 1.65; }
  .tk-tools-sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  @media (max-width: 700px) {
    .tk-tools-page .tk-tool-card__content h3 { min-height: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tk-tool-details__chevron { transition: none; }
  }
  /* De link naar de tool blijft zichtbaar naast de uitklapbare uitleg. */
  .tk-tools-page .tk-tool-card__content > .tk-tool-card__button { margin-top: 12px; }
  .tk-tool-details__body .tk-tool-tags { margin-bottom: 4px; }
  /* --- Plugin: elke tool heeft een eigen SVG; alle kaartjes in dezelfde kleur --- */
  .tk-tool-card__art .tk-tool-card__svg {
    position: relative;
    z-index: 2;
    display: block;
    width: min(88%, 330px);
    height: auto;
    max-height: 168px;
    overflow: visible;
  }
  .tk-tool-card__art img.tk-tool-card__svg { object-fit: contain; }
  .tk-tool-card__art--leeg::after {
    content: "";
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--tk-purple), var(--tk-purple-dark));
    opacity: .35;
  }
  /* Rustige knop naar de tool: zacht paars, zodat de tekening het eerst opvalt. */
  .tk-tools-page .tk-tool-card__button {
    color: var(--tk-purple-dark) !important;
    background: #f3e6fb;
    border: 1px solid #e2c9f3;
    box-shadow: none;
  }
  .tk-tools-page .tk-tool-card__button:hover,
  .tk-tools-page .tk-tool-card__button:focus-visible {
    color: #fff !important;
    background: var(--tk-purple-dark);
    border-color: var(--tk-purple-dark);
    transform: none;
  }
  .tk-tools-page .tk-tool-details__toggle { background: #fff; border-color: #ecdafa; }
