@import url("/assets/tokens-8eca03df.css");

/*
 * threetags app stylesheet — project-level overrides on top of iona-design-system
 * tokens, then base typography and layout primitives.
 *
 * Semantic tokens we override are themselves CSS custom properties referenced
 * by component CSS (e.g. .btn uses var(--accent-default)). Overriding them in
 * scope of [data-project="threetags"] propagates to every component without
 * editing component CSS.
 *
 * Note: atomic→semantic resolution happens at token build time, not at runtime.
 * Overriding --color-accent-600 alone won't change --accent-default; the semantic
 * token has to be overridden directly.
 */

[data-project="threetags"] {
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --accent-default: #0000ee;
  --accent-hover: #0000bb;
  --library-green: #047857;
  --library-amber: #b45309;
  --library-ink: #111827;
  --library-soft: #f6f7f9;
}

/* Base typography + layout */
html {
  box-sizing: border-box;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
*, *::before, *::after {
  box-sizing: inherit;
  min-width: 0;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  line-height: 1.5;
  overflow-x: hidden;
}

img,
svg,
video,
iframe,
table,
pre,
code {
  max-width: 100%;
}

a,
p,
h1,
h2,
h3,
li,
span,
code {
  overflow-wrap: anywhere;
}

/* Classic blue/purple link styling for body content. Wrapped in :where() so the
   selector has zero specificity and component-level rules (.app-shell__nav a,
   .btn, etc.) still win without needing higher specificity or !important.
   Tag pills participate so visited tags fade to purple — useful wayfinding. */
a:where(:not(.btn, .app-shell__brand)) {
  color: var(--accent-default);
}
a:visited:where(:not(.btn, .app-shell__brand)) {
  color: #551a8b;
}

/* App-level layout primitives */
.app-shell__topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(12px);
}

.app-shell__brand {
  color: var(--library-ink);
  font-weight: 750;
  letter-spacing: 0;
  text-decoration: none;
}

.app-shell__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

.app-shell__nav a:not(.btn),
.app-shell__nav a:not(.btn):visited,
.link-button {
  color: #374151;
  text-decoration: none;
}

.app-shell__handle {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.app-shell__nav a:not(.btn):hover,
.link-button:hover {
  color: var(--accent-hover);
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

.flash-wrap {
  width: min(100%, 1120px);
  margin: 1rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
}

.panel-heading h2 {
  margin: 0;
}

/* Tag trees — public co-occurrence browser, behind tag_trees flag. */
.tag-tree__viz {
  width: 100%;
  height: 480px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

.tag-tree__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tag-tree__edge {
  stroke: #c7d2fe;
  stroke-opacity: 0.7;
  pointer-events: none;
}

.tag-tree__node circle {
  fill: #ffffff;
  stroke: #d1d5db;
  stroke-width: 1.5;
  transition: fill 150ms ease, stroke 150ms ease;
}

.tag-tree__node text {
  fill: #1f2937;
  font: 600 0.78rem ui-sans-serif, system-ui, sans-serif;
  pointer-events: none;
  user-select: none;
}

.tag-tree__node:hover circle {
  fill: #eef2ff;
  stroke: var(--accent-default);
}

.tag-tree__node--focal circle {
  fill: var(--accent-default);
  stroke: var(--accent-default);
}

.tag-tree__node--focal text {
  fill: var(--text-on-accent, #ffffff);
  font-weight: 700;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .tag-tree__viz {
    height: 380px;
  }

  .tag-tree__node text {
    font-size: 0.7rem;
  }

  .tag-tree__node--focal text {
    font-size: 0.85rem;
  }
}

.tag-tree__graph {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  text-align: center;
}

.tag-tree__focal {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.tag-tree__focal-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--accent-default);
  color: var(--text-on-accent, #ffffff);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tag-tree__focal small {
  color: #6b7280;
  font-size: 0.8rem;
}

.tag-tree__co-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  max-width: 56rem;
  margin: 0 auto;
}

.tag-tree__co-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.tag-tree__co-tag:hover {
  transform: translateY(-1px);
  border-color: var(--accent-default);
  background: #eef2ff;
  color: var(--accent-default);
}

.tag-tree__co-tag small {
  color: #9ca3af;
  font-size: 0.7em;
}

.tag-tree__lonely {
  max-width: 36rem;
  margin: 0 auto;
  color: #4b5563;
}

.tag-tree__lonely strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #111827;
}

.tag-tree__panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--library-ink);
}

