/* "Hej!": the "Med tyska ögon" switch. It takes its colours from the skin like everything else;
   this post wears Classic, so it comes out in Winamp green and yellow. */

/* ---- Med tyska ögon */
.ty { display: grid; gap: 14px; }
.widget .ty__switch { appearance: none; justify-self: start; display: inline-flex; align-items: center; gap: 12px; padding: 2px 0; border: 0; background: none; color: var(--th-text); font: 600 15px/1 var(--wide); cursor: pointer; }
.ty__plate { position: relative; width: 28px; height: 44px; border: 1px solid var(--th-line); border-radius: 5px; background: #000; }
.ty__rocker { position: absolute; left: 5px; right: 5px; top: 22px; height: 16px; border-radius: 3px; background: var(--th-dim); transition: top .15s ease, background-color .15s ease; }
.is-on .ty__rocker { top: 5px; background: var(--th-hot); box-shadow: 0 0 10px var(--th-glow); }

/* the paragraph itself, switched on: everything fades but what German helps with, which lights up
   and is underlined; the false friends get a dashed line. The German words hang under each one as
   generated content, so the paragraph's text never changes. */
.post__body p.ty-on { color: var(--th-dim); line-height: 2.55; }
.ty-on .ty-w { position: relative; }
/* the lines are backgrounds, not text-decoration, so they do not run through the German words */
.ty-on .ty-w--look { color: var(--th-hot); padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat; }
.ty-on .ty-w--trap { color: var(--th-title); padding-bottom: 2px; background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px) left bottom / 100% 2px no-repeat; }
.ty-on .ty-w--name { color: var(--th-text); }
.ty-on .ty-w--look::after, .ty-on .ty-w--trap::after {
  content: attr(data-de);
  position: absolute; left: 0; top: calc(100% + 3px);
  font: 500 11px/1 var(--wide); letter-spacing: 0; white-space: nowrap;
  color: inherit;
}

.ty__sum { margin: 0; min-height: 1.5em; font: 600 14px/1.5 var(--wide); color: var(--th-bright); }
.ty__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font: 500 12px/1.4 var(--wide); color: var(--th-dim); }
.ty__legend li { display: inline-flex; align-items: center; gap: 7px; }
.ty__key { width: 14px; height: 3px; }
.ty__key--look { background: var(--th-hot); }
.ty__key--trap { border-top: 2px dashed var(--th-title); }
.ty__key--none { background: var(--th-dim); }
/* the table starts closed, in the HTML itself, so readers with and without script (and crawlers)
   get the same page; it is all there, one click away */
.ty__table { margin-top: 4px; }
.ty__table summary { cursor: pointer; font: 600 13px/1.4 var(--wide); color: var(--th-link); }
.ty__table summary:hover { color: var(--th-bright); }
.ty__table table { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .ty__rocker { transition: none; }
}
