@font-face {
  font-family: "Timezone";
  src: url("../fonts/HALTimezoneUnlicensed-Regular.otf") format("opentype");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Timezone";
  src: url("../fonts/HALTimezoneUnlicensed-Italic.otf") format("opentype");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Timezone Mono";
  src: url("../fonts/HALTimezoneUnlicensed-MonoRegular.otf") format("opentype");
  font-style: normal;
  font-display: swap;
}


/*Color Variables*/
:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-neon-green: #59FF4D;

  --color-grey: #E8E9E2;
  --color-flap-basket: #000000;
}

/*Color for highlighted text*/
::-moz-selection {
  /* Code for Firefox */
  background: var(--color-neon-green);
}

::selection {
  background: var(--color-neon-green);
}

html,
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*article title*/
h2 {
  font-family: "Timezone", serif;
  font-size: 3.75rem;
  line-height: 0.7;
  font-weight: 300;
  margin: 0;
  color: var(--color-black);
}

/*article subheadings*/
h3 {
  font-family: "Timezone", serif;
  font-size: 2.4rem;
  line-height: 0.72;
  font-weight: 300;
  margin: 0;
  color: var(--color-black);
}

/*sidebar buttons*/
h4 {
  font-family: "Timezone Mono", monospace;
  font-size: 1.25rem;
  line-height: 0.7;
  font-weight: 200;
  color: var(--color-black);
  margin: 0;
}

/*preview-info, article-author*/
h5 {
  font-family: "Timezone Mono", monospace;
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 100;
  color: var(--color-black);
}

/*footnotes*/
h6 {
  font-family: "Timezone Mono", monospace;
  font-size: 0.833rem;
  line-height: 1.1;
  font-weight: 100;
  color: var(--color-black);
  margin: 0;
}

/*article text*/
p {
  font-family: "Timezone", serif;
  font-size: 1.25rem;
  line-height: 1.13;
  color: var(--color-black);
  font-weight: 100;
  margin: 0;
}

a {
  color: var(--color-black);
  overflow-wrap: break-word;
}

/* ===============================
   SIDEBAR – GROUPED TABS + PANEL
   Panel content = 50vw
   Tabs sit to the right of the panel, moving together
   =============================== */

.sidebar-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Drawer total width = 50vw + tab rail width (≈ 60%) */
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  /* container only */
  height: 100vh;
  pointer-events: none;
  z-index: 1002;
}

.sidebar-group {
  position: fixed;
  top: 0;
  left: 0;

  width: 50vw;
  /* panel width */
  height: 100vh;

  transform: translateX(-50vw);
  /* CLOSED: hide panel, tab ends at x=0 */
  transition: transform 300ms ease;
  /* match JS DURATION */

  pointer-events: auto;
  z-index: 1003;
}

/* OPEN: panel visible */
.sidebar-group.is-open {
  transform: translateX(0);
  z-index: 1002;
  /* ensure open one sits on top */
}



/* ---------- SIDEBAR TABS (attached to panel edge) ---------- */
.sidebar-tab {
  position: absolute;
  left: 50vw;
  top: var(--tabTop, 20px);

  transform-origin: left bottom;
  transform: rotate(90deg);

  height: 22px;
  width: max-content;

  background: #fff;
  border: none;
  padding: 2px 4px;
  margin: 0;
  cursor: pointer;
}


/* rotated label */
.sidebar-tab span {
  display: block;
  line-height: 16px;
  font-size: 1.5rem;
  font-family: 'Timezone Mono', monospace;
  white-space: nowrap;
  padding: 0 8px;
  color: #000;
}

.sidebar-tab.is-active {
  background-color: #59FF4D;
}


/* We'll actually position tabs based on the "stack" using a shared rail:
     easiest: give each group a different top offset for its own tab is NOT enough.
     Instead, we render *all* tabs in every group? No.
     Better: we position the active tab normally, and we draw a fake rail? No.
  
     So: we stack the tabs via CSS variables set in JS (clean).
  */
.sidebar-tab {
  top: var(--tabTop, 24px);
}

/* Panel content area is EXACTLY 50vw */
.sidebar-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 50vw;
  height: 100vh;

  padding: 1.5rem;
  box-sizing: border-box;
  overflow: auto;
}

/* Demo colors */
.sidebar-view.Inhalt {
  background: rgb(0, 0, 0);
  color: #fff;
}

.sidebar-view.Suche {
  background: green;
  color: #fff;
}

.sidebar-group[data-group="Suche"],
.sidebar-right-view[data-right-view="Suche"] {
  display: none !important;
}

