/* ==========================================================================
   Timora User Manual - stylesheet
   Colours and typography follow the Timora landing page
   (brand 500/600/700 = #00b84a / #00a640 / #008c36, ink = #0b1328).
   ========================================================================== */

:root {
  --brand-50: #eafff2;
  --brand-100: #d5f8df;
  --brand-500: #00b84a;
  --brand-600: #00a640;
  --brand-700: #008c36;

  --app-50: #f6f7f8;
  --app-100: #eceff1;
  --app-200: #d9d9d9;
  --app-300: #c8cdd2;

  --ink: #0b1328;
  --ink-muted: #4a5468;
  --ink-subtle: #6b7488;

  --white: #ffffff;
  --shadow-soft: 0 2px 10px rgba(11, 19, 40, 0.1);
  --shadow-card: 0 1px 3px rgba(11, 19, 40, 0.08);

  --radius: 0.5rem;
  --radius-lg: 0.75rem;

  --sidebar-width: 20rem;
  --content-max: 52rem;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Offset so anchor targets are not hidden behind the sticky header */
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--app-50);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Base typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-600);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--app-100);
  border: 1px solid var(--app-200);
  border-radius: 0.25rem;
  padding: 0.1em 0.35em;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

li > ul,
li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--app-200);
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 100rem;
  margin: 0 auto;
  gap: 0;
}

/* Sidebar ---------------------------------------------------------------- */

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--app-200);
  padding: 1.5rem 1.25rem 3rem;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--app-100);
  text-decoration: none;
}

.sidebar__brand img {
  height: 2.25rem;
  width: auto;
}

.sidebar__brand-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-subtle);
  letter-spacing: 0.02em;
}

.sidebar__meta {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.sidebar nav {
  margin-top: 1.25rem;
}

.sidebar nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: chapter;
}

.sidebar nav > ol > li {
  margin: 0 0 0.125rem;
}

.sidebar nav a {
  display: block;
  padding: 0.4rem 0.625rem;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  color: var(--ink-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar nav a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.sidebar nav a.is-active {
  background: var(--brand-50);
  border-left-color: var(--brand-600);
  color: var(--brand-700);
  font-weight: 600;
}

.sidebar nav .nav-num {
  display: inline-block;
  min-width: 1.6rem;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}

.sidebar nav a.is-active .nav-num {
  color: var(--brand-600);
}

.sidebar nav ol ol {
  margin: 0.125rem 0 0.5rem 1.6rem;
}

.sidebar nav ol ol a {
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  color: var(--ink-subtle);
}

/* Main column ------------------------------------------------------------ */

.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 2.5rem 6rem;
}

.content__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Cover
   -------------------------------------------------------------------------- */

.cover {
  background: var(--white);
  border-top: 4px solid var(--brand-600);
  border-bottom: 1px solid var(--app-200);
  padding: 3rem 2.5rem 2.75rem;
  margin: 0 -2.5rem 3rem;
}

.cover__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.cover img.cover__logo {
  height: 2.75rem;
  width: auto;
  margin-bottom: 1.75rem;
}

.cover__kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

.cover h1 {
  color: var(--ink);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.015em;
  margin: 1.25rem 0 0.75rem;
}

.cover__lead {
  color: var(--ink-muted);
  font-size: 1.0625rem;
  max-width: 44rem;
  margin-bottom: 2rem;
}

.cover__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.cover__fact {
  background: var(--app-50);
  border: 1px solid var(--app-200);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.cover__fact dt {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.2rem;
}

.cover__fact dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

/* Sprachumschalter auf der Cover */
.cover__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--app-100);
}

.cover__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--app-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  background: var(--white);
}

.cover__lang:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.cover__lang[aria-current="true"] {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Chapters
   -------------------------------------------------------------------------- */

.chapter {
  padding-top: 2rem;
  margin-bottom: 1rem;
}

.chapter + .chapter {
  border-top: 1px solid var(--app-200);
  margin-top: 3.5rem;
  padding-top: 3rem;
}

.chapter__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 0.5rem;
}

.chapter > h2 {
  font-size: 1.875rem;
  margin-bottom: 1rem;
}

.chapter h3 {
  font-size: 1.3125rem;
  margin: 2.25rem 0 0.75rem;
}

.chapter h4 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

.chapter__lead {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Plan badges
   -------------------------------------------------------------------------- */

.pkg {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: middle;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid transparent;
  text-decoration: none;
}

a.pkg:hover {
  filter: brightness(0.95);
}

.pkg--standard {
  background: var(--app-100);
  border-color: var(--app-300);
  color: var(--ink-muted);
}

.pkg--business {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
}

.pkg--enterprise {
  background: #eef1ff;
  border-color: #8a9bff;
  color: #2c3a99;
}

.pkg--addon {
  background: #fff6e5;
  border-color: #f0b64d;
  color: #8a5a00;
}

h2 .pkg,
h3 .pkg,
h4 .pkg {
  margin-left: 0.5rem;
  position: relative;
  top: -0.1em;
}

.pkg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: -0.25rem 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Callout boxes
   -------------------------------------------------------------------------- */

.note {
  border: 1px solid var(--app-200);
  border-left: 4px solid var(--app-300);
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.875rem 1.125rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-card);
}

