/**
 ******************************************************************************
 * Fonts
 ******************************************************************************
 */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-400.ttf") format("truetype");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-700.ttf") format("truetype");
}

/**
 ******************************************************************************
 * Global Theme
 ******************************************************************************
 */

:root,
.theme--light {
  color-scheme: light;
  --page-background: #fcfaf6;
  --page-surface: #fffdfa;
  --page-rail: #f5f1e9;
  --page-header: #f3eee5;
  --page-stripe: #faf7f2;
  --page-foreground: #352c24;
  --muted-foreground: #796c5d;
  --line-color: #e5ddd1;
  --selected-background: #eae3d8;
  --selected-foreground: #352c24;
  --accent-background: #f0eae0;
  --accent-foreground: #48311c;
  --menu-background: #fffdfa;
  --menu-border: #e5ddd1;
  --menu-selected: #eae3d8;
  --focus-ring: #796c5d;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --content-width: 1500px;
  --gutter: clamp(20px, 3vw, 40px);
}

.theme--dark {
  color-scheme: dark;
  --page-background: #110f0d;
  --page-surface: #1b1714;
  --page-rail: #181512;
  --page-header: #211c17;
  --page-stripe: #1e1a16;
  --page-foreground: #e8dfd1;
  --muted-foreground: #b3a594;
  --line-color: #342d26;
  --selected-background: #302820;
  --selected-foreground: #e8dfd1;
  --accent-background: #2b241e;
  --accent-foreground: #fff0d0;
  --menu-background: #1b1714;
  --menu-border: #342d26;
  --menu-selected: #302820;
  --focus-ring: #b3a594;
}

/**
 ******************************************************************************
 * Document Foundation & Reset
 ******************************************************************************
 */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-block-size: 100%;
}

body {
  background: var(--page-background);
  color: var(--page-foreground);
  font-family: "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  letter-spacing: -1px;
  line-height: 1.15;
}

h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

::selection {
  background: var(--selected-background);
  color: var(--selected-foreground);
}

.icon {
  flex: none;
  inline-size: 21px;
  block-size: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/**
 ******************************************************************************
 * Controls
 ******************************************************************************
 */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-block-size: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--selected-background);
  color: var(--selected-foreground);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-quick);

  &:hover {
    opacity: 0.9;
    transform: translateY(-2px);
  }

  &:active {
    transform: translateY(0);
  }

  &--secondary {
    background: var(--page-surface);
    color: var(--page-foreground);
  }
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  transition:
    background var(--duration-quick),
    transform var(--duration-fast) var(--ease-out);

  &:hover {
    background: var(--page-header);
    transform: translateY(-2px);
  }

  &:active {
    transform: translateY(0);
  }
}

.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid var(--line-color);
  border-radius: 50%;
  background: var(--page-header);
  font-weight: 700;
}

/**
 ******************************************************************************
 * Forms
 ******************************************************************************
 */

.field {
  display: grid;
  gap: 8px;
  margin-block-end: 18px;
}

.field label {
  font-size: 16px;
  font-weight: 700;
}

.field input,
.field textarea {
  inline-size: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-color);
  border-radius: 5px;
  background: var(--page-background);
  color: var(--page-foreground);
  resize: vertical;
}

/**
 ******************************************************************************
 * Application Shell
 ******************************************************************************
 */

.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-block-size: 100vh;
}

