:root {
  --ink: #071a34;
  --paper: #fffaf0;
  --cream: #fff8eb;
  --muted: #5c6a7a;
  --line: #d7cbb6;
  --focus: #3f8efc;
  --danger: #b42318;
  --font: "Segoe UI", system-ui, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.45;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--paper);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--paper);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
  border-left: 1px solid var(--line);
}

::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 3px solid var(--paper);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #123056;
}

::-webkit-scrollbar-corner {
  background: var(--paper);
}

textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--paper);
}

img {
  max-width: 100%;
}

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

.cartoon-button-form {
  display: contents;
  margin: 0;
}

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

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

.cartoon-button,
.cartoon-button.cb--compact,
label.cartoon-button {
  --cb-width: 196px;
  --cb-height: 72px;
  --cb-icon-stage: 46px;
  --cb-icon-size: 42px;
  --cb-shadow-x: 5px;
  --cb-shadow-y: 5px;
  --cb-border: 2px;
  column-gap: 10px;
  padding: 8px 14px 8px 10px;
  font-size: 16px;
}

label.cartoon-button {
  margin: 0;
}

.cb--submit .cb__icon-wrap {
  width: 42px;
  height: 42px;
}

.cb--submit .cb__icon-wrap::after {
  top: -6px;
  right: -6px;
  width: 12px;
  height: 12px;
}

.page {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand__logo {
  display: block;
  height: 64px;
  width: auto;
  max-width: min(400px, 100%);
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  padding-bottom: 2px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    color: var(--ink);
  }
}

.site-nav a.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
}

.page-title,
.hero h1,
.job-detail h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-title {
  margin-bottom: 24px;
}

.lede,
.hint,
.meta,
.score,
.badge {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  margin: 0;
  font-weight: 600;
}

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

.badge a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.flash {
  margin: 0 0 20px;
  font-weight: 600;
}

.lede a {
  color: var(--ink);
}

.facts-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
}

.facts-list div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px;
  font-size: 14px;
}

.facts-list dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.facts-list dd {
  margin: 0;
}

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

.job-card,
.explore-card,
.job-detail__media,
.roast,
.photo-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.job-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.job-card__media,
.job-detail__media {
  display: block;
  overflow: hidden;
  background: #f3ead6;
  aspect-ratio: 16 / 10;
}

.job-card__media img,
.job-detail__media img,
.photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
}

.job-card__placeholder img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.job-card__placeholder--tall {
  min-height: 240px;
}

.job-card__body,
.job-detail__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
  padding: 16px 18px 18px;
}

.job-card__copy {
  min-width: 0;
}

.job-card__offence {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
}

.job-card__offence img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.job-card h2,
.explore-card h2,
.roast-block h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.job-card h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.job-card h2 a,
.explore-card {
  text-decoration: none;
}

.explore-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.explore-card img {
  width: 56px;
  height: 56px;
}

.explore-card h2,
.explore-card .meta {
  margin: 0;
}

.explore-card .meta {
  margin-top: 2px;
}

.blurb {
  margin: 10px 0 0;
}

.job-card .blurb {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.job-card .score {
  margin-top: 0;
}

.job-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 14px;
}

.upvote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.upvote.is-on {
  border-color: var(--ink);
  background: #fff4d6;
}

.upvote__arrow {
  font-size: 12px;
  line-height: 1;
}

.job-detail .js-upvote {
  margin: 0;
}

.job-detail {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

.job-detail__media {
  min-height: 240px;
}

.job-detail .job-card__actions {
  margin-top: 18px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
}

.empty .page-title {
  margin-bottom: 0;
  color: var(--ink);
}

.empty p {
  margin: 0;
}

.empty .cartoon-button {
  margin-top: 16px;
}

.wall-feed {
  display: grid;
  justify-items: center;
  min-height: 72px;
  margin: 12px 0 0;
}

.wall-feed__hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.job-card.is-appended {
  animation: wall-in 0.35s ease;
}

@keyframes wall-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .job-card.is-appended {
    animation: none;
  }
}

.form {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
}

.req {
  color: #c00;
  font-weight: 700;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 12px;
}

.char-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.char-count.is-max {
  color: var(--danger);
}

.field-label {
  font-size: 14px;
  font-weight: 600;
}

.photo-field.is-error .field-label {
  color: var(--danger);
}

