.work9 {
  --paper: #eaf8f7;
  --ink: #103b43;
  --accent: #1b6861;
  --wash: #d1e9e4;
  --ctext: white;
  --entry: rotate(13deg) translateY(-22px);
  --shift: rotate(13deg) translateY(-22px);
}
.work,
.work * {
  box-sizing: border-box;
}
.work {
  overflow: clip;
  background: var(--paper);
  color: var(--ink);
  font:
    400 1rem/1.8 system-ui,
    "Yu Gothic",
    sans-serif;
}
.work h1,
.work h2,
.work p,
.work figure {
  margin: 0;
}
.work h1 {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--accent);
  margin-bottom: 21px;
}
.work .hero {
  display: grid;
  align-items: center;
  gap: clamp(20px, 4vw, 66px);
  position: relative;
  padding: clamp(36px, 6vw, 110px) max(5vw, calc((100vw - 1380px) / 2));
  min-height: min(680px, 77vh);
}
.work .herocopy,
.work .art {
  min-width: 0;
}
.work .display {
  font-size: clamp(2.25rem, 4.1vw, 5rem);
  font-weight: 800;
  line-height: 1.21;
  letter-spacing: -0.065em;
  text-wrap: balance;
  line-break: strict;
  overflow-wrap: anywhere;
  margin: 0 0 24px;
}
.work .lead {
  max-width: 39em;
  line-height: 1.9;
}
.work .cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--accent);
  color: var(--ctext);
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 12px 21px;
  margin-block: 22px 0;
  text-decoration: none;
  font-weight: 750;
  transition: transform 0.18s;
}
.work .cta:hover {
  transform: translateY(-2px);
}
.work .cta:after {
  content: "↗";
}
.work .diagram {
  display: block;
  width: 100%;
  height: auto;
}
.work .art {
  position: relative;
}
.work figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  font-weight: 700;
  background: var(--wash);
  color: var(--ink);
}
.work .story,
.work .scope,
.work .demosect,
.work .local {
  margin: auto;
  width: min(1180px, 90%);
  padding: clamp(32px, 5vw, 76px) clamp(5px, 2.8vw, 50px);
}
.work .story p,
.work .scope p,
.work .local > p {
  max-width: 50em;
  margin-top: 16px;
}
.work h2 {
  font-size: clamp(1.5rem, 2.9vw, 2.9rem);
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.work .demosect > p {
  margin: 14px 0 22px;
  max-width: 48em;
}
.work .lab {
  padding: clamp(16px, 3vw, 44px);
  background: var(--wash);
}
.work .console {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}
.work .console > * {
  min-width: 0;
}
.work .console > label {
  display: grid;
  gap: 3px;
  font-weight: 650;
}
.work .console .tick,
.work .sortrow label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
}
.work button,
.work select,
.work input,
.work textarea {
  font: inherit;
  color: inherit;
}
.work button,
.work select,
.work input:not([type="checkbox"]),
.work textarea {
  max-width: 100%;
  border: 1px solid currentColor;
  background: var(--paper);
  border-radius: 3px;
  padding: 8px 12px;
  min-height: 44px;
}
.work button,
.work select {
  cursor: pointer;
}
.work button:disabled {
  opacity: 0.52;
  cursor: default;
}
.work .reset {
  margin-top: 16px;
  background: transparent;
}
.work .result {
  width: 100%;
  margin: 8px 0 0;
  background: var(--paper);
  padding: clamp(17px, 2.4vw, 35px);
  border-inline-start: 3px solid var(--accent);
  overflow-wrap: anywhere;
  transition:
    max-width 0.4s,
    background-color 0.4s,
    border-radius 0.4s;
}
.work .result small {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.work .result strong {
  display: block;
  font-size: clamp(1.1rem, 1.9vw, 1.65rem);
  line-height: 1.5;
}
.work .result[data-mobile="true"] {
  max-width: 320px;
  min-height: 240px;
}
.work .result[data-theme] .sample-visual {
  height: 60px;
  margin-block: 12px;
  background: linear-gradient(
    125deg,
    transparent 30%,
    currentColor 30% 39%,
    transparent 39% 49%,
    currentColor 49% 65%,
    transparent 65%
  );
  opacity: 0.45;
}
.work #sortlist,
.work #editor,
.work .sheet,
.work #memo {
  width: 100%;
}
.work .sortrow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid currentColor;
}
.work .sortrow > strong,
.work .sortrow > label {
  flex: 1;
}
.work input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.work .console [hidden] {
  display: none !important;
}
.work .local details {
  border-bottom: 1px solid currentColor;
}
.work .local summary {
  cursor: pointer;
  line-height: 1.65;
  padding: 17px 0;
  font-weight: 700;
}
.work .local details p {
  padding: 0 0 19px;
  max-width: 48em;
}
.work .local h2 {
  margin-bottom: 16px;
}
.work :focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.work [aria-invalid="true"] {
  outline: 2px dashed #9b3e30;
}
.work .sheetrow input {
  width: 100%;
}
.work .sheetrow label {
  display: grid;
  padding: 6px;
}
.work .scope {
  position: relative;
}
.work .scope + .scope {
  padding-top: 10px;
}
.work .orbit-total {
  width: 100%;
}
.work .piece {
  transform-box: fill-box;
  transform-origin: center;
  animation: assemble 0.85s both;
}
.work .p2 {
  animation-delay: 0.09s;
}
.work .p3 {
  animation-delay: 0.16s;
}
.work .changed {
  animation: reform 0.48s ease-out;
}
@keyframes assemble {
  from {
    transform: var(--entry);
    opacity: 0.35;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes reform {
  from {
    transform: var(--shift);
    clip-path: inset(0 12% 0 0);
  }
  to {
    transform: none;
    clip-path: inset(0);
  }
}

.work9 .hero {
  grid-template-columns: 1fr 0.87fr;
}
.work9 .art {
  border-radius: 50% 50% 6% 6%;
  background: #c7e1dc;
}
.work9 .story {
  border-left: 10px double #5d8279;
}
.work9 .result blockquote {
  margin: 16px 0 0;
  border-left: 5px solid #69b6a2;
  padding: 15px;
  background: #d5ede4;
}
.work9 .lab {
  border-top: 6px solid #377c72;
}
.work9 .scope {
  background: var(--wash);
  border-radius: 0 50px 0 0;
}
@media (min-width: 701px) {
  .work9 .hero {
  }
}
@media (max-width: 700px) {
  .work.work9 .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 30px 5vw;
    gap: 20px;
  }
  .work .hero .herocopy,
  .work .hero .art {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }
  .work .display {
    font-size: clamp(2rem, 8.6vw, 3.4rem);
    max-width: 18em;
  }
  .work .hero .art {
    width: min(100%, 460px);
    align-self: center;
  }
  .work .story {
    display: block;
  }
  .work .console {
    align-items: stretch;
  }
  .work .console > label:not(.tick) {
    width: 100%;
  }
  .work .local,
  .work .story,
  .work .demosect,
  .work .scope {
    width: 93%;
  }
  .work .sheetrow > div {
    display: block;
  }
  .work .sheetrow summary {
    min-height: 44px;
  }
  .work .diagram {
    max-height: 310px;
  }
  .work .result[data-theme="2"] {
    display: block;
  }
}
html[data-motion="reduced"] .work *,
html[data-motion="reduced"] .work *::before {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .work *,
  .work *::before {
    animation: none !important;
    transition: none !important;
  }
}
.work .sequence {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.work .sequence span {
  display: inline-block;
  padding: 5px 12px;
  border-bottom: 1px solid currentColor;
  font-weight: 670;
}
.work .sheetrow:not([open]) > div {
  display: none;
}
.work .result button {
  color: inherit;
}
.work .herocopy,
.work .art {
  position: relative;
}
.work .result[data-theme="2"] .sample-visual {
  background: repeating-linear-gradient(
    120deg,
    transparent 0 10px,
    currentColor 11px 13px
  );
}
.work9 .sequence {
  align-items: stretch;
}
.work9 .sequence span:last-child {
  border-left: 6px solid #368571;
}
.work9 .scope:nth-last-child(2) {
  width: 84%;
  border-left: 4px solid #4f887b;
}
.work9 .scope:last-child {
  width: 84%;
  border-left: 4px solid #4f887b;
}
@media (min-width: 920px) {
  .work9 .demosect {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    align-items: start;
    align-content: start;
    gap: 14px 5%;
    width: 100%;
  }
  .work9 .demosect h2,
  .work9 .demosect > p,
  .work9 .demosect > .cta {
    grid-column: 1;
    justify-self: start;
  }
  .work9 .demosect .lab {
    grid-column: 2;
    grid-row: 1/5;
    width: 100%;
  }
}
@media (max-width: 700px) {
  .work .editorial .story {
    display: block;
  }
  .work .sequence {
    gap: 6px;
  }
  .work .editorial .demosect .cta {
    width: auto;
  }
  .work .sequence span {
    font-size: 0.94rem;
  }
  .work .scope:nth-last-child(2),
  .work .scope:last-child {
    padding-block: 26px;
  }
}

.work9 .search-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  color: #194948;
  background: #fff;
  border: 1px solid #759c96;
  border-radius: 45px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 600;
  min-height: 48px;
}
.work9 .search-entry span {
  font-size: 1.6rem;
  line-height: 1;
}
@media (min-width: 701px) {
  .work9 .herocopy {
    grid-column: 1;
    grid-row: 1;
  }
  .work9 .search-entry {
    grid-column: 1;
    grid-row: 2;
  }
  .work9 .art {
    grid-column: 2;
    grid-row: 1/3;
  }
  .work9 .hero {
    row-gap: 16px;
  }
}

.work9 .result blockquote:not([hidden]) {
  animation: source-reveal 0.64s ease-out both;
}
.work9 .result blockquote p {
  background: linear-gradient(transparent 45%, #a6dbbb 45%);
  width: fit-content;
}
@keyframes source-reveal {
  from {
    transform: translateX(14%) scaleX(0.88);
    transform-origin: left;
    clip-path: inset(0 35% 0 0);
  }
  to {
    transform: none;
    clip-path: inset(0);
  }
}
@media (min-width: 920px) {
  .work9 .result:has(blockquote:not([hidden])) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
  }
  .work9 .result:has(blockquote:not([hidden])) blockquote {
    grid-column: 2;
    grid-row: 1/4;
    margin: 0;
  }
  .work9 .result:has(blockquote:not([hidden])) > button {
    grid-column: 1;
  }
}

.hero .display { overflow-wrap: normal; line-break: strict; text-wrap: balance; }
.hero .display > [data-wrap-group] { display: inline-block; white-space: nowrap; }


.ai-feature,
.ai-notes {
  padding: clamp(48px, 7vw, 104px) 0;
}
.ai-frame {
  width: min(1150px, 90%);
  margin: 0 auto;
  min-width: 0;
}
.ai-frame > * {
  min-width: 0;
}
.ai-feature h2,
.ai-notes h2 {
  margin: 0 0 0.38em;
  font-size: clamp(1.85rem, 3.9vw, 3.9rem);
  line-height: 1.25;
  letter-spacing: -0.052em;
  color: inherit;
  word-break: auto-phrase;
  text-wrap: balance;
}
.ai-feature header > p:last-child,
.ai-feature .ai-frame > div:first-child > p:last-child {
  max-width: 35em;
}
.ai-caption {
  margin: 0 0 1rem;
  font-weight: 730;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.ai-feature p:not(.ai-caption),
.ai-notes p {
  line-height: 1.85;
}
.ai-notes h2 {
  font-size: clamp(1.55rem, 2.9vw, 2.8rem);
}
.ai-notes .ai-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 4.5vw, 66px);
  margin-top: 1.65rem;
}
.ai-notes h3 {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(1.1rem, 1.65vw, 1.48rem);
  line-height: 1.55;
  word-break: auto-phrase;
  text-wrap: balance;
}
.ai-notes p {
  margin: 0;
}
.ai-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin: 0.24rem 0.6rem 0.24rem 0;
  min-height: 44px;
  padding: 0.35em 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: inherit;
  text-underline-offset: 0.32em;
}
.ai-jump:after {
  content: "↓";
}
@media (max-width: 740px) {
  .ai-notes .ai-notes-grid {
    grid-template-columns: 1fr;
  }
  .ai-frame {
    width: 89%;
  }
}