.tag-tree__panel h2 code {
  background: #f3f4f6;
  padding: 0.05rem 0.35rem;
  border-radius: 0.3rem;
  font-size: 0.9em;
}

.tag-tree__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.tag-tree__link a {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  text-decoration: none;
  color: #111827;
  transition: border-color 150ms ease;
}

.tag-tree__link a:hover {
  border-color: var(--accent-default);
}

.tag-tree__link strong {
  font-weight: 600;
}

.tag-tree__link small {
  color: #6b7280;
  font-size: 0.78rem;
}

/* Admin-toolbar styles moved to iona_design_system gem
   (components/admin_toolbar/web/admin_toolbar.css). The layout links it via
   stylesheet_link_tag "admin_toolbar". */

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.page--app {
  width: min(100%, 760px);
}

/* Wide-viewport marginalia. Hidden at normal widths; appears as quiet
   decoration when there's room in the gutter. Pointer-events disabled so
   it never intercepts clicks. */
.wide-marginalia {
  display: none;
  pointer-events: none;
  user-select: none;
  color: #cbd5e1;
}

@media (min-width: 1600px) {
  .wide-marginalia--left {
    display: block;
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #cbd5e1;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}

/* Page-with-rail: a main column + a sticky side rail (used for the
   contributor list on /url/:id). Stacks at narrow widths, splits at
   wide widths. The page itself widens to accommodate. */
.page-with-rail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-with-rail__rail-heading {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

@media (min-width: 1100px) {
  .page--app:has(.page-with-rail) {
    width: min(100%, 1100px);
  }

  .page-with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
  }

  .page-with-rail__main {
    min-width: 0;
  }

  .page-with-rail__rail {
    position: sticky;
    top: 5rem;
    padding-left: 2rem;
    border-left: 1px solid #eef0f3;
  }
}

.page__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: var(--inset-sm);
  border-bottom: 1px solid var(--border-default);
  padding-bottom: var(--inset-md);
  margin-bottom: var(--stack-lg);
}

.page-heading,
.public-header,
.explore-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.page-heading h1,
.public-header h1,
.explore-hero h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--library-ink);
}

.page-heading h1 {
  font-size: clamp(1.875rem, 4vw, 3rem);
}

.public-header p,
.explore-hero p {
  max-width: 58ch;
  margin: 1rem 0 0;
  color: #4b5563;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--library-green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.action-row,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page__title {
  font-size: var(--font-xl-size);
  line-height: var(--font-xl-leading);
  font-weight: 700;
  margin: 0;
}

.page__nav {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--inset-md);
  font-size: var(--font-sm-size);
  line-height: var(--font-sm-leading);
}

.page__subnav {
  flex-basis: 100%;
  display: flex;
  gap: var(--inset-md);
  font-size: var(--font-sm-size);
  line-height: var(--font-sm-leading);
}

.stack > * + * { margin-top: var(--stack-md); }
.stack--lg > * + * { margin-top: var(--stack-lg); }

.flash {
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  margin-bottom: 1rem;
}
.flash--error { border-color: var(--danger-default); color: var(--danger-default); }

/* Calendar grid (admin/schedule) */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--border-default);
  border: 1px solid var(--border-default);
}
.cal-grid--head {
  background-color: var(--surface-raised);
  border-bottom: none;
  margin-bottom: 0;
}
.cal-grid__dow {
  padding: var(--inset-xs) var(--inset-sm);
  font-size: var(--font-sm-size);
  font-weight: 600;
  text-align: center;
  background-color: var(--surface-raised);
}