.sidebar {
  position: sticky;
  inset-block-start: 0;
  display: flex;
  flex-direction: column;
  block-size: 100vh;
  padding: 20px 14px 18px;
  overflow-y: auto;
  background: var(--page-rail);
  border-inline-end: 1px solid var(--line-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
}

.brand__image {
  flex: none;
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.brand__name {
  font-size: 30px;
  letter-spacing: -1.5px;
}

.sidebar__brand {
  margin: 0 10px 28px;
}

.sidebar__nav {
  display: grid;
  gap: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-block-size: 44px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 16px;
  text-decoration: none;
  transition:
    background var(--duration-quick),
    transform var(--duration-fast) var(--ease-out);

  &:hover {
    background: var(--page-header);
    transform: translateX(2px);
  }

  &[aria-current="page"] {
    background: var(--selected-background);
    color: var(--selected-foreground);
    font-weight: 700;
  }
}

.sidebar__account {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  padding: 14px 6px;
  border: 0;
  border-block-start: 1px solid var(--line-color);
  border-radius: 0 0 6px 6px;
  background: transparent;
  font-size: 15px;
  text-align: start;
  transition: background var(--duration-quick);

  &:hover {
    background: var(--page-header);
  }
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-inline-size: 0;
}

.shell {
  inline-size: 100%;
  max-inline-size: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.topbar {
  border-block-end: 1px solid var(--line-color);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  block-size: 64px;
}

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: 13px;
  min-inline-size: 0;
  color: var(--muted-foreground);
  font-size: 15px;
  white-space: nowrap;
}

.topbar__crumb strong {
  overflow: hidden;
  color: var(--page-foreground);
  font-weight: 400;
  text-overflow: ellipsis;
}

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

.main {
  padding-block: 26px 40px;
}

.footer {
  padding-block-end: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
}

/**
 ******************************************************************************
 * Theme Selector
 ******************************************************************************
 */

.theme-selector {
  position: relative;
}

.theme-selector__trigger {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--page-foreground);
  transition:
    background var(--duration-quick),
    transform var(--duration-fast) var(--ease-out);

  &:hover {
    background: var(--page-header);
    transform: translateY(-2px);
  }

  &:active {
    transform: translateY(0);
  }
}

.theme-selector__icon {
  inline-size: 21px;
  block-size: 21px;
}

.theme-selector__icon--sun {
  display: none;
}

.theme--dark .theme-selector__icon--moon {
  display: none;
}

.theme--dark .theme-selector__icon--sun {
  display: block;
}

.theme-selector__menu {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(100% + 0.5rem);
  inset-inline-end: 0;
  display: grid;
  gap: 0.25rem;
  min-inline-size: 8rem;
  padding: 0.375rem;
  border: 1px solid var(--menu-border);
  border-radius: 0.5rem;
  background: var(--menu-background);
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 20%);

  &[hidden] {
    display: none;
  }
}

.theme-selector__option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  inline-size: 100%;
  padding: 0.5rem 0.625rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: start;

  &:hover,
  &[aria-checked="true"] {
    background: var(--menu-selected);
  }
}

/**
 ******************************************************************************
 * Collections
 ******************************************************************************
 */

.collection__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 18px;
}

.collection__description {
  margin-block-start: 4px;
  color: var(--muted-foreground);
  font-size: 16px;
}

.collection__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 14px;
}

.collection--shared {
  margin-block-start: 28px;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--line-color);
}

.empty {
  padding-block: 28px;
  color: var(--muted-foreground);
}

/**
 ******************************************************************************
 * List Cards
 ******************************************************************************
 */

.list-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-block-size: 160px;
  padding: 16px 18px 12px;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--page-surface);
  transition: transform var(--duration-fast) var(--ease-out);

  &:hover {
    transform: translateY(-2px);
  }
}

.list-card__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.18;
  text-decoration: none;

  &::after {
    position: absolute;
    inset: 0;
    content: "";
  }
}

.list-card__description {
  margin-block: 6px 14px;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1.5;
}

.list-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 8px;
  border-block-start: 1px solid var(--line-color);
  color: var(--muted-foreground);
  font-size: 14px;

  & .icon-button {
    position: relative;
    z-index: 1;
    block-size: 32px;
    min-inline-size: 32px;
  }
}

.list-card__owner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 10px;
  color: var(--muted-foreground);
  font-size: 14px;

  & .avatar {
    inline-size: 28px;
    block-size: 28px;
    font-size: 13px;
  }
}

/**
 ******************************************************************************
 * List Detail
 ******************************************************************************
 */

.detail {
  overflow: hidden;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  background: var(--page-surface);
}

.detail__header {
  position: relative;
  padding: 20px 24px;
  border-block-end: 1px solid var(--line-color);
  background: var(--page-header);
}

.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 14px;
  color: var(--muted-foreground);
  font-size: 15px;
  text-decoration: none;

  & .icon {
    inline-size: 16px;
    block-size: 16px;
    transform: rotate(180deg);
  }

  &:hover {
    color: var(--page-foreground);
  }
}

.detail__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.detail h1 {
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -1px;
}

.detail__description {
  max-inline-size: 700px;
  margin-block-start: 6px;
  font-size: 17px;
}

.detail__mode {
  margin-block-start: 8px;
  color: var(--muted-foreground);
  font-size: 15px;
}

.detail__owner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 12px;
  font-size: 15px;

  & .avatar {
    background: var(--page-surface);
  }
}

.detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 16px;
}

.detail__people {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 24px;
  border-block-end: 1px solid var(--line-color);
  color: var(--muted-foreground);
  font-size: 15px;

  & strong {
    color: var(--page-foreground);
    font-weight: 400;
  }
}

.detail__person {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  & .avatar {
    inline-size: 28px;
    block-size: 28px;
    font-size: 13px;
  }
}

.detail__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-block-end: 1px solid var(--line-color);
  color: var(--muted-foreground);
  font-size: 15px;
}

.detail__progress-track {
  flex: 1;
  max-inline-size: 200px;
  block-size: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-color);
}

.detail__progress-fill {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: var(--muted-foreground);
  transition: inline-size var(--duration-fast) var(--ease-out);
}