.archive {
  background: #103b43;
  color: #edfbf6;
}
.archive .ai-frame {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: clamp(24px, 6vw, 106px);
  align-items: center;
}
.archive-reader {
  min-width: 0;
  margin: 0;
  border: 1px solid #81b9af;
  padding: clamp(16px, 3.5vw, 44px);
  background: repeating-linear-gradient(
    90deg,
    transparent 0 31px,
    #ffffff08 32px
  );
}
.archive-reader legend {
  padding: 0 0.55rem;
  font-weight: 700;
  color: #a8eedc;
}
.archive-reader label {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  cursor: pointer;
  margin: 0.2em 0.8em 0.5em 0;
  min-height: 44px;
}
.archive-reader input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #77ddc5;
}
.archive-doc {
  border-left: 9px solid #73c7ab;
  background: #f7f5df;
  color: #152e31;
  margin: 1rem 5px 5px 0;
  padding: clamp(20px, 3.2vw, 42px);
  box-shadow:
    5px 5px #c1cabd,
    10px 10px #709b94;
}
.archive-doc small {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}
.archive-doc h3 {
  font:
    600 clamp(1.8rem, 3vw, 3.3rem) / 1.4 "Yu Mincho",
    serif;
  padding-bottom: 0.4em;
  border-bottom: 1px solid #99aaa0;
  margin: 0.8rem 0;
}
.archive-doc p {
  font-size: clamp(1rem, 1.8vw, 1.48rem);
}
.archive-doc mark {
  color: #103b43;
  background: #acedd9;
}
.archive-doc footer {
  font-size: 0.87rem;
  margin-top: 1.5em;
}
.archive-reader:has(input[value="old"]:checked) .archive-new,
.archive-reader:has(input[value="new"]:checked) .archive-old {
  display: none;
}
.archive-old {
  border-color: #b49b75;
  background: #ede9db;
}
.work9 .ai-notes {
  background: #d8efea;
}
.work9 .ai-notes article {
  border-top: 1px solid #28685b;
}
.work9 .ai-notes h3 {
  padding-top: 0.5em;
}
.work9 .diagram {
  background: linear-gradient(115deg, #d2eee6, #effaf0);
}
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="normal"] .archive[data-seen="true"] .archive-doc {
    animation: archive-file 0.6s cubic-bezier(0.2, 0.74, 0.23, 1);
  }
  html[data-motion="normal"] .archive-doc mark {
    animation: archive-mark 0.8s 0.25s both;
  }
  @keyframes archive-file {
    from {
      transform: perspective(500px) rotateY(-10deg) translateX(20px);
    }
  }
  @keyframes archive-mark {
    from {
      background-color: transparent;
    }
  }
}
@media (max-width: 740px) {
  .archive .ai-frame {
    grid-template-columns: 1fr;
  }
}