.note__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
  color: var(--ink-muted);
}

.note p:last-child,
.note ul:last-child,
.note ol:last-child {
  margin-bottom: 0;
}

.note--info {
  border-left-color: var(--brand-600);
}
.note--info .note__title {
  color: var(--brand-700);
}

.note--warn {
  border-left-color: #e0a106;
  background: #fffdf6;
}
.note--warn .note__title {
  color: #9a6c00;
}

.note--pkg {
  border-left-color: #8a9bff;
  background: #fafbff;
}
.note--pkg .note__title {
  color: #2c3a99;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--app-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption {
  caption-side: top;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-subtle);
  padding: 0.75rem 1rem 0.25rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--app-100);
}

thead th {
  background: var(--app-50);
  border-bottom: 1px solid var(--app-200);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--brand-50);
}

td.center,
th.center {
  text-align: center;
}

.yes {
  color: var(--brand-700);
  font-weight: 700;
}

.no {
  color: var(--ink-subtle);
}

.opt {
  color: #8a5a00;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Step-by-step instructions
   -------------------------------------------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 0 2.75rem;
  margin-bottom: 0.875rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-600);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps > li > strong:first-child {
  display: block;
}

/* Navigation path / UI element -------------------------------------------------- */

.ui {
  font-weight: 600;
  color: var(--ink);
  background: var(--app-100);
  border: 1px solid var(--app-200);
  border-radius: 0.25rem;
  padding: 0.05em 0.35em;
  font-size: 0.9375em;
  white-space: nowrap;
}

.path {
  font-weight: 600;
  color: var(--brand-700);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Definition lists / field descriptions
   -------------------------------------------------------------------------- */

.fields {
  margin: 1.25rem 0;
  border: 1px solid var(--app-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.fields div {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0 1.25rem;
  padding: 0.6875rem 1.125rem;
  border-bottom: 1px solid var(--app-100);
}

.fields div:last-child {
  border-bottom: 0;
}

.fields dt {
  font-weight: 600;
  font-size: 0.9375rem;
}

.fields dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Screenshots
   -------------------------------------------------------------------------- */

figure {
  margin: 1.75rem 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--app-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: var(--white);
}

figcaption {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

figcaption b {
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Kacheln (Inhaltsverzeichnis auf der Cover)
   -------------------------------------------------------------------------- */

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.875rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.toc-grid li {
  margin: 0;
}

.toc-card {
  display: block;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--app-200);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.toc-card:hover {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.toc-card__num {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-700);
}

.toc-card__title {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.toc-card__desc {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-subtle);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.manual-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--app-200);
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

.manual-footer p {
  margin-bottom: 0.35rem;
}

/* Back to top --------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--app-300);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.to-top:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}

/* --------------------------------------------------------------------------
   Mobile navigation
   -------------------------------------------------------------------------- */

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--app-200);
  padding: 0.625rem 1rem;
}

.topbar img {
  height: 1.875rem;
  width: auto;
}

.topbar a {
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-700);
  border: 1px solid var(--app-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
}

@media (max-width: 64rem) {
  .topbar {
    display: flex;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--app-200);
    padding: 1.5rem 1.25rem 2rem;
  }

  .content {
    padding: 0 1.25rem 4rem;
  }

  .cover {
    margin: 0 -1.25rem 2.5rem;
    padding: 2.5rem 1.25rem 2rem;
    border-radius: 0;
  }

  .fields div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .to-top {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Print / PDF export
   -------------------------------------------------------------------------- */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .sidebar,
  .topbar,
  .to-top {
    display: none !important;
  }

  .layout {
    display: block;
    max-width: none;
  }

  .content {
    padding: 0;
  }

  .content__inner {
    max-width: none;
  }

  .cover {
    margin: 0 0 1.5rem;
    padding: 0 0 1.5rem;
    border-top: 3px solid var(--brand-600);
    border-bottom: 1px solid var(--app-300);
    padding-top: 1.5rem;
    break-after: page;
  }

  .cover__langs {
    display: none;
  }

  .chapter {
    break-before: page;
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .chapter > h2,
  .chapter h3,
  .chapter h4 {
    break-after: avoid;
  }

  table,
  figure,
  .note,
  .fields,
  .steps > li {
    break-inside: avoid;
  }

  figure img {
    box-shadow: none;
  }

  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .toc-card {
    box-shadow: none;
  }

  a {
    color: var(--ink);
    text-decoration: none;
  }

  .table-wrap {
    overflow: visible;
    box-shadow: none;
  }
}