/**
 ******************************************************************************
 * List Items
 ******************************************************************************
 */

.items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: start;
  padding: 16px 24px;
  border-block-end: 1px solid var(--line-color);

  &:last-child {
    border-block-end: 0;
  }

  &:nth-child(even) {
    background: var(--page-stripe);
  }

  &--empty {
    grid-template-columns: minmax(0, 1fr);
  }
}

.item__number {
  padding-block-start: 3px;
  color: var(--muted-foreground);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.item__name {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: start;
}

a.item__name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.item__description {
  max-inline-size: 650px;
  margin-block-start: 6px;
  color: var(--muted-foreground);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.item__link {
  display: inline-block;
  margin-block-start: 5px;
  color: var(--muted-foreground);
  font-size: 15px;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
  transition: color var(--duration-quick);

  &:hover {
    color: var(--page-foreground);
  }
}

.item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item__purchase {
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--accent-background);
  place-items: center;
  transition: transform var(--duration-fast) var(--ease-out);

  &:hover {
    transform: scale(1.06);
  }
}

.item__status {
  display: flex;
  align-items: center;
  gap: 6px;
  inline-size: fit-content;
  margin-block-start: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--page-header);
  font-size: 14px;
  font-weight: 700;
}

.item--other .item__name,
.item--other .item__description,
.item--other .item__link {
  color: var(--muted-foreground);
}

.item--mine .item__number {
  color: var(--page-foreground);
}

/**
 ******************************************************************************
 * Dialogs and Toasts
 ******************************************************************************
 */

.dialog {
  inline-size: min(510px, calc(100% - 32px));
  max-block-size: 90dvh;
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  background: var(--page-surface);
  color: var(--page-foreground);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity var(--duration-quick) var(--ease-out),
    transform var(--duration-quick) var(--ease-out),
    display var(--duration-quick) allow-discrete,
    overlay var(--duration-quick) allow-discrete;

  &[open] {
    opacity: 1;
    transform: scale(1);
    transition-duration: var(--duration-fast);
  }

  &::backdrop {
    background: rgb(33 20 9 / 0.6);
    opacity: 0;
    transition:
      opacity var(--duration-quick),
      display var(--duration-quick) allow-discrete,
      overlay var(--duration-quick) allow-discrete;
  }

  &[open]::backdrop {
    opacity: 1;
  }
}

@starting-style {
  .dialog[open] {
    opacity: 0;
    transform: scale(0.96);
  }

  .dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 16px;
}

.dialog__copy {
  margin-block-end: 20px;
  color: var(--muted-foreground);
}

.dialog__error {
  margin-block-end: 1rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--accent-background);
  color: var(--accent-foreground);
  font-size: 15px;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-block-start: 16px;
}

.toast {
  position: fixed;
  z-index: 20;
  inset-block-end: 26px;
  inset-inline-start: 50%;
  max-inline-size: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--page-foreground);
  color: var(--page-background);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity var(--duration-quick),
    transform var(--duration-fast) var(--ease-out);

  &--visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/**
 ******************************************************************************
 * Account Menu
 ******************************************************************************
 */

.account {
  position: relative;
  margin-block-start: auto;
}

.account__menu {
  position: absolute;
  z-index: 15;
  inset-block-end: calc(100% + 8px);
  inset-inline-start: 0;
  inline-size: 100%;
  min-inline-size: 200px;
  padding: 12px;
  border: 1px solid var(--menu-border);
  border-radius: 8px;
  background: var(--menu-background);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.16);
}

.account__name {
  font-weight: 700;
}

.account__email {
  margin-block-end: 10px;
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 14px;
}

.account__action {
  inline-size: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--page-surface);
  font-weight: 700;
  text-align: start;

  &:hover {
    background: var(--page-header);
  }
}

/**
 ******************************************************************************
 * Page Forms and Errors
 ******************************************************************************
 */

.form-page {
  display: grid;
  padding-block: clamp(1.5rem, 5vh, 4rem);
  place-items: start center;
}

.form-page .dialog__form {
  inline-size: 100%;
  max-inline-size: 34rem;
  padding: 24px;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  background: var(--page-surface);
}

.field--choice {
  padding: 0;
  border: 0;
}

.field--choice legend {
  margin-block-end: 8px;
  font-size: 16px;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  background: var(--page-rail);
}

.segmented__option {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: 42px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted-foreground);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition:
    background var(--duration-quick) var(--ease-out),
    color var(--duration-quick) var(--ease-out),
    border-color var(--duration-quick) var(--ease-out);

  & input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
  }

  &:hover {
    color: var(--page-foreground);
  }

  &:has(input:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  &:has(input:checked) {
    border-color: var(--line-color);
    background: var(--page-surface);
    color: var(--page-foreground);
    box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
  }
}

