:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #fbfcf9;
  --surface-soft: #eef1eb;
  --surface-deep: #e6eae2;
  --text: #1d211d;
  --muted: #686f67;
  --muted-strong: #525a52;
  --line: #d6dbd2;
  --line-strong: #c4ccc0;
  --accent: #176b48;
  --accent-dark: #0f5538;
  --accent-soft: #e5f2ea;
  --blue: #315f83;
  --blue-soft: #e7eff5;
  --amber: #8a5b16;
  --amber-soft: #f8eed8;
  --danger: #a53b32;
  --danger-soft: #faebe8;
  --shadow: 0 18px 45px rgba(30, 43, 33, 0.06);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Account library */
.library-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 140px 125px 170px auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.library-toolbar label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.library-toolbar label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.library-toolbar input,
.library-toolbar select,
.task-rename-input {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12px;
}

.library-toolbar input:focus,
.library-toolbar select:focus,
.task-rename-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 72, 0.11);
  outline: 0;
}

.library-search > span {
  position: absolute;
}

.library-toolbar .text-button {
  min-height: 40px;
}

.bulk-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 7px 0;
}

.bulk-select-all,
.task-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
}

.bulk-select-all input,
.task-select input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.selection-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.account-task-list {
  margin-top: 0;
}

.account-task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 88px;
  align-items: center;
  gap: 12px;
  padding: 13px 6px;
}

.account-task-row:hover {
  padding-right: 6px;
  padding-left: 6px;
  background: rgba(255, 255, 255, 0.48);
}

.task-select {
  justify-content: center;
}

.account-task-link {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(180px, 1.25fr) minmax(170px, 0.8fr) minmax(135px, 0.6fr) 22px;
  align-items: center;
  gap: 16px;
}

.account-task-retention {
  display: grid;
  gap: 3px;
  color: var(--muted);
}

.account-task-retention small {
  font-size: 10px;
}

.account-task-status {
  display: grid;
  gap: 2px;
}

.account-task-status small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.account-task-status .task-attention {
  color: var(--amber);
  font-weight: 700;
}

