/* Read It Never — shared frontend tokens and layouts. Legacy service dialogs retain
   their structural styles; these tokens unify the entire interface. */
:root {
  --ink: #172a25;
  --muted: #65736e;
  --line: #dfe5e1;
  --paper: #fff;
  --canvas: #f7f9f7;
  --accent: #225e49;
  --accent-hover: #174a38;
  --lime: #d9f77b;
  --soft: #edf4ed;
  --danger: #a93434;
  --radius: 14px;
  --shadow: 0 18px 60px #102c2514;
}
* {
  box-sizing: border-box;
}
html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #70a858;
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
button {
  min-height: 40px;
}
h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  background: var(--lime);
  color: var(--ink);
  padding: 10px 18px;
  z-index: 9999;
}
.skip-link:focus {
  top: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  padding: 38px 22px 18px;
  background: var(--ink);
  color: #d3dfd9;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.brand strong {
  display: block;
  font-size: 27px;
  font-weight: 650;
}
.brand-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 45px;
  height: 46px;
  background: var(--lime);
  border-radius: 11px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -2px;
}
.brand-symbol span {
  position: absolute;
  right: 5px;
  top: 0;
  font-size: 17px;
}
.sidebar-label {
  font-size: 11px;
  letter-spacing: 1.9px;
  color: #98b0a4;
  margin: 57px 12px 14px;
  font-weight: 600;
}
.workspace-nav {
  display: grid;
  gap: 6px;
}
.nav-view {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 9px;
  padding: 13px 14px;
  color: #c5d5cd;
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.nav-view i {
  width: 18px;
  font-size: 15px;
}
.nav-view.active {
  background: #2e453b;
  color: var(--lime);
}
.nav-view:hover {
  background: #294036;
}
.nav-count {
  margin-left: auto;
  font-size: 12px;
  background: #ffffff0c;
  padding: 1px 7px;
  border-radius: 5px;
}
.sidebar-note {
  margin: 54px 10px 32px;
  padding-top: 25px;
  border-top: 1px solid #ffffff20;
}
.sidebar-note .eyebrow {
  color: #a4bbae;
  font-size: 10px;
  letter-spacing: 1.4px;
}
.sidebar-note p {
  font-family: Georgia, serif;
  color: #edf3ee;
  font-size: 21px;
  line-height: 1.45;
  margin: 17px 0 12px;
}
.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--lime);
  font-size: 13px;
}
.text-button span {
  margin-left: 24px;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-link {
  color: #bacfc2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-decoration: none;
  padding: 12px 10px 24px;
}
.sidebar-link span {
  margin-left: auto;
}
.account-button {
  width: 100%;
  border: 0;
  border-top: 1px solid #ffffff20;
  padding: 22px 0 3px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #edf4ef;
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.account-button small {
  display: block;
  font-size: 11px;
  color: #a4bbae;
  margin-top: 3px;
}
.account-button i {
  margin-left: auto;
}
.avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #3c5146;
  color: #d9f77b;
  font-size: 14px;
}
.user-menu {
  position: relative;
}
.user-dropdown {
  display: none;
  position: absolute;
  bottom: 70px;
  top: auto;
  right: 0;
  min-width: 210px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 40;
}
.user-menu:hover .user-dropdown {
  display: none;
}
.user-menu.open .user-dropdown {
  display: block;
}
.user-dropdown .dropdown-item {
  padding: 11px 10px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
  border: 0;
  background: white;
  border-radius: 6px;
}
.user-dropdown .dropdown-item:hover {
  background: var(--soft);
}
.workspace #app {
  width: auto;
  max-width: 1500px;
  margin: 0 0 0 246px;
  padding: 0 48px 32px;
  min-height: 100vh;
}
.workspace-topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.workspace-topbar strong {
  font-weight: 500;
  color: var(--ink);
}
.workspace-topbar > div {
  display: flex;
  gap: 14px;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 40px 0 28px;
}
.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 1.9px;
  font-weight: 650;
  color: var(--accent);
  margin: 0 0 12px;
}
.workspace-heading h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  letter-spacing: -1.9px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 13px;
  text-align: left;
}
.workspace-heading h1 span {
  color: #70a650;
}
.workspace-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.primary-button,
.workspace .add-link-button,
.workspace .generate-podcast-button {
  width: auto;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 550;
  box-shadow: none;
  white-space: nowrap;
}
.primary-button:hover,
.workspace .add-link-button:hover,
.workspace .generate-podcast-button:hover {
  background: var(--accent-hover);
}
.secondary-button {
  background: white;
  color: var(--ink);
  border: 1px solid #cdd8d0;
  padding: 10px 15px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
}
.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 7px;
  font-size: 14px;
}
.quiet-button:hover,
.secondary-button:hover {
  background: var(--soft);
  color: var(--ink);
}
.capture-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--soft);
  border: 1px solid #dce7d9;
  padding: 23px;
  border-radius: var(--radius);
  margin-bottom: 33px;
}
.capture-symbol {
  background: #dceace;
  border: 1px solid #cfdfc5;
  color: var(--accent);
  border-radius: 12px;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.capture-copy {
  flex: 1;
}
.capture-copy strong {
  display: block;
  font-weight: 550;
  font-size: 15px;
  margin-bottom: 4px;
}
.capture-copy span {
  font-size: 13px;
  color: var(--muted);
}
.capture-strip .quick-add-button {
  width: auto;
  margin: 0;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cdd8d0;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
}
.capture-strip .upload-media-button {
  background: transparent;
  color: var(--ink);
  width: auto;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  margin: 0;
  padding: 10px;
  white-space: nowrap;
}
.workspace .search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  box-shadow: none;
  background: transparent;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0 14px;
  border-radius: 9px;
  width: 52%;
  min-width: 260px;
  color: #84918a;
}
.search-field #searchInput {
  width: 100%;
  padding: 12px 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  box-shadow: none;
}
.search-field:focus-within {
  outline: 2px solid #70a858;
  outline-offset: 2px;
}
.search-field #searchInput:focus {
  outline: 0;
}
.search-field kbd {
  font: 12px inherit;
  border: 1px solid var(--line);
  padding: 0 6px;
  border-radius: 4px;
  color: #6b7972;
}
.workspace .star-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  white-space: nowrap;
}
.workspace .star-filter-options {
  display: flex;
  gap: 0;
}
.workspace .star-filter-option {
  border: 0;
  background: transparent;
  color: #798878;
  padding: 0 5px;
  font-size: 23px;
  min-width: 32px;
  margin: 0;
}
.workspace .star-filter-option.active {
  color: #8d6400;
}
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
}
.selection-help {
  color: #77837b;
  font-size: 12px;
}
.selection-help i {
  margin-left: 5px;
}
#link-list {
  margin: 0;
}
.content-list {
  display: grid;
  gap: 13px;
}
.workspace .link-item {
  display: block;
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 23px 18px;
  box-shadow: 0 2px 3px #102c2502;
  margin: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  width: 100%;
}
.workspace .link-item:hover {
  border-color: #aebeaf;
  box-shadow: 0 5px 18px #18352806;
  transform: none;
}
.workspace .link-item.is-selected {
  border-color: #66966a;
  background: #fbfdf7;
  box-shadow: 0 0 0 1px #66966a;
}
.workspace .link-item.read {
  opacity: 1;
}
.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.card-source {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.source-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #edf3ed;
  border-radius: 7px;
}
.source-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.workspace .link-header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0;
  padding: 0;
  width: 100%;
}
.workspace .link-item .link-header h3 {
  font-size: 19px;
  font-weight: 570;
  line-height: 1.45;
  letter-spacing: -0.3px;
  margin: 0;
  padding: 0;
  flex: 1;
  color: var(--ink);
}
.workspace .link-checkbox {
  position: static;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 5px 0 0;
  height: 20px;
  width: 20px;
  flex: 0 0 20px;
}
.workspace .link-checkbox input {
  appearance: auto;
  position: static;
  opacity: 1;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.workspace .link-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 17px 0 0 33px;
  padding: 0;
}
.workspace .link-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  font-size: 12px;
}
.workspace .link-category {
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.5;
  background: #eef2eb;
  color: #466040;
  cursor: pointer;
  max-width: 100%;
}
.workspace .link-date {
  font-size: 12px;
  color: var(--muted);
}
.workspace .star-rating {
  display: flex;
  gap: 0;
  margin: 0;
}
.workspace .star-rating button {
  border: 0;
  padding: 0 3px;
  background: none;
  color: #84927b;
  font-size: 20px;
  min-height: 30px;
  width: 25px;
}
.workspace .star-rating button.active {
  color: #986c04;
}
.workspace .star-rating button:hover {
  background: #f1f5eb;
}
.workspace .link-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.workspace .link-actions button,
.workspace .card-menu button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 6px;
  min-height: 34px;
  width: auto;
}
.workspace .link-actions .summary-button {
  color: var(--accent);
  background: #f0f6ee;
  border-color: #e0ebdc;
  font-weight: 600;
}
.workspace .link-actions button:hover {
  color: var(--ink);
  background: var(--soft);
}
.card-menu {
  position: relative;
}
.card-menu summary {
  cursor: pointer;
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 30px;
  list-style: none;
  color: var(--muted);
  border-radius: 6px;
}
.card-menu summary::-webkit-details-marker {
  display: none;
}
.card-menu[open] summary,
.card-menu summary:hover {
  background: var(--soft);
}
.card-menu-panel {
  position: absolute;
  right: 0;
  top: 36px;
  width: 200px;
  padding: 7px;
  display: grid;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.workspace .card-menu button {
  text-align: left;
  justify-content: flex-start;
  border: 0;
  font-size: 13px;
  padding: 10px;
}
.workspace .card-menu button:hover {
  background: var(--soft);
}
.workspace .card-menu .delete-button {
  color: var(--danger);
}
.workspace .link-url {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.workspace .files-popup {
  z-index: 35;
  max-width: calc(100vw - 35px);
}
#read-links-section {
  border: 0;
  margin: 0;
  padding: 0;
}
.archive-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}
.archive-toolbar h2 {
  display: none;
}
.view-mode-toggle-container {
  margin: 0 0 16px;
}
.view-mode-toggle {
  font-size: 13px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.category-container {
  margin: 0;
  background: transparent;
  border: 0;
}
.category-header {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
  margin-bottom: 10px;
}
.category-title {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
}
.category-content {
  padding: 0 0 14px 15px;
}
.category-content .link-item {
  margin: 10px 0;
}
.library-status,
.empty-state {
  padding: 55px 24px;
  text-align: center;
  border: 1px dashed #cddbcc;
  border-radius: 14px;
  background: #fff;
}
.library-status .spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  display: inline-block;
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.empty-state h2 {
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.7px;
  margin: 0 0 10px;
}
.empty-state p:not(.eyebrow) {
  max-width: 450px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 14px;
}
.workspace-footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding: 20px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: #768277;
}
.workspace-footer span:first-child {
  font-weight: 600;
}
.selection-bar {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 123px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  max-width: calc(100vw - 294px);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 35px #142a2538;
  border: 1px solid #3e5b4d;
  border-radius: 13px;
  padding: 14px 18px;
  z-index: 60;
}
.selection-bar strong {
  display: block;
  font-size: 14px;
}
.selection-bar div > span {
  display: block;
  font-size: 11px;
  color: #bfcec5;
  margin-top: 2px;
}
.selection-indicator {
  background: #3a5644;
  border-radius: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--lime);
}
.selection-bar .quiet-button {
  color: #cfdbd3;
  font-size: 12px;
}
.workspace .selection-bar .generate-podcast-button {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  padding: 10px 15px;
  font-size: 13px;
}
body:has(.selection-bar:not([hidden])) .workspace-footer {
  padding-bottom: 90px;
}
.workspace .loading-icon {
  position: fixed;
  top: auto;
  bottom: 22px;
  right: 22px;
  left: auto;
  width: auto;
  max-width: calc(100vw - 44px);
  transform: none;
  background: var(--ink);
  color: white;
  border-radius: 9px;
  padding: 13px 18px;
  z-index: 80;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  max-width: min(420px, calc(100vw - 44px));
  z-index: 6000;
  display: grid;
  gap: 8px;
}
.rin-toast {
  padding: 14px 18px;
  background: var(--ink);
  border: 1px solid #496254;
  color: white;
  box-shadow: var(--shadow);
  border-radius: 10px;
  font-size: 14px;
}
.rin-toast.error {
  background: #742e2e;
  border-color: #a24a4a;
}
/* Dialogs use the existing form IDs and service handlers. */
body .modal {
  z-index: 1000;
  padding: 5vh 20px;
  background: #12251dcc;
  backdrop-filter: blur(5px);
}
body .modal-content {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 auto;
  width: min(100%, 610px);
  max-width: 920px;
  max-height: 90vh;
  overflow: auto;
  padding: 36px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #e0e8e0;
  border-radius: 18px;
  box-shadow: 0 25px 100px #061b2940;
}
body .modal-content h2 {
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  font-weight: 550;
  margin: 3px 30px 12px 0;
}
body .modal .close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin: 0;
  float: none;
  color: var(--muted);
  font-size: 25px;
  background: #f0f4ee;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.dialog-description {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 23px;
  line-height: 1.6;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.modal label,