.sidebar-view.Basket {
  background: rgb(0, 0, 0);
  color: #fff;
}

/* Right side only when open */
.sidebar-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;

  background-color: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transform: translateX(100%);
  transition: transform 350ms ease;

  pointer-events: auto;
  z-index: 1001;
}

.sidebar-root.is-open .sidebar-right {
  transform: translateX(0);
}

.sidebar-right-inner {
  height: 100%;
  overflow: auto;
  padding: 1.375rem;
  padding-left: 32px;
  box-sizing: border-box;
}


/* ---------- INHALT LAYOUT ---------- */

/* TOC content must flow normally */
.sidebar-view .toc-category,
.sidebar-view .toc-wrapper,
.sidebar-view .toc-item,
.sidebar-view .toc-title,
.sidebar-view .toc-author,
.sidebar-view .toc-check {
  position: static;
}

.sidebar-view .toc-category,
.sidebar-view .toc-title,
.sidebar-view .toc-author {
  font-family: 'Timezone', serif !important;
  font-size: 2.4rem;
}

.toc-landing {
  margin-bottom: 1.375rem;
}

.toc-title {
  color: #ffffff;
}

.toc-category {
  display: block;
  margin: 0 0 1.375rem 0;
}

.toc-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  margin: 0 0 2.75rem 1.375rem;
}

.toc-item {
  display: flex;
  flex-direction: row;
  gap: 1.375rem;

  width: 100%;
  transform: none !important;

  pointer-events: none;
}

.toc-title-wrapper:hover .toc-title,
.toc-title-wrapper:hover .toc-author {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.toc-title-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 80%;

  text-decoration: none;
  color: inherit;
}

.toc-title,
.toc-author {
  display: block;
}

.toc-author {
  font-style: italic;
}

.toc-check {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  margin-left: auto;
  margin-top: 12px;
}

/*------------------  PREVIEW STYLE  -------------------*/

.sidebar-right-view[hidden] {
  display: none;
}

.sidebar-right-inner {
  height: 100%;
}

.sidebar-right-view {
  height: 100%;
}

/* 
.right-pad {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.right-article-head {
  box-sizing: border-box;
  text-align: center;
}

.right-article-heading,
.right-article-subheading,
.right-article-author {
  margin: 0;
}

.right-article-author {
  margin-top: 1.67rem;
}

.right-article-preview {
  font-family: 'Timezone', serif;
  font-size: 20px;
  margin-top: auto;
}

.right-article-tags {
  margin-top: 8px;
}

.right-article-bottom {
  margin: 0;
  padding: 0;
} */

.sidebar-right-inner {
  height: 100%;
}

.sidebar-right-view {
  height: 100%;
}