.account-task-actions {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.account-task-actions .text-button {
  min-height: 29px;
  padding: 3px 5px;
  font-size: 10px;
}

.task-rename-editor {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0 2px;
}

.task-rename-editor label {
  min-width: 0;
}

/* Admin */
.admin-page {
  padding-top: 50px;
  padding-bottom: 86px;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.admin-heading h1 {
  margin-bottom: 8px;
}

.admin-heading .lead {
  margin: 0;
  font-size: 13px;
}

.system-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.system-metrics > div {
  display: grid;
  min-height: 125px;
  align-content: center;
  gap: 4px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.system-metrics > div:last-child {
  border-right: 0;
}

.system-metrics span,
.system-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.system-metrics strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.admin-section {
  padding-top: 42px;
}

.admin-section .section-heading-row h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
}

.admin-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-table td:first-child {
  font-weight: 600;
}

.admin-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.admin-table tr.attention td {
  background: var(--amber-soft);
}

.admin-empty,
.admin-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 940px) {
  .library-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-search {
    grid-column: 1 / -1;
  }

  .account-task-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .account-task-link {
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(120px, 0.55fr) 20px;
  }

  .account-task-actions {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
  }

  .task-rename-editor {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .account-task-link {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto) 18px;
  }

  .account-task-retention {
    grid-column: 1;
    grid-row: 2;
    grid-auto-flow: column;
    justify-content: start;
    gap: 12px;
  }

  .account-task-status {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .account-task-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .system-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .system-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-search {
    grid-column: auto;
  }

  .bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-count {
    margin-right: 0;
  }

  .bulk-toolbar .danger-button {
    width: 100%;
  }

  .account-task-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
  }

  .account-task-link {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 8px;
  }

  .account-task-retention,
  .account-task-status {
    grid-column: 1;
    grid-row: auto;
  }

  .account-task-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .account-task-actions {
    grid-auto-flow: row;
    justify-items: start;
  }

  .task-rename-editor {
    grid-template-columns: 1fr;
  }

  .task-rename-editor .secondary-button,
  .task-rename-editor .text-button {
    width: 100%;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .system-metrics {
    grid-template-columns: 1fr;
  }

  .system-metrics > div,
  .system-metrics > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 7px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 251, 248, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  min-height: 66px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  position: relative;
  padding: 22px 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: transparent;
  content: "";
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  background: var(--accent);
}

.logout-form {
  margin: 0;
}

.logout-link {
  background: transparent;
}

.header-cta {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.header-cta:hover {
  background: var(--accent-dark);
}

.page-container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.home-page,
.result-page {
  padding-top: 50px;
  padding-bottom: 86px;
}

.page-heading,
.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 30px;
}

.page-heading > div:first-child,
.result-title-block {
  min-width: 0;
}

.page-heading > div:first-child {
  max-width: 760px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 670px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.limit-summary,
.metadata-row {
  display: flex;
  flex-wrap: wrap;
}

.limit-summary {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 0;
  padding-bottom: 4px;
}

.limit-summary span {
  padding: 0 13px;
  border-right: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.limit-summary span:first-child {
  padding-left: 0;
}

.limit-summary span:last-child {
  padding-right: 0;
  border-right: 0;
}

.upload-panel,
.processing-panel,
.audio-panel,
.transcript-panel,
.sidebar-section,
.not-found-panel {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.72fr);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.source-tabs {
  display: inline-grid;
  grid-column: 1;
  grid-template-columns: 1fr 1fr;
  width: min(100% - 64px, 330px);
  margin: 28px 32px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.source-tab {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.source-tab:hover {
  color: var(--text);
}

.source-tab.active {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(31, 44, 34, 0.11);
  color: var(--text);
}

.source-panel {
  grid-column: 1;
  margin-top: 20px;
  padding: 0 32px 32px;
}

.dropzone {
  display: flex;
  min-height: 305px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: #f8f9f6;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone strong {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
}

.dropzone > span:not(.secondary-button):not(.dropzone-icon) {
  color: var(--muted);
  font-size: 13px;
}

.dropzone-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
}

.dropzone .secondary-button {
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.primary-button {
  padding: 9px 17px;
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.43;
}

.secondary-button {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.secondary-button:hover {
  border-color: #97a493;
  background: var(--surface-soft);
}

.danger-button {
  padding: 8px 15px;
  border: 1px solid #dfaaa4;
  background: var(--danger-soft);
  color: var(--danger);
}

.danger-button:hover {
  border-color: var(--danger);
}

.text-button {
  min-height: 34px;
  padding: 6px 0;
  background: transparent;
  color: var(--accent);
}

.text-button:hover {
  color: var(--accent-dark);
}

.icon-button {
  flex: 0 0 38px;
  min-height: 38px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.selected-file {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.file-type {
  display: grid;
  flex: 0 0 40px;
  height: 40px;
  place-items: center;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.file-details {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.file-details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-details span {
  color: var(--muted);
  font-size: 12px;
}

.field-label,
.control-group legend {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.text-input,
.select-input,
.text-area,
.search-field input,
.segment-speaker,
.segment-text {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  outline: none;
}

.text-input,
.select-input,
.search-field input,
.segment-speaker {
  min-height: 42px;
  padding: 8px 11px;
}

.text-area {
  min-height: 90px;
  padding: 9px 11px;
  resize: vertical;
}

.text-input:focus,
.select-input:focus,
.text-area:focus,
.search-field input:focus,
.segment-speaker:focus,
.segment-text:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 72, 0.11);
}

.source-panel .text-input {
  min-height: 52px;
  font-size: 14px;
}

.field-help,
.settings-section p,
.privacy-note,
.edit-hint {
  color: var(--muted);
  font-size: 12px;
}

.field-help {
  margin: 8px 0 0;
}

.form-divider {
  display: none;
}

.settings-section {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 27px 26px 30px;
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading-row p {
  margin-bottom: 0;
}

.settings-section .section-heading-row h2 {
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 19px;
  margin-top: 22px;
}

.control-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.segmented-control label {
  cursor: pointer;
}

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

.segmented-control span {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.segmented-control strong {
  font-size: 13px;
}

.segmented-control small {
  color: var(--muted);
  font-size: 10px;
}

.segmented-control input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 22px;
  cursor: pointer;
}

.toggle-row > input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  margin-top: 2px;
  border-radius: 11px;
  background: #b4bcb2;
  transition: background 0.15s ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(30, 43, 33, 0.24);
  content: "";
  transition: transform 0.15s ease;
}

.toggle-row input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-row input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle-row > span:last-child {
  display: flex;
  flex-direction: column;
}

.toggle-row strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.advanced-settings {
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.advanced-settings summary {
  margin-bottom: 15px;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.notification-settings {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.notification-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.notification-options {
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}

.notification-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.notification-toggle {
  flex: 0 0 auto;
  align-items: center;
  margin-top: 0;
}

.notification-toggle .toggle-track {
  margin-top: 0;
}

.notification-address {
  min-width: 0;
  flex: 1;
}

.notification-address .text-input {
  min-height: 38px;
}

.notification-address .text-input:disabled {
  background: transparent;
  color: var(--muted);
  opacity: 0.64;
}

.notification-connect {
  justify-content: space-between;
  font-size: 12px;
}

.form-error,
.result-alert {
  padding: 12px 14px;
  border: 1px solid #dfaaa4;
  border-radius: 4px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.upload-panel > .form-error,
.upload-panel > .upload-progress,
.upload-panel > .submit-button,
.upload-panel > .privacy-note {
  grid-column: 1 / -1;
  margin-right: 32px;
  margin-left: 32px;
}

.upload-panel > .form-error {
  margin-top: 22px;
}

.upload-progress {
  margin-top: 22px;
}

.progress-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.progress-label-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.progress-label-row span {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-deep);
}

.progress-track.large {
  height: 7px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s ease;
}

.submit-button {
  width: auto;
  min-height: 48px;
  margin-top: 24px;
}

.privacy-note {
  margin-top: 10px;
  margin-bottom: 26px;
  text-align: center;
}

.recent-section {
  padding-top: 66px;
  scroll-margin-top: 82px;
}

.recent-section .section-heading-row h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
}

.empty-list {
  display: flex;
  min-height: 150px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.empty-list strong {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.empty-list span {
  font-size: 13px;
}

.task-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.task-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 68px;
  align-items: center;
  gap: 22px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.15s ease, background 0.15s ease;
}

.task-list-item:hover {
  padding-right: 10px;
  padding-left: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.task-list-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.task-list-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.task-list-main span,
.task-list-date {
  color: var(--muted);
  font-size: 12px;
}

.task-list-status {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner span:first-child {
  color: var(--text);
  font-weight: 600;
}

/* Result page */

.result-heading {
  align-items: center;
}

.result-heading h1 {
  max-width: 760px;
  overflow: hidden;
  margin-bottom: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 42px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-bottom: 13px;
}

.status-pill {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #b9ccda;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.status-done,
.status-pill.status-done_with_warning {
  border-color: #b9d3c4;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.status-failed,
.status-pill.status-cancelled {
  border-color: #e0b5af;
  background: var(--danger-soft);
  color: var(--danger);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.metadata-row {
  gap: 0;
}

.metadata-row span {
  padding: 0 12px;
  border-right: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
}

.metadata-row span:first-child {
  padding-left: 0;
}

.metadata-row span:last-child {
  padding-right: 0;
  border-right: 0;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.processing-panel {
  padding: 20px 22px;
  background: var(--surface-soft);
}

.stage-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
}

.stage-row span:nth-child(2),
.stage-row span:nth-child(3) {
  text-align: center;
}

.stage-row span:last-child {
  text-align: right;
}

.stage-row span.complete,
.stage-row span.active {
  color: var(--accent);
  font-weight: 700;
}

.result-alert {
  margin-top: 18px;
  margin-bottom: 18px;
}

.audio-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 18px;
  padding: 16px 20px;
}

.audio-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audio-heading p {
  margin-bottom: 0;
}

.audio-heading strong {
  font-size: 13px;
  font-weight: 600;
}

.audio-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.audio-panel audio {
  width: 100%;
  height: 40px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.transcript-panel {
  min-width: 0;
  overflow: hidden;
}

.transcript-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.transcript-toolbar h2,
.transcript-toolbar p {
  margin-bottom: 0;
}

.transcript-toolbar h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
}

.search-field {
  width: min(100%, 290px);
}

.search-field input {
  min-height: 39px;
  background: #f8f9f6;
  font-size: 13px;
}

.edit-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  line-height: 1.5;
}

.autosave-status {
  flex: 0 0 auto;
  color: var(--muted-strong);
  font-weight: 600;
  white-space: nowrap;
}

.autosave-status.saving,
.autosave-status.pending {
  color: var(--amber);
}

.autosave-status.saved {
  color: var(--accent);
}

.autosave-status.error {
  color: var(--danger);
}

.segments-list {
  max-height: 720px;
  overflow-y: auto;
}

.segment-row {
  display: grid;
  grid-template-columns: 70px 128px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 15px 20px;
  border-bottom: 1px solid #e5e9e2;
  transition: background 0.15s ease;
}

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

.segment-row:hover {
  background: #f8f9f6;
}

.segment-row.playing {
  background: var(--accent-soft);
}

.segment-row.search-hidden {
  display: none;
}

.time-button {
  min-height: 33px;
  padding: 5px 7px;
  border: 0;
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.segment-speaker {
  min-height: 33px;
  padding: 5px 8px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.segment-text {
  min-height: 54px;
  padding: 7px 9px;
  background: transparent;
  resize: vertical;
  font-size: 14px;
  line-height: 1.5;
}

.segment-speaker:read-only,
.segment-text:read-only {
  border-color: transparent;
}

.transcript-empty {
  display: flex;
  min-height: 310px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 11px;
  padding: 38px 28px;
  color: var(--muted);
}

.transcript-empty p {
  margin: 4px 0 0;
  font-size: 13px;
}

.loading-line {
  display: block;
  width: min(100%, 460px);
  height: 11px;
  border-radius: 3px;
  background: var(--surface-deep);
}

.loading-line.short {
  width: min(72%, 330px);
}

.result-sidebar {
  display: grid;
  gap: 12px;
}

.sidebar-section {
  padding: 19px;
  background: var(--surface-soft);
}

.sidebar-section h2 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.task-notification-toggle {
  align-items: center;
  margin-top: 0;
}

.task-notification-toggle .toggle-track {
  margin-top: 0;
}

.task-notification-toggle input:disabled + .toggle-track {
  opacity: 0.55;
}

.task-notification-section .field-help {
  margin: 10px 0 0;
  line-height: 1.45;
}

.task-notification-section > .secondary-button {
  margin-top: 13px;
}

.speaker-tools-section > .field-help {
  margin: -6px 0 12px;
  line-height: 1.4;
}

.speaker-tools-list {
  display: grid;
  gap: 8px;
}

.speaker-rename-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}

.speaker-rename-row input {
  min-width: 0;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.speaker-rename-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 72, 0.11);
  outline: 0;
}

.speaker-apply-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

.speaker-apply-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.details-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.details-list div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.details-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.details-list dt {
  color: var(--muted);
}

.details-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.task-id-value {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
}

.download-list {
  display: grid;
}

.download-list a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.download-list a:last-child {
  border-bottom: 0;
}

.download-list a:hover {
  color: var(--accent);
}

.download-list a::after {
  color: var(--accent);
  content: "↓";
  font-size: 15px;
  font-weight: 400;
}

.download-list.disabled {
  opacity: 0.43;
  pointer-events: none;
}

.manage-section {
  display: grid;
  gap: 8px;
}

.manage-section h2,
.manage-section p {
  margin-bottom: 0;
}

.full-width {
  width: 100%;
}

.inline-button {
  width: auto;
  margin-top: 9px;
}

.not-found-panel {
  max-width: 640px;
  margin: 70px auto;
  padding: 48px;
  text-align: center;
}

.not-found-panel h1 {
  font-size: 42px;
}

.not-found-code {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.not-found-panel p {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  max-width: min(390px, calc(100% - 44px));
  padding: 11px 14px;
  border-radius: 4px;
  background: var(--text);
  box-shadow: var(--shadow);
  color: white;
  font-size: 13px;
  font-weight: 600;
}

/* Authorization and account */

.auth-page {
  display: grid;
  min-height: calc(100vh - 66px);
  place-items: start center;
  padding-top: 64px;
  padding-bottom: 80px;
}

.auth-panel {
  width: min(100%, 500px);
  padding: 40px 42px 38px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(251, 252, 249, 0.56);
}

.auth-panel h1 {
  margin-bottom: 13px;
  font-size: 43px;
}

.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.oauth-options {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}

.oauth-button {
  display: grid;
  min-height: 48px;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.oauth-button:hover {
  border-color: var(--text);
  background: white;
  transform: translateY(-1px);
}

.oauth-mark,
.connection-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 4px;
  background: var(--text);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.oauth-yandex .oauth-mark,
.connection-mark.oauth-yandex {
  background: #fc3f1d;
}

.oauth-google .oauth-mark,
.connection-mark.oauth-google {
  background: #4285f4;
}

.oauth-vk .oauth-mark,
.connection-mark.oauth-vk {
  background: #0077ff;
  font-size: 10px;
}

.oauth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.oauth-divider::before,
.oauth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.oauth-divider + .auth-form {
  margin-top: 22px;
}

.auth-field .field-label {
  margin-bottom: 8px;
}

.auth-field .text-input {
  min-height: 48px;
  background: var(--surface);
}

.auth-submit {
  width: 100%;
  min-height: 47px;
  margin-top: 4px;
}

.auth-error {
  margin-top: 22px;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.account-page {
  padding-top: 50px;
  padding-bottom: 86px;
}

.account-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 31px;
  border-bottom: 1px solid var(--line);
}

.account-heading h1 {
  margin-bottom: 8px;
}

.account-heading .lead {
  margin-top: 0;
  font-size: 14px;
}

.account-connections {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}

.account-notifications {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.account-notifications h2 {
  margin: 2px 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.account-notifications p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.account-notification-info {
  min-width: 190px;
}

.account-notifications .account-notification-message {
  max-width: 360px;
  margin-top: 10px;
  color: var(--muted-strong);
}

.account-notifications .account-notification-message.success {
  color: var(--accent);
}

.account-notifications .account-notification-message.error {
  color: var(--danger);
}

.account-notification-controls {
  display: grid;
  width: min(100%, 620px);
  gap: 12px;
}

.notification-default-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.notification-default-toggle {
  min-width: 0;
  margin: 0;
}

.account-notification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.connection-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
}

.connection-mark {
  width: 21px;
  height: 21px;
  font-size: 9px;
}

.connection-mark.oauth-vk {
  font-size: 8px;
}

.account-tasks {
  padding-top: 44px;
}

.account-tasks .section-heading-row {
  align-items: center;
}

.account-tasks .section-heading-row h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.account-count {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.account-task-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.account-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.55fr) minmax(150px, 0.65fr) 24px;
  min-height: 76px;
  align-items: center;
  gap: 18px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.15s ease, background 0.15s ease;
}

.account-task-row:hover {
  padding-right: 12px;
  padding-left: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.account-task-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.account-task-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.account-task-main small,
.account-task-date {
  color: var(--muted);
  font-size: 11px;
}

.account-task-status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.account-task-status.status-done,
.account-task-status.status-done_with_warning {
  color: var(--accent);
}

.account-task-status.status-failed,
.account-task-status.status-cancelled {
  color: var(--danger);
}

.account-task-arrow {
  color: var(--accent);
  font-size: 18px;
}

.account-empty {
  display: flex;
  min-height: 260px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  margin-top: 20px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-empty h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
}

.account-empty p {
  max-width: 580px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .upload-panel {
    grid-template-columns: minmax(0, 1.25fr) minmax(275px, 0.75fr);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .result-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manage-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .header-inner,
  .page-container {
    width: min(100% - 30px, 1120px);
  }

  .header-inner {
    min-height: 60px;
  }

  .nav-link {
    padding-top: 19px;
    padding-bottom: 17px;
  }

  .home-page,
  .result-page {
    padding-top: 34px;
    padding-bottom: 60px;
  }

  .page-heading,
  .result-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  h1,
  .result-heading h1 {
    font-size: 39px;
  }

  .lead {
    margin-top: 14px;
    font-size: 15px;
  }

  .limit-summary {
    justify-content: flex-start;
  }

  .upload-panel {
    display: block;
  }

  .source-tabs {
    width: min(100% - 36px, 340px);
    margin: 20px 18px 0;
  }

  .source-panel {
    margin-top: 16px;
    padding: 0 18px 20px;
  }

  .dropzone {
    min-height: 250px;
    padding: 26px;
  }

  .settings-section {
    padding: 22px 18px 24px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  }

  .upload-panel > .form-error,
  .upload-panel > .upload-progress,
  .upload-panel > .submit-button,
  .upload-panel > .privacy-note {
    margin-right: 18px;
    margin-left: 18px;
  }

  .task-list-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .task-list-date {
    display: none;
  }

  .audio-panel {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .transcript-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .segment-row {
    grid-template-columns: 65px minmax(0, 1fr);
  }

  .segment-text {
    grid-column: 1 / -1;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions > * {
    flex: 1;
  }

  .footer-inner {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
  }

  .auth-page {
    padding-top: 38px;
  }

  .account-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-notifications {
    flex-direction: column;
  }

  .account-notification-controls {
    width: 100%;
  }

  .account-task-row {
    grid-template-columns: minmax(0, 1fr) minmax(130px, auto) 22px;
  }

  .account-task-date {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand > span:last-child {
    display: none;
  }

  .main-nav {
    gap: 14px;
  }

  .nav-link {
    font-size: 12px;
  }

  .home-link {
    display: none;
  }

  .header-cta {
    min-height: 34px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 11px;
  }

  .page-container {
    width: calc(100% - 22px);
  }

  h1,
  .result-heading h1 {
    font-size: 35px;
    white-space: normal;
  }

  .limit-summary {
    row-gap: 7px;
  }

  .limit-summary span {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .dropzone {
    min-height: 235px;
    align-items: center;
    padding: 22px 17px;
    text-align: center;
  }

  .dropzone strong {
    font-size: 23px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    grid-template-columns: 1fr 1fr;
  }

  .recent-section {
    padding-top: 50px;
  }

  .recent-section .section-heading-row h2 {
    font-size: 28px;
  }

  .metadata-row {
    row-gap: 7px;
  }

  .metadata-row span {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .stage-row {
    font-size: 9px;
  }

  .processing-panel,
  .audio-panel,
  .sidebar-section {
    padding: 15px;
  }

  .transcript-toolbar,
  .edit-hint {
    padding-right: 15px;
    padding-left: 15px;
  }

  .segment-row {
    padding: 12px;
  }

  .result-sidebar {
    grid-template-columns: 1fr;
  }

  .manage-section {
    grid-column: auto;
  }

  .not-found-panel {
    margin-top: 34px;
    padding: 30px 18px;
  }

  .not-found-panel h1 {
    font-size: 34px;
  }

  .auth-page {
    display: block;
    padding-top: 28px;
  }

  .auth-panel {
    padding: 30px 10px;
    background: transparent;
  }

  .auth-panel h1 {
    font-size: 32px;
  }

  .account-page {
    padding-top: 34px;
  }

  .account-heading h1 {
    font-size: 36px;
  }

  .account-heading .primary-button {
    width: 100%;
  }

  .notification-default-form {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .notification-default-form .secondary-button,
  .account-notification-actions form,
  .account-notification-actions .secondary-button {
    width: 100%;
  }

  .account-notification-actions {
    flex-direction: column;
  }

  .edit-hint {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-tasks {
    padding-top: 34px;
  }

  .account-task-row {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 10px;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .account-task-status {
    grid-column: 1;
  }

  .account-task-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Keep the library row layout after legacy account breakpoints. */
.account-task-list {
  margin-top: 0;
}

.account-task-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 88px;
  gap: 12px;
  padding: 13px 6px;
}

.account-task-row:hover {
  padding-right: 6px;
  padding-left: 6px;
}

@media (max-width: 940px) {
  .account-task-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .account-task-status {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .account-task-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 560px) {
  .account-task-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 6px;
  }

  .account-task-status {
    grid-column: 1;
    grid-row: auto;
  }

  .account-task-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}
