/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Variables ──────────────────────────────────────────────────────── */
:root {
  --bg:            #f4f4f5;
  --surface:       #ffffff;
  --border:        #e4e4e7;
  --fg:            #18181b;
  --fg-muted:      #71717a;
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-fg:     #ffffff;
  --danger-fg:     #dc2626;
  --success-fg:    #16a34a;
  --warning-fg:    #d97706;
  --header-h:      44px;
  --sidebar-w:     230px;
  --r:             6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #09090b;
    --surface:      #18181b;
    --border:       #27272a;
    --fg:           #fafafa;
    --fg-muted:     #a1a1aa;
    --accent:       #3b82f6;
    --accent-hover: #60a5fa;
    --danger-fg:    #f87171;
    --success-fg:   #4ade80;
    --warning-fg:   #fbbf24;
  }
}

/* ─── Base ───────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header ─────────────────────────────────────────────────────────── */
#header {
  display: flex;
  align-items: center;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 10;
}

#nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  border-radius: var(--r);
  flex-shrink: 0;
}
#nav-toggle:hover { background: var(--bg); }

#tool-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Background process pills ───────────────────────────────────────── */
#process-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.process-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  white-space: nowrap;
  transition: background 0.12s;
  cursor: pointer;
}
.process-pill:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
@keyframes pill-wobble {
  0%   { transform: rotate(0deg) scale(1); }
  15%  { transform: rotate(-6deg) scale(1.05); }
  35%  { transform: rotate(5deg) scale(1.05); }
  55%  { transform: rotate(-4deg) scale(1.02); }
  75%  { transform: rotate(3deg) scale(1.02); }
  90%  { transform: rotate(-1deg) scale(1); }
  100% { transform: rotate(0deg) scale(1); }
}
.process-pill.wobble {
  animation: pill-wobble 0.55s ease-in-out;
}

/* ─── Content ────────────────────────────────────────────────────────── */
#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--fg-muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

/* ─── Overlay ────────────────────────────────────────────────────────── */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 20;
}
#overlay.visible { display: block; }

/* ─── Sidebar ────────────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}
#sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 15px;
}

#sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  border-radius: var(--r);
}
#sidebar-close:hover { background: var(--bg); color: var(--fg); }

.tool-list {
  list-style: none;
  padding: 6px 0;
  flex: 1;
  overflow-y: auto;
}

/* ─── Category groups ────────────────────────────────────────────────── */
.cat-group { }

.cat-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.cat-summary::-webkit-details-marker { display: none; }

.cat-summary::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--fg-muted);
  border-bottom: 1.5px solid var(--fg-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}
details[open] .cat-summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.cat-tools { list-style: none; }

/* ─── Sidebar links ──────────────────────────────────────────────────── */
.tool-list a,
.cat-tools a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
}
.tool-list a:hover,
.cat-tools a:hover { background: var(--bg); }
.tool-list a.active,
.cat-tools a.active {
  background: var(--bg);
  font-weight: 600;
  color: var(--accent);
}

.tool-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-style: normal;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 4px 0;
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.sidebar-link:hover { background: var(--bg); color: var(--fg); }
.sidebar-link.active { color: var(--accent); font-weight: 600; }

/* ─── Tool layout ────────────────────────────────────────────────────── */
.tool {
  padding: 24px 20px;
  width: 100%;
}

.tool h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ─── Tool title row (h2 + help button) ─────────────────────────────── */
.tool-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}
.tool-title-row h2 { margin-bottom: 0; }

.tool-info-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}
.tool-info-btn:hover,
.tool-info-btn.active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}

.tool-info-panel {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ─── Related tools ──────────────────────────────────────────────────── */
.related-tools {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.related-tools h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.related-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--fg);
  font-size: 13px;
}
.related-item:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Form elements ──────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.required { color: var(--danger-fg); }

.input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--fg);
  line-height: 1.4;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.input:disabled { opacity: 0.5; cursor: not-allowed; }

select.input {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

textarea.input { resize: vertical; min-height: 80px; }

.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 3px;
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  /* align-items: flex-end; */
}
.row .field { flex: 1; min-width: 70px; }

/* ─── Chip / Badge (generisch) ──────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}
.chip.accent {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}

/* ─── Icon-Button (Quadrat, nur Icon) ───────────────────────────────── */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--fg-muted);
  transition: background 0.1s, color 0.1s;
}
.icon-btn:hover { background: var(--bg); color: var(--fg); }
.icon-btn.danger:hover { color: var(--danger-fg); border-color: var(--danger-fg); }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.1s;
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ─── Time display ───────────────────────────────────────────────────── */
.time-display {
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  padding: 28px 0 24px;
}

.copy-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 15px;
  padding: 4px 5px;
  border-radius: 4px;
  line-height: 1;
}
.copy-btn:hover { color: var(--fg); background: var(--border); }

/* ─── Dialog / Modal ─────────────────────────────────────────────────── */
dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--r) * 2);
  padding: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  color: var(--fg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
dialog:not([open]) { display: none; }

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dialog-header h2 { font-size: 16px; font-weight: 600; }

.dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  border-radius: var(--r);
}
.dialog-close:hover { background: var(--bg); color: var(--fg); }

.dialog-body {
  padding: 20px;
  overflow-y: auto;
}

