/*
Theme Name: Is Work Over?
Theme URI: https://isworkover.com/
Author: Is Work Over?
Description: Pixel IBM front for Is Work Over? Uses Core plugin REST when a release is active; otherwise the local catalogue.
Version: 0.5.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: isworkover
*/

:root {
  --bg: #161616;
  --surface: #0d0d0d;
  --fg: #f4f4f4;
  --muted: #8d8d8d;
  --border: #393939;
  --accent: #0043ce;
  --amber: #ffb000;
  --up: #24a148;
  --fall: #fa4d56;
  --hold: #42be65;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}

button,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.grid-bg {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: repeating-linear-gradient(
    to bottom,
    rgb(0 0 0 / 0) 0 2px,
    rgb(0 0 0 / 0.12) 3px 4px
  );
  mix-blend-mode: multiply;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--fg);
  background: var(--surface);
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

.brand:hover,
.brand:focus,
.brand:active,
.brand:visited {
  color: inherit;
  text-decoration: none;
}

.topbar a {
  text-decoration: none;
}

.brand:hover {
  color: var(--amber);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
}

.nav-btn {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  color: var(--fg);
}

.nav-btn:hover {
  color: var(--amber);
}

.nav-btn:hover::after,
.nav-btn.is-on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 1px;
  background: currentColor;
}

.nav-btn.is-on {
  background: transparent;
  color: var(--amber);
}

.lang {
  display: flex;
  border: 0;
  opacity: 0.4;
}

.lang:hover,
.lang:focus-within {
  opacity: 1;
}

.lang a,
.lang button,
.topbar .lang a {
  min-height: 22px;
  min-width: auto;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--muted);
  border: 0;
}

.lang a.is-on,
.lang button.is-on,
.topbar .lang a.is-on {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 -1px 0 var(--fg);
}

.lede {
  max-width: none;
  margin: 20px 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.wrap h1 {
  margin: 0;
  font-size: clamp(26px, 5vw, 38px);
  text-transform: uppercase;
  font-family: var(--mono);
  text-wrap: balance;
  max-width: 100%;
}

.wrap h2 {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 22px;
}

.why-row h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
}

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

a.pixel-btn {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wrap {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 48px);
  text-transform: uppercase;
  white-space: nowrap;
}