.cal-cell {
  background-color: var(--surface-default);
  padding: var(--inset-sm);
  min-height: 6rem;
  font-size: var(--font-sm-size);
  display: flex;
  flex-direction: column;
  gap: var(--inset-xs);
}
.cal-cell--out {
  background-color: var(--surface-raised);
  opacity: 0.5;
}
.cal-cell--past {
  opacity: 0.7;
}
.cal-cell--today {
  outline: 2px solid var(--accent-default);
  outline-offset: -2px;
}

.cal-cell__date {
  font-weight: 600;
  font-size: var(--font-sm-size);
}
.cal-cell__title {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}
.cal-cell__title--tentative {
  font-style: italic;
  opacity: 0.85;
}
.cal-cell__badge {
  display: inline-block;
  padding: 0 var(--inset-xs);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
  border: 1px solid currentColor;
}
.cal-cell__badge--sent     { color: var(--text-muted); }
.cal-cell__badge--locked   { color: var(--accent-default); }
.cal-cell__badge--tentative{ color: var(--text-muted); border-style: dashed; }
.cal-cell__badge--skip     { color: var(--danger-default); }
.cal-cell__badge--today    { color: var(--accent-default); }
.cal-cell__note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stack--xs > * + * { margin-top: var(--stack-xs, 0.25rem); }
.stack--sm > * + * { margin-top: var(--stack-sm, 0.5rem); }

/* Homepage intro for signed-out + signed-in pitch */
.hero { padding: var(--inset-sm) 0; }
.hero__lede {
  font-size: var(--font-lg-size);
  line-height: 1.45;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.hero__lede span { display: block; }
.hero__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-sm-size);
  line-height: 1.55;
  max-width: 56ch;
}
.hero__cta {
  margin: 0;
  font-size: var(--font-sm-size);
}

/* Wider page for admin calendar */
.page--wide { max-width: 1100px; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1rem;
}

.panel,
.empty-state,
.form-panel {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.035);
}

.notice {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  font-size: 0.95rem;
}

.auth-page {
  width: min(100%, 28rem);
}

.auth-card {
  padding: 2rem;
}

.auth-card__header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  line-height: 1.1;
  color: var(--library-ink);
}

.auth-card__header p {
  margin: 0 0 0.5rem;
  color: #4b5563;
}

.auth-page__footer {
  margin: 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
}

.link-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.link-form__input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  background: #ffffff;
  font: inherit;
  color: var(--text-primary);
}

.link-form__input:focus {
  outline: none;
  border-color: var(--accent-default);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.link-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
}

.link-preview--error {
  display: block;
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.link-preview__body {
  min-width: 0;
}

.link-preview__domain {
  margin: 0 0 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.link-preview__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--library-ink);
  word-break: break-word;
}