.segmented__hint {
  color: var(--muted-foreground);
  font-size: 15px;
}

.segmented__hint > span {
  display: none;
}

.field--choice:has(input[value="secret"]:checked) .segmented__hint > [data-mode="secret"],
.field--choice:has(input[value="3rd_party"]:checked) .segmented__hint > [data-mode="3rd_party"] {
  display: inline;
}

.button--danger {
  border-color: var(--accent-foreground);
  background: var(--accent-foreground);
  color: var(--page-surface);
}

.error-page {
  display: grid;
  gap: 10px;
  padding-block: clamp(2rem, 8vh, 6rem);
  place-items: start center;
  text-align: center;
}

.error-page__status {
  color: var(--muted-foreground);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.error-page__message {
  max-inline-size: 34rem;
  color: var(--muted-foreground);
}

/**
 ******************************************************************************
 * Signed-out Page Layout
 ******************************************************************************
 */

.site-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

.site-layout__main {
  display: grid;
}

.site-header,
.site-footer {
  inline-size: 100%;
  padding-inline: var(--gutter);
}

.site-header {
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.site-header__inner,
.site-footer__inner {
  inline-size: 100%;
  max-inline-size: var(--content-width);
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__navigation {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.site-header__login {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 0.25em;

  &:hover {
    text-decoration: underline;
  }
}

.site-footer {
  padding-block: 1.25rem 1.5rem;
}

.site-footer__inner {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
}

/**
 ******************************************************************************
 * Login Page
 ******************************************************************************
 */

.login {
  display: grid;
  padding: clamp(3rem, 10vh, 8rem) var(--gutter);
  place-items: center;
}

.login__card {
  inline-size: 100%;
  max-inline-size: 26rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line-color);
  border-radius: 8px;
  background: var(--page-surface);
}

.login__heading {
  margin-block-end: 1.5rem;
}

.login__description {
  margin-block-start: 0.5rem;
  color: var(--muted-foreground);
}

.login__error {
  margin-block-end: 1rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--accent-background);
  color: var(--accent-foreground);
  font-size: 15px;
}

.login__notice {
  margin-block-end: 1rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--page-background);
  font-size: 15px;
}

.login__alt {
  margin-block-start: 1.25rem;
  font-size: 15px;
  text-align: center;

  & a {
    text-underline-offset: 0.25em;
  }
}

.login__form {
  display: grid;
}

.login__submit {
  inline-size: 100%;
  margin-block-start: 0.25rem;
}

/**
 ******************************************************************************
 * Landing Page
 ******************************************************************************
 */

.home-hero {
  display: grid;
  padding: clamp(3rem, 10vh, 8rem) var(--gutter);
  place-items: center;
}

.home-hero__content {
  max-inline-size: 42rem;
  text-align: center;
}

.home-hero__title {
  margin: 0;
  font-size: clamp(4.75rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.home-hero__description {
  max-inline-size: 36rem;
  margin: clamp(1.5rem, 4vw, 2rem) auto clamp(1.75rem, 4vw, 2.25rem);
  color: var(--muted-foreground);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  line-height: 1.4;
  text-wrap: balance;
}

/**
 ******************************************************************************
 * Utilities & Motion Preferences
 ******************************************************************************
 */

.skip-link {
  position: fixed;
  inset-block-start: -70px;
  inset-inline-start: 12px;
  z-index: 30;
  padding: 10px 14px;
  border: 1px solid var(--line-color);
  border-radius: 6px;
  background: var(--page-surface);
  text-decoration: none;
  transition: inset-block-start var(--duration-quick) var(--ease-out);

  &:focus {
    inset-block-start: 12px;
  }
}

@media (max-width: 760px) {
  :root,
  .theme--light,
  .theme--dark {
    --gutter: 16px;
  }

  .app {
    display: block;
    padding-block-end: 74px;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    inset-block-start: auto;
    inset-block-end: 0;
    inline-size: 100%;
    block-size: auto;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    border-block-start: 1px solid var(--line-color);
    border-inline-end: 0;
    background: var(--page-rail);
  }

  .sidebar__brand,
  .sidebar__account {
    display: none;
  }

  .sidebar__nav {
    display: flex;
    gap: 8px;
  }

  .sidebar__link {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    font-size: 14px;
    line-height: 1.2;

    &:hover {
      transform: none;
    }
  }

  .topbar__inner {
    block-size: 58px;
  }

  .main {
    padding-block: 20px 28px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .collection__heading {
    flex-direction: column;
    align-items: start;
    gap: 12px;
    margin-block-end: 16px;
  }

  .collection__grid {
    gap: 12px;
  }
}

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