:root {
  --navy: #0b3a86;
  --ink: #1b2536;
  --muted: #5b6b85;
  --sky: #9fd6ff;
  --sky-soft: #e4f4ff;
  --sky-pale: #f3faff;
  --pink: #ffe6f5;
  --line: #dfe8f2;
  --radius: 44px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --latin: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, Arial;
  --font-ja: var(--latin), "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic",
    "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
  --font-zh: var(--latin), "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
    "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-en: var(--latin), "Hiragino Sans", "Yu Gothic UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font: var(--font-ja);
  /* The lab name lockup keeps its original face. */
  --font-brand: "Avenir Next", "Quicksand", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "PingFang SC", "Noto Sans JP", "Noto Sans SC", "Yu Gothic", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* Touch: no grey flash on a tap (what is pressed answers by itself, see the pressed rules), and no
   wait for a possible double tap. */
a, button, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* A long press on these is still a press. Left alone, iOS answers it twice over: with its link
   preview, and by lifting the link's contents out of the card to be dragged away (a smaller rounded
   piece raised inside the card). Neither, and no text selection: they cut across the page's own feedback. */
.card, .shot, .pill, .tile, .login, .me, .mini, .go, .to-top, .dots button, .nav a, .lang button, .wordmark, .crop-step,
.crumb a, a.who, .p-or, .shot img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; font-size: 112.5%; }
:lang(ja) { font-family: var(--font-ja); }
:lang(zh) { font-family: var(--font-zh); }
:lang(en) { font-family: var(--font-en); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.85;
  letter-spacing: 0.015em;
  background: #eef8ff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip, not hidden: body must not become a scroll container or the sticky bar loses its anchor */
}
a { color: var(--navy); }
::selection { background: var(--sky); color: var(--navy); }

/* ---------- language ---------- */
.tt { display: inline-grid; }
div.tt { display: grid; margin: 1em 0; }
.tt > p { margin: 0; }
.tt > .t {
  grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden; filter: blur(6px);
  transition: opacity 0.26s var(--ease-io), filter 0.26s var(--ease-io), visibility 0s 0.26s;
}
html[data-lang="ja"] .t[lang="ja"],
html[data-lang="en"] .t[lang="en"],
html[data-lang="zh"] .t[lang="zh"] {
  opacity: 1; visibility: visible; filter: blur(0);
  transition: opacity 0.6s var(--ease) 0.12s, filter 0.6s var(--ease) 0.12s, visibility 0s;
}

/* ---------- ambient background (own layer, never repaints on scroll) ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(#ffffff 0%, #eef8ff 40%, #cfeaff 100%); }
.bg i { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.bg i:nth-child(1) { width: 60vw; height: 60vw; left: -20vw; bottom: -25vw; background: #8ecbff; animation: drift-a 26s var(--ease-io) infinite alternate; }
.bg i:nth-child(2) { width: 50vw; height: 50vw; right: -15vw; bottom: -20vw; background: #a9dcff; animation: drift-b 32s var(--ease-io) infinite alternate; }
.bg i:nth-child(3) { width: 38vw; height: 38vw; right: -8vw; top: 4vh; background: var(--pink); animation: drift-c 22s var(--ease-io) infinite alternate; }
@keyframes drift-a { to { transform: translate3d(8vw, -6vh, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-10vw, -8vh, 0) scale(0.9); } }
@keyframes drift-c { to { transform: translate3d(-6vw, 10vh, 0) scale(1.18); } }

/* ---------- header ---------- */
.site-header { text-align: center; padding: 30px 16px 6px; view-transition-name: site-header; }
.wordmark { display: inline-block; text-decoration: none; color: var(--navy); transition: opacity 0.3s; }
@media (hover: hover) { .wordmark:hover { opacity: 0.65; } }
.wordmark:active, .wordmark.pressed { opacity: 0.65; }
.wordmark b { display: block; font-family: var(--font-brand); font-size: 1.51rem; font-weight: 500; letter-spacing: 0.14em; line-height: 1.2; }
.wordmark small { display: block; margin-top: 4px; font-family: var(--font-brand); font-size: 0.605rem; font-weight: 700; letter-spacing: 0.24em; }