.link-preview__description {
  margin: 0;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-preview__controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.link-preview__actions {
  display: flex;
  gap: 0.5rem;
}

.segmented-control--sm label {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}

.link-card--editing {
  padding: 1rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.link-card__edit {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.link-card__edit-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.link-card__edit-save {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.link-card__edit-actions form,
.link-card__edit-actions form .btn {
  margin: 0;
}

.link-card__remove-confirm {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #7f1d1d;
}

.link-card__remove-confirm p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.link-card__remove-confirm-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.link-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.link-card__head .link-card__title {
  flex: 1 1 auto;
  min-width: 0;
}

.link-card__actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex: 0 0 auto;
}

/* Per-link public/private toggle on /me (mine context). */
.visibility-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.visibility-toggle:hover { border-color: #b9c6d8; }
.visibility-toggle--public {
  color: var(--library-green);
  border-color: #b7e0cc;
  background: #ecfdf5;
}
.visibility-toggle--private {
  color: var(--library-amber);
  border-color: #f0d8b0;
  background: #fffbeb;
}

.connected-device {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.connected-device strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* ButtonComponent — matches the threetags browser-extension popup style.
   The iona-design-system gem ships base .btn rules, but they aren't @import'd
   into application.css, so this is the canonical local style. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn--primary {
  background: var(--accent-default);
  color: #ffffff;
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--secondary {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}
.btn--secondary:hover { background: #f9fafb; border-color: #9ca3af; }

.btn--ghost {
  background: transparent;
  color: #374151;
}
.btn--ghost:hover { background: #f3f4f6; color: #111827; }

.btn--danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn--danger:hover { background: #fee2e2; }

.btn--sm { padding: 0.35rem 0.65rem; font-size: 0.8125rem; }
.btn--md { padding: 0.55rem 0.85rem; font-size: 0.875rem; }
.btn--lg { padding: 0.75rem 1rem;    font-size: 1rem; }

.btn[disabled],
.btn--disabled { cursor: default; opacity: 0.65; }
.btn--loading { cursor: progress; opacity: 0.85; }

/* InputComponent / TextareaComponent — extension-popup styling on the DS markup. */
.input {
  display: grid;
  gap: 0.4rem;
  font: inherit;
}

.input__label {
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 650;
}

.input__field {
  display: flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input__field:focus-within {
  border-color: var(--accent-default);
  box-shadow: 0 0 0 3px rgba(0, 0, 238, 0.18);
}
.input--error .input__field { border-color: #b91c1c; }
.input--error .input__field:focus-within {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18);
}

.input__control {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  outline: none;
}
.input__control::placeholder { color: #9ca3af; }

.input--sm .input__control { padding: 0.4rem 0.55rem;  font-size: 0.8125rem; }
.input--md .input__control { padding: 0.5rem 0.65rem;  font-size: 0.875rem; }
.input--lg .input__control { padding: 0.65rem 0.8rem;  font-size: 1rem; }

.input--disabled .input__field { opacity: 0.65; background: #f9fafb; }
.input--readonly .input__field { background: #f9fafb; }

.input__addon {
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  color: #6b7280;
}

.input__helper { font-size: 0.75rem; color: #6b7280; }
.input--error .input__helper { color: #b91c1c; }

.panel,
.empty-state {
  padding: 1.25rem;
}

.panel h2,
.empty-state h2,
.section-heading h2 {
  margin: 0 0 0.85rem;
  color: var(--library-ink);
  font-size: 1rem;
  line-height: 1.3;
}

.empty-state {
  display: grid;
  place-items: start;
  gap: 0.75rem;
  min-height: 12rem;
}

.empty-state p {
  max-width: 46ch;
  margin: 0;
  color: #6b7280;
}

.resource-list {
  display: grid;
  gap: 0.75rem;
}

.mine-toolbar {
  display: grid;
  gap: 0.75rem;
}

.mine-tabs {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0.25rem;
  background: #f3f4f6;
  border-radius: 0.625rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.mine-tabs::-webkit-scrollbar {
  display: none;
}

.mine-tabs__chip {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  background: #ffffff;
  border-radius: 0.45rem;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.08),
    0 1px 1px rgba(15, 23, 42, 0.04);
  transform: translateX(0);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.mine-tabs__seg,
.mine-tabs__seg:visited {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 0.45rem;
  background: transparent;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.mine-tabs__seg:hover {
  color: #111827;
}

.mine-tabs__seg--active,
.mine-tabs__seg--active:visited,
.mine-tabs__seg--active:hover {
  background: #ffffff;
  color: #111827;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.08),
    0 1px 1px rgba(15, 23, 42, 0.04);
}

.mine-tabs--js .mine-tabs__seg--active,
.mine-tabs--js .mine-tabs__seg--active:visited,
.mine-tabs--js .mine-tabs__seg--active:hover {
  background: transparent;
  box-shadow: none;
}

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

.mine-search {
  display: block;
}

.mine-search .input-control {
  width: 100%;
}

.bookmark-card {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  max-width: 100%;
}

/* Link cards render as plain list rows separated by a thin rule.
   No box chrome, no padding box — let the text breathe. */
.link-card {
  max-width: 100%;
}

/* List-row treatment: any link-card inside a list context renders as a
   plain row separated by a thin rule. Only the standalone aggregate
   card on /url/:id keeps the chrome-free no-padding shape. */
.resource-list .link-card,
.discovery-section__list .link-card {
  padding: 1.1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.resource-list .link-card:last-child,
.discovery-section__list li:last-child .link-card {
  border-bottom: 0;
}

.resource-list .link-card:first-child,
.discovery-section__list li:first-child .link-card {
  padding-top: 0.4rem;
}

/* When a link-card lives inside a discovery <li>, drop the bullet/marker
   and let the card span the row. */
.discovery-section__list li:has(.link-card) {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bookmark-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  gap: 1.25rem;
  padding: 1rem;
}

.link-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bookmark-card__domain,
.bookmark-card__date,
.link-card__domain {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
}

.link-card__url {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  color: #374151;
  font-size: 0.8rem;
  line-height: 1.35;
}

.link-card__url-host {
  flex: 0 0 auto;
}

.link-card__url-path {
  min-width: 0;
  overflow: hidden;
  color: #9ca3af;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card__url-copy {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  position: relative;
  margin-left: 0.35rem;
  border: 0;
  padding: 0;
  color: #374151;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.link-card__url-copy:hover {
  color: var(--accent-hover);
}

.link-card__url-copied {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  transform: translateX(-50%);
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  color: #374151;
  background: #ffffff;
  box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.12);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  animation: copied-pop 140ms ease-out;
}

.link-card__url-copied::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid #dbe4ef;
  border-bottom: 1px solid #dbe4ef;
  background: #ffffff;
  transform: translate(-50%, -50%) rotate(45deg);
}

@keyframes copied-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.2rem) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.bookmark-card__title,
.link-card__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.bookmark-card__title a {
  color: var(--library-ink);
  text-decoration: none;
}

/* Card titles inherit the global blue→purple link styling. Hover gets
   underline so the title reads as a real text link. */
.link-card__title a {
  text-decoration: none;
}

.link-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.bookmark-card__description,
.link-card__description {
  max-width: 72ch;
  margin: 0;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bookmark-card__side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}

.state-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.4rem;
}

/* Icon paired with its count, side-by-side. Tightly grouped so they
   read as one unit — bookmark+count, heart+count. */
.icon-action {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.icon-action__count {
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.55rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #334155;
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease-out;
}

.icon-btn:hover {
  color: #475569;
}

.icon-btn--bookmark.icon-btn--active,
.icon-btn--bookmark.icon-btn--active:hover {
  color: #c89b2a;
}

.icon-btn--heart.icon-btn--active,
.icon-btn--heart.icon-btn--active:hover {
  color: #c25450;
}

.app-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  transform-origin: center;
}

.app-icon.is-pulsing {
  animation: icon-pulse 300ms ease-out;
}

@keyframes icon-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .app-icon.is-pulsing {
    animation: none;
  }
}

.app-icon--inline {
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.3em;
  vertical-align: -0.05em;
  color: #94a3b8;
}

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.tag-row--inline {
  display: inline-flex;
  margin-top: 0;
}

.tag-row--end {
  justify-content: flex-end;
}

.tag-cloud {
  margin-top: 0;
}

.contribution-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contribution-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.contribution-row:last-child {
  border-bottom: 0;
}

.contribution-row__user {
  font-weight: 650;
  text-decoration: none;
}

.contribution-row__user:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contribution-row__heart {
  display: inline-flex;
  align-items: center;
  color: #ef4444;
}

.contribution-row__heart svg {
  width: 0.95rem;
  height: 0.95rem;
}

.profile-stats {
  margin-top: 0.4rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.muted {
  color: #6b7280;
}

.tag-pill,
.visibility-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.tag-pill {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 0.15em;
}

.tag-pill:hover {
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.tag-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.05rem 0.2rem;
  color: #94a3b8;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
}

.tag-edit:hover {
  color: var(--accent-hover);
  background: transparent;
}

.tag-edit svg {
  width: 0.95rem;
  height: 0.95rem;
}

.tag-edit__hint {
  font-size: 0.78rem;
}

.tag-row--editing {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.tag-pill--chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.3rem 0.15rem 0.55rem;
  background: #eef2ff;
  border-radius: 999px;
  color: #1e3a8a;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.tag-pill__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.tag-pill__remove:hover,
.tag-pill__remove:focus-visible {
  background: rgba(15, 23, 42, 0.1);
  outline: none;
}

.tag-chips .tag-typeahead {
  flex: 1 1 9rem;
  min-width: 9rem;
}

.tag-chips__input {
  width: 100%;
  padding: 0.25rem 0.3rem;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
}

.tag-chips__input:focus {
  outline: none;
  box-shadow: none;
}

.tag-row__edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.visibility-badge--private {
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.visibility-badge--public {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

/* Accessible label hidden visually but read by assistive tech. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.subtle-link {
  font-size: 0.85rem;
  text-decoration: none;
}

.subtle-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.toolbar {
  padding: 1rem;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.toolbar__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem auto;
  gap: 0.75rem;
}

.input-control,
.select-control,
.textarea,
.field input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  line-height: 1.4;
  padding: 0.5rem 0.625rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input-control:focus,
.select-control:focus,
.textarea:focus,
.field input:focus {
  outline: none;
  border-color: var(--accent-default);
  box-shadow: 0 0 0 3px rgba(0, 0, 238, 0.18);
}

.textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.tag-typeahead {
  position: relative;
  display: block;
}

.tag-typeahead__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  display: grid;
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.tag-typeahead__menu[hidden] {
  display: none;
}

.tag-typeahead__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  color: #111827;
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius-md) - 0.125rem);
  cursor: pointer;
}

.tag-typeahead__option[aria-selected="true"],
.tag-typeahead__option:hover {
  background: #f3f4f6;
}

.tag-typeahead__option small {
  color: #6b7280;
  font-size: 0.75rem;
}

.tag-typeahead__hint {
  display: block;
  margin-top: 0.4rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field__label {
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 650;
}

.form-panel {
  overflow: hidden;
}

.form-section {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 0.58fr);
  gap: 2rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-section h2 {
  margin: 0;
  color: var(--library-ink);
  font-size: 1rem;
}

.form-section p {
  max-width: 34ch;
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.form-actions {
  padding: 1rem 1.5rem;
  background: #f9fafb;
}

.form-errors {
  margin: 1rem;
  padding: 0.75rem 1rem;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
}

.form-errors p {
  margin: 0;
}

/* Segmented control — matches the extension popup's visibility toggle.
   Active styling lives on the <label> itself (mirroring the extension's
   .visibility-option rule) so there's no inner gap between the wrapper
   border and the active fill. */
.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  align-self: start;
  justify-self: start;
  padding: 1px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.segmented-control label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: inline-block;
}

.segmented-control label:has(input:checked) {
  color: #111827;
  background: #e5e7eb;
}

/* Anchor-based segmented control (no <input>, no <label>) — used when the
   control navigates rather than form-submits, e.g. drill-down sort tabs. */
.segmented-control__seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.segmented-control__seg:hover {
  color: #111827;
}

.segmented-control__seg--active,
.segmented-control__seg--active:hover {
  color: #111827;
  background: #e5e7eb;
}

/* Discovery sections — preview + drill-down on /explore and /t/:slug.
   Each section gets a thin top rule and clear section heading so the page
   reads as distinct landmarks rather than a continuous wall. */
.discovery-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.discovery-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.discovery-section__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.discovery-section__header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--library-ink);
}

/* Default list shape: vertical stack. Link cards and host rows always
   stack one per line — they don't read as cards when packed beside
   each other. Tag chips opt back into horizontal wrap below. */
.discovery-section__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}

.discovery-section__list:has(.discovery-tag) {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.discovery-section__empty {
  margin: 0;
  font-size: 0.9rem;
}

.discovery-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

.discovery-tag__count {
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 500;
}

.discovery-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.25rem 0;
  text-decoration: none;
}

.discovery-row:hover .discovery-row__primary {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.discovery-row__primary {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.discovery-row__count {
  flex: 0 0 auto;
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 500;
}

.breadcrumb {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.compact-list,
.tag-index {
  display: grid;
  gap: 0.5rem;
}

.compact-list__item,
.tag-index__item {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0;
  color: #111827;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
}

.compact-list__item:last-child,
.tag-index__item:last-child {
  border-bottom: 0;
}

.compact-list__item small,
.tag-index__item small {
  color: #6b7280;
}

.tag-index {
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.tag-index__item {
  padding: 1rem;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric {
  margin: 0;
  color: var(--library-ink);
  font-size: 2.5rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .page,
  .flash-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-heading,
  .public-header,
  .explore-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell__nav {
    justify-content: flex-end;
  }

  .app-shell__nav > * + * {
    border-left: 1px solid #d1d5db;
    padding-left: 1rem;
  }

  .overview-grid,
  .bookmark-card__body,
  .toolbar__search,
  .form-section {
    grid-template-columns: 1fr;
  }

  .panel,
  .empty-state,
  .form-panel,
  .toolbar,
  .bookmark-card,
  .link-card,
  .tag-index__item {
    border-color: transparent;
    box-shadow: none;
  }

  .panel,
  .empty-state,
  .bookmark-card__body,
  .link-card__body,
  .toolbar,
  .form-section,
  .form-actions {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bookmark-card__side {
    align-items: flex-start;
    text-align: left;
  }

  .state-chip-row {
    justify-content: flex-start;
  }

  .link-card__footer {
    flex-wrap: wrap;
  }

  .segmented-control,
  .segmented-control span {
    width: 100%;
    min-width: 0;
  }
}

/* Calendar 2-pane layout */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--inset-lg);
}
@media (max-width: 900px) {
  .cal-layout { grid-template-columns: 1fr; }
}

.cal-cell--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.cal-cell--link:hover {
  background-color: var(--surface-raised);
}

.cal-side {
  display: block;
  border: 1px solid var(--border-default);
  background-color: var(--surface-raised);
  padding: var(--inset-md);
  position: sticky;
  top: var(--inset-md);
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.cal-side__placeholder { color: var(--text-muted); font-size: var(--font-sm-size); }
.cal-side__header {
  display: flex;
  align-items: center;
  gap: var(--inset-md);
  margin-bottom: var(--stack-md);
  padding-bottom: var(--inset-xs);
  border-bottom: 1px solid var(--border-default);
}
.cal-side__close {
  margin-left: auto;
  text-decoration: none;
  font-weight: 700;
}

/* Tabs */
.schedule-tabs {
  display: flex;
  gap: var(--inset-xs);
  border-bottom: 1px solid var(--border-default);
  align-items: center;
}
.schedule-tabs__tab {
  padding: var(--inset-sm) var(--inset-md);
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.schedule-tabs__tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-default);
  font-weight: 600;
}
.schedule-tabs__spacer { flex: 1; }
.schedule-tabs__pending {
  font-size: var(--font-sm-size);
  text-decoration: none;
  padding: var(--inset-xs) var(--inset-sm);
}

/* Locked table */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: var(--inset-sm);
  border-bottom: 1px solid var(--border-default);
}
.table th {
  font-weight: 600;
  background-color: var(--surface-raised);
}

/* Queue list */
.queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border-default);
}
.queue-list__item {
  display: flex;
  align-items: center;
  gap: var(--inset-md);
  padding: var(--inset-sm) var(--inset-md);
  background-color: var(--surface-default);
  border-bottom: 1px solid var(--border-default);
  cursor: grab;
}
.queue-list__item:last-child { border-bottom: none; }
.queue-list__item:active { cursor: grabbing; }
.queue-list__handle {
  font-family: monospace;
  color: var(--text-muted);
  user-select: none;
}
.queue-list__pos {
  font-family: monospace;
  color: var(--text-muted);
  font-size: var(--font-sm-size);
  min-width: 2.5rem;
}
.queue-list__title { flex: 1; }
.sortable-ghost {
  opacity: 0.4;
  background-color: var(--surface-raised);
}
