/* Overview: a short welcome beside the kamishibai print, then the products as tiles (art, a live figure, a state pill) — all within
   the first screen at desktop widths — and the guides folded underneath. */
.home-page main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.home-page main > * + * { margin-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--washi-hi); margin: 10px; border: 1px solid var(--line); }
.hero-copy { display: grid; align-content: center; gap: 8px; padding: 20px 28px; }
.hero-copy h1 { font-size: 36px; line-height: 1.2; }
.hero-copy > p { font-size: 15px; line-height: 1.65; color: var(--sumi-2); max-width: 46ch; }
/* The hero links are the house's brush buttons (style.css); only their link behaviour is set here. */
.button { display: inline-flex; align-items: center; color: var(--on-ink); text-decoration: none; }
.hero-media { position: relative; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); background: var(--washi-lo); }
.hero-media .edo-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 45%; }
#pending-status { padding: 8px 12px; background: #efe0bb; border-left: 3px solid var(--kincha); }
.hero-copy .actions { align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.journey-link { color: var(--sumi); font-size: 14px; padding: 10px 4px; text-underline-offset: 4px; }
.hero-copy .tour-link, .hero-copy .borrowing-link { white-space: nowrap; }
.hero-copy > .hero-currency { font-size: 13px; line-height: 1.6; }
.hero-copy > .hero-manage { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; font-size: 14px; }
.hero-manage a { display: inline-flex; align-items: center; min-height: 36px; }
.home-page #notice:not(:empty) { margin: 12px; padding: 12px; background: var(--washi-hi); border-left: 2px solid var(--shu); }

/* Product tiles: each a link with its print, its ledger, a name, one line, a large live figure and a coloured state pill. */
.principles { display: grid; gap: 10px; }
.product-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile { --book-c: var(--ai); min-width: 0; }
.tile.book-kasane { --book-c: var(--kasane-2); }
.tile.book-programs { --book-c: var(--yorozu-2); }
.tile > a { position: relative; display: flex; flex-direction: column; height: 100%; color: var(--sumi); text-decoration: none; background: var(--washi-tex) 0 0 / 480px, var(--washi); border: 1px solid #00000059; border-top: 3px solid var(--book-c); box-shadow: 0 14px 30px -18px #000000cc; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.tile-art { position: relative; display: block; height: 104px; background: var(--art) var(--at, 70% 60%) / cover no-repeat, var(--washi-lo); border-bottom: 1px solid var(--hair); }
.tile[data-tile="borrow"] { --art: url('/assets/edo-ryogae-counter.jpg'); --at: 62% 62%; }
.tile[data-tile="turbo"] { --art: url('/assets/edo-yorozuya-shop.jpg'); --at: 70% 58%; }
.tile[data-tile="perps"] { --art: url('/assets/edo-kamishibai-hero-v2.jpg'); --at: 38% 72%; }
.tile[data-tile="credit"] { --art: url('/assets/edo-sparrow-guide.webp'); --at: 50% 62%; }
.tile[data-tile="reserve"] { --art: url('/assets/edo-reserve-storehouse.jpg'); --at: 82% 58%; }
.tile-icon { position: absolute; left: 12px; bottom: -18px; width: 38px; height: 38px; padding: 6px; border-radius: 50%; background: var(--washi-hi); border: 1px solid var(--book-c); fill: none; stroke: var(--book-c); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 3px 8px -4px #0008; }
.tile-book { display: block; margin: 24px 14px 0; font: 600 10.5px/1.4 var(--sans); letter-spacing: .08em; color: var(--muted); }
.tile-name { display: flex; align-items: center; gap: 7px; margin: 3px 14px 0; font: 600 18px/1.3 var(--serif); }
.tile-name .desk-seal { display: grid; place-items: center; flex: none; width: 21px; height: 22px; border: 1px solid var(--shu); color: var(--shu); font: 600 12px/1 var(--serif); transform: rotate(-3deg); }
.tile-line { display: block; margin: 5px 14px 0; font-size: 12.5px; line-height: 1.55; color: var(--sumi-2); }
.tile-figure { display: grid; align-content: end; gap: 1px; flex: 1; min-height: 76px; margin: 10px 14px 14px; padding-top: 8px; border-top: 1px dotted var(--line); }
.tile-figure .figure-label { font: 600 11px/1.4 var(--sans); letter-spacing: .04em; color: var(--shu-dk); }
.tile-figure .figure-value { font: 600 25px/1.2 var(--serif); font-variant-numeric: tabular-nums; color: var(--sumi); overflow-wrap: anywhere; }
.tile-figure .figure-sub { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
/* State pills: green open, amber closed for now, vermilion during the founding sale; a desk not open yet wears a grey "Soon". */
.tile-pill { position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px; font: 600 11px/1.6 var(--sans); letter-spacing: .03em; color: #fff; background: var(--matcha); box-shadow: 0 2px 6px -2px #0009; }
.tile-pill[data-state="closed"] { background: var(--kincha); }
.tile-pill[data-state="genesis"] { background: var(--shu); }
.tile-pill::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; opacity: .85; }
.tile > a[data-soon] .tile-pill { display: none; }
.product-tiles.book-desks .tile > a[data-soon]::after { position: absolute; top: 8px; right: 8px; margin: 0; padding: 2px 9px; border: 0; border-radius: 999px; background: #6f6a60; color: #fff; font: 600 11px/1.6 var(--sans); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .tile > a:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -16px #000000d9; }
  .tile > a:hover .tile-name { color: var(--shu-dk); }
  .button:hover { background: var(--shu-dk); color: var(--on-ink); }
  .button.secondary:hover { background: var(--sumi); color: var(--on-ink); }
  .desk-strip a:hover { color: var(--shu-dk); }
}
.tile > a:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }

/* The remaining desks: one row of seals. */
.desk-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 6px 16px; background: var(--washi-hi); border: 1px solid #00000059; }
.desk-strip-label { font: 600 12px/1.4 var(--sans); color: var(--muted); letter-spacing: .06em; }
.desk-strip .book-desks { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
.desk-strip a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--sumi); font: 600 14px/1.3 var(--serif); text-decoration: none; }
.desk-strip .desk-seal { display: grid; place-items: center; width: 20px; height: 21px; border: 1px solid var(--shu); color: var(--shu); font: 600 11.5px/1 var(--serif); transform: rotate(-3deg); }
.home-read-note { margin: 0; font-size: 12px; color: var(--ai-ink); }
.home-read-note a { color: inherit; }

/* Guides, folded: devnet, a desk for what you hold, and the borrowing steps. */
.home-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.home-guides > details { padding: 0 18px; }
.home-guides > details[open] { grid-column: 1 / -1; }
.home-guides > details > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font: 600 15px/1.45 var(--serif); list-style: none; }
.home-guides > details > summary::-webkit-details-marker { display: none; }
.home-guides > details > summary::before { content: "＋"; flex: none; color: var(--shu); }
.home-guides > details[open] > summary::before { content: "−"; }
.home-guides > details > summary::after { content: none; }
.devnet-guide-body { padding: 4px 0 18px; }
.devnet-guide-body p { max-width: 76ch; font: 14.5px/1.8 var(--prose); color: var(--sumi-2); }
.devnet-guide-body p + p { margin-top: 10px; }
.devnet-guide-body a { display: inline-block; padding-block: 4px; font-family: var(--sans); }
.devnet-guide-body .guide-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.purpose-guide dl { margin: 0 0 8px; }
.purpose-guide dl > div { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 15px; }
.purpose-guide dt { font-weight: 600; }
.purpose-guide dd { margin: 0; font-size: 14px; line-height: 1.8; }
.purpose-guide dd a { display: inline-flex; min-height: 44px; align-items: center; }
.borrowing-guide { scroll-margin-top: 24px; }
.borrowing-guide ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 8px 8px 20px 24px; gap: 24px; }
.borrowing-guide li { padding-left: 4px; }
.borrowing-guide li::marker { color: var(--shu); font-variant-numeric: tabular-nums; }
.borrowing-guide h3 { margin: 0 0 8px; font-size: 16px; }
.borrowing-guide p { margin: 0; color: var(--sumi-2); font-size: 13px; line-height: 1.8; }