.bar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 10px 20px; padding: 14px clamp(16px, 3.5vw, 50px); margin-bottom: 10px;
  view-transition-name: site-bar;
}
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(1.6) blur(24px); backdrop-filter: saturate(1.6) blur(24px);
  box-shadow: 0 6px 30px rgba(11, 58, 134, 0.08);
  transition: opacity 0.45s var(--ease);
}
.bar.stuck::before { opacity: 1; }
/* Behind a 97% white bar the blur shows next to nothing, and on phones it can flash while the page scrolls. */
@media (hover: none) { .bar::before { -webkit-backdrop-filter: none; backdrop-filter: none; } }
.nav { display: flex; flex-wrap: wrap; justify-content: center; grid-column: 2; }
.bar-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 14px; }
.nav a {
  position: relative; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 0.86rem;
  letter-spacing: 0.12em; padding: 6px 16px;
}
.nav a + a::before {
  content: ""; position: absolute; left: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px;
  border-radius: 50%; background: var(--sky);
}
.nav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--navy); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
html:not(.member) .nav .in-only { display: none; }
.nav a.active::after, .nav a:active::after, .nav a.pressed::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) { .nav a:hover::after { transform: scaleX(1); transform-origin: left; } }

.lang { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(228, 244, 255, 0.9); }
.lang-ind {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 8px rgba(11, 58, 134, 0.16);
  transition: transform 0.5s var(--ease), width 0.5s var(--ease);
}
.lang button {
  position: relative; z-index: 1; border: 0; background: transparent; color: var(--navy); font: inherit;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; padding: 4px 14px; border-radius: 999px;
  cursor: pointer; opacity: 0.55; transition: opacity 0.3s;
}
.lang button[aria-pressed="true"], .lang button:active, .lang button.pressed { opacity: 1; }
@media (hover: hover) { .lang button:hover { opacity: 1; } }
.login {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 18px 7px 14px; border-radius: 999px;
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; line-height: 1.5; box-shadow: 0 4px 14px rgba(11, 58, 134, 0.22);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background-color 0.45s var(--ease);
}
.login svg { width: 15px; height: 15px; flex: none; }
.login .t { text-align: center; }
@media (hover: hover) { .login:hover { transform: translateY(-2px); background: #1450b4; box-shadow: 0 10px 24px rgba(11, 58, 134, 0.3); } }
.login:active, .login.pressed { transform: scale(0.97); background: #1450b4; }
.lang button:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* ---------- main panel ---------- */
.panel {
  max-width: 1340px; margin: 0 auto 60px; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 60px rgba(120, 190, 255, 0.25); view-transition-name: panel;
}
html.js .panel { animation: panel-in 1s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(28px) scale(0.985); } }

/* ---------- showcase: slides that cross-fade in one cell; the animated lab name is the first ---------- */
.show { position: relative; }
/* pan-y: the page still scrolls up and down from here, and a sideways drag is left to the showcase. */
.slides { display: grid; width: 100%; aspect-ratio: 67 / 30; min-height: 430px; max-height: 620px; overflow: hidden; touch-action: pan-y; }
.slides.snap .slide { transition: none; }
.slide {
  grid-area: 1 / 1; position: relative; min-width: 0; min-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
  transition: opacity 1.5s var(--ease-io), visibility 0s 1.5s;
}
.slide.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.5s var(--ease-io), visibility 0s; }
.shot { display: block; color: inherit; text-decoration: none; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot:active .cap, .shot.pressed .cap { transform: scale(0.97); transition-duration: 0.2s; }
.cap {
  transition: transform 0.5s var(--ease);
  position: absolute; left: clamp(16px, 3vw, 44px); bottom: clamp(16px, 3vw, 40px); max-width: calc(100% - 32px);
  padding: 18px 26px 16px; border-radius: 24px; background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(11, 58, 134, 0.14); text-align: left;
}
.cap .tag { margin-bottom: 8px; }
.cap b { display: block; color: var(--navy); font-size: 1.12rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1.5; }
/* The marks lie over the bottom of the picture, see-through. */
.dots {
  position: absolute; left: 0; right: 0; bottom: clamp(8px, 1.4vw, 16px); z-index: 3; display: flex; justify-content: center;
  gap: 10px; pointer-events: none;
}
.dots button {
  width: 28px; height: 26px; padding: 10px 0; border: 0; border-radius: 0; cursor: pointer; pointer-events: auto;
  background: rgba(11, 58, 134, 0.2) content-box; transition: background-color 0.7s var(--ease);
}
.dots button:active, .dots button.pressed { background-color: rgba(11, 58, 134, 0.45); transition-duration: 0.1s; }
.dots button.on { background-color: rgba(11, 58, 134, 0.78); }
.dots button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- hero (the first slide) ---------- */
.hero { display: grid; place-content: center; text-align: center; padding: 40px 24px; isolation: isolate; }
.hero .blob { position: absolute; z-index: -2; border-radius: 50%; filter: blur(50px); will-change: transform; transition: transform 1.2s var(--ease); }
.hero .blob.a { width: 440px; height: 320px; left: 6%; top: 4%; background: var(--sky-soft); }
.hero .blob.b { width: 480px; height: 340px; right: 2%; bottom: 0; background: var(--pink); }
.orbit { position: absolute; z-index: -1; left: 50%; top: 50%; border-radius: 50%; translate: -50% -50%; }
.orbit.o1 { width: 300px; height: 300px; background: var(--sky-pale); animation: pop 1.4s var(--ease) 0.1s both; }
.orbit.o2 { width: 540px; height: 540px; border: 18px solid var(--sky-soft); animation: pop 1.6s var(--ease) 0.2s both; }
.orbit.o3 { width: 720px; height: 720px; border: 1.5px dashed rgba(159, 214, 255, 0.9); animation: pop 1.8s var(--ease) 0.3s both, spin 80s linear infinite; }
.orbit.o3::before, .orbit.o3::after { content: ""; position: absolute; border-radius: 50%; }
.orbit.o3::before { width: 14px; height: 14px; left: 50%; top: -8px; margin-left: -7px; background: var(--sky); box-shadow: 0 0 0 6px rgba(159, 214, 255, 0.35); }
.orbit.o3::after { width: 9px; height: 9px; left: 14.6%; bottom: 14.6%; background: #ffc4e3; }
@keyframes pop { from { opacity: 0; scale: 0.6; } }
@keyframes spin { to { rotate: 360deg; } }

.hero h1 { margin: 0; color: var(--navy); font-family: var(--font-brand); font-size: clamp(1.96rem, 6vw, 3.38rem); font-weight: 500; letter-spacing: 0.2em; line-height: 1.3; }
.hero h1 span { display: inline-block; font-family: inherit; animation: rise 1.1s var(--ease) calc(0.25s + var(--i) * 0.08s) both; }
@keyframes rise { from { opacity: 0; transform: translateY(0.6em) rotate(6deg); filter: blur(8px); } }
.hero .en { margin: 10px 0 0; color: var(--navy); font-family: var(--font-brand); font-weight: 700; font-size: 0.756rem; letter-spacing: 0.3em; text-transform: uppercase; animation: widen 1.4s var(--ease) 0.7s both; }
@keyframes widen { from { opacity: 0; letter-spacing: 0.7em; } }
.hero .lead { margin: 34px auto 0; max-width: 34em; font-size: 1.08rem; animation: fade-up 1.1s var(--ease) 1s both; }
.hero .areas { margin: 26px 0 0; color: var(--muted); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.12em; animation: fade-up 1.1s var(--ease) 1.15s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
.scroll-cue { position: absolute; left: 50%; bottom: 46px; width: 1px; height: 46px; margin-left: -0.5px; background: var(--line); overflow: hidden; animation: fade-up 1s var(--ease) 1.6s both; }
.scroll-cue::after { content: ""; position: absolute; inset: 0; background: var(--navy); animation: cue 2.2s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- sections ---------- */
section { padding: 90px 24px; }
section.band { background: var(--sky-soft); }
/* After Projects: the members' part (signed in) is a plain block, Members alternates with it, and
   Links is always a tinted strip of its own, with a fine line where another tinted block ends on it. */
html:not(.no-members) #internal + #members { background: var(--sky-soft); }
html.no-members #members, html.no-members .nav a[href="/#members"] { display: none; }
#links { background: var(--sky-soft); border-top: 2px solid #fff; }
.wrap { max-width: 960px; margin: 0 auto; }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }
h2.title {
  margin: 0 0 48px; text-align: center; color: var(--navy);
  font-size: 1.45rem; font-weight: 800; letter-spacing: 0.26em; text-transform: uppercase;
}
h2.title small { display: block; margin-top: 6px; font-size: 0.84rem; letter-spacing: 0.1em; font-weight: 700; color: var(--muted); text-transform: none; }

/* scroll reveal: hidden only when the script is running */
html.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
html.js h2.title.rv { transform: none; letter-spacing: 0.7em; transition: opacity 1s var(--ease), letter-spacing 1.2s var(--ease); }
html.js .rv.in { opacity: 1; transform: none; }
html.js h2.title.rv.in { letter-spacing: 0.34em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card {
  position: relative; display: block; overflow: hidden; background: #fff; border-radius: 28px; padding: 30px 28px;
  text-decoration: none; color: inherit; border: 1px solid var(--line);
}
section.band .card { border-color: transparent; }
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(159, 214, 255, 0.4), transparent 70%);
}
@media (hover: hover) { .card:hover::before { opacity: 1; } }
.card > * { position: relative; }
a.card { box-shadow: 0 0 0 rgba(11, 58, 134, 0); }
html.js a.card.rv.in, a.card { transition: opacity 0.9s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
@media (hover: hover) { a.card:hover, html.js a.card.rv.in:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11, 58, 134, 0.14); transition-delay: 0s; } }
a.card:active, html.js a.card.rv.in:active, a.card.pressed, html.js a.card.rv.in.pressed {
  transform: translateY(-2px) scale(0.985); box-shadow: 0 10px 26px rgba(11, 58, 134, 0.12);
  transition-duration: 0.2s; transition-delay: 0s;
}
/* Under a finger the glow stays for as long as the finger is on the card, and moves with it. */
.card:active::before, .card.touched::before { opacity: 1; transition-duration: 0.2s; }
.card h3 { margin: 0 0 10px; color: var(--navy); font-size: 1.12rem; letter-spacing: 0.05em; }
.card p { margin: 0; font-size: 0.96rem; }
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; color: var(--navy);
  padding: 0 8px; margin: 0 6px 12px 0; background: linear-gradient(transparent 60%, #ffe9a8 60%);
}
.tag.blue { background: linear-gradient(transparent 60%, var(--sky) 60%); }
.tag.green { background: linear-gradient(transparent 60%, #c9f3c4 60%); }
.tag.pink { background: linear-gradient(transparent 60%, #ffd3ea 60%); }

/* ---------- project sheet (floats over the page) ---------- */
html.sheet-open { overflow: hidden; }
dialog.sheet, dialog.crop {
  border: 0; padding: 0; background: transparent; overflow: visible; color: inherit;
  width: min(580px, calc(100vw - 32px)); max-width: none; max-height: none;
}
dialog.sheet::backdrop, dialog.crop::backdrop {
  background: rgba(11, 58, 134, 0.26); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.32s var(--ease-io);
}
dialog.sheet.open::backdrop, dialog.crop.open::backdrop { opacity: 1; transition: opacity 0.55s var(--ease); }
.sheet-box {
  position: relative; background: #fff; border-radius: 34px; padding: 46px 40px 38px;
  max-height: calc(100dvh - 48px); overflow: auto; box-shadow: 0 30px 90px rgba(11, 58, 134, 0.28);
  opacity: 0; transform: translate3d(var(--dx, 0), var(--dy, 24px), 0) scale(0.94); will-change: transform, opacity;
  transition: transform 0.32s var(--ease-io), opacity 0.26s var(--ease-io);
}
dialog.sheet.open .sheet-box, dialog.crop.open .sheet-box {
  opacity: 1; transform: none; transition: transform 0.7s var(--ease), opacity 0.45s var(--ease);
}
.sheet-body h3 { margin: 6px 0 14px; color: var(--navy); font-size: 1.5rem; letter-spacing: 0.05em; line-height: 1.5; }
.sheet-body p { margin: 0; }
.sheet-foot { margin-top: 34px; text-align: center; }
.sheet-x {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--sky-soft); cursor: pointer; transition: transform 0.5s var(--ease), background-color 0.4s var(--ease);
}
.sheet-x::before, .sheet-x::after {
  content: ""; position: absolute; left: 12px; right: 12px; top: 19px; height: 2px; border-radius: 2px; background: var(--navy);
}
.sheet-x::before { transform: rotate(45deg); }
.sheet-x::after { transform: rotate(-45deg); }
@media (hover: hover) { .sheet-x:hover { transform: rotate(90deg); background: var(--sky); } }
.sheet-x:active, .sheet-x.pressed { transform: rotate(90deg); background: var(--sky); }
.sheet-x:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

blockquote.motto { margin: 0 0 28px; text-align: center; color: var(--navy); font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 600; letter-spacing: 0.14em; }

.pill {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-width: 260px; padding: 14px 14px 14px 30px; border-radius: 999px; text-decoration: none;
  color: var(--navy); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em;
  background: var(--sky); box-shadow: 0 0 0 10px rgba(159, 214, 255, 0.4);
}
html.js .pill.rv.in, .pill { transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.5s var(--ease); }
@media (hover: hover) { .pill:hover { box-shadow: 0 0 0 16px rgba(159, 214, 255, 0.28); background: #b4dfff; } }
.pill:active, html.js .pill.rv.in:active, .pill.pressed, html.js .pill.rv.in.pressed {
  transform: scale(0.97); background: #b4dfff; box-shadow: 0 0 0 14px rgba(159, 214, 255, 0.28);
  transition-duration: 0.2s; transition-delay: 0s;
}
.pill::after {
  /* The arrow is drawn, not a "›" character, so it sits dead centre in every font. */
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%230b3a86' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.25 11.5l3.5 3.5-3.5 3.5'/%3E%3C/svg%3E") center / 30px 30px no-repeat;
}
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 28px; }
.tile {
  display: inline-flex; align-items: center; justify-content: center; min-width: 210px; padding: 24px 40px;
  border-radius: 26px; background: #fff; color: var(--navy); text-decoration: none; font-weight: 700;
  font-size: 0.94rem; letter-spacing: 0.1em; line-height: 1.5; box-shadow: 0 0 0 rgba(11, 58, 134, 0);
}
html.js .tile.rv.in, .tile { transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.tile:active, html.js .tile.rv.in:active, .tile.pressed, html.js .tile.rv.in.pressed {
  transform: scale(0.97); box-shadow: 0 0 0 8px rgba(159, 214, 255, 0.45); transition-duration: 0.2s; transition-delay: 0s;
}
@media (hover: hover) { .tile:hover { box-shadow: 0 0 0 8px rgba(159, 214, 255, 0.45); } }
.more { margin-top: 56px; text-align: center; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.list li:first-child { border-top: 1px solid var(--line); }
.list .date { color: var(--navy); font-weight: 700; font-size: 0.88rem; margin-right: 10px; }

.page-head { text-align: center; padding: 76px 24px 30px; background: radial-gradient(500px 260px at 50% 0%, var(--sky-soft) 0%, transparent 70%); }
.page-head h1 { margin: 8px 0 0; color: var(--navy); font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: 0.14em; }
.page-head p { margin: 14px auto 0; max-width: 40em; color: var(--muted); }
.crumb { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; }
.crumb a { text-decoration: none; }
.crumb a::before { content: "‹ "; display: inline-block; transition: transform 0.4s var(--ease); }
@media (hover: hover) { .crumb a:hover::before { transform: translateX(-4px); } }
.crumb a:active::before, .crumb a.pressed::before { transform: translateX(-4px); }
.note { margin: 0 auto 36px; padding: 14px 22px; border-radius: 18px; background: #fff7dc; font-size: 0.9rem; color: #6b5310; text-align: center; }
.note.members { background: var(--sky-soft); color: var(--navy); }
.block h3 { color: var(--navy); font-size: 1.08rem; letter-spacing: 0.1em; margin: 44px 0 12px; }

.site-footer { text-align: center; padding: 10px 16px 50px; color: var(--navy); font-size: 0.8rem; letter-spacing: 0.1em; }
.foot-lang { margin-top: 26px; }
.foot-lang .lang { background: rgba(255, 255, 255, 0.6); }
.site-footer b { display: block; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.2em; }

.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; color: var(--navy); font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.16em; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.45);
  opacity: 0; transform: translateY(16px) scale(0.8); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) { .to-top:hover { box-shadow: 0 0 0 10px rgba(159, 214, 255, 0.35); transform: translateY(-4px); } }
.to-top.show:active, .to-top.show.pressed { box-shadow: 0 0 0 10px rgba(159, 214, 255, 0.35); transform: scale(0.94); transition-duration: 0.2s; }

/* ---------- signed-in members: account chip, Members section, account page ---------- */
/* A face is a round picture: the member's own, or their initial on a soft disc. */
.face {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: var(--sky-soft) center / cover no-repeat; color: var(--navy); font-weight: 700; font-size: 0.8rem;
  line-height: 1; letter-spacing: 0;
}
.face.blank {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%230b3a86' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='15' cy='12' r='3.6'/%3E%3Cpath d='M8.6 22.4a6.6 6.6 0 0 1 12.8 0'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}

.me { display: none; }
html.member .login.in { display: none; }
html.member .me { display: inline-flex; }
.me {
  align-items: center; gap: 9px; padding: 3px 16px 3px 3px; border-radius: 999px; text-decoration: none;
  color: var(--navy); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; line-height: 1.5;
  background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
.me:active, .me.pressed { transform: scale(0.97); background: #fff; box-shadow: inset 0 0 0 1px var(--sky); transition-duration: 0.2s; }
@media (hover: hover) { .me:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--sky), 0 6px 18px rgba(11, 58, 134, 0.12); } }
.me-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me:not(.named) .me-name, .me.named .me-label { display: none; }
.me-label .t { text-align: center; }

.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 46px; min-height: 164px; }
.person { display: flex; flex-direction: column; align-items: center; width: 190px; text-align: center; color: var(--navy); }
.person .who { display: block; color: inherit; text-decoration: none; }
.p-status, .p-org, .p-or { font-size: 0.8rem; line-height: 1.6; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.p-status { margin-top: 6px; font-weight: 700; }
.p-org { color: var(--muted); }
.p-status + .p-org { margin-top: 2px; }
.p-or {
  margin-top: 8px; color: var(--navy); font-weight: 700; letter-spacing: 0.08em; text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--sky); transition: box-shadow 0.4s var(--ease);
}
@media (hover: hover) { .p-or:hover { box-shadow: inset 0 -2px 0 var(--navy); } }
.p-or:active, .p-or.pressed { box-shadow: inset 0 -2px 0 var(--navy); }
.person .face, .acct-pic .face {
  width: 104px; height: 104px; font-size: 2.1rem; font-weight: 600; box-shadow: 0 0 0 8px rgba(159, 214, 255, 0.4);
  transition: box-shadow 0.5s var(--ease);
}
.person .face { margin: 8px auto 20px; }
@media (hover: hover) { a.who:hover .face { box-shadow: 0 0 0 14px rgba(159, 214, 255, 0.28); } }
a.who:active .face, a.who.pressed .face { box-shadow: 0 0 0 14px rgba(159, 214, 255, 0.28); transition-duration: 0.2s; }
.person b { display: block; font-size: 0.96rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1.6; overflow-wrap: anywhere; }

.acct { display: grid; gap: 34px; transition: opacity 0.5s var(--ease); }
.acct[aria-busy="true"] { opacity: 0.45; pointer-events: none; }
.field { display: grid; gap: 10px; }
.field > span, .switch > span { color: var(--navy); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.1em; }
.field input[type="text"], .field input[type="url"] {
  width: 100%; font: inherit; color: var(--ink); padding: 13px 22px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--sky-pale); outline: 0;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease);
}
.field input:focus { border-color: var(--sky); background: #fff; box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.35); }
.field input::placeholder { color: #a9b6c9; }
.acct-pic { display: flex; align-items: center; gap: 32px; padding: 10px 8px 8px; }
.acct-pic .face { flex: none; }
.orgs { display: grid; gap: 10px; }
.acct-acts { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.mini {
  position: relative; display: inline-flex; align-items: center; border: 0; border-radius: 999px; padding: 8px 20px;
  font: inherit; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1.5; color: var(--navy);
  background: var(--sky-soft); cursor: pointer; transition: background-color 0.4s var(--ease);
}
@media (hover: hover) { .mini:hover { background: var(--sky); } }
.mini:active, .mini.pressed { background: var(--sky); }
.mini.quiet { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) { .mini.quiet:hover { background: var(--sky-pale); } }
.mini.quiet:active, .mini.quiet.pressed { background: var(--sky-pale); }
.mini .t { text-align: center; }
.mini[hidden] { display: none; }
.mini input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mini:focus-visible, .mini:focus-within, .go:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.acct-pic.none [data-act="no-avatar"] { visibility: hidden; }
/* One of a few, or none: the chosen one is filled in. */
.picks { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.mini.pick { padding: 9px 22px; transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.mini.quiet.pick[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: inset 0 0 0 1px var(--navy); }

.switch { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch i {
  position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: #cfdbe9;
  transition: background-color 0.45s var(--ease);
}
.switch i::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(11, 58, 134, 0.22); transition: transform 0.45s var(--ease);
}
.switch input:checked + i { background: var(--navy); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2px solid var(--navy); outline-offset: 3px; }

/* Framing a picture: it is dragged and zoomed behind a round window, and what shows is what is kept. */
html.crop-open { overflow: hidden; }
dialog.crop { width: min(400px, calc(100vw - 32px)); }
.crop-box { padding: 30px 30px 28px; }
.crop-stage {
  position: relative; width: 100%; max-width: 320px; margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 26px;
  background: var(--sky-soft); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; outline: 0;
}
.crop-stage.held { cursor: grabbing; }
.crop-stage:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.crop-stage::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 200px rgba(255, 255, 255, 0.74), inset 0 0 0 2px #fff;
}
.crop-zoom { display: flex; align-items: center; gap: 14px; max-width: 320px; margin: 24px auto 0; }
.crop-zoom input {
  flex: 1; min-width: 0; height: 30px; margin: 0; padding: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; outline: 0;
}
.crop-zoom input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--sky-soft); }
.crop-zoom input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--sky-soft); }
.crop-zoom input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 0; border-radius: 50%;
  background: var(--navy); box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.45);
}
.crop-zoom input::-moz-range-thumb {
  width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.45);
}
.crop-zoom input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.45), 0 0 0 7px var(--navy); }
.crop-zoom input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(159, 214, 255, 0.45), 0 0 0 7px var(--navy); }
.crop-step {
  position: relative; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--sky-soft); cursor: pointer; transition: background-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.crop-step::before, .crop-step.plus::after {
  content: ""; position: absolute; left: 11px; right: 11px; top: 16px; height: 2px; border-radius: 2px; background: var(--navy);
}
.crop-step.plus::after { transform: rotate(90deg); }
@media (hover: hover) { .crop-step:hover { background: var(--sky); } }
.crop-step:active, .crop-step.pressed { background: var(--sky); transform: scale(0.92); transition-duration: 0.2s; }
.crop-step:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.crop-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin-top: 26px; }
.crop-acts .mini { padding: 12px 28px; font-size: 0.9rem; letter-spacing: 0.1em; }