/* ✅ main column */
.right-pad {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.right-article-bottom {
  display: grid;
  grid-template-columns: 160px 1fr;
  /* label column width */
  column-gap: 32px;
  row-gap: 8px;
  align-items: start;
}

.right-meta-row {
  display: contents;
  /* lets label/value participate in parent grid */
}

.right-meta-label {
  font-family: "Timezone Mono", monospace;
  font-size: 1rem;
  line-height: 1.2;
}

.right-meta-value {
  font-family: "Timezone Mono", monospace;
  font-size: 1rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

[data-right-meta-subtitle] {
  display: block;
}

/* keep head styling */
.right-article-head {
  box-sizing: border-box;
  text-align: center;
}

/* preview text sits above meta */
.right-article-preview {
  font-family: 'Timezone', serif;
  font-size: 20px;
  margin: 0 0 16px 0;
}

.right-inhalt-body {
  display: none;
}

.right-inhalt-body.is-active {
  display: block;
}

/* ✅ bottom meta stack (title → author → tags) */
.right-article-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* optional: style bottom title */
.right-meta-title .t {
  font-family: 'Timezone Mono', monospace;
  font-size: 1rem;
  line-height: 1;
}

.right-meta-title .s {
  font-family: 'Timezone Mono', monospace;
  font-size: 1rem;
  line-height: 1;
}

/* optional: style bottom author */
.right-meta-author {
  font-family: 'Timezone Mono', monospace;
  font-size: 1rem;
}

/* tags layout */
.right-article-tags {
  display: block;
}

.right-tag {
  display: inline;
  font-family: 'Timezone Mono', monospace;
  font-size: 1rem;
}

.right-tag + .right-tag::before {
  content: ", ";
}




/* linke Map */
.toc-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

/* Labels links */
.toc-item {
  position: absolute;
  left: 1.375rem;

  font-family: "Timezone Mono", monospace;
  font-size: 1rem;
  line-height: 1.13;
  font-weight: 100;
  margin: 0 2.75rem 0 0;

  color: var(--color-white);

  transform: translateY(-50%);
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;

  pointer-events: auto;
  cursor: pointer;
}

.toc-item.is-active {
  /* color: var(--color-black);
    -webkit-text-stroke: 2px var(--color-white);
    paint-order: stroke fill; */
  color: var(--color-neon-green);
}

.toc-item.is-pinned {
  top: auto;
  bottom: 0.5rem;
  transform: none;
  /* wichtig: translateY(-50%) aushebeln */
}

/* Remove native checkbox */
.toc-check {
  appearance: none;
  -webkit-appearance: none;

  width: 2rem;
  height: 2rem;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  border: none;
  cursor: pointer;

  background-image: url("/assets/box.svg");
}

.toc-check:hover {
  background-image: url("/assets/box_hovered.svg");
}

.toc-check:checked {
  background-image: url("/assets/box_checked.svg");
}

.toc-check:checked:hover {
  background-image: url("/assets/box_checked.svg");
}

/* Floating label */
.toc-hover-label {
  position: fixed;
  pointer-events: none;

  font-family: "Timezone", serif;
  font-size: 1.25rem;
  line-height: 1;

  background: #59FF4D;
  color: #000;

  transform: translate(-110%, -45%);
  white-space: nowrap;

  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 9999;
}

.toc-hover-label.is-visible {
  opacity: 1;
}


.basket-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.375rem;

  padding-bottom: 1.375rem;

  font-family: 'Timezone', serif !important;
  font-size: 2.4rem !important;
  line-height: 1.13;
  font-weight: 100;

  transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.basket-item.is-dragging {
  transition: none;
  position: relative;
  z-index: 50;
  transform: translate3d(0, var(--dragY, 0px), 0) scale(1.02);
}

.basket-item.is-dragging .basket-drag {
  cursor: grabbing;
}

.basket-drag {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;

  color: #000;
  font-size: 2.4rem;
  line-height: 1;
  font-family: inherit;

  cursor: grab;
}

.basket-author {
  font-style: italic;
}

.basket-link {
  display: grid;
  gap: 2px;
  text-decoration: none;
  flex: 1;
}

.basket-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0;
  opacity: 0.5;
}

.basket-delete:hover {
  opacity: 1;
}

.sidebar-view.Basket {
  padding-left: 2.75rem;
}

.basket-background {
  background-color: #ffffff;
  padding: 1rem;
  height: auto;
  min-height: 65vh;
  padding-bottom: 258px;
}

/* The shape */
.basket-bottom-shape {
  position: absolute;
  left: 0;
  bottom: 0;

  width: 50vw;
  height: 258px;

  background: #d9d9d9;
  /* adjust to match your screenshot */
  clip-path: polygon(0% 0%,
      /* top-left */
      92% 0%,
      /* top-right (a bit inwards) */
      100% 100%,
      /* bottom-right (slanted edge) */
      0% 100%
      /* bottom-left */
    );

  pointer-events: none;

  z-index: 52;
}

.print-wrapper {
  position: absolute;
  bottom: -0.7vw;
  left: 46vw;
  --print-header-peek: 38px;
  transform: translateX(-100%) translateY(calc(-1 * var(--print-header-peek)));
  background-color: #59ff4d;
  z-index: 51;

  display: grid;
  gap: 1.375rem;

  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.print-wrapper.is-open {
  transform: translateX(-100%) translateY(calc(-258px - 0.7vw));
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
}

.print-title {
  font-family: 'Timezone', serif;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 100;
}

.print-arrow {
  font-family: 'Timezone Mono', monospace;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;

  margin-top: 0.5rem;
  margin-right: 0.5rem;
}


.print-grid {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.print-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1.375rem;
}

.print-label {
  font-family: "Timezone Mono", monospace;
  font-size: 1.25rem;
  line-height: 1.13;
  font-weight: 100;
}

.print-divider {
  border: 0;
  height: 1px;
  background: #000;
  margin: 0;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s);
}

.print-btn {
  background: transparent;
  border: 1px solid #000;
  padding: calc(1.375rem * 0.5) 1.375rem;

  font-family: 'Timezone', serif;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 100;

  cursor: pointer;
}

.print-options {
  display: flex;
  gap: 1.375rem;
}

.print-choice {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;

  font-family: "Timezone Mono", monospace;
  font-size: 1.25rem;
  line-height: 1.13;
  font-weight: 100;

  cursor: pointer;
  text-decoration: none;
}

.print-choice.is-active {
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 2px;
}