.work9 .reference-room { background: #153f46; }
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="normal"] .reference-lens { animation: locate-clause 7.4s cubic-bezier(.42,0,.34,1) infinite; }
}
@keyframes locate-clause {
  0%, 100% { transform: translate(28px, -60px); }
  25% { transform: translate(48px, -14px); }
  48% { transform: translate(-39px, 9px); }
  70% { transform: translate(36px, 5px); }
}
.work9 .source-rail { margin-top: 1.6rem; max-width: 51rem; border: 1px solid #4d7871; background: #e5f0e8; color: #1c3937; }
.work9 .source-rail figcaption { background: #17464a; color: #e5f5ee; padding: .65rem 1rem; }
.source-leaves { display: grid; grid-template-columns: .83fr 1.17fr; gap: 1.1rem; padding: clamp(15px, 3vw, 32px); }
.source-answer { border-bottom: 1px solid #5c8279; padding: .55rem 0 1rem; }
.source-leaves small, .source-answer > span { color: #31594f; font-size: .8rem; font-weight: 700; }
.work9 .source-answer p { margin: 1rem 0; font-size: clamp(1.1rem, 2.4vw, 1.7rem); line-height: 1.5; }
.source-excerpt { position: relative; min-width: 0; padding: 1rem clamp(10px,2vw,24px) 1.3rem 1rem; border: 1px solid #98aaa0; background: #fffef7; box-shadow: 3px 3px #b8cbbb; }
.work9 .source-excerpt p { margin: .65rem 0 .35rem; font-weight: 750; }
.source-excerpt blockquote { position: relative; margin: 0; font-size: clamp(.96rem, 1.7vw, 1.15rem); line-height: 1.8; }
.source-excerpt strong { background: #b9e7bf; }
.source-bracket { position: absolute; left: 4px; top: 25%; height: 42%; width: 8px; border: solid #26794f; border-width: 2px 0 2px 3px; transform: translateY(calc(var(--cg-progress, .55) * 76%)); }
.work9 .source-foot { margin: 0; border-top: 1px solid #9eafa3; padding: .75rem 1rem; font-size: .92rem; }
@media (max-width: 530px) {
  .source-leaves { grid-template-columns: 1fr; gap: .7rem; }
  .source-answer { padding: 0 0 .5rem; }
  .work9 .source-answer p { display: inline; margin: 0 .4em; font-size: 1rem; }
  .source-answer br { display: none; }
}
@media (max-width: 700px) {
  .work.work9 .hero { display: grid; grid-template-columns: minmax(0,1fr); gap: .8rem; }
  .work9 .hero .herocopy { display: contents; }
  .work9 .hero h1 { grid-row: 1; margin: 0; }
  .work9 .hero .display { grid-row: 2; margin: 0; }
  .work9 .hero .art { grid-row: 3; grid-column: 1; width: 100%; }
  .work9 .hero .lead { grid-row: 4; }
  .work9 .hero .reference-actions { grid-row: 5; }
  .work9 .reference-actions .cta { margin-top: 0; }
  .work9 .hero .search-entry { grid-row: 6; }
}