.dialog-intro {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.dialog-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.form-error {
  font-size: 13px;
  color: var(--danger-fg);
  background: color-mix(in srgb, var(--danger-fg) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger-fg) 25%, transparent);
  border-radius: var(--r);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.form-success {
  font-size: 13px;
  color: var(--success-fg);
  background: color-mix(in srgb, var(--success-fg) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--success-fg) 25%, transparent);
  border-radius: var(--r);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.form-warning {
  font-size: 13px;
  color: var(--fg);
  background: color-mix(in srgb, var(--warning-fg) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning-fg) 35%, transparent);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.form-warning .btn-row { margin-top: 10px; }

/* ─── Empty-state hint (e.g. "noch keine Einträge") ──────────────────── */
.empty-hint {
  color: var(--fg-muted);
  font-size: 13px;
  padding: 8px 4px;
}

/* ─── Error ──────────────────────────────────────────────────────────── */
.load-error {
  padding: 24px 20px;
  color: var(--danger-fg);
  font-size: 14px;
}

/* ─── DSGVO notice in feedback form ─────────────────────────────────── */
.dialog-privacy {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ─── Homepage ───────────────────────────────────────────────────────── */
.home {
  padding: 24px 20px;
}

.home-section {
  margin-bottom: 32px;
}
.home-section:last-child { margin-bottom: 0; }

.home-section h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

/* ─── Tool cards grid (homepage + category pages) ────────────────────── */
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--r) * 2);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.12s, color 0.12s, transform 0.1s;
}
.tool-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.tool-card-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.tool-card-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* ─── Category cards (homepage) ──────────────────────────────────────── */
.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--r) * 2);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.12s, color 0.12s;
}
.cat-card:hover { border-color: var(--accent); color: var(--accent); }
.cat-card-label { font-weight: 600; font-size: 14px; }
.cat-card-count { font-size: 12px; color: var(--fg-muted); }
.cat-card:hover .cat-card-count { color: var(--accent); }

/* ─── Related tools: category link variant ───────────────────────────── */
.related-cat-link {
  border-style: dashed;
}

/* ─── Converter tool ─────────────────────────────────────────────────── */
.conv-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.conv-input {
  flex: 1;
  min-width: 120px;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}

.conv-select {
  flex: 1;
  min-width: 160px;
}

.conv-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conv-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
}
.conv-result:hover { background: var(--surface); }

.conv-label {
  font-size: 13px;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.conv-value {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-all;
}

.conv-self {
  background: var(--surface);
  border: 1px solid var(--border);
}
.conv-self .conv-label { color: var(--fg); font-weight: 600; }
.conv-self .conv-value { color: var(--accent); font-weight: 600; }

/* ─── Segmented control ──────────────────────────────────────────────── */
.seg-ctrl {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  flex-shrink: 0;
}

.seg-btn {
  flex: 1;
  padding: 7px 14px;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-muted);
  white-space: nowrap;
  line-height: 1;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover:not(.active) { background: var(--bg); color: var(--fg); }
.seg-btn.active {
  background: var(--accent);
  color: var(--accent-fg);
}

.seg-ctrl-sm .seg-btn { padding: 7px 10px; }

/* ─── Date calculator ────────────────────────────────────────────────── */
.input-btn-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.input-btn-row .input { flex: 1; }
.input-btn-row .seg-ctrl { align-self: stretch; }

.field-hint {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

/* ─── Result table ───────────────────────────────────────────────────── */
.dc-result {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row:hover { background: var(--bg); }

.result-label {
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.result-value-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.result-value {
  font-size: 14px;
  text-align: right;
  word-break: break-all;
}
.result-value.mono {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-variant-numeric: tabular-nums;
}

/* Muted subtitle line under a result value, e.g. the matched CIDR range
   for a classified address (see ip-calc's Class-Bereich/Netz-IP rows). */
.result-value small {
  color: var(--fg-muted);
  font-size: 11px;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-variant-numeric: tabular-nums;
}

.copy-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  line-height: 1;
}
.copy-inline:hover { color: var(--fg); background: var(--border); }

.conv-result-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.timer-preset-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  transition: border-color 0.1s, background 0.1s;
}
.timer-preset-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

/* ─── Tool divider ───────────────────────────────────────────────────── */
.tool-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ─── Sidebar: recent tools section ─────────────────────────────────── */
#sidebar-recent {
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.cat-summary-plain {
  display: flex;
  align-items: center;
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  user-select: none;
}

/* ─── Sidebar: home link brand ───────────────────────────────────────── */
.sidebar-home-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.12s;
}
.sidebar-home-link:hover {
  color: var(--accent);
}

/* ─── Sidebar: favourite star buttons ───────────────────────────────── */
.cat-tools li {
  display: flex;
  align-items: stretch;
}

.cat-tools li > a {
  flex: 1;
  min-width: 0;
}

.fav-btn {
  flex-shrink: 0;
  align-self: center;
  background: none;
  border: none;
  cursor: pointer;
  color: transparent;
  font-size: 13px;
  padding: 4px 10px 4px 0;
  line-height: 1;
  transition: color 0.1s;
}

/* Show star on row-hover or when active (favorited) */
.cat-tools li:hover > .fav-btn { color: var(--fg-muted); }
.fav-btn.active               { color: #f59e0b; }
.fav-btn:hover                { color: #f59e0b !important; }

