.nav-actions { display: flex; align-items: center; justify-self: end; gap: 12px; }
.inline-link { padding: 0; border: 0; background: none; color: var(--deep); font-weight: var(--weight-emphasis); }
.mobile-login { display: none; }
.account-avatar { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #cdd9d2; border-radius: 50%; background: var(--sage); color: var(--deep); }

.story-section {
  --story-section-padding: clamp(65px, 8vw, 116px);
  padding-block: var(--story-section-padding);
}
.story-section .section-intro h2, .start-section h2 { text-wrap: balance; }
.philosophy { background: #f3f6f3; }
.philosophy-intro, .about-manifesto { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(26px, 6vw, 88px); align-items: start; }
.philosophy-intro .section-intro, .about-manifesto .section-intro { margin: 0; }
.section-prose { display: grid; gap: 17px; color: var(--text); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.9; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(35px, 6vw, 76px); border-block: 1px solid #d6e1da; }
.principles article { padding: 27px 26px; }
.principles article + article { border-left: 1px solid #d6e1da; }
.principles .icon { width: 24px; height: 24px; color: var(--action); }
.principles h3 { margin: 12px 0 6px; font: var(--weight-display) 22px/1.4 var(--heading); }
.principles p { color: var(--text); font-size: 14px; line-height: 1.7; }

.story-modes {
  display: grid;
  min-height: calc(100svh - var(--cover-header-height));
  background:
    linear-gradient(#f6f0df30, #f6f0df20),
    #f6f3eb url(paper.webp) center / cover no-repeat;
  color: #243a2f;
  padding-block: clamp(42px, 5vw, 76px);
  scroll-margin-top: calc(-1 * var(--anchor-gap));
}
.download-section { background: #f5f7f6; }
.story-modes > .wrap { display: grid; grid-template-rows: auto 1fr; }
.story-modes .section-intro { margin-bottom: clamp(20px, 2.7vw, 36px); }
.story-mode-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 32px);
}
.story-mode {
  --mode-panel-space: clamp(30px, 4.7vw, 70px);
  --mode-title-size: clamp(30px, 3.3vw, 44px);
  --mode-title-rest-bottom: clamp(18px, 3vw, 46px);
  --mode-image-fade: to right;
  --mode-image-flip: 1;
  --mode-image-zoom: 1;
  --mode-effect-rest: 0% 50%;
  --mode-effect-open: 100% 50%;
  --mode-effect-size: 200% 100%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-width: 0;
  min-height: clamp(284px, 34vw, 336px);
  overflow: hidden;
  border: 1px solid #395145;
  border-radius: 10px;
  background: #14231c;
  box-shadow: 0 10px 28px #21342a17;
}
.story-mode:nth-child(even) {
  --mode-image-fade: to left;
  --mode-effect-rest: 100% 50%;
  --mode-effect-open: 0% 50%;
  grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
}
:is([data-mode-card="quick"], [data-mode-card="continue"]) { --mode-image-flip: -1; }
.story-mode-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.story-mode-image {
  position: absolute;
  inset: -32px;
  width: calc(100% + 64px);
  height: calc(100% + 64px);
  pointer-events: none;
  object-fit: cover;
  filter: brightness(1.055) contrast(1.02) saturate(.8);
  transform: scaleX(var(--mode-image-flip)) scale(var(--mode-image-zoom));
  transition: transform .65s var(--ease);
}
.story-mode-soft {
  position: absolute;
  inset: 0;
  z-index: 1;
  mask-image: linear-gradient(var(--mode-image-fade), transparent 58%, #0009 68%, #000e 77%, #000 83%);
  mask-size: var(--mode-effect-size);
  mask-position: var(--mode-effect-rest);
  mask-repeat: no-repeat;
  opacity: 0;
  transition: mask-position .75s var(--ease), opacity .55s var(--ease);
}
.story-mode-image-soft { filter: blur(18px) brightness(.25) saturate(.5); }
.story-mode-image-accent { display: none; }
@media (min-width: 761px) {
  /* Selected contours carry more green; the unmasked pencil drawing stays black. */
  .story-mode-image-accent {
    display: block;
    filter: url(#mode-green-ink) brightness(1.055) contrast(1.02) saturate(.55);
    mask-image: var(--mode-ink-mask);
    mask-mode: alpha;
    mask-size: cover;
    mask-position: var(--mode-ink-position, center);
    mask-repeat: no-repeat;
  }
  .story-mode-image-accent.story-mode-image-soft { filter: url(#mode-green-ink) blur(18px) brightness(.25) saturate(.35); }
  /* Masks below are embedded by image-source/build-mode-ink-masks.cjs for file:// previews. */
  [data-mode-card="quick"] { --mode-ink-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgxNiIgaGVpZ2h0PSI4NjYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4MTYgODY2Ij4gPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0MiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gPHBhdGggZD0iTTExODAgNTA1IFExMjY2IDQyOSAxMzcwIDM5OSBNMTE4MCA1MDUgUTEyOTAgNDc4IDEzNzAgMzk5Ii8+IDxwYXRoIGQ9Ik0xMjMgNjcgUTE0OCAxMjQgMTA0IDE5NiBROTMgMTI5IDEyMyA2NyIvPiA8cGF0aCBkPSJNMTM2NSA0MDUgTDE2NjggMjIxIFExNzMxIDE4MiAxNzUwIDE0MCIvPiA8cGF0aCBkPSJNMTMyOCAzNjEgTDE2MjAgMTc4IFExNzAxIDEyNiAxNzQ2IDE1MSIvPiA8cGF0aCBkPSJNMTM0NSAzNTQgUTEzODEgMzc1IDEzOTYgNDA2Ii8+IDwvZz4gPC9zdmc+"); }
  [data-mode-card="tree"] { --mode-ink-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgxNiIgaGVpZ2h0PSI4NjYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4MTYgODY2Ij4gPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0NCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gPHBhdGggZD0iTTg5IDI1NyBRMjMxIDIxNSAzMzggMjkzIFE0NTYgMjE1IDU0NSAyNTYgUTYxMSAyOTEgNjgwIDI4NSIvPiA8cGF0aCBkPSJNMTI5NiAzNDMgUTEzODggMjY0IDE1MTggMjQ3IFExNTgwIDI0MCAxNjIxIDIyMCBMMTcwMiAxODQiLz4gPHBhdGggZD0iTTY4MCAyODUgUTgxOSAyMzggOTEwIDI4MSBROTcyIDMxNSAxMDE3IDM2MCIvPiA8cGF0aCBkPSJNMTAxNyAzNjAgUTExMTAgNDAyIDEwODUgNTIzIFExMDUyIDU4NyAxMDU5IDY1NyIvPiA8L2c+IDwvc3ZnPg=="); --mode-ink-position: center 38%; }
  [data-mode-card="continue"] { --mode-ink-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgxNiIgaGVpZ2h0PSI4NjYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4MTYgODY2Ij4gPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIzOCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gPHBhdGggZD0iTTkxNCA0MjQgUTkyMCAzNzEgOTQyIDMzMiBROTgxIDIxOSAxMTI2IDEzMiBRMTE5MyA5MiAxMjU5IDc4Ii8+IDxwYXRoIGQ9Ik0xMTUxIDQ5OCBMMTUyMyA0OTIgTTExMDggNTMwIEwxNTE4IDUyNiIvPiA8cGF0aCBkPSJNMTI1OSA3OCBRMTQ0NCAyOSAxNTU4IDE1OSBRMTYzMCAyNDQgMTYzNSAzNzUiLz4gPHBhdGggZD0iTTk5MyA2NDkgTDE1MTEgNjQ2IE0xMjA0IDQ0OSBMMTU0NyA0NDQiLz4gPC9nPiA8L3N2Zz4="); --mode-ink-position: center 58%; }
  [data-mode-card="notes"] { --mode-ink-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgxNiIgaGVpZ2h0PSI4NjYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4MTYgODY2Ij4gPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0MCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gPHBhdGggZD0iTTEzNTUgNDI3IFExNDM2IDM4NSAxNTIzIDQ0MyBRMTU4OSA0ODggMTYzNCA1NzAgUTE0ODMgNTkwIDE0MDAgNTA4IFExMzY5IDQ3NyAxMzU1IDQyNyIvPiA8cGF0aCBkPSJNMTE4MiAyNDUgUTExNjQgMTcyIDEwODggMTM0IFExMDQ4IDExOSAxMDI0IDEyOSIvPiA8cGF0aCBkPSJNNzIwIDMzNCBRMTA0NyAyNDggMTM5MCAxOTAiLz4gPHBhdGggZD0iTTEwNjUgMjczIFExMDg5IDM2MCAxMDA3IDQwOCBROTY5IDQzMCA5MjUgNDM4Ii8+IDxwYXRoIGQ9Ik0xMzEwIDIwNSBRMTI3MiAxMTIgMTIwMCA3NCBRMTE2NSA2MCAxMTI3IDc0Ii8+IDwvZz4gPC9zdmc+"); --mode-ink-position: center 63%; }
}
[data-mode-card="tree"] .story-mode-image { object-position: center 38%; }
[data-mode-card="continue"] .story-mode-image { object-position: center 58%; }
[data-mode-card="notes"] .story-mode-image { object-position: center 63%; }
.story-mode:has(.story-mode-toggle[aria-expanded="true"]) { --mode-image-zoom: 1.035; }
.story-mode:has(.story-mode-toggle[aria-expanded="true"]) .story-mode-soft { mask-position: var(--mode-effect-open); opacity: 1; }
.story-mode-body { position: relative; grid-area: 1 / 2; display: grid; min-width: 0; padding: var(--mode-panel-space); text-align: right; }
.story-mode:nth-child(even) .story-mode-body { grid-column: 1; text-align: left; }
.story-mode-body h3 {
  position: absolute;
  inset-inline: var(--mode-panel-space);
  top: calc(100% - var(--mode-title-rest-bottom) - var(--mode-title-size) * 1.15);
  color: #182d21;
  font: var(--weight-display) var(--mode-title-size)/1.15 var(--heading);
  letter-spacing: -.025em;
  text-shadow: 0 1px 1px #fffc, 0 0 16px #fff8;
  transition: top .5s var(--ease), color .35s .12s var(--ease), text-shadow .35s .12s var(--ease);
}
.story-mode:has(.story-mode-toggle[aria-expanded="true"]) h3 {
  top: var(--mode-panel-space);
  color: #f4f1e6;
  text-shadow: 0 2px 16px #000a;
}
.story-mode-toggle { padding: 0; border: 0; color: inherit; background: transparent; text-align: inherit; }
.story-mode :is(.story-mode-toggle, .action-glow):focus-visible { outline-color: #e8f2eb; }
.story-mode-details {
  display: grid;
  padding-top: calc(var(--mode-title-size) * 1.15 + 20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .28s var(--ease), visibility 0s .28s;
}
.story-mode:has(.story-mode-toggle[aria-expanded="true"]) .story-mode-details {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: .30s, .30s, .30s;
}
.story-mode-details > div { display: flex; flex-direction: column; align-items: end; justify-content: space-between; gap: 15px; }
.story-mode:nth-child(even) .story-mode-details > div { align-items: start; }
.story-mode-details p { max-width: 30em; color: #e1e9df; font-size: 14px; line-height: 1.85; }
.story-mode-details .button { min-height: 44px; padding-inline: 12px; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .story-modes.has-scroll-reveal .story-mode:not(.is-visible):not(:focus-within) {
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
  }
  .story-mode.is-visible { animation: story-mode-enter .58s var(--ease) var(--mode-reveal-delay, 0ms) both; }
}
@keyframes story-mode-enter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.plans-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 24px; margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--deep); }
.plans-entry .button { margin-left: auto; }

.about { background: white; }
/* 原为分割线预留的下间距，去掉线之后由 .team 的上边距承担间隔 */
.about-manifesto { position: relative; }
.team { margin-top: clamp(38px, 6vw, 70px); }
.team-intro { max-width: 750px; margin-bottom: 28px; }
.team-intro h3 { color: var(--deep); font: var(--weight-display) 30px/1.3 var(--heading); }
.team-grid, .platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.team-grid { gap: 20px; }
.team-member {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 25px;
  min-width: 0;
  min-height: 326px;
  padding: 30px 30px 25px;
  border: 1px solid #d5ded3;
  border-radius: 12px;
  background: linear-gradient(#fafaf3e8, #f4f6eee8), url(paper.webp) center / cover;
  box-shadow: 0 8px 24px #243c3010;
  transition: translate .32s var(--ease), border-color .32s var(--ease), box-shadow .32s var(--ease);
}
.team-member::before { content: '“'; position: absolute; z-index: -1; right: 22px; top: 36px; color: #29463712; font: 110px/1 Georgia, serif; pointer-events: none; }
.team-member h4 { margin: 0; color: var(--action); font: var(--weight-emphasis) 13px/1.5 var(--body); letter-spacing: .12em; }
.team-member blockquote { flex: 1; margin: 0; }
/* 信纸格线用下划线实现：浏览器按每行基线定位，天然对齐，无需手工调相位。
   skip-ink 关掉，否则下划线会在字母下伸部分断开。 */
.team-member blockquote p {
  color: #263f35;
  font: var(--weight-display) clamp(14px, 1.5vw, 16px)/1.8 var(--heading);
  letter-spacing: -.015em;
  text-indent: 2em;
  overflow-wrap: anywhere;
  text-decoration-line: underline;
  text-decoration-color: rgba(139, 155, 130, .38);
  text-decoration-thickness: 1px;
  /* 1px：像素实测为准，格线正好落在字形底部 */
  text-underline-offset: 1px;
  text-decoration-skip-ink: none;
}
.team-member blockquote p + p { margin-top: 12px; }
.team-member footer { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; padding-top: 18px; border-top: 1px solid #d8e0d5; }
.team-member cite { display: block; }
/* 手写签名图：已裁掉四周留白，按等高度显示，宽度随比例自适应 */
.team-member cite img { display: block; height: 26px; width: auto; }
@media (min-width: 951px) and (hover: hover) {
  .team-member:hover {
    --letter-border-color: #9cb5a3;
    translate: 0 -5px;
    box-shadow: 0 18px 36px #243c301a;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .team-grid .team-member:nth-child(2).is-visible { animation-delay: .09s; }
  .team-grid .team-member:nth-child(3).is-visible { animation-delay: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  .team-member:hover { translate: none; }
}
.team .actions { margin-top: 24px; }

.start-section { position: relative; isolation: isolate; background: #233c31; color: white; text-align: center; overflow: hidden; }
.start-section::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 50% 122%, #6b9177 0, transparent 62%), repeating-radial-gradient(ellipse at 50% 140%, transparent 0 40px, #e2eee20d 41px 42px); }
.start-section .wrap > .icon { width: 38px; height: 38px; color: #c7e2d0; }
.start-brand-icon { display: none; }
.start-section h2 { margin-block: 18px 14px; font: var(--weight-display) clamp(34px, 4.8vw, 61px)/1.2 var(--heading); letter-spacing: -.05em; }
.start-section .actions { justify-content: center; margin-top: 26px; }
.start-section button:focus-visible { outline-color: white; }

.platform { position: relative; padding: 26px; display: grid; justify-items: start; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.platform > .icon { width: 31px; height: 31px; margin-bottom: 5px; color: var(--action); }
.platform h3 { color: var(--deep); font: var(--weight-display) 24px/1.25 var(--heading); }
.platform p { color: var(--text); line-height: 1.6; }
.platform .button { margin-top: 8px; }
.web-platform { border-color: #a9c0b1; }
.plans-entry { background: white; }

@media (min-width: 951px) {
  .story-section {
    --section-edge-space: calc(var(--story-section-padding) / 2 + 8px);
    /* Offset the space inside labels, logos, and transparent buttons at the edges. */
    padding-block:
      calc(var(--section-edge-space) - var(--section-start-inset, 9px))
      calc(var(--section-edge-space) - var(--section-end-inset, 0px));
  }
  .about { --section-end-inset: 6px; }
  .start-section { --section-start-inset: 3px; --section-end-inset: 17px; }
  .faq-section { --section-start-inset: 10px; }
  #download-title { margin-block-start: 0; }

  .start-section .wrap > .icon { display: none; }
  .start-brand-icon { display: inline-block; vertical-align: middle; filter: url(#start-brand-transparent); }

  .feature-scroll-enabled .feature-heading {
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) [controls-start] auto auto [controls-end] minmax(0, 1fr);
    gap: 14px;
    padding-block: clamp(12px, 4.6vh, 44px);
    border-right-color: transparent;
  }
  .feature-heading h2 { grid-area: 1 / 1; }
  .feature-heading .feature-progress { grid-area: 3 / 1; }
  .feature-heading .feature-scroll-hint { grid-area: 4 / 1; }
  .feature-scroll-enabled .feature-heading::before {
    content: '';
    position: absolute;
    grid-row: controls-start / controls-end;
    inset-block: 0;
    inset-inline-end: -1px;
    width: 1px;
    background: var(--line);
    pointer-events: none;
  }
  .feature-scroll-enabled .feature-heading::after { display: none; }

  .story-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .story-mode, .story-mode:nth-child(even) {
    --mode-panel-space: clamp(26px, 2vw, 36px);
    --mode-title-rest-bottom: 30px;
    grid-template-columns: minmax(0, 1fr);
    min-height: 300px;
  }
  .story-mode .story-mode-body { grid-area: 1 / 1; }
  .story-mode:nth-child(even) {
    --mode-image-flip: -1;
    --mode-image-fade: to right;
    --mode-effect-rest: 0% 50%;
    --mode-effect-open: 100% 50%;
  }
  .story-mode:nth-child(even) .story-mode-body { text-align: right; }
  .story-mode:nth-child(even) .story-mode-details > div { align-items: end; }
  .story-mode-details p { max-width: 26em; color: #fff; }
  .story-mode:nth-child(even) .story-mode-details p { text-wrap: balance; }
  .story-mode:nth-child(even) .story-mode-details .button {
    padding-inline: 0;
    border-inline-width: 0;
    justify-content: flex-end;
    text-align: right;
  }

  .story-section .section-intro .overline > span:empty { display: none; }

  /* Keep the two manifesto columns on one shared text row. */
  .about-manifesto, .philosophy-intro { row-gap: 20px; }
  :is(.about-manifesto, .philosophy-intro) .section-intro { display: contents; }
  :is(.about-manifesto, .philosophy-intro) .overline { grid-column: 1 / -1; margin: 0; }
  .about-manifesto #about-title,
  .philosophy-intro #philosophy-title { grid-column: 1; grid-row: 2; margin: 0; }
  .philosophy-intro #philosophy-title {
    align-self: start;
  }
  :is(.about-manifesto, .philosophy-intro) > .section-prose {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Warm letter paper, ruled writing area and a quiet folded corner. */
  .team-member {
    --letter-border-color: #ded9c9;
    border-color: var(--letter-border-color);
    border-radius: 2px;
    background: linear-gradient(#fffdf6ed, #faf7edee), url(paper.webp) center / cover;
    box-shadow: 0 2px 3px #493d2610, 0 12px 28px #493d2610;
  }
  .team-member::before {
    content: '';
    inset: 18px auto 18px 19px;
    width: 1px;
    background: #b3917930;
  }
  .team-member::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    color: var(--letter-border-color);
    background: linear-gradient(45deg, #ece6d6 0 48%, currentColor 48% 52%, white 52%);
    transition: color .32s var(--ease);
    pointer-events: none;
  }
  .team-member footer { border-top: 0; padding-top: 8px; }
  .platform .button {
    justify-self: start;
    justify-content: flex-start;
    padding-inline: 0;
    border-inline-width: 0;
    text-align: left;
  }
}

.faq-section { background: white; }
.faq-grid { display: grid; grid-template-columns: .68fr 1fr; gap: 24px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 62px; padding: 10px 3px; cursor: pointer; color: var(--deep); font-weight: var(--weight-emphasis); list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--action); font-size: 22px; font-weight: var(--weight-regular); transition: transform .25s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.faq-list details p { padding: 0 3px 18px; line-height: 1.75; color: var(--text); animation: dialog-step .24s var(--ease) both; }
@media (min-width: 951px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq-grid .section-intro, .faq-grid #faq-title { margin: 0; }
  .faq-list summary, .faq-list details p { padding-inline: 0; }
}

.story-footer { padding: 52px 0 25px; background: #eef3ef; color: var(--deep); }
.footer-main { display: grid; grid-template-columns: minmax(185px, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 22px; }
.footer-brand p { margin-block: 13px 6px; font: var(--weight-display) 23px/1.3 var(--heading); }
@media (min-width: 951px) {
  .footer-brand .logo img { width: 70px; height: auto; }
  .footer-brand p {
    position: relative;
    width: max-content;
    margin-top: 10px;
    padding-bottom: 10px;
    text-align: center;
    white-space: nowrap;
    font-family: KaiTi, STKaiti, "Kaiti SC", var(--heading);
    font-size: var(--type-body) !important;
    font-weight: var(--weight-regular);
    letter-spacing: -1.5px;
    line-height: 1.4;
  }
  .footer-brand p::after {
    content: '';
    position: absolute;
    inset: auto 0 2px;
    height: 7px;
    background: var(--action);
    clip-path: polygon(0 94%, 12% 75%, 32% 54%, 51% 36%, 73% 20%, 93% 7%, 100% 8%, 94% 21%, 74% 42%, 52% 56%, 32% 71%, 12% 87%, 2% 100%);
    pointer-events: none;
  }
}
.footer-legal { color: var(--muted); }
.footer-group { display: flex; flex-direction: column; align-items: start; gap: 7px; }
.footer-group h2 { margin-bottom: 3px; font-size: 15px; }
.footer-group a, .footer-group button { padding: 2px 0; border: 0; background: none; text-align: left; font-size: 14px; color: var(--text); line-height: 1.55; }
.footer-group a:hover, .footer-legal a:hover { color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 36px; padding-top: 19px; border-top: 1px solid #d6e1da; font-size: 12px; }
.footer-legal a { margin-left: auto; }

.site-dialog { width: min(680px, calc(100% - 28px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; color: var(--ink); background: white; border: 1px solid #d5e2da; border-radius: 18px; box-shadow: 0 26px 80px #112c2450; overscroll-behavior: contain; }
.site-dialog::backdrop { background: #142b23a8; backdrop-filter: blur(5px); }
.site-dialog[open] { animation: dialog-in .38s var(--ease) both; }
html:has(.site-dialog[open]) { overflow: hidden; }
html.site-dialog-with-gutter:has(.site-dialog[open]) { scrollbar-gutter: stable; }
.dialog-shell { position: relative; padding: clamp(22px, 5vw, 36px); }
.dialog-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--deep); font-size: 24px; line-height: 1; }
.dialog-kicker { padding-right: 42px; letter-spacing: .06em; }
.dialog-shell h2 { margin: 8px 38px 14px 0; color: var(--deep); font: var(--weight-display) clamp(27px, 5vw, 39px)/1.24 var(--heading); letter-spacing: -.04em; }
.dialog-shell h2:focus { outline: none; }
#site-dialog-content { display: grid; gap: 14px; }
#site-dialog-content > * { animation: dialog-step .28s var(--ease) both; }
#site-dialog-content p { line-height: 1.75; color: var(--text); }
#site-dialog-content .actions { margin-top: 3px; }
.dialog-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dialog-choice { padding: 13px 14px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--line); border-radius: 10px; color: var(--deep); background: #f4f8f5; text-align: left; }
.dialog-choice small { display: block; margin-top: 4px; color: var(--muted); }
.example-index { display: flex; flex-wrap: wrap; gap: 6px; }
.example-index button { padding: 7px 10px; min-height: 36px; border: 1px solid #dce5df; border-radius: 8px; color: var(--deep); background: white; font-size: 13px; }
.example-reader { min-height: 178px; padding: 18px; display: grid; align-content: start; gap: 9px; border-left: 3px solid #7d9b89; border-radius: 7px; background: #f2f6f3; animation: dialog-step .34s var(--ease) both; }
.example-reader h3 { color: var(--deep); font: var(--weight-display) 22px/1.3 var(--heading); }
.example-reader blockquote, .example-reader li { line-height: 1.75; }
.example-reader ol, .example-reader ul { margin: 0; padding-inline-start: 21px; }
.example-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.example-controls .button:disabled { opacity: .48; cursor: default; }
.dialog-field { display: grid; gap: 7px; color: var(--deep); font-weight: var(--weight-emphasis); }
.dialog-field textarea { width: 100%; padding: 11px; resize: vertical; border: 1px solid #b8cbbf; border-radius: 8px; color: var(--ink); font: inherit; font-weight: var(--weight-regular); }
.dialog-field textarea:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.dialog-status { min-height: 1.5em; font-size: 14px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.975); clip-path: inset(9% 0 0 round 18px); } to { opacity: 1; transform: none; clip-path: inset(0 round 18px); } }
@keyframes dialog-step { from { opacity: .5; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 1050px) {
  .footer-main { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 950px) {
  .desktop-login { display: none; }
  .mobile-login { display: block; padding-inline: 0; text-align: left; justify-self: start; }
  .nav-actions { gap: 6px; }
  .nav-actions .account-avatar { width: 36px; height: 36px; }
  .nav-actions .header-cta .icon { display: none; }
}
@media (max-width: 760px) {
  .philosophy-intro, .about-manifesto, .faq-grid { grid-template-columns: 1fr; gap: 20px; }
  .principles article { padding: 19px 14px; }
  .team-grid, .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .story-mode, .story-mode:nth-child(even) {
    --mode-panel-space: 23px;
    --mode-image-fade: to bottom;
    --mode-effect-rest: 50% 0%;
    --mode-effect-open: 50% 100%;
    --mode-effect-size: 100% 200%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(170px, 45vw, 260px) 1fr;
  }
  .story-mode .story-mode-body { grid-area: 2 / 1; text-align: left; }
  .story-mode .story-mode-details > div { align-items: start; }
  [data-mode-card="quick"] .story-mode-image { object-position: 82% center; }
  [data-mode-card="tree"] .story-mode-image { object-position: 68% 38%; }
  [data-mode-card="continue"] .story-mode-image { object-position: 82% 58%; }
  [data-mode-card="notes"] .story-mode-image { object-position: 72% 63%; }
}
@media (max-width: 520px) {
  .site-header .nav { width: calc(100% - 24px); }
  .site-header .logo img { width: 96px; }
  .principles, .platform-grid { grid-template-columns: 1fr; }
  .principles article + article { border-left: 0; border-top: 1px solid #d6e1da; }
  .plans-entry .button { margin-left: 0; }
  .team-grid { gap: 8px; }
  .team-member { flex-direction: column; align-items: start; padding: 13px; }
  .team-avatar { width: 44px; height: 44px; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal a { margin-left: 0; }
}

:is(.hero, .story-mode, .start-section) {
  --action-glow-text: white;
  --action-glow-line: #8eaa9a;
  --action-glow-fill: linear-gradient(to top, #9be9ba4d, #9be9ba1a 16px, transparent 30px) padding-box;
  --action-glow-offset: 0px;
}
.action-glow { color: var(--action-glow-text, var(--deep)); }
.action-glow, .action-glow:hover { background: transparent; border-color: transparent; border-radius: 0; }
:is(.footer-group button, .inline-link) { --action-glow-offset: 0px; }