.acct-key { margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line); }
.acct-hint { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.85; }
a.mini { text-decoration: none; }
.acct-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 10px; }
.go {
  border: 0; border-radius: 999px; padding: 12px 44px; font: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.14em; line-height: 1.5; color: #fff; background: var(--navy); cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 58, 134, 0.22);
  transition: background-color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
@media (hover: hover) { .go:hover { background: #1450b4; box-shadow: 0 10px 24px rgba(11, 58, 134, 0.3); } }
.go:active, .go.pressed { transform: scale(0.97); background: #1450b4; }
.go:disabled { background: #a9b6c9; box-shadow: none; cursor: default; }
/* The three messages share one cell, so showing one never moves anything. */
.acct-status { display: inline-grid; margin: 0; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.acct-status > span {
  grid-area: 1 / 1; opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease-io), visibility 0s 0.3s;
}
.acct-status[data-state="saving"] > [data-s="saving"], .acct-status[data-state="saved"] > [data-s="saved"],
.acct-status[data-state="error"] > [data-s="error"], .acct-status[data-state="unloaded"] > [data-s="unloaded"],
.acct-status[data-state="soon"] > [data-s="soon"] { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.acct-status > [data-s="saved"] { color: var(--navy); }
.acct-status > [data-s="error"], .acct-status > [data-s="unloaded"] { color: #b3261e; }

/* ---------- page-to-page transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: var(--ease); }
::view-transition-old(panel) { animation: vt-out 0.3s var(--ease-io) both; }
::view-transition-new(panel) { animation: vt-in 0.6s var(--ease) 0.12s both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px) scale(0.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(26px) scale(0.99); } }

/* Leaving (or coming back to) a page whose project sheet is open. Named parts are drawn above
   everything else during a transition, so the page under the sheet would jump in front of it and
   then slide to wherever the next page puts it. Instead the page stays one flat picture, exactly as
   it looks behind the sheet, and only the sheet is its own part: it leaves the way a panel does. */
html.sheet-open .site-header, html.sheet-open .bar, html.sheet-open .panel { view-transition-name: none; }
html.sheet-open .sheet-box { view-transition-name: sheet; }
::view-transition-old(sheet) { animation: vt-out 0.3s var(--ease-io) both; }
::view-transition-new(sheet) { animation: vt-in 0.6s var(--ease) 0.12s both; }
/* The transition already brings the panel in; it must not make a second entrance of its own. */
html.from-sheet .panel { animation: none; }

@media (max-width: 900px) {
  .bar { grid-template-columns: 1fr; justify-items: center; }
  .nav, .bar-end { grid-column: 1; justify-self: center; }
}
@media (max-width: 640px) {
  html { font-size: 106.25%; }
  :root { --radius: 26px; }
  .panel { margin: 0 10px 40px; }
  section { padding: 60px 20px; }
  .hero { padding: 30px 20px; }
  .slides { min-height: 400px; }
  .cap { bottom: 40px; } /* clear of the slide marks, which lie across the bottom here */
  .orbit.o1 { width: 200px; height: 200px; }
  .orbit.o2 { width: 340px; height: 340px; border-width: 12px; }
  .orbit.o3 { width: 460px; height: 460px; }
  .nav a { padding: 6px 10px; font-size: 0.8rem; }
  /* Four links have to fit one line on a phone: a second line would start with a stray dot. */
  .nav.four, html.member .nav { flex-wrap: nowrap; }
  .nav.four a, html.member .nav a { padding: 6px min(10px, 2.3vw); font-size: min(0.8rem, 3.1vw); letter-spacing: 0.09em; }
  /* ...and five, for a signed-in member once Members is there too. */
  html.member .nav.four a { padding: 6px min(8px, 1.7vw); font-size: min(0.76rem, 2.55vw); letter-spacing: 0.06em; }
  /* With nobody listed the Members link is away, so there is one link fewer each time. */
  html.no-members:not(.member) .nav.four a { padding: 6px 10px; font-size: 0.8rem; letter-spacing: 0.12em; }
  html.no-members.member .nav.four a { padding: 6px min(10px, 2.3vw); font-size: min(0.8rem, 3.1vw); letter-spacing: 0.09em; }
  .acct-pic { gap: 22px; padding-left: 4px; padding-right: 0; }
  .acct-pic .face { width: 88px; height: 88px; font-size: 1.8rem; }
  .to-top { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html.js .rv { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
