/* woeis.me — the front door. Sunny desk on the left, personal raincloud on the right. */
@property --split { syntax: "<percentage>"; inherits: true; initial-value: 50%; }

:root {
  --paper: #f6eedd;
  --ink: #2a2433;
  --ink-soft: #5d5466;
  --line: #e2d6bd;
  --card: #fffaf0;

  /* the desk (Woe Is ME) */
  --desk-bg: #f7f0df;
  --desk-glow: #f3d8cc;
  --orange: #f16d45;
  --orange-deep: #d55f3e;
  --star: #f77b50;
  --star-shadow: #df6544;
  --leaf: #8ca06d;
  --stem: #65815b;
  --petal: #f5bad0;
  --bud: #f7da77;

  /* the cloud (woe is me) */
  --cloud-bg: #e6e2f0;
  --violet: #6b4fa0;
  --rain: #5aa6e0;
  --pink: #f4b3c2;
  --cloud-fill: #fbf5e8;

  --shadow: 4px 4px 0 var(--ink);
  --f-sans: "DM Sans", system-ui, sans-serif;
  --f-serif: "Fraunces", Georgia, serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --f-mono: "Space Mono", "DM Mono", ui-monospace, monospace;
  --wrap: min(1120px, 100% - 32px);
  --split: 50%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d1820; --ink: #f1e9d8; --ink-soft: #b9afc4; --line: #3a3248; --card: #262033;
    --desk-bg: #261c17; --desk-glow: #3a2419; --cloud-bg: #1b1724; --violet: #a98be0;
    --orange: #ff8a63; --shadow: 4px 4px 0 #000; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1d1820; --ink: #f1e9d8; --ink-soft: #b9afc4; --line: #3a3248; --card: #262033;
  --desk-bg: #261c17; --desk-glow: #3a2419; --cloud-bg: #1b1724; --violet: #a98be0;
  --orange: #ff8a63; --shadow: 4px 4px 0 #000; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.6 var(--f-serif); font-variation-settings: "SOFT" 50;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.02; font-variation-settings: "SOFT" 100, "WONK" 1; }
a { color: inherit; }
em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
:focus-visible { outline: 3px dashed var(--violet); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { margin: 0 0 12px; font: 400 12px/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

/* Inline links take the colour of whichever me they lead to. */
a[href^="/me/"] { text-decoration-color: var(--orange); }
a[href^="/woe/"] { text-decoration-color: var(--rain); }
p a, td a { text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; transition: background .15s; }
p a[href^="/me/"]:hover, td a[href^="/me/"]:hover { background: color-mix(in srgb, var(--orange) 22%, transparent); }
p a[href^="/woe/"]:hover, td a[href^="/woe/"]:hover { background: color-mix(in srgb, var(--rain) 25%, transparent); }

/* ---------- top ---------- */
.top {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, (100% - 1120px) / 2);
  background: linear-gradient(90deg, var(--desk-bg) var(--split), var(--cloud-bg) var(--split));
  border-bottom: 2px solid var(--ink);
  transition: --split .6s cubic-bezier(.3,1.4,.5,1);
}
.mark { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 800 21px/1 var(--f-sans); letter-spacing: -.04em; }
.mark-sun {
  display: grid; place-items: center; width: 28px; height: 28px; margin-right: -10px; z-index: 1;
  border-radius: 50% 46% 50% 42%; background: var(--orange); color: #fff9ed;
  font: 600 19px/1 var(--f-serif); transform: rotate(-9deg);
}
.mark-cloud { width: 38px; height: 30px; }
.mark-cloud svg { width: 100%; height: 100%; }
.mark-dot { color: var(--rain); }
.conditions { margin: 0; font: 400 12px/1.3 var(--f-mono); letter-spacing: .04em; color: var(--ink-soft); text-align: right; }
.cond-sun { color: var(--orange-deep); }
.cond-rain { color: var(--rain); }
.cond-sep { margin: 0 6px; }
@media (max-width: 560px) { .conditions { font-size: 11px; } .cond-sep { display: none; } .conditions span { display: block; } }

/* ---------- the diptych ---------- */
.diptych {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 44px 0 40px;
  background:
    radial-gradient(circle at calc(var(--split) / 2) 62%, var(--desk-glow), transparent 32%),
    linear-gradient(90deg, var(--desk-bg) var(--split), var(--cloud-bg) var(--split));
  transition: --split .6s cubic-bezier(.3,1.4,.5,1);
}
/* dotted paper only on the cloud's side */
.diptych::before {
  content: ""; position: absolute; inset: 0 0 0 var(--split); z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
.seam {
  position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--split); width: 24px; height: 100%;
  transform: translateX(-50%); pointer-events: none; overflow: visible;
}
.seam path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 9 7; vector-effect: non-scaling-stroke; }
.rain-field {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: var(--split); right: 0; pointer-events: none;
  background-image: repeating-linear-gradient(105deg, transparent 0 46px, color-mix(in srgb, var(--rain) 30%, transparent) 46px 48px, transparent 48px 96px);
  background-size: 200px 200px;
  opacity: var(--rain-amt, .35);
  animation: drizzle 1.1s linear infinite;
  transition: opacity .5s;
}
@keyframes drizzle { to { background-position: -54px 200px; } }

.diptych .eyebrow { position: relative; z-index: 2; text-align: center; margin-bottom: 18px; padding: 0 16px; }

/* Title: "woe" sits in the sun, "is" sits in the rain, and each "me" is a door. */
.title { position: relative; z-index: 2; font-weight: 900; letter-spacing: -.045em; }
.title-woe, .title-fork { display: grid; grid-template-columns: var(--split) 1fr; align-items: baseline; }
.title-woe { font-size: clamp(44px, 9vw, 112px); line-height: .9; }
.title-woe > span { padding: 0 .12em; }
.w-desk { justify-self: end; font-family: var(--f-sans); font-weight: 800; letter-spacing: -.07em; }
.w-cloud { justify-self: start; font-family: var(--f-serif); }
.title-fork { position: relative; font-size: clamp(66px, 15vw, 190px); line-height: .9; }
.me {
  display: inline-block; padding: 0 .12em .06em; text-decoration: none; border-radius: .12em;
  transition: transform .35s cubic-bezier(.3,1.6,.5,1), filter .3s, opacity .3s;
}
.me-desk { justify-self: end; color: var(--orange); font-family: var(--f-serif); font-weight: 600; font-style: italic; letter-spacing: -.06em; }
.me-cloud { justify-self: start; color: var(--violet); font-style: italic; }
.me-period { position: relative; color: var(--rain); }
.period-cloud { position: absolute; width: .5em; left: -.02em; top: .02em; animation: hover 3.5s ease-in-out infinite; }
.period-cloud svg { width: 100%; height: auto; }
@keyframes hover { 50% { transform: translateY(-.07em); } }
.title-or {
  position: absolute; left: var(--split); top: 52%; z-index: 3; transform: translate(-50%, -50%) rotate(-8deg);
  padding: 2px 10px 4px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  font: 700 clamp(18px, 2.4vw, 28px)/1 var(--f-hand); letter-spacing: 0; color: var(--ink);
}
.me:hover, .me:focus-visible { transform: rotate(-3deg) scale(1.06); }
.diptych[data-active="desk"] .me-cloud, .diptych[data-active="cloud"] .me-desk { opacity: .45; filter: grayscale(.6); }

/* the two halves */
.halves { position: relative; z-index: 2; display: grid; grid-template-columns: var(--split) 1fr; margin-top: 4px; }
.half { position: relative; display: flex; flex-direction: column; padding: 0 clamp(16px, 4vw, 56px); }
.half-desk { align-items: flex-end; text-align: right; }
.half-cloud { align-items: flex-start; }
.scrawl {
  margin: 4px 0 0; font: 700 clamp(19px, 2.3vw, 26px)/1.05 var(--f-hand); color: var(--ink-soft);
}
.scrawl-desk { transform: rotate(-3deg); color: var(--orange-deep); }
.scrawl-cloud { transform: rotate(2.5deg); color: var(--violet); }
.scrawl b { font-size: 1.3em; }
.creature-link { display: block; margin: 6px 0 4px; border-radius: 24px; }
.half-copy { max-width: 400px; font-size: 16px; line-height: 1.6; }
.half-copy p { margin: 0 0 8px; }
.half-name { font: 400 12px/1.4 var(--f-mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.half-name b { color: var(--ink); }
.half-desk .half-copy { font-family: var(--f-sans); }

/* the star (from the little desk) */
.star { width: clamp(150px, 24vw, 270px); height: auto; overflow: visible; margin-right: -14%; transition: transform .45s cubic-bezier(.3,1.5,.5,1); }
.star-fill { fill: var(--star); stroke: var(--orange-deep); stroke-width: 2.5; }
.star-shadow { fill: var(--star-shadow); }
.star .pupil { fill: #332b25; transition: transform .12s; }
.star .cheek { fill: #d65248; opacity: .7; }
.star-mouth { fill: none; stroke: #332b25; stroke-width: 3; stroke-linecap: round; transition: d .3s; }
.stem { fill: none; stroke: var(--stem); stroke-width: 4; stroke-linecap: round; }
.leaf { fill: var(--leaf); }
.petal { fill: var(--petal); stroke: #c56688; stroke-width: 1.4; }
.bud { fill: var(--bud); }
.star-body { transform-origin: 120px 120px; animation: bob 4s ease-in-out infinite; }
.star-flower { transform-origin: 184px 150px; animation: offer 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes offer { 50% { transform: rotate(-7deg) translateX(4px); } }

/* the cloud (from the raincloud) */
.cloud { width: clamp(150px, 22vw, 250px); height: auto; overflow: visible; margin-left: -6%; transition: transform .45s cubic-bezier(.3,1.5,.5,1); animation: drift 5s ease-in-out infinite; }
.cloud .c-outline { fill: var(--ink); stroke: var(--ink); stroke-width: 9; }
.cloud .c-fill { fill: var(--cloud-fill); }
.cloud .c-cheeks { fill: var(--pink); opacity: .9; }
.cloud .pupil { fill: #2a2433; transition: transform .12s; }
.cloud .c-mouth { fill: none; stroke: #2a2433; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; transition: d .3s; }
.cloud .c-rain line { stroke: var(--rain); stroke-width: 4; stroke-linecap: round; opacity: 0; animation: rainline 1s linear infinite; animation-delay: calc(var(--i) * .17s); }
@keyframes rainline { 0% { opacity: 0; transform: translateY(-8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(22px); } }
@keyframes drift { 50% { transform: translate(6px, -4px); } }
.creature-link:hover .star, .creature-link:focus-visible .star { transform: rotate(-5deg) scale(1.05); }
.creature-link:hover .cloud, .creature-link:focus-visible .cloud { transform: rotate(4deg) scale(1.05); }

.truce {
  position: relative; z-index: 2; margin: 22px auto 0; padding: 0 16px; text-align: center;
  font: 700 clamp(20px, 2.4vw, 26px)/1.1 var(--f-hand); color: var(--ink-soft); transform: rotate(-1.5deg);
}

@media (max-width: 640px) {
  .diptych { padding-top: 30px; }
  .half { padding: 0 12px; }
  .half-copy { font-size: 14.5px; }
  .star { margin-right: -8%; }
  .cloud { margin-left: 0; }
}

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-block: 2px solid var(--ink); background: var(--ink); color: var(--paper); }
.ticker-track { display: flex; width: max-content; gap: 0; padding: 10px 0; font: 400 14px/1 var(--f-mono); white-space: nowrap; animation: tick 70s linear infinite; }
.ticker-track span { padding: 0 18px; }
.ticker-track .t-desk::before { content: "✳ "; color: var(--orange); }
.ticker-track .t-cloud::before { content: "☂ "; color: var(--rain); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { width: var(--wrap); margin: 0 auto; padding: 84px 0 0; }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head h2, .toss h2 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; letter-spacing: -.03em; }
.section-head h2 em { color: var(--violet); }
.sub { margin: 14px 0 0; color: var(--ink-soft); font-size: 18px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4em; padding: 14px 22px; border-radius: 999px; cursor: pointer;
  font: 700 15px/1 var(--f-mono); color: var(--paper); background: var(--ink); border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--orange); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--rain); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--orange); }

/* ---------- router ---------- */
.router { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; align-items: start; }
.router .section-head { grid-column: 1 / -1; margin-bottom: 0; }
.router-form, .verdict {
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); padding: 26px;
}
.field-label { display: block; margin: 0 0 8px; font: 700 14px/1.3 var(--f-mono); }
.field-label small { font-weight: 400; color: var(--ink-soft); }
.woe-input {
  width: 100%; margin-bottom: 24px; padding: 14px 16px; border: 2.5px solid var(--ink); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: 400 20px/1.3 var(--f-hand);
}
.woe-input::placeholder { color: var(--ink-soft); opacity: .7; }
.slider-wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.slider-end { font: 700 17px/1 var(--f-hand); color: var(--ink-soft); }
.slider-end:first-child { color: var(--orange-deep); }
.slider-end:last-child { color: var(--violet); }
.size { width: 100%; accent-color: var(--violet); appearance: none; height: 12px; border-radius: 999px; border: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--orange), #e8b84a, var(--violet)); cursor: pointer; }
.size::-webkit-slider-thumb { appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.size::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.verdict { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; }
.gauge { width: 100%; height: auto; }
.needle { transform-box: view-box; transform-origin: 100px 105px; transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.verdict-quote { margin: 0 0 6px; font: 700 22px/1.15 var(--f-hand); color: var(--ink-soft); }
.verdict-text { margin: 0 0 10px; font-size: 19px; line-height: 1.4; font-weight: 600; }
.verdict-go { margin: 0; font: 400 15px/1.6 var(--f-mono); }
.verdict-go a { font-weight: 700; }
.verdict.serious .verdict-text { font-weight: 400; }
@media (max-width: 860px) { .router { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .verdict { grid-template-columns: 1fr; }
  .gauge { max-width: 200px; margin: 0 auto; }
  .slider-wrap { grid-template-columns: 1fr 1fr; }
  .size { grid-column: 1 / -1; grid-row: 1; }
  .slider-end:last-child { text-align: right; }
}

/* ---------- ledger ---------- */
.compare {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
  font-size: 16px; line-height: 1.45;
}
.compare th, .compare td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1.5px dashed var(--line); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th { width: 18%; font: 400 12px/1.5 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-top: 17px; }
.compare thead th { border-bottom: 2.5px solid var(--ink); font-size: clamp(34px, 5vw, 54px); line-height: 1; font-style: italic; }
.compare thead a { text-decoration: none; }
.col-desk a { color: var(--orange); font-weight: 600; }
.col-cloud a { color: var(--violet); font-weight: 900; }
.compare td:nth-child(2), .col-desk { background: color-mix(in srgb, var(--orange) 7%, transparent); font-family: var(--f-sans); }
.compare td:nth-child(3), .col-cloud { background: color-mix(in srgb, var(--violet) 8%, transparent); }
.footnote { margin: 14px 4px 0; font: 700 21px/1.2 var(--f-hand); color: var(--ink-soft); }
@media (max-width: 640px) {
  .compare thead tr, .compare tbody tr { display: grid; grid-template-columns: 1fr 1fr; }
  .compare thead th:first-child { display: none; }
  .compare tbody th { grid-column: 1 / -1; width: auto; padding: 12px 14px 0; border-bottom: 0; background: transparent; }
  .compare td { padding: 6px 14px 14px; font-size: 14.5px; }
  .compare thead th { padding: 14px; }
}

/* ---------- coin ---------- */
.toss { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-bottom: 20px; }
.toss .btn { margin-top: 24px; }
.toss-result { min-height: 3.2em; margin: 18px 0 0; font-size: 20px; line-height: 1.5; }
.toss-result a { font-weight: 700; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.coin-stage { perspective: 900px; display: grid; place-items: center; min-height: 260px; }
.coin {
  position: relative; width: 220px; height: 220px; transform-style: preserve-3d;
  transition: transform 1.6s cubic-bezier(.2,.9,.3,1);
}
.coin-face {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px;
  border-radius: 50%; border: 3px solid var(--ink); backface-visibility: hidden;
  box-shadow: inset 0 0 0 10px color-mix(in srgb, #fff 25%, transparent), inset 0 0 0 13px var(--ink);
}
.coin-heads { background: var(--star); color: #fff9ed; }
.coin-heads span { font: italic 600 74px/1 var(--f-serif); letter-spacing: -.06em; }
.coin-tails { background: #cfc5e6; transform: rotateY(180deg); }
.coin-cloud { width: 130px; }
.coin-cloud svg { width: 100%; height: auto; }
.coin-face small { font: 700 12px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: #2a2433; }
@media (max-width: 720px) { .toss { grid-template-columns: 1fr; } .coin-stage { order: -1; min-height: 230px; } .coin { width: 190px; height: 190px; } }

/* ---------- footer ---------- */
.footer { width: var(--wrap); margin: 80px auto 0; padding: 36px 0 48px; border-top: 2px solid var(--ink); text-align: center; }
.footer-big { margin: 0 0 14px; font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.footer-big span { color: var(--ink-soft); font-style: italic; font-weight: 400; }
.footer-text { max-width: 640px; margin: 0 auto 10px; font-size: 17px; }
.fineprint { margin: 0; font: 400 12px/1.6 var(--f-mono); color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.ai-disclaimer { max-width: 680px; margin: 18px auto 0; padding-top: 16px; border-top: 1px dashed var(--line); font: 400 12.5px/1.65 var(--f-mono); color: var(--ink-soft); }
