/* ========================================
   Client Helpbook — colors and foundations
   ======================================== */

:root {
  color-scheme: light;

  --navy: #182b3a;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-light: #e7f4f1;
  --coral: #edaa96;
  --coral-light: #fff0e9;
  --background: #f8f9f7;
  --surface: #ffffff;
  --muted: #596975;
  --line: #dce5e1;
  --danger: #a12626;
  --danger-light: #fff2f1;

  --radius: 20px;
  --shadow: 0 8px 28px rgb(24 43 58 / 5%);
  --shadow-hover: 0 14px 32px rgb(24 43 58 / 9%);
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  max-width: 100%;
}

a {
  color: var(--teal-dark);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

button,
.button {
  touch-action: manipulation;
}

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

::selection {
  background: #cdeae3;
  color: var(--navy);
}

[hidden] {
  display: none !important;
}

/* ========================================
   Header and navigation
   ======================================== */

.skip-link {
  position: fixed;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  background: white;
  color: var(--navy);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.app-header {
  background: var(--navy);
  border-bottom: 3px solid var(--coral);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
  max-width: 1200px;
  margin: auto;
  padding: 20px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 14px;
  background: var(--teal);
  color: white;
  font-size: 15px;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-links a,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #edf3f5;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition);
}

.nav-links a:hover,
.nav-button:hover {
  background: rgb(255 255 255 / 9%);
  color: white;
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  background: rgb(255 255 255 / 12%);
  border-color: rgb(255 255 255 / 16%);
  color: white;
}

.nav-links form {
  margin: 0;
}

.user-name {
  max-width: 200px;
  margin-left: 8px;
  padding: 8px 12px 8px 18px;
  border-left: 1px solid rgb(255 255 255 / 24%);
  color: #e0e9ec;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.app-header :where(a, button):focus-visible {
  outline-color: var(--coral);
}

/* ========================================
   Page layout and typography
   ======================================== */

main {
  max-width: 1200px;
  margin: auto;
  padding: 48px 28px 28px;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 750;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}

p {
  margin-top: 0;
}

.muted,
.timestamp {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-heading,
.guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 30px;
}

.page-heading > div,
.guide-heading > div {
  min-width: 0;
}

.page-heading .muted {
  max-width: 640px;
  margin-bottom: 0;
}

.section-title {
  margin: 30px 0 18px;
  font-size: 19px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ========================================
   Buttons
   ======================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--teal);
  color: white;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.button:hover {
  background: var(--teal-dark);
  color: white;
  text-decoration: none;
  box-shadow: 0 5px 14px rgb(15 118 110 / 15%);
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  border-color: #b9cbc5;
  background: white;
  color: var(--navy);
}

.button.secondary:hover {
  border-color: var(--teal);
  background: var(--teal-light);
  box-shadow: none;
}

.button.danger {
  border-color: #edc8c3;
  background: var(--danger-light);
  color: var(--danger);
}

.button.danger:hover {
  background: #ffe4e0;
  box-shadow: none;
}

button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.actions form {
  margin: 0;
}

/* ========================================
   Dashboard cards
   ======================================== */

.stats,
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.stats {
  margin-bottom: 30px;
}

.stat,
.card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card {
  overflow-wrap: anywhere;
  box-shadow: var(--shadow);
}

.stat {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 3px solid #a9d7ca;
}

.stat:nth-child(even) {
  border-top-color: var(--coral);
}

.stat strong {
  display: block;
  font-size: 34px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.stat-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 27px;
}

.stat:nth-child(even) .stat-icon {
  background: var(--coral-light);
  color: #8a4735;
}

.book-card {
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.book-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.book-heading > div {
  min-width: 0;
}

.book-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.book-heading p {
  margin-bottom: 0;
  font-size: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 23px;
  font-weight: 700;
}

.book-card:nth-child(even) .avatar {
  background: var(--coral-light);
  color: #8a4735;
}

.book-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.book-actions > .muted {
  font-size: 14px;
}

.timestamp {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid #cce7df;
  border-radius: 8px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.empty {
  grid-column: 1 / -1;
  padding: 52px 28px;
  border-style: dashed;
  box-shadow: none;
  text-align: center;
}

.empty h2 {
  margin-top: 0;
}

.empty .muted {
  max-width: 440px;
  margin-right: auto;
  margin-left: auto;
}

.empty .button {
  margin-top: 8px;
}

/* ========================================
   Search and form inputs
   ======================================== */

.search {
  margin-bottom: 30px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f0;
}

.search label,
.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 650;
}

.search-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.search input {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.search input,
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.form-field textarea,
.form-field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #aebfb8;
  border-radius: 11px;
  background: white;
  color: var(--navy);
  font: inherit;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.search input:hover,
.form-field input:hover,
.form-field textarea:hover,
.form-field select:hover {
  border-color: #6e9388;
}

.search input:focus,
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--teal);
}

input::placeholder,
textarea::placeholder {
  color: #687872;
  opacity: 1;
}

.form-field {
  margin-bottom: 24px;
}

.form-field textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}

.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background: #eef2ef;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  vertical-align: middle;
}

