@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400&display=swap");

:root {
  --bg: #f3f2ee;
  --ink: #111110;
  --muted: #6d6c67;
  --line: rgba(17, 17, 16, 0.12);
  --accent: #0a8597;
  --card: #ffffff;
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0c0d;
  --ink: #f1f0ec;
  --muted: #8f8e89;
  --line: rgba(241, 240, 236, 0.14);
  --accent: #3fd3e6;
  --card: #17191b;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.ai { color: var(--accent); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.top .me { font-weight: 500; font-size: 15px; }
.top .me.back { color: var(--muted); font-weight: 400; transition: color .2s; }
.top .me.back:hover { color: var(--ink); }
.top nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.top nav a { color: var(--muted); transition: color .2s; }
.top nav a:hover { color: var(--ink); }

.switch {
  position: relative; display: inline-flex; border: 1px solid var(--line); border-radius: 99px;
  padding: 3px; background: none; color: var(--ink); font: 500 13px var(--sans); cursor: pointer;
}
.switch span { position: relative; z-index: 1; padding: 5px 12px; border-radius: 99px; transition: color .3s; }
.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; height: calc(100% - 6px); width: calc(50% - 3px);
  border-radius: 99px; background: var(--ink); transition: transform .45s var(--ease);
}
.switch span:first-child { color: var(--bg); }
[data-theme="dark"] .switch::before { transform: translateX(100%); }
[data-theme="dark"] .switch span:first-child { color: var(--ink); }
[data-theme="dark"] .switch span:last-child { color: var(--bg); }

/* Theme transition: circle reveal from the switch */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal .9s var(--ease); }
@keyframes reveal {
  from { clip-path: circle(0 at var(--x, 90%) var(--y, 30px)); }
  to { clip-path: circle(150vmax at var(--x, 90%) var(--y, 30px)); }
}

/* Hero */
.hero { padding: clamp(60px, 14vh, 160px) var(--pad) clamp(48px, 10vh, 120px); }
.hero h1 {
  font-weight: 500; font-size: clamp(48px, 9.4vw, 156px); line-height: 0.95; letter-spacing: -0.045em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero h1 .line > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 em { letter-spacing: -0.02em; color: var(--accent); }
@keyframes rise { from { transform: translateY(105%); } }
.hero .sub {
  display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 32px; margin-top: clamp(40px, 7vh, 80px);
  color: var(--muted); font-size: 17px; animation: fade 1s .5s var(--ease) both;
}
.hero .sub p + p { margin-top: 2px; }
.hero .sub .who { color: var(--ink); }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }

/* Section label */
.label {
  display: flex; justify-content: space-between; padding: 0 var(--pad) 14px; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line); margin: 0 var(--pad); padding-left: 0; padding-right: 0;
}

