:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #141413;
  --muted: #5d5b56;
  --line: #bdb9b0;
  --red: #dc292e;
  --pad: clamp(19px, 4.6vw, 78px);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
:where(h1, h2, p, figure) { margin: 0; }
:where(button, input, textarea, select) { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.shell { max-width: 1510px; margin-inline: auto; min-height: 100vh; }
.shell:focus { outline: none; }
.shell:has(.pk-editor) { max-width: none; }
.boot { padding: var(--pad); }
.brand { font-weight: 600; letter-spacing: -.04em; white-space: nowrap; }
.brand > span { font-weight: 400; letter-spacing: -.04em; }
.cat { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); display: block; }
.wave {
  display: block;
  width: min(100%, 230px);
  height: 10px;
  margin-top: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 5Q3 0 6 5T12 5T18 5T24 5' stroke='%23dc292e' stroke-width='2.3' fill='none'/%3E%3C/svg%3E") repeat-x left center;
}
.login { padding: 0 var(--pad) var(--pad); }
.login-wordmark { margin: clamp(24px, 4vw, 59px) 0 clamp(26px, 4vw, 65px); }
.login-wordmark h1 { font-size: min(14.1vw, 203px); line-height: .88; margin-left: -.035em; }
.login-wordmark .wave { width: 100%; height: 10px; margin-top: clamp(18px, 3vw, 38px); }
.login-grid { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(0, 1fr); gap: clamp(35px, 8vw, 145px); align-items: start; }
.meme { min-width: 0; }
.meme-image { aspect-ratio: 4 / 3; border: 1px solid var(--ink); background: white; }
.meme-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.meme-caption { border: 1px solid var(--ink); border-top: 0; padding: .45em .6em .55em; text-align: center; font-size: clamp(16px, 1.65vw, 26px); font-weight: 650; line-height: 1.12; overflow-wrap: anywhere; }
.meme-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.meme-controls button { min-height: 44px; padding: 4px 2px; background: none; border: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.meme-controls button:hover { color: var(--ink); }
.login-figure { position: relative; }
.login-figure::after {
  content: "";
  position: absolute;
  width: clamp(30px, 4vw, 64px);
  height: 1px;
  background: var(--ink);
  right: 0;
  top: 23%;
  transform: translate(100%, -50%);
}
.login-figure .meme-image { aspect-ratio: 2 / 1; }
.login-panel { max-width: 450px; padding-top: clamp(4px, 1vw, 13px); }
.login-panel h2 { margin-bottom: 24px; font-size: clamp(36px, 4vw, 64px); letter-spacing: -.065em; line-height: 1; }
.login-panel form, .file-form, .tool-card form { display: grid; gap: 15px; }
:where(.login-panel, .file-form, .tool-card) label, .catalog-search { display: block; font-size: 13px; font-weight: 700; }
:where(.login-panel, .file-form, .tool-card) :where(input, textarea), .catalog-search input {
  display: block;
  width: 100%;
  margin-top: 7px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 13px;
  min-height: 49px;
  font-size: 16px;
  font-weight: 400;
}
:where(.file-form, .tool-card) input[type=file] { padding: 9px; }
:where(.file-form, .tool-card) input[type=file]::file-selector-button { font: inherit; color: var(--ink); border: 1px solid var(--line); background: var(--paper); padding: 6px 9px; margin-right: 12px; cursor: pointer; }
.button {
  display: inline-flex;
  min-height: 49px;
  padding: 12px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.button:hover { background: #ebe8e1; }
.button--solid { color: var(--paper); background: var(--ink); }
.button--solid:hover { background: #35342f; }
.button > span { font-size: 18px; line-height: 1; }
.feedback { color: #a4141c; font-size: 14px; line-height: 1.4; }
.feedback:empty { display: none; }
.top { padding: 0 var(--pad); min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ink); }
.wordmark { padding: 8px 2px 8px 0; border: 0; background: transparent; color: var(--ink); font-size: clamp(27px, 3.8vw, 52px); line-height: .83; }
.top-right { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; column-gap: clamp(13px, 3vw, 42px); row-gap: 0; font-size: 13px; }
.identity span { color: var(--muted); margin-left: 4px; }
.text-button { min-height: 44px; padding: 4px 0; color: var(--ink); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: #a4141c; }
.tabs { padding-inline: var(--pad); display: flex; gap: clamp(16px, 4vw, 54px); border-bottom: 1px solid var(--line); min-height: 55px; }
.tabs button { position: relative; padding: 6px 0; border: 0; color: var(--muted); background: transparent; font-size: clamp(13px, 2.5vw, 16px); font-weight: 700; }
.tabs button[aria-current] { color: var(--ink); }
.tabs button[aria-current]::after { content: ""; position: absolute; height: 2px; inset: auto 0 0; background: var(--red); }
.workspace { padding: clamp(27px, 5vw, 73px) var(--pad) var(--pad); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(25px, 4vw, 53px); }
.section-head h1, .success h1 { font-size: clamp(42px, 8.3vw, 121px); line-height: .88; letter-spacing: -.08em; overflow-wrap: anywhere; }
.section-head > .button { flex-shrink: 0; }
.section-head .metadata { margin-bottom: 12px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(135px, 1fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.workspace-meme { position: relative; margin-top: clamp(19px, 5vw, 67px); }
.workspace-meme::before { content: ""; position: absolute; width: clamp(15px, 2.5vw, 38px); height: 1px; background: var(--ink); left: 0; top: 35%; transform: translateX(-100%); }
.workspace-meme .meme-image { aspect-ratio: 1; }
.catalog-search { max-width: 420px; margin-bottom: 17px; }
.catalog-list, .project-list { list-style: none; padding: 0; margin: 0; }
.catalog-item { display: grid; grid-template-columns: minmax(126px, 37%) minmax(0, 1fr); gap: clamp(14px, 2.4vw, 36px); border: 1px solid var(--ink); padding: clamp(12px, 2vw, 24px); }
.catalog-item + .catalog-item { margin-top: 12px; }
.cover { background: #e4e2dc; border: 1px solid var(--line); aspect-ratio: 3 / 2; align-self: start; display: grid; place-items: center; font-size: 15px; }
.cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.catalog-info { display: flex; flex-direction: column; align-items: start; padding-block: 5px; }
.catalog-info h2, .tool-card h2 { font-size: clamp(25px, 3vw, 49px); letter-spacing: -.064em; line-height: .99; overflow-wrap: anywhere; }
.catalog-info h2 { margin-block: 9px 17px; }
.catalog-info .actions { margin-top: auto; }
.catalog-info .feedback { margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: start; }
.muted, .metadata { color: var(--muted); }
.metadata { font-size: 13px; line-height: 1.43; }
.empty { border: 1px solid var(--line); padding: clamp(18px, 3vw, 35px); min-height: 100px; display: grid; align-content: center; gap: 10px; justify-items: start; }
.project-list { border-top: 1px solid var(--ink); }
.project-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: clamp(10px, 3vw, 28px); padding: 18px 3px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); text-align: left; }
.project-row:hover { background: #ebe8e1; }
.row-title { display: block; font-size: clamp(20px, 3vw, 38px); font-weight: 700; letter-spacing: -.04em; margin-bottom: 6px; overflow-wrap: anywhere; }
.row-state { color: var(--muted); font-size: 13px; }
.row-arrow { font-size: 21px; padding-right: 3px; }
.back { margin: -9px 0 17px; }
.file-form { max-width: 510px; }
.file-form .button { justify-self: start; }
.success { display: grid; grid-template-columns: 1.18fr 1fr; gap: clamp(26px, 6vw, 90px); align-items: start; }
.success h1 { font-size: clamp(45px, 7.5vw, 108px); }
.success p { margin-block: 25px 19px; font-size: clamp(18px, 2.9vw, 30px); max-width: 33ch; line-height: 1.14; letter-spacing: -.035em; }
.success figure { border: 1px solid var(--ink); align-self: center; }
.success .cat { object-fit: contain; filter: none; height: auto; }
.project-tools { display: grid; gap: 12px; }
.tool-card { border: 1px solid var(--ink); padding: clamp(15px, 2.5vw, 32px); display: grid; gap: 15px; justify-items: start; }
.tool-card form, .tool-card textarea, .tool-card label { width: 100%; }
.tool-card form .button { justify-self: start; }
.tool-card h2 { font-size: clamp(23px, 2.8vw, 37px); }
.tool-card textarea { font-size: 13px; line-height: 1.35; resize: vertical; }
.notice { font-size: 14px; border-left: 2px solid var(--red); padding-left: 10px; }
@media (max-width: 780px) {
  .login-grid { gap: clamp(24px, 5vw, 43px); }
  .login-figure .meme-image { aspect-ratio: 1.5; }
  .workspace-grid { gap: 24px; }
  .catalog-item { grid-template-columns: 1fr; }
  .catalog-info { padding-bottom: 0; }
  .cover { max-width: 410px; }
}
@media (max-width: 560px) {
  .login-grid { grid-template-columns: 1fr; gap: 24px; }
  .login-figure { grid-row: 2; }
  .login-figure::after { width: 1px; height: 12px; right: 10%; top: 0; transform: translateY(-100%); }
  .login-figure .meme-image { aspect-ratio: 1.8; }
  .login-wordmark h1 { font-size: clamp(36px, 14.2vw, 79px); }
  .login-panel h2 { margin-bottom: 15px; }
  .top { min-height: 63px; }
  .identity { font-size: 12px; text-align: right; }
  .identity span { display: none; }
  .section-head { align-items: start; flex-direction: column; }
  .workspace-grid, .success { grid-template-columns: minmax(0, 1fr); }
  .workspace-meme { width: 100%; max-width: 340px; margin: 0; }
  .workspace-meme::before { display: none; }
  .workspace-meme .meme-image { aspect-ratio: 3 / 2; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