.blink {
  display: inline-block;
  width: 8px;
  height: 24px;
  margin-left: 4px;
  background: var(--amber);
  vertical-align: middle;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.lede {
  max-width: none;
  margin: 20px 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.pager a {
  color: var(--amber);
  text-decoration: none;
}

.iwo-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.iwo-foot-links,
.iwo-foot-lang {
  display: flex;
  gap: 16px;
}

.iwo-foot a {
  color: var(--muted);
  text-decoration: none;
  opacity: 0.55;
}

.iwo-foot a:hover,
.iwo-foot a.is-on {
  color: var(--fg);
  opacity: 1;
}

.formula {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.delta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.delta.up { color: var(--up); }
.delta.down { color: #da1e28; }
.delta.flat { color: var(--muted); }

.pct .delta {
  margin-left: 12px;
  font-size: 0.35em;
  vertical-align: super;
}

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

.pace-line {
  margin: 12px 0 0;
  font-size: 15px;
}

.pace-note {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.wrong-link {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrong-link a {
  color: var(--muted);
  text-decoration: none;
}

.wrong-link a:hover { color: var(--amber); }

.compare-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.compare-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.faq {
  margin-top: 40px;
  border-top: 2px solid var(--fg);
  padding-top: 24px;
}

.faq article {
  margin-top: 20px;
}

.faq h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
}

.legal h2 {
  margin: 32px 0 8px;
  font-size: 16px;
}

.legal a { color: var(--amber); }

.blog-body {
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.55;
}

.blog-body p { margin: 0 0 16px; }
.blog-body h2 { margin: 32px 0 12px; font-size: 20px; }
.blog-body ul { margin: 0 0 16px; padding-left: 1.2em; }
.blog-body li { margin: 0 0 8px; }
.blog-body a { color: var(--amber); }

.legal code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
}

.box {
  margin-top: 32px;
  border: 2px solid var(--fg);
  background: var(--surface);
  padding: 16px;
  box-shadow: 4px 4px 0 0 var(--accent);
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 112px;
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 12px;
  font-family: var(--mono);
  font-size: 14px;
  resize: vertical;
}

textarea:focus {
  outline: 0;
  border-color: var(--amber);
}

.pixel-btn,
.pixel-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.pixel-btn {
  background: var(--surface);
  box-shadow: 4px 4px 0 0 var(--accent);
}

.pixel-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.pixel-fill {
  width: 100%;
  margin-top: 12px;
  background: var(--accent);
  color: var(--fg);
  box-shadow: 4px 4px 0 0 var(--amber);
}

.pixel-btn:active,
.pixel-fill:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 0 var(--accent);
}

.card {
  border: 2px solid var(--fg);
  background: var(--surface);
  padding: 32px 20px;
  text-align: center;
  box-shadow: 8px 8px 0 0 var(--accent);
}

.card .mark {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--amber);
}

.card h2 {
  margin: 16px 0 0;
  font-size: 30px;
  text-transform: uppercase;
}

.pct {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: clamp(64px, 16vw, 128px);
  font-weight: 600;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.bar {
  display: flex;
  width: 100%;
  max-width: 28rem;
  margin: 24px auto 0;
  gap: 4px;
  height: 32px;
}

.bar i {
  flex: 1;
  min-width: 0;
  background: var(--border);
}

.bar i.on {
  background: var(--amber);
}

.bar.sm {
  height: 8px;
  gap: 1px;
  margin: 4px 0 0;
}

.verdict {
  max-width: 24rem;
  margin: 32px auto 0;
  font-size: 18px;
}

.rankline {
  margin: 24px 0 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.link-rank {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border: 2px solid var(--fg);
}

.list li {
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  gap: 12px;
  width: 100%;
  align-items: center;
  padding: 12px;
  text-align: left;
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}

.rank-row:hover {
  transform: translate(4px, 0);
  background: rgb(255 255 255 / 0.04);
  box-shadow: inset 4px 0 0 0 var(--accent);
}

.n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.job-name {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
}

.score {
  font-family: var(--mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.score.fall { color: var(--fall); }
.score.hold { color: var(--hold); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.filters .pixel-btn,
.filters .pixel-fill {
  width: auto;
  margin: 0;
  min-width: 88px;
}

.why,
.method-block {
  margin-top: 16px;
  border: 2px solid var(--fg);
  background: var(--surface);
  padding: 20px;
  box-shadow: 4px 4px 0 0 var(--accent);
}

.why-row {
  margin-top: 24px;
}

.why-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.why-row h4 {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
}

.why-row .big {
  font-family: var(--mono);
  font-size: 30px;
  color: var(--amber);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.iwo-logo { display: block; flex: none; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--bg);
}
.overlay[hidden] { display: none !important; }
.overlay .icon-btn {
  background: var(--surface);
  color: var(--fg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.iwo-find {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 20px 0 0;
  align-items: stretch;
}

.iwo-find input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: var(--surface);
  border: 2px solid var(--fg);
  box-shadow: 4px 4px 0 0 var(--accent);
  padding: 12px 14px;
}

.iwo-find input[type="search"]::-webkit-search-decoration,
.iwo-find input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.iwo-find input[type="search"]:focus {
  outline: none;
  box-shadow: 4px 4px 0 0 var(--amber);
}

.iwo-find .pixel-fill {
  width: auto;
  min-width: 9rem;
  margin: 0;
}

.find-miss {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.share-sheet {
  width: min(22rem, 100%);
  border: 2px solid var(--fg);
  background: var(--surface);
  box-shadow: 4px 4px 0 0 var(--accent);
  padding: 20px;
  display: grid;
  gap: 10px;
}

.share-sheet .kicker { margin: 0 0 4px; }
.share-sheet .pixel-fill,
.share-sheet .pixel-btn {
  margin: 0;
  text-decoration: none;
  text-align: center;
}
.share-sheet .icon-btn {
  justify-self: end;
  width: 48px;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.overlay-actions .pixel-fill {
  flex: 1;
  margin: 0;
}

.icon-btn {
  width: 48px;
  min-width: 48px;
}

.link-rank a,
.rankline a {
  color: var(--amber);
  text-decoration: none;
}
.rankline a:hover { text-decoration: underline; }

.stat {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 600;
}

.split {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .split { grid-template-columns: 1fr 1fr; }
}

.ok { color: var(--hold); }
.no { color: var(--fall); }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.task-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}
.task-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 0 8px 8px 0;
}
.task-table td,
.task-table tfoot th {
  border-top: 1px solid var(--border);
  padding: 12px 8px 12px 0;
  vertical-align: top;
}
.task-table td:nth-child(2),
.task-table td:nth-child(3),
.task-table td:nth-child(4),
.task-table th:nth-child(2),
.task-table th:nth-child(3),
.task-table th:nth-child(4),
.task-table tfoot th:nth-child(2),
.task-table tfoot th:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}
.task-table details {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.task-table summary {
  cursor: pointer;
  color: var(--amber);
}
.task-table details p { margin: 6px 0 0; }
.task-table details a { color: var(--fg); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .blink, .rank-row, .pixel-btn, .pixel-fill { animation: none; transition: none; }
}
  .blink, .rank-row, .pixel-btn, .pixel-fill { animation: none; transition: none; }
}