/* Work index */
.index { list-style: none; padding: 0 var(--pad); }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: baseline; gap: 16px;
  padding: clamp(14px, 2.2vw, 26px) 0; transition: opacity .35s var(--ease);
}
.index .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.index .t {
  font-size: clamp(34px, 6.4vw, 104px); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  transition: transform .5s var(--ease);
}
.index .m { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tag { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 12px; color: var(--muted); }
.tag.ai { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.index:hover a { opacity: .28; }
.index:hover a:hover { opacity: 1; }
.index a:hover .t { transform: translateX(14px); }
.index a.soon { cursor: default; }

.peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: 240px; aspect-ratio: 3 / 4; pointer-events: none;
  border-radius: 14px; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.85);
  transition: opacity .3s var(--ease), transform .45s var(--ease); background: var(--card);
}
.peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Blocks */
.block { padding: clamp(80px, 14vh, 160px) var(--pad) 0; }
.block h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 28px; }
.block h2.display { font-size: clamp(40px, 6vw, 96px); font-weight: 500; color: var(--ink); letter-spacing: -0.045em; line-height: 1; margin-bottom: clamp(40px, 6vh, 72px); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.process > div { border-top: 1px solid var(--ink); padding-top: 22px; }
.process h3 { margin: 22px 0 12px; font-size: clamp(22px, 1.9vw, 28px); font-weight: 500; letter-spacing: -0.025em; }
.process p { color: var(--muted); font-size: 17px; line-height: 1.55; }
.process ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.process li { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 13px; color: var(--muted); }
.process li.ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.own { margin-top: 18px; font-size: 15px; color: var(--muted); }
.flow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; border-top: 1px solid var(--line); padding-top: 24px;
  font-size: clamp(16px, 1.6vw, 28px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; }
.flow i { font-style: normal; color: var(--muted); font-weight: 400; }
.flow i.loop { color: var(--accent); margin-left: 10px; }
.flow .last { white-space: nowrap; }
.block h2.split { display: flex; justify-content: space-between; gap: 16px; }
.toolline { margin-top: 28px; font-size: 15px; color: var(--muted); max-width: 900px; }
.flow span { transition: color .3s; white-space: nowrap; }
.flow span:hover { color: var(--accent); }
.toolrow { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; }
.toolrow li { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.toolrow li.ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.tools h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.tools li { list-style: none; font-size: 17px; line-height: 1.6; }
.path { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.path div { flex: 1 1 160px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.path b { display: block; font-weight: 500; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.03em; }
.path span { font-size: 13px; color: var(--muted); }
.about { border-top: 1px solid var(--line); padding-top: 20px; max-width: 1100px; }
.about p { font-size: clamp(24px, 2.8vw, 40px); letter-spacing: -0.03em; line-height: 1.2; }
.about p:nth-child(odd) { color: var(--ink); }
.about p:nth-child(even) { color: var(--muted); }
.brands { font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -0.02em; line-height: 1.4; color: var(--muted); max-width: 1200px; }
.brands span { color: var(--ink); }

/* Footer */
.foot { padding: clamp(100px, 18vh, 200px) var(--pad) 28px; }
.foot .big {
  display: inline-block; font-size: clamp(44px, 8vw, 128px); font-weight: 500; letter-spacing: -0.045em; line-height: 1;
  border-bottom: 2px solid transparent; transition: border-color .3s;
}
.foot .big:hover { border-color: var(--ink); }
button.big { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink); font-family: var(--sans); cursor: pointer; padding: 0; }

/* Contact modal */
.talk-form .hp { position: absolute; left: -9999px; }
.talk-modal { margin: auto; width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 24px;
  background: var(--card); color: var(--ink); padding: 0; box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); }
.talk-modal[open] { animation: pop .5s var(--ease); }
.talk-modal::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.talk-form, .talk-done { position: relative; padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.talk-modal h2 { font-size: 36px; font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.talk-modal p.muted { margin-top: -6px; font-size: 16px; }
.talk-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.talk-form input, .talk-form textarea { font: 16px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; resize: vertical; outline: none; transition: border-color .2s; }
.talk-form input:focus, .talk-form textarea:focus { border-color: var(--accent); }
.talk-form .err { min-height: 1em; margin: -4px 0 -4px; font-size: 14px; color: #e5484d; }
.talk-modal .send { margin-top: 4px; border: 0; border-radius: 99px; padding: 14px 20px; background: var(--ink); color: var(--bg);
  font: 500 15px var(--sans); cursor: pointer; transition: opacity .2s; }
.talk-modal .send:hover { opacity: .85; }
.talk-modal .x { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 99px; border: 1px solid var(--line);
  background: none; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.foot .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; font-size: 13px; color: var(--muted); }
.foot .row a:hover { color: var(--ink); }

/* Case page */
.case-head { padding: clamp(48px, 10vh, 120px) var(--pad) clamp(40px, 8vh, 96px); }
.case-head .back { font-size: 14px; color: var(--muted); }
.case-head .back:hover { color: var(--ink); }
.case-head h1 {
  margin-top: 40px; max-width: 13ch; font-weight: 500; font-size: clamp(44px, 7.6vw, 128px);
  line-height: 0.96; letter-spacing: -0.045em; animation: fade 1s var(--ease) both;
}
.case-head .problem { margin-top: 32px; max-width: 560px; font-size: 19px; color: var(--muted); animation: fade 1s .15s var(--ease) both; }
.case-head .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.muted { color: var(--muted); }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 0; animation: fade 1s var(--ease) both; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; color: var(--ink); }
.pill.ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.case-head .head-row + h1 { margin-top: 20px; max-width: 20ch; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 7vh, 72px); border-top: 1px solid var(--line); animation: fade 1s .2s var(--ease) both; }
.overview > div { padding: 32px 32px 8px; border-left: 1px solid var(--line); }
.overview > div:first-child { padding-left: 0; border-left: 0; }
.overview p { margin-top: 16px; font-size: 19px; line-height: 1.5; max-width: 34ch; }
.overview p.res { color: var(--accent); }
.overview .stat { display: block; font-size: clamp(44px, 4.6vw, 72px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--accent); }
.overview .stat + p { margin-top: 12px; }
.result .role { margin-top: 12px; font-size: 19px; color: var(--ink); max-width: 60ch; }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0 var(--pad); border-top: 1px solid var(--line); margin: 0 var(--pad); padding: 0; }
.steps { padding-bottom: 30vh; }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; opacity: .25; transition: opacity .5s var(--ease); }
.step.on { opacity: 1; }
.step .k { font-size: 13px; color: var(--muted); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.step h2 { font-size: clamp(30px, 3.4vw, 52px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; }
.step p { margin-top: 14px; font-size: 18px; color: var(--muted); }
.step .inline { display: none; }

.stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }
.phone {
  position: relative; width: min(330px, 26vw, 38vh); aspect-ratio: 9 / 19.5; border-radius: 44px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, .35);
}
.phone img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.03); transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.phone img.on { opacity: 1; transform: none; }
.phone img.fit-contain, .step .inline img.fit-contain { object-fit: contain; object-position: center; background: #0b0c0e; }

.result { padding: clamp(80px, 14vh, 160px) var(--pad) 0; }
.result p.big { font-size: clamp(32px, 4.6vw, 72px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; max-width: 18ch; }
.result p.role { margin-top: 24px; font-size: 15px; color: var(--muted); }
.next { display: block; margin: clamp(80px, 14vh, 160px) var(--pad) 0; padding-top: 20px; border-top: 1px solid var(--line); }
.next span { font-size: 13px; color: var(--muted); }
.next b { display: block; font-weight: 500; font-size: clamp(40px, 6.4vw, 104px); letter-spacing: -0.04em; line-height: 1.05; transition: transform .5s var(--ease); }
.next:hover b { transform: translateX(14px); }

/* My part */
.mine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--line); animation: fade 1s .3s var(--ease) both; }
.mine ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.mine li { position: relative; padding-left: 20px; font-size: 17px; line-height: 1.45; }
.mine li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Lock */
.lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; vertical-align: -2px; margin-left: 8px; opacity: .7; }
.lock.big { width: 28px; height: 28px; margin: 0 0 24px; opacity: 1; color: var(--muted); }
.lockscreen { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--pad); animation: fade .8s var(--ease) both; }
.lockscreen h1 { margin: 14px 0 12px; font-size: clamp(44px, 6vw, 96px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.lockscreen > p.muted { font-size: 17px; }
.lockform { display: flex; gap: 8px; margin-top: 32px; width: min(420px, 100%); }
.lockform input { flex: 1; font: 16px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 13px 20px; outline: none; transition: border-color .2s; }
.lockform input:focus { border-color: var(--accent); }
.lockform button { border: 0; border-radius: 99px; padding: 0 24px; background: var(--ink); color: var(--bg); font: 500 15px var(--sans); cursor: pointer; }
.lockscreen .err { min-height: 1.4em; margin-top: 12px; font-size: 14px; color: #e5484d; }
.lockscreen .ask { margin-top: 8px; background: none; border: 0; color: var(--muted); font: 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lockscreen .ask:hover { color: var(--ink); }

/* Status states */
.states { padding: 0 var(--pad) clamp(40px, 8vh, 96px); }
.st-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; border-top: 1px solid var(--line); padding-top: 32px; margin-bottom: 32px; }
.st-head h2 { margin-top: 12px; font-size: clamp(32px, 3.6vw, 56px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.st-head p { font-size: 17px; max-width: 42ch; }
.st-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-card { border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--card);
  opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 120ms); }
.states.in .st-card { opacity: 1; transform: none; }
.st-card img { width: 100%; }

/* User path map — always dark */
.pathmap { padding: 0 var(--pad) clamp(40px, 8vh, 96px); }
.pm-card { background: #0d0f11; color: #f1f0ec; border: 1px solid rgba(255,255,255,.08); border-radius: 28px; padding: clamp(24px, 3.4vw, 48px); overflow: hidden; }
.pm-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 40px; }
.pm-k { color: #8f8e89; }
.pm-head h2 { margin-top: 12px; font-size: clamp(32px, 3.6vw, 56px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.pm-head p { color: #9a9994; font-size: 17px; max-width: 46ch; }
.pm-row { padding: 22px 0; border-top: 1px solid rgba(255,255,255,.08); }
.pm-label { display: block; font-size: 12px; color: #8f8e89; margin-bottom: 14px; }
.pm-row.after .pm-label { color: #d6d5d0; }
.pm-chain { display: flex; align-items: center; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.pm-mini, .pm-card2 { position: relative; flex: none; display: flex; flex-direction: column; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, #17191c, #111316); border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease); }
.pm-mini { width: 62px; height: 42px; padding: 0 10px; flex-direction: row; align-items: center; gap: 7px; transition-delay: calc(var(--i) * 40ms); }
.pm-mini b { flex: 1; height: 5px; border-radius: 9px; background: rgba(255,255,255,.12); }
.pm-link { flex: none; width: 14px; height: 1px; background: rgba(255,255,255,.16); }
.pm-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; display: block; }
.pm-mini .pm-dot { width: 9px; height: 9px; border-width: 1.5px; opacity: .7; }
.pm-dot { border-color: rgba(255,255,255,.38); }
.pm-dot.done { border-color: rgba(255,255,255,.85); background: rgba(255,255,255,.85); }
.pm-stage { position: relative; display: flex; justify-content: space-between; align-items: center; height: 190px; padding: 0 2px; }
.pm-curves { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pm-curves path { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 1.2; stroke-dasharray: 400; stroke-dashoffset: 400;
  transition: stroke-dashoffset 1s var(--ease); transition-delay: calc(500ms + var(--i, 0) * 140ms); }
.pm-curves path.tip { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0; transition: opacity .4s 1.4s; }
.pathmap.in .pm-curves path { stroke-dashoffset: 0; }
.pathmap.in .pm-curves path.tip { opacity: 1; }
.pm-card2 { width: clamp(120px, 14vw, 190px); height: 84px; padding: 0 18px; transition-delay: calc(350ms + var(--i) * 120ms); }
.pm-card2 { transform: none; }
.pm-card2:nth-of-type(odd) { top: -28px; }
.pm-card2:nth-of-type(even) { top: 28px; }
.pm-card2 .pm-dot { margin-bottom: 2px; }
.pm-card2 b { display: block; height: 7px; width: 78%; border-radius: 9px; background: rgba(255,255,255,.14); }
.pm-card2 b.short { width: 46%; background: rgba(255,255,255,.08); }
.pathmap.in .pm-mini { opacity: 1; transform: none; }
.pathmap.in .pm-card2 { opacity: 1; }
.pm-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: 11px; color: #8f8e89; }
.pm-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.pm-legend .entry::before { background: #3b82f6; } .pm-legend .account::before { background: #5fd0bd; }
.pm-legend .home::before { background: #c9f2cf; } .pm-legend .deal::before { background: #7c4dff; } .pm-legend .done::before { background: #e74fae; }

/* Frameless stage for wide images (Köket) */
.story.open { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.story.open .phone { width: 100%; max-width: calc(78vh * 1.2); aspect-ratio: 6 / 5; border-radius: 20px; background: transparent; box-shadow: none; }
.story.open .phone img { object-fit: contain; object-position: center; border-radius: 20px; }

/* Mobile */
@media (max-width: 1100px) and (min-width: 861px) {
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
}

@media (max-width: 860px) {
  .top nav { gap: 16px; }
  .top nav a { display: none; }
  .hero .sub { grid-template-columns: 1fr; gap: 16px; }
  .index a { grid-template-columns: 32px 1fr; }
  .index .m { grid-column: 2; }
  .peek { display: none; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .process { grid-template-columns: 1fr; row-gap: 36px; }
  .story { grid-template-columns: 1fr; }
  .overview { grid-template-columns: 1fr; }
  .mine, .mine ul { grid-template-columns: 1fr; gap: 14px; }
  .pm-head { grid-template-columns: 1fr; gap: 12px; }
  .st-head { grid-template-columns: 1fr; gap: 12px; }
  .st-grid { grid-template-columns: 1fr; }
  .overview > div { padding: 24px 0 0; border-left: 0; }
  .stage { display: none; }
  .steps { padding-bottom: 0; }
  .step { min-height: 0; opacity: 1; padding: 48px 0 0; max-width: none; }
  .step .inline { display: block; width: min(300px, 78vw); aspect-ratio: 9 / 19.5; margin-top: 28px; border-radius: 36px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
  .step .inline img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .story.open .step .inline { width: 100%; aspect-ratio: auto; border-radius: 16px; }
  .story.open .step .inline img { height: auto; }
}

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