@font-face {
  font-family: 'Geologica';
  font-weight: 300 600;
  font-display: swap;
  src: url('/static/fonts/geologica-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geologica';
  font-weight: 300 600;
  font-display: swap;
  src: url('/static/fonts/geologica-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --yellow: #eef44e;
  --yellow-soft: #f8fbc4;
  --ink: #121212;
  --ink-2: #4a4a44;
  --paper: #fefefe;
  --mist: #f4f4f4;
  --line: #dadada;
  --red: #b3261e;
  --olive: #5c600b;
  --display: 'Geologica', 'Arial', sans-serif;
  --body: 'Arial', 'Helvetica', sans-serif;
  --cut: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--mist);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

h1,
h2 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-xl {
  width: 40px;
  height: 40px;
  stroke-width: 1.25;
}

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-2);
}

[hidden] {
  display: none !important;
}

/* header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand a,
.brand img {
  display: block;
}

.brand-product {
  padding-left: 14px;
  border-left: 1px solid var(--ink);
  font: 500 18px/1 var(--display);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.who {
  color: var(--ink-2);
}

.langs {
  display: flex;
}

.lang {
  min-width: 36px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 500 13px/1 var(--display);
  cursor: pointer;
}

.lang:hover {
  color: var(--ink);
}

.lang[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

/* buttons */

.btn {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn-body {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 24px 11px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.2;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color 0.15s;
}

.btn-body .icon {
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-body .icon {
  transform: translateX(3px);
}

.btn-primary:hover .btn-body {
  background: #2e2e2a;
}

.btn-ghost .btn-body {
  background: var(--paper);
  color: var(--ink);
}

.pane-list .btn-ghost .btn-body,
.drop .btn-ghost .btn-body {
  background: var(--mist);
}

.btn-ghost:hover .btn-body {
  background: var(--yellow-soft);
}

.btn:disabled {
  cursor: default;
  opacity: 0.4;
}

.btn:disabled .icon {
  transform: none;
}

.ibtn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.ibtn:hover {
  background: var(--yellow);
}

.textlink {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* workbench */

.work {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  min-height: calc(100dvh - 64px);
}

.pane-drop {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px 32px 40px;
  background: var(--yellow);
  border-right: 1px solid var(--ink);
}

.link-head h1 {
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.shared-by {
  margin-top: 10px;
  color: var(--olive);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 28px 24px 26px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

.drop h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.drop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drop-note {
  color: var(--ink-2);
  font-size: 14px;
}

.facts {
  margin: 0;
}

.facts > div {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--ink);
}

.facts dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--olive);
  font-size: 14px;
}

.facts dt .icon {
  width: 18px;
  height: 18px;
}

.facts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
}

.facts strong {
  font: 500 19px/1.3 var(--display);
}

.facts ul {
  margin: 0;
  padding-left: 18px;
}

.staff-note {
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}

.pane-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 36px 40px 48px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.toolbar-title h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.summary {
  color: var(--ink-2);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 70ch;
  color: var(--ink-2);
  font-size: 14px;
}

/* tables */

.table-wrap {
  overflow-x: auto;
}

table.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.files th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-2);
  font: 500 13px/1.2 var(--display);
  text-align: left;
  white-space: nowrap;
}

.files td {
  height: 48px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.files tbody tr:hover {
  background: var(--mist);
}

.files tr.is-selected,
.files tr.is-selected:hover {
  background: var(--yellow-soft);
}

.files .num,
.c-size,
.c-added {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.files th.num,
.files td.num,
.c-size {
  text-align: right;
}

.c-check {
  width: 44px;
  padding-right: 0 !important;
}

.c-act {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.c-name {
  max-width: 0;
  width: 60%;
}

.links .c-name {
  width: auto;
  max-width: 320px;
}

input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

.file,
.dir-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: calc(var(--level, 0) * 24px);
}

.dir-toggle {
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: 500 15px/1.3 var(--display);
  text-align: left;
  cursor: pointer;
}

.file .icon,
.dir-toggle .icon {
  color: var(--ink-2);
}

.chev {
  width: 16px;
  height: 16px;
  margin-left: -4px;
  transition: transform 0.2s var(--ease);
}

.dir-toggle[aria-expanded='true'] .chev {
  transform: rotate(90deg);
}

.file {
  padding-left: calc(var(--level, 0) * 24px + 22px);
}

.name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-count {
  padding: 1px 7px;
  background: var(--mist);
  color: var(--ink-2);
  font: 400 12px/1.5 var(--body);
}

.by {
  font-size: 13px;
  color: var(--ink-2);
}

.by-staff {
  padding: 2px 8px;
  background: var(--ink);
  color: var(--paper);
}

.row-transfer td {
  border-bottom-color: var(--paper);
}

.row-transfer {
  background: linear-gradient(to right, var(--yellow) var(--p), var(--mist) var(--p));
}

.row-transfer.is-done {
  background: var(--yellow);
}

.row-transfer.is-error {
  background: #fbe9e7;
  color: var(--red);
}

.row-transfer .file {
  padding-left: 0;
}

.c-status {
  font-size: 14px;
}

.when {
  display: block;
  white-space: nowrap;
}

.when-left {
  font-size: 13px;
}

.progress {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.progress-bar {
  height: 6px;
  background: linear-gradient(to right, var(--ink) var(--p), var(--mist) var(--p));
  transition: background 0.25s;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 72px 24px;
  border: 1px solid var(--line);
  text-align: center;
}

.empty .icon {
  color: var(--ink-2);
}

/* drag flood */

.flood {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--yellow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), visibility 0.18s;
}

body.flooded .flood {
  opacity: 0.96;
  visibility: visible;
}

.flood-target {
  position: absolute;
  left: var(--px, 50%);
  top: var(--py, 50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 30px 22px 24px;
  background: var(--ink);
  color: var(--paper);
  font: 500 22px/1.2 var(--display);
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(0.92);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  transition: transform 0.3s var(--ease);
}

body.flooded .flood-target {
  transform: translate(-50%, -50%) scale(1);
}

/* forms (staff) */

.new-link {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.new-link h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-label {
  padding: 0;
  font: 500 15px/1.2 var(--display);
}

.field-hint {
  color: var(--olive);
  font-size: 14px;
}

.field input:not([type='checkbox']),
.field select,
.link-url {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px var(--body);
}

.field input:disabled {
  background: transparent;
  opacity: 0.5;
}

.field input:focus-visible,
.field select:focus-visible,
.link-url:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  cursor: pointer;
}

.check:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}

.new-link .btn {
  align-self: flex-start;
}

.created {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.created h2 {
  font-size: 32px;
  font-weight: 600;
}

.created-label {
  font: 500 18px/1.3 var(--display);
}

.link-url {
  font: 14px ui-monospace, 'SF Mono', Menlo, monospace;
}

.warn {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
}

.warn .icon {
  color: var(--yellow);
}

/* sign-in, fatal */

.signin,
.fatal {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 64px);
  padding: 24px;
}

.signin {
  background: var(--yellow);
}

.signin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: min(440px, 100%);
}

.signin-card h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.error {
  display: flex;
  gap: 10px;
  color: var(--red);
  font-weight: 600;
}

.fatal {
  align-content: center;
  gap: 18px;
  text-align: center;
}

.fatal h1 {
  max-width: 28ch;
  font-size: 26px;
  font-weight: 500;
}

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 22px 14px 16px;
  background: var(--ink);
  color: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s var(--ease), opacity 0.2s, visibility 0.3s;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.toast .icon {
  color: var(--yellow);
}

.toast[data-kind='error'] .icon {
  color: #ff8a80;
}

/* small screens */

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

  .pane-drop {
    padding: 28px 16px 32px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .pane-list {
    padding: 28px 16px 40px;
  }

  .c-added,
  .c-by {
    display: none;
  }

  .top {
    padding: 0 16px;
  }

  .who {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 92px;
    height: auto;
  }

  .top-right {
    gap: 10px;
  }

  .links th:nth-child(n + 4):not(.c-act),
  .links td:nth-child(n + 4):not(.c-act) {
    display: none;
  }
}

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

.transfers {
  display: grid;
  gap: 10px;
}

.on-coarse {
  display: none;
}

@media (pointer: coarse) {
  .on-fine {
    display: none;
  }

  .on-coarse {
    display: inline;
  }
}

@media (max-width: 900px) {
  .file,
  .dir-toggle {
    padding-left: calc(var(--level, 0) * 14px);
  }

  .file {
    padding-left: calc(var(--level, 0) * 14px + 18px);
  }

  .files .name {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .files td {
    padding: 8px;
  }
}