.login-form label {
  display: block;
  color: var(--ink);
  font-weight: 550;
  font-size: 14px;
  margin: 13px 0 6px;
}
.modal input:not([type="radio"]):not([type="checkbox"]),
.modal select,
.modal textarea,
.login-form input,
.invitation-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #ccd7cd;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  margin: 0 0 6px;
}
.modal textarea {
  min-height: 95px;
  resize: vertical;
}
.modal button[type="submit"],
.modal .submit-button,
.login-button {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 13px 16px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 550;
}
.modal .form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal .form-columns > div {
  min-width: 0;
}
.capture-tabs {
  display: flex;
  background: #f0f4ed;
  border-radius: 9px;
  padding: 4px;
  gap: 4px;
  margin: 22px 0 14px;
}
.capture-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
}
.capture-tabs button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 5px #122b200c;
}
.modal .accordion {
  margin-top: 13px;
}
.modal .accordion-header {
  font-size: 13px;
  padding: 13px;
  background: #f3f6f0;
  border: 0;
  border-radius: 8px;
}
.modal .radio-group {
  display: grid;
  gap: 10px;
}
.modal .radio-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
}
.modal .radio-label:has(:checked) {
  border-color: var(--accent);
  background: #f4f9ee;
}
.modal input[type="radio"] {
  accent-color: var(--accent);
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}
.modal .radio-content span {
  font-weight: 550;
  font-size: 14px;
}
.modal .radio-content small {
  color: var(--muted);
  font-size: 12px;
}
.modal .file-input-group {
  background: #f5f8f2;
  border: 1px dashed #a8bea5;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}
.modal input[type="file"] {
  border: 0 !important;
  padding: 10px 0 !important;
  background: transparent !important;
  font-size: 14px !important;
}
.modal input::file-selector-button {
  border: 1px solid #c1d2bd;
  background: #fff;
  color: var(--accent);
  padding: 9px 12px;
  border-radius: 6px;
  margin-right: 12px;
  cursor: pointer;
}
.modal .file-info {
  color: var(--muted);
  font-size: 12px;
}
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.form-feedback {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5eae7;
  color: #8b3331;
  margin: 10px 0;
}
.form-feedback.success {
  color: var(--accent);
  background: var(--soft);
}
/* Reading and editing */
.workspace .accordion-item {
  margin-top: 0;
  border: 0;
}
.workspace .accordion-item:not(:empty) {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.workspace .accordion-item > .accordion-header {
  background: transparent;
  border: 0;
  padding: 16px 0;
}
.workspace .accordion-item.active > .accordion-content {
  background: transparent;
  padding: 0 0 14px;
  border: 0;
  max-height: none !important;
  overflow: visible;
}
.workspace .accordion-item:not(.active) > .accordion-content {
  max-height: 0 !important;
  padding: 0;
  border: 0;
}
.workspace .summary-section {
  background: #fafcf8;
  border: 1px solid #e6ece3;
  border-radius: 10px;
  padding: 24px;
}
.summary-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.summary-header h4 {
  margin: 0;
  font-size: 14px;
}
.workspace .summary-header button,
.workspace .deepening-item button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 6px;
}
.markdown-content {
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.markdown-content p {
  color: #33443b;
}
.markdown-content h1 {
  text-align: left;
  font-size: 26px;
}
.markdown-content img {
  max-width: 100%;
  height: auto;
}
.markdown-content table {
  display: block;
  overflow: auto;
}
.markdown-content a {
  overflow-wrap: anywhere;
}
.workspace .edit-textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #94ad8e;
  border-radius: 7px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.edit-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.workspace .edit-controls button {
  font-size: 13px;
  background: var(--soft);
  color: var(--accent);
  padding: 8px 12px;
  border: 1px solid var(--line);
}
.workspace .deepening-section {
  margin-top: 22px;
}
.workspace .deepening-item {
  padding: 16px;
  background: #f7f9f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0;
}
#chatMessages {
  min-height: 200px;
  max-height: 50vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbf7;
  padding: 14px;
}
#chatForm {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
#chatForm button,
#chatForm input {
  margin: 0;
}
#chatForm button {
  width: auto;
}
.chat-message.user {
  background: #e7f1df;
  color: var(--ink);
}
#statsModal .modal-content {
  width: min(1100px, 100%);
}
.tab-buttons,
.tabs {
  display: flex;
  flex-wrap: wrap;
}
.table-responsive {
  overflow-x: auto;
}
/* Listening */
body[data-view="library"] #podcast-section,
body[data-view="archive"] #podcast-section {
  display: none !important;
}
body[data-view="podcasts"] #podcast-section {
  margin: 0;
}
body[data-view="podcasts"] .podcast-accordion {
  box-shadow: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  overflow: hidden;
}
body[data-view="podcasts"] .podcast-accordion-header {
  background: white;
  padding: 24px;
  cursor: default;
  border-bottom: 1px solid var(--line);
}
.podcast-accordion-header h2 {
  font-size: 19px;
  margin: 0;
}
.podcast-accordion-header .eyebrow {
  font-size: 10px;
  margin: 0;
}
body[data-view="podcasts"] .podcast-accordion-content {
  display: block;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.workspace #podcast-player {
  padding: 24px;
  margin: 0;
  background: white;
  box-shadow: none;
}
.workspace .podcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 26px;
}
.workspace .podcast-main-content {
  min-width: 0;
}
.workspace .podcast-list-container {
  box-shadow: none;
  border: 1px solid var(--line);
  margin: 0;
}
.workspace .podcast-search {
  padding: 12px;
}
.workspace .podcast-search input {
  border: 0;
  background: #f6f8f3;
  font-size: 14px;
  border-radius: 7px;
}
.workspace .podcast-item {
  opacity: 1;
  padding: 13px;
  border: 1px solid transparent;
  gap: 12px;
}
.workspace .podcast-item.selected {
  border-color: #9bba8f;
  background: #f0f6e8;
}
.workspace .podcast-item:hover {
  background: #f5f8f0;
}
.workspace .podcast-item-icon {
  width: 39px;
  height: 43px;
  border-radius: 9px;
  background: var(--accent);
  margin: 0;
}
.workspace .podcast-item.listened .podcast-item-icon {
  background: #718671;
}
.workspace .podcast-item-title {
  font-size: 14px;
  color: var(--ink);
  white-space: normal;
}
.workspace .podcast-item-date {
  font-size: 11px;
}
.workspace .podcast-filters {
  padding: 10px;
  gap: 5px;
  flex-wrap: wrap;
  background: #f7f9f4;
}
.workspace .filter-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 9px;
}
.workspace .filter-button.active {
  background: var(--accent);
  color: white;
}
.workspace .podcast-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-end;
}
.workspace .podcast-buttons button {
  background: white;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  padding: 8px 12px;
  width: auto;
}
.workspace .player-controls {
  background: var(--ink);
  border: 0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.now-playing-title {
  width: 100%;
  color: #f5f9ed;
  font-size: 15px;
  font-weight: 550;
  margin: 0;
}
.workspace #audio-player {
  width: 100%;
  margin: 0;
  min-width: 0;
  height: 45px;
}
.workspace .custom-buttons-container {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}
.workspace .custom-button {
  width: 42px;
  height: 42px;
  padding: 0;
  min-width: 42px;
  border-radius: 50%;
  background: #385245;
  color: var(--lime);
  border: 0;
  font-size: 15px;
}
.workspace .podcast-articles {
  width: auto;
  padding: 20px 0 0 23px;
  background: transparent;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.workspace .podcast-articles h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.workspace .podcast-article-item {
  padding: 12px;
  background: #f7f9f3;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
  cursor: pointer;
}
.workspace .podcast-article-title {
  font-size: 13px;
  color: var(--ink);
}
.workspace .podcast-article-category {
  font-size: 11px;
  margin-top: 5px;
  color: var(--muted);
}
/* Account and public sharing reuse the same visual language. */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-story {
  background: var(--ink);
  color: white;
  padding: 55px 12%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.auth-story h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 4.7vw, 70px);
  line-height: 1.15;
  letter-spacing: -2px;
  text-align: left;
  color: #f6f9ef;
  margin: 70px 0 25px;
}
.auth-story h1 em {
  color: var(--lime);
  font-weight: 400;
}
.auth-story p {
  color: #bdcec1;
  max-width: 370px;
  line-height: 1.8;
}
.auth-steps {
  border-top: 1px solid #ffffff24;
  margin-top: 50px;
  padding-top: 22px;
  font-size: 13px;
  display: flex;
  gap: 20px;
  color: #c8d9cc;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.login-container {
  width: 100%;
  max-width: 375px;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
}
.login-container h2 {
  font-size: 32px;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 0 0 10px;
}
.login-container .intro {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 30px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-form label {
  margin: 0 0 8px;
}
.login-button {
  width: 100%;
  margin-top: 10px;
}
.request-access {
  margin-top: 27px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.request-access button {
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  font-size: 13px;
}
.shared-page .shared-podcast-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 30px 70px;
  background: transparent;
  box-shadow: none;
}
.shared-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
  font-size: 13px;
}
.shared-brand .brand {
  color: var(--ink);
  font-size: 16px;
}
.shared-brand .brand strong {
  display: inline;
  font-size: 16px;
}
.shared-page .shared-header {
  text-align: left;
  margin: 36px 0 25px;
}
.shared-page .shared-header h1 {
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0 0 12px;
}
.shared-page .podcast-title {
  font-size: 32px;
  letter-spacing: -1px;
  color: var(--ink);
  font-weight: 550;
  line-height: 1.35;
}
.shared-page .shared-player {
  background: var(--ink);
  padding: 23px;
  border-radius: 12px;
  margin-bottom: 30px;
}
.shared-page audio {
  width: 100%;
}
.shared-page .shared-accordion {
  border: 1px solid var(--line);
  border-radius: 11px;
  margin: 13px 0;
  background: white;
  overflow: hidden;
}
.shared-page .shared-accordion-header {
  background: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.shared-page .shared-accordion-header h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 12px;
}
.shared-page .shared-accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 23px;
}
.shared-page .shared-accordion.open .shared-accordion-content {
  max-height: none;
  padding-bottom: 22px;
}
.shared-page .summary-item h3 {
  font-size: 21px;
}
/* Responsive layouts keep core actions visible without icon-only menus. */
@media (min-width: 1746px) {
  .workspace #app {
    margin-right: auto;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding: 30px 16px 18px;
  }
  .workspace #app {
    margin-left: 210px;
    padding: 0 28px 28px;
  }
  .capture-strip {
    flex-wrap: wrap;
    gap: 12px;
  }
  .capture-copy {
    flex-basis: calc(100% - 70px);
  }
  .capture-strip .quick-add-button {
    margin-left: 58px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  .workspace-heading .primary-button {
    margin-top: 31px;
  }
  .selection-bar {
    left: calc(50% + 105px);
    max-width: calc(100vw - 245px);
  }
  .workspace .podcast-layout {
    grid-template-columns: 1fr;
  }
  .workspace .podcast-articles {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }
  .selection-help {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 12px 18px 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .sidebar .brand {
    font-size: 15px;
    gap: 8px;
  }
  .sidebar .brand strong {
    font-size: 15px;
    display: inline;
  }
  .brand-symbol {
    width: 31px;
    height: 32px;
    font-size: 20px;
    border-radius: 7px;
  }
  .brand-symbol span {
    font-size: 12px;
  }
  .sidebar-label,
  .sidebar-note,
  .sidebar-link {
    display: none;
  }
  .workspace-nav {
    order: 3;
    display: flex;
    width: 100%;
    gap: 6px;
    justify-content: space-between;
  }
  .nav-view {
    flex: 1;
    justify-content: center;
    padding: 11px 6px;
    gap: 7px;
    border-radius: 7px 7px 0 0;
    font-size: 12px;
  }
  .nav-view i {
    font-size: 13px;
    width: auto;
  }
  .nav-count {
    margin: 0;
    font-size: 10px;
  }
  .sidebar-bottom {
    margin: 0 0 0 auto;
  }
  .account-button {
    padding: 0;
    border: 0;
    min-height: 34px;
  }
  .account-button > span:not(.avatar),
  .account-button > i {
    display: none;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .user-dropdown {
    bottom: auto;
    top: 44px;
  }
  .workspace #app {
    margin: 0;
    padding: 0 20px 24px;
    min-height: calc(100vh - 106px);
  }
  .workspace-topbar {
    height: 55px;
    font-size: 11px;
  }
  .workspace-topbar > div {
    gap: 3px;
  }
  .workspace-topbar .quiet-button {
    font-size: 12px;
  }
  .workspace-heading {
    flex-wrap: wrap;
    gap: 20px;
    margin: 27px 0 22px;
  }
  .workspace-heading h1 {
    font-size: 34px;
    letter-spacing: -1.5px;
  }
  .workspace-heading .primary-button {
    margin: 0;
    width: 100%;
  }
  .eyebrow {
    font-size: 10px;
  }
  .workspace-heading p:last-child {
    font-size: 13px;
  }
  .capture-strip {
    padding: 17px;
    margin-bottom: 25px;
    gap: 10px;
  }
  .capture-symbol {
    display: none;
  }
  .capture-copy {
    flex-basis: 100%;
    margin-bottom: 5px;
  }
  .capture-copy strong {
    font-size: 14px;
  }
  .capture-copy span {
    font-size: 12px;
  }
  .capture-strip .quick-add-button {
    margin-left: 0;
    flex: 1;
    font-size: 12px;
  }
  .capture-strip .upload-media-button {
    flex: 1;
    font-size: 12px;
  }
  .workspace .search-container {
    gap: 10px;
    margin-bottom: 12px;
  }
  .search-field {
    width: 100%;
    min-width: 0;
  }
  .search-field input {
    font-size: 16px !important;
  }
  .search-field kbd {
    display: none;
  }
  .workspace .star-filter {
    margin-left: auto;
  }
  .star-filter .quiet-button {
    font-size: 12px;
  }
  .list-meta {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .workspace .link-item {
    padding: 17px 16px 14px;
  }
  .workspace .link-item .link-header h3 {
    font-size: 18px;
  }
  .workspace .link-details {
    margin: 15px 0 0;
    gap: 14px;
  }
  .workspace .link-info {
    margin-left: 31px;
  }
  .workspace .link-actions {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #edf0ea;
    gap: 7px;
  }
  .workspace .link-actions button {
    flex: 1;
    min-height: 39px;
    padding: 7px 8px;
    font-size: 12px;
  }
  .workspace .link-actions .podcast-button {
    flex: 0;
  }
  .source-name {
    max-width: 200px;
  }
  .selection-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    width: auto;
    max-width: none;
    padding: 12px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .selection-indicator {
    display: none;
  }
  .selection-bar > div {
    flex: 1;
  }
  .selection-bar div > span {
    display: none;
  }
  .selection-bar .generate-podcast-button {
    width: 100%;
  }
  .workspace-footer {
    margin-top: 28px;
    font-size: 10px;
  }
  .workspace-footer span:last-child {
    max-width: 170px;
    text-align: right;
  }
  body .modal {
    padding: 12px;
  }
  body .modal-content {
    max-height: calc(100dvh - 24px);
    padding: 30px 22px 24px;
    width: 100%;
    border-radius: 14px;
  }
  body .modal-content h2 {
    font-size: 25px;
  }
  .modal .form-columns {
    gap: 12px;
  }
  .modal .form-columns label {
    font-size: 12px;
  }
  .modal .file-input-group {
    padding: 14px;
  }
  .workspace .summary-section {
    padding: 17px;
  }
  .summary-header {
    margin-bottom: 15px;
  }
  .workspace #podcast-player {
    padding: 15px;
  }
  .podcast-accordion-header .eyebrow {
    display: none;
  }
  .workspace .podcast-accordion-header {
    padding: 20px;
  }
  .workspace .podcast-articles {
    padding-top: 20px;
  }
  .workspace .podcast-buttons {
    flex-wrap: wrap;
  }
  .auth-page {
    display: block;
  }
  .auth-story {
    min-height: auto;
    padding: 28px;
  }
  .auth-story h1 {
    font-size: 36px;
    margin: 28px 0 10px;
  }
  .auth-story p,
  .auth-steps {
    display: none;
  }
  .auth-panel {
    padding: 35px 28px;
  }
  .shared-page .shared-podcast-container {
    padding: 25px 20px;
  }
  .shared-page .podcast-title {
    font-size: 27px;
  }
  .empty-state {
    padding: 35px 20px;
  }
  .empty-state h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.guide-step {
  display: flex;
  gap: 16px;
  margin: 26px 0;
}
.guide-step > span {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
}
.guide-step h3 {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 600;
}
.guide-step p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
/* Override the legacy fixed widths and one-line headings at their old specificity. */
.workspace #userButton {
  width: 100%;
  height: auto;
  padding: 22px 0 3px;
  min-height: 40px;
  justify-content: flex-start;
  border-radius: 0;
  background: transparent;
}
.workspace #userButton:hover {
  background: transparent;
}
.workspace .content-list {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.workspace .link-item {
  min-width: 0;
}
.workspace .link-item .link-header h3 {
  white-space: normal;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}
.workspace .link-details {
  width: auto;
  min-width: 0;
}
.workspace .link-actions button:hover {
  transform: none;
  box-shadow: none;
}
.workspace .quick-add-button,
.workspace .upload-media-button {
  min-width: 0;
  box-shadow: none;
}
.workspace #addLinkForm button[type="submit"],
.workspace #generatePodcastForm button[type="submit"] {
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 13px 16px;
  margin-top: 18px;
  font-size: 14px;
}
body #generatePodcastModal .modal-content,
body #chatBotModal .modal-content {
  margin: 0 auto;
  padding: 36px;
  width: min(100%, 610px);
  max-width: 920px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
#podcast-filter-empty {
  margin: 15px;
  font-size: 13px;
  color: var(--muted);
}
.workspace .link-actions .summary-button,
.workspace .link-actions .chat-button {
  width: auto;
}
@media (max-width: 760px) {
  .workspace #userButton {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
  }
  body #generatePodcastModal .modal-content,
  body #chatBotModal .modal-content {
    padding: 30px 22px 24px;
    border-radius: 14px;
  }
  .capture-strip .quick-add-button,
  .capture-strip .upload-media-button {
    flex: 1 1 0;
  }
  .workspace .link-details {
    width: 100%;
  }
}
.workspace #podcast-section {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}
.workspace .podcast-controls {
  align-items: stretch;
}
.workspace .podcast-list-container {
  width: 100%;
}
.workspace #custom-play-pause {
  background: #3b5745;
}
.workspace #custom-play-pause i,
.workspace #open-chat-modal i {
  font-size: 18px;
}
.workspace .podcast-article-item {
  width: 100%;
  text-align: left;
}
.avatar i {
  margin: 0;
}
.workspace .podcast-layout {
  padding: 0;
}
.workspace .podcast-articles {
  min-width: 0;
}