.form > label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.form legend {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.form input[type="text"],
.form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.form textarea {
  resize: vertical;
  min-height: 96px;
}

.form input:focus-visible,
.form textarea:focus-visible,
.site-nav a:focus-visible,
.job-card__offence:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.photo-field {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.photo-field:has(#photo:focus-visible) .cartoon-button {
  outline: 4px solid var(--focus);
  outline-offset: 7px;
}

.photo-preview {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f3ead6;
}

.offence-picker {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.offence-option {
  display: block;
}

.offence-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.offence-option__card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.offence-option__card img {
  width: 36px;
  height: 36px;
}

.offence-option input:checked + .offence-option__card {
  border-color: var(--ink);
  background: #fff4d6;
}

.offence-option input:focus-visible + .offence-option__card {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.roast-block h2 {
  margin: 0 0 16px;
}

.roast-form {
  --roast-accent: #ed6e83;
  gap: 20px;
}

.roast-form > .roast-field {
  display: grid;
  gap: 8px;
  font-family: var(--cartoon-button-font);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.roast-form .char-count {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.roast-field--name {
  max-width: 320px;
}

.roast-form input[type="text"],
.roast-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--roast-accent);
  font-family: var(--cartoon-button-font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.roast-form textarea {
  resize: vertical;
  min-height: 120px;
  border-radius: 22px;
}

.roast-form input[type="text"]::placeholder,
.roast-form textarea::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.roast-form input[type="text"]:focus,
.roast-form input[type="text"]:focus-visible,
.roast-form textarea:focus,
.roast-form textarea:focus-visible {
  outline: none;
}

.roast-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.roast {
  padding: 14px 16px;
}

.roast p {
  margin: 0 0 6px;
}

.roast-block > .hint {
  margin-top: 16px;
}

.explore-fineprint {
  margin: 72px 0 0;
  font-size: 10px;
  line-height: 1.3;
  color: #c9bba6;
}

.explore-fineprint a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal {
  max-width: 38rem;
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.bottom-bar {
  display: none;
}

@media (max-width: 800px) {
  .job-grid,
  .explore-grid,
  .job-detail,
  .offence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    min-height: 100dvh;
  }

  .page {
    width: 100%;
    max-width: 960px;
    padding: 12px 16px calc(76px + env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    align-items: center;
    gap: 0;
    margin-top: 0;
    margin-bottom: 18px;
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
    padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--cream) 90%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .brand__logo {
    height: 44px;
    max-width: min(260px, 100%);
  }

  .site-nav {
    display: none;
  }

  .hero {
    margin-bottom: 18px;
  }

  .hero .cartoon-button-form,
  .empty .cartoon-button-form {
    display: none;
  }

  .bottom-bar {
    display: grid;
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--line);
    background: var(--paper);
  }

  .bottom-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 0;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
  }

  .bottom-bar__icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .bottom-bar__label {
    font-size: 11px;
    letter-spacing: 0;
    line-height: 1;
    padding-bottom: 3px;
  }

  .bottom-bar__item.is-active {
    color: var(--ink);
  }

  .bottom-bar__item.is-active .bottom-bar__label {
    box-shadow: inset 0 -2px 0 var(--ink);
  }

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

  .page-title,
  .hero h1,
  .job-detail h1 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .job-card h2,
  .explore-card h2,
  .blurb,
  .meta,
  .legal p {
    overflow-wrap: anywhere;
  }

  .cartoon-button,
  .cartoon-button.cb--compact,
  label.cartoon-button {
    --cb-width: 100%;
    --cb-shadow-x: 4px;
    --cb-shadow-y: 4px;
    width: calc(100% - 4px);
    max-width: calc(100% - 4px);
    touch-action: manipulation;
  }

  .cartoon-button:focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
  }

  .hero,
  .form,
  .empty,
  .roast-block {
    padding-bottom: 8px;
  }

  .job-card__media,
  .job-detail__media,
  .photo-preview {
    aspect-ratio: 4 / 3;
  }

  .job-card__body,
  .job-detail__body {
    --offence-col: 56px;
    --offence-gap: 12px;
    grid-template-columns: minmax(0, 1fr) var(--offence-col);
    gap: 10px var(--offence-gap);
    padding: 14px;
  }

  .job-card h2 {
    font-size: 18px;
  }

  .job-card__offence,
  .job-card__offence img {
    width: 56px;
    height: 56px;
  }

  .job-card__placeholder img {
    width: 72px;
    height: 72px;
  }

  .job-card__placeholder--tall {
    min-height: 200px;
  }

  .job-detail .facts-list {
    display: flex;
    width: auto;
    margin-right: calc(-1 * var(--offence-col) - var(--offence-gap));
    gap: 8px 16px;
  }

  .job-detail .facts-list div {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facts-list dd {
    overflow-wrap: anywhere;
  }

  .job-card__actions {
    gap: 10px 12px;
    margin-top: 12px;
  }

  .wall-feed {
    min-height: 64px;
    margin-top: 16px;
  }

  .upvote {
    min-height: 44px;
    padding: 0 14px;
    touch-action: manipulation;
  }

  .form input[type="text"],
  .form textarea,
  .roast-form input[type="text"],
  .roast-form textarea {
    font-size: 16px;
    min-height: 44px;
  }

  .form textarea,
  .roast-form textarea {
    min-height: 112px;
  }

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

  .offence-option__card {
    min-height: 48px;
    padding: 10px 8px;
    font-size: 13px;
  }

  .explore-card {
    grid-template-columns: 48px 1fr;
    min-height: 64px;
    padding: 12px;
  }

  .explore-card img {
    width: 48px;
    height: 48px;
  }

  .roast-form {
    --roast-accent: #ed6e83;
    gap: 16px;
  }

  .roast-form input[type="text"],
  .roast-form textarea {
    box-shadow: 4px 4px 0 var(--roast-accent);
  }

  .roast-field--name {
    max-width: none;
  }

  .empty {
    padding: 28px 4px;
  }

  .explore-fineprint {
    margin-top: 48px;
  }

  .legal {
    max-width: none;
  }

  .legal p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  a,
  button,
  label,
  input,
  textarea {
    touch-action: manipulation;
  }
}