.form-field input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #9cb8ad;
  border-radius: 12px;
  background: #f5faf7;
  color: var(--muted);
  font-size: 14px;
}

.form-field input::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 1px solid #bdd8cd;
  border-radius: 8px;
  background: white;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form-field input::file-selector-button:hover {
  background: var(--teal-light);
}

.help-text {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.help-text ul {
  margin: 8px 0;
  padding-left: 20px;
}

.form-field [aria-invalid="true"] {
  border-color: var(--danger);
}

.errorlist,
.form-warning {
  color: var(--danger);
  font-size: 14px;
}

.errorlist {
  margin: 8px 0;
  padding-left: 20px;
}

.form-warning {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #edc8c3;
  border-radius: 12px;
  background: var(--danger-light);
  font-weight: 600;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ========================================
   Guides and editor
   ======================================== */

.editor {
  max-width: 780px;
  margin: auto;
}

.editor > .muted {
  margin-bottom: 28px;
}

.guide {
  margin-bottom: 24px;
}

.guide-heading {
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.guide-heading h2 {
  margin: 0;
}

.guide-heading > a {
  font-size: 14px;
  font-weight: 650;
}

.instructions {
  max-width: 78ch;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.instructions p:last-child {
  margin-bottom: 0;
}

.instructions ol,
.instructions ul {
  padding-left: 24px;
}

.instructions li + li {
  margin-top: 8px;
}

.screenshot {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f2f5f3;
}

details {
  margin-top: 16px;
}

summary {
  padding: 8px 0;
  color: var(--teal-dark);
  font-weight: 650;
  cursor: pointer;
}

/* ========================================
   Messages
   ======================================== */

.notice {
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid #cce7df;
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 14px;
}

.notice.error,
.notice.danger {
  border-color: #edc8c3;
  border-left-color: var(--danger);
  background: var(--danger-light);
  color: var(--danger);
}

.notice.warning {
  border-color: #e9d2ae;
  border-left-color: #93601e;
  background: #fff6e8;
  color: #754a14;
}

.notice.info {
  border-color: #cddde5;
  border-left-color: #375d75;
  background: #eef5fa;
  color: #284b62;
}

.notice > :last-child {
  margin-bottom: 0;
}

/* ========================================
   Login and signup
   ======================================== */

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  max-width: 1020px;
  margin: 32px auto 64px;
}

.auth-intro {
  padding: 24px 0;
}

.auth-intro::before {
  display: block;
  width: 54px;
  height: 6px;
  margin-bottom: 30px;
  border-radius: 10px;
  background: var(--coral);
  content: "";
}

.auth-intro h1 {
  max-width: 440px;
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.auth-intro .muted {
  max-width: 420px;
  font-size: 18px;
  line-height: 1.8;
}

.auth-card {
  padding: 34px;
  border-top: 4px solid var(--teal);
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
}

.auth-card > .muted {
  margin-bottom: 26px;
  font-size: 14px;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

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

.auth-switch a {
  font-weight: 650;
}

/* ========================================
   Footer
   ======================================== */

.app-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.app-footer p {
  margin: 0;
}

.app-footer a {
  font-weight: 600;
}

/* ========================================
   Subtle motion
   ======================================== */

@keyframes enter-page {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .page-heading,
  .auth-layout {
    animation: enter-page 320ms ease-out both;
  }

  .stats {
    animation: enter-page 360ms ease-out both;
  }
}

@media (hover: hover) and (pointer: fine) {
  .book-card:hover {
    border-color: #adcfc2;
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .book-card:hover,
  .button:active {
    transform: none;
  }
}

/* ========================================
   Tablet and mobile
   ======================================== */

@media (max-width: 960px) {
  .nav {
    gap: 16px;
  }

  .nav-links {
    width: 100%;
  }

  .auth-layout {
    gap: 30px;
  }
}

@media (max-width: 760px) {
  main {
    padding: 30px 20px 24px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 540px;
    margin: 8px auto 36px;
  }

  .auth-intro {
    padding: 0;
  }

  .auth-intro::before {
    margin-bottom: 20px;
  }

  .auth-intro h1 {
    font-size: 38px;
  }

  .auth-intro .muted {
    font-size: 16px;
  }

  .auth-card {
    padding: 26px;
  }

  .page-heading {
    align-items: flex-start;
  }

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

@media (max-width: 540px) {
  .nav {
    padding: 16px;
  }

  .brand {
    font-size: 19px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a,
  .nav-button {
    padding: 10px;
    font-size: 13px;
  }

  .user-name {
    margin-left: 0;
    padding-left: 10px;
  }

  main {
    padding: 26px 16px 20px;
  }

  h1 {
    font-size: 32px;
  }

  .page-heading,
  .guide-heading {
    gap: 18px;
  }

  .page-heading > .actions {
    width: 100%;
  }

  .stats {
    gap: 12px;
  }

  .stat {
    align-items: flex-start;
    padding: 18px 14px;
  }

  .stat-icon {
    display: none;
  }

  .stat strong {
    font-size: 29px;
  }

  .stat div > span {
    font-size: 12px;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
  }

  .search {
    padding: 18px;
    border-radius: 16px;
  }

  .search input {
    flex-basis: 100%;
  }

  .book-heading {
    gap: 12px;
  }

  .book-heading h2 {
    font-size: 19px;
  }

  .book-actions .button {
    width: 100%;
  }

  .empty {
    padding: 36px 20px;
  }

  .auth-card {
    padding: 22px;
  }

  .form-actions > .button {
    flex: 1 1 auto;
  }

  .app-footer {
    flex-direction: column;
    margin-top: 36px;
  }
}

/* Workspace redesign */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.workspace-layout {
  background: #f6f7f9;
}

.workspace-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 30px 20px 22px;
  border-right: 1px solid #e3e7ec;
  background: white;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 40px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.sidebar-brand:hover {
  text-decoration: none;
}

.sidebar-brand .brand-mark {
  width: 44px;
  height: 44px;
  background: var(--navy);
  font-size: 22px;
}

.brand-caption {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}

.sidebar-label {
  margin: 0 12px 12px;
  color: #6b7685;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 6px;
  padding: 12px;
  border-radius: 10px;
  color: #536171;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-navigation a:hover {
  background: #f2f5f4;
  color: var(--navy);
}

.sidebar-navigation a[aria-current="page"] {
  background: #e7f3ee;
  color: #155d4c;
  box-shadow: inset 3px 0 #287e66;
}

.sidebar-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 20px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 36px;
}

.sidebar-tip {
  margin-bottom: 24px;
  padding: 17px;
  border: 1px solid #e7e9df;
  border-radius: 14px;
  background: #f8f8f0;
  font-size: 12px;
}

.sidebar-tip strong {
  font-size: 13px;
}

.sidebar-tip p {
  margin: 7px 0 0;
  color: #5f685f;
}

.sidebar-tip a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 650;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.account-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f5ded3;
  color: #794835;
  font-weight: 700;
}

.sidebar-account > div {
  min-width: 0;
}

.sidebar-account strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.sidebar-account div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-logout {
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.sidebar-logout:hover {
  color: var(--navy);
  text-decoration: underline;
}

.workspace-content {
  margin-left: 260px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 20px 36px;
  border-bottom: 1px solid #e3e7ec;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.topbar-label {
  color: var(--navy);
  font-weight: 650;
}

.workspace-content main {
  max-width: 1340px;
  padding: 34px 36px 24px;
}

.dashboard-welcome {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: center;
  gap: 38px;
  padding: 38px;
  border-radius: 22px;
  background: #1c3441;
}

.welcome-copy .eyebrow {
  color: #a6d9c8;
  font-size: 10px;
}

.welcome-copy h1 {
  max-width: 520px;
  margin-top: 12px;
  color: white;
  font-size: clamp(30px, 3.2vw, 43px);
  line-height: 1.15;
}

.welcome-copy > p:not(.eyebrow) {
  max-width: 440px;
  margin-bottom: 24px;
  color: #d0dce1;
  font-size: 14px;
}

.welcome-button {
  background: #d9eee4;
  color: #193f32;
}

.welcome-button:hover {
  background: #c5e5d6;
  color: #193f32;
}

.welcome-note {
  max-width: 320px;
  justify-self: end;
  padding: 25px;
  border: 1px solid #ead5c7;
  border-radius: 15px;
  background: #f5e8dc;
  color: #674f3d;
  transform: rotate(2deg);
  box-shadow: 8px 10px 0 rgb(0 0 0 / 10%);
}

.note-label {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.welcome-note h2 {
  margin: 16px 0 12px;
  color: #40372f;
  font-size: 24px;
}

.welcome-note p {
  font-size: 12px;
  line-height: 1.8;
}

.note-bottom {
  display: block;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #d9c3b1;
  font-size: 10px;
  font-weight: 650;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 24px;
  margin: 24px 0 38px;
  padding: 24px;
  border: 1px solid #e2e6ea;
  border-radius: 16px;
  background: white;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 13px;
}

.summary-marker {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #e7f3ee;
  color: #23664f;
  font-size: 23px;
}

.summary-marker.peach {
  background: #fcf0e5;
  color: #8c5635;
}

.summary-item strong {
  display: block;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.summary-item div > span,
.summary-description span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.summary-description {
  align-self: center;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.summary-description strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 22px;
}

.library-heading h2 {
  margin: 0 0 5px;
  font-size: 23px;
}

.library-heading p {
  margin: 0;
  font-size: 13px;
}

.library-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.library-search input {
  width: 260px;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #b8c5c0;
  border-radius: 10px;
  background: white;
  color: var(--navy);
  font-size: 13px;
}

.library-grid {
  gap: 20px;
}

.library-book {
  padding: 25px;
  border-color: #e0e6e4;
  border-radius: 17px;
  box-shadow: 0 3px 12px rgb(24 43 58 / 3%);
}

.library-book-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.library-book .avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 20px;
}

.book-company {
  max-width: 65%;
  padding: 5px 9px;
  border-radius: 6px;
  background: #f3f5f6;
  color: #596975;
  font-size: 10px;
}

.book-client {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.library-book h3 {
  margin: 0 0 14px;
  font-size: 21px;
}

.library-book-count {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}

.library-book .timestamp {
  margin: 0;
  font-size: 10px;
}

.library-book .timestamp time {
  display: block;
}

.book-open-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.book-open-link span {
  font-size: 20px;
}

.book-open-link:hover {
  text-decoration: underline;
}

.empty-symbol {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 29px;
}

/* Editor and image controls */

.editor-redesign {
  max-width: 820px;
}

.editor-form {
  padding: 32px;
}

.editor-form-intro {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.editor-form-intro h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.editor-form-intro p {
  margin: 0;
  font-size: 13px;
}

.optional-label {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.image-upload-panel {
  padding: 18px;
  border: 1px solid #d7e2dc;
  border-radius: 14px;
  background: #f8faf9;
}

.image-caption {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.editor-image-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 280px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: contain;
}

.upload-widget {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.upload-widget label {
  display: inline;
  margin-left: 5px;
  color: #8c3e31;
  font-size: 13px;
}

.new-image-preview {
  margin-top: 20px;
}

.upload-status:empty {
  display: none;
}

.upload-status {
  margin-bottom: 0;
}

.image-removal-pending {
  opacity: 0.4;
}

.has-errors input,
.has-errors textarea,
.has-errors select {
  border-color: var(--danger);
}

.field-errors {
  color: var(--danger);
}

.editor-save-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Smaller screens */

@media (min-width: 1500px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .workspace-sidebar {
    width: 220px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .workspace-content {
    margin-left: 220px;
  }

  .workspace-content main {
    padding: 28px 24px;
  }

  .dashboard-welcome {
    gap: 24px;
    padding: 28px;
  }

  .welcome-note {
    padding: 20px;
  }

  .dashboard-summary {
    grid-template-columns: 1fr 1fr;
  }

  .summary-description {
    display: none;
  }
}

@media (max-width: 900px) {
  .dashboard-welcome {
    grid-template-columns: 1fr;
  }

  .welcome-note {
    display: none;
  }

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

@media (max-width: 760px) {
  .workspace-sidebar {
    position: static;
    width: 100%;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    margin-bottom: 20px;
  }

  .sidebar-label,
  .sidebar-tip {
    display: none;
  }

  .sidebar-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-navigation a {
    min-height: 44px;
    margin: 0;
    padding: 9px 11px;
    font-size: 12px;
  }

  .sidebar-icon {
    display: none;
  }

  .sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .sidebar-account {
    padding: 0;
    border: 0;
  }

  .sidebar-account div > span {
    display: none;
  }

  .sidebar-bottom > p,
  .sidebar-bottom form {
    margin: 0;
  }

  .sidebar-logout {
    margin: 0;
  }

  .workspace-content {
    margin-left: 0;
  }

  .workspace-topbar {
    display: none;
  }

  .workspace-content main {
    padding: 24px 16px;
  }

  .dashboard-welcome {
    padding: 26px;
    border-radius: 17px;
  }

  .welcome-copy h1 {
    font-size: 32px;
  }

  .dashboard-summary {
    gap: 16px;
    padding: 18px;
  }

  .summary-marker {
    display: none;
  }

  .library-search {
    width: 100%;
  }

  .library-search input {
    flex: 1;
    min-width: 140px;
    width: auto;
  }

  .editor-form {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-welcome {
    animation: enter-page 300ms ease-out both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-navigation a {
    transition: none;
  }
}