@media (max-width: 1180px) and (min-width: 861px) {
  .product-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile { grid-column: span 2; }
  .tile:nth-child(-n+2) { grid-column: span 3; }
}
@media (min-width: 861px) and (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { height: 200px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) { .borrowing-guide ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } .purpose-guide dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { aspect-ratio: 2 / 1; border-left: 0; border-top: 1px solid var(--line); }
  .product-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:first-child { grid-column: 1 / -1; }
  .home-guides { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .hero-grid { margin: 8px; }
  .hero-copy { padding: 18px 16px 18px; gap: 10px; }
  .hero-copy h1 { font-size: 32px; }
  .hero-media { aspect-ratio: auto; height: 140px; }
  .product-tiles { gap: 8px; }
  .tile-art { height: 72px; }
  .tile-icon { width: 32px; height: 32px; bottom: -15px; left: 10px; }
  .tile-book { margin: 20px 10px 0; font-size: 10px; }
  .tile-name { margin: 2px 10px 0; font-size: 16px; }
  .tile-line { margin: 4px 10px 0; font-size: 12px; }
  .tile-figure { min-height: 64px; margin: 8px 10px 10px; }
  .tile-figure .figure-value { font-size: 21px; }
  .tile-pill, .product-tiles.book-desks .tile > a[data-soon]::after { top: 6px; right: 6px; padding: 1px 7px; font-size: 10.5px; }
  .desk-strip { padding: 6px 12px; }
  .home-guides > details { padding: 0 14px; }
  .borrowing-guide ol { grid-template-columns: minmax(0, 1fr); padding: 4px 0 18px 22px; }
  .borrowing-guide p { font-size: 14px; }
}
.home-guides > details > summary::before { position: static; width: auto; height: auto; margin: 0; border: 0; transform: none; background: none; }
.hero-copy > .hero-manage { max-width: none; }
.tile[data-tile="credit"] .figure-value, .tile[data-tile="perps"] .figure-value { font-size: 21px; white-space: nowrap; }
/* Try next (a connected wallet): one compact row under the tiles. */
.home-page .try-next { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 20px; padding: 6px 16px; }
.home-page .try-next h2 { font-size: 15px; }
.home-page .try-next-lede { display: none; }
.home-page .try-next .try-next-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 18px; }
.home-page .try-next-list li { border-top: 0; padding: 4px 0; }
@media (max-width: 560px) { .home-page .try-next { grid-template-columns: minmax(0, 1fr); padding: 8px 14px; } .tile[data-tile="credit"] .figure-value, .tile[data-tile="perps"] .figure-value { font-size: 17px; } }

.journey-link { color: var(--sumi); font-size: 14px; padding: 10px 4px; text-underline-offset: 4px; }
.market-thesis { padding: 30px; scroll-margin-top: 16px; }
.market-thesis h2 { font-size: 26px; margin-bottom: 10px; }
.market-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; margin: 24px 0; padding-left: 24px; }
.market-steps li::marker { color: var(--shu); font-family: var(--serif); }
.market-steps h3 { font-size: 18px; margin-bottom: 8px; }
.market-steps p { font-size: 16px; line-height: 1.75; color: var(--sumi-2); }
.market-links { margin-top: 16px; font-size: 14px; }
@media (max-width: 860px) { .market-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .market-thesis { padding: 22px 18px; } .market-thesis h2 { font-size: 23px; } }
.market-thesis .guide-intro { font-size: 17px; line-height: 1.75; }
.market-thesis .guide-risk { font-size: 14px; line-height: 1.65; color: var(--sumi-2); }
