/* Articles, the libraries and the founder's page (tool/site/articles).
   Loaded after home.css, whose tokens, top bar, store buttons, closing band
   and footer they reuse. A reading page: one column, paper ground. */
.reading { background: var(--paper); }
.reading .top { position: static; background: var(--aqua); }

.piece {
  max-width: 42rem; margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--pad) clamp(3rem, 7vw, 4.5rem);
  box-sizing: content-box;
}
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--ink-2); margin-bottom: 1rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; }
.piece h1 {
  font-weight: 900; line-height: 1.25; letter-spacing: -.01em;
  font-size: clamp(1.7rem, 5.4vw, 2.4rem); text-wrap: balance;
}
.byline { margin-top: .9rem; font-size: .9rem; color: var(--ink-2); }
.byline a { color: var(--sea); font-weight: 700; text-decoration: none; }
.byline time { white-space: nowrap; }
.byline a:hover { text-decoration: underline; text-underline-offset: 3px; }
.note {
  margin-top: 1.25rem; padding: .8rem 1rem; border-radius: .8rem;
  background: hsl(36 72% 94%); color: var(--brown); font-size: .92rem;
}

/* the answer an answer engine can lift on its own */
.answer {
  margin: 1.75rem 0 0; padding: 1.15rem 1.25rem 1.25rem; border-radius: 1.1rem;
  background: var(--aqua); border: 1px solid var(--aqua-3);
}
.answer h2 { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sea); margin-bottom: .35rem; }
.zh .answer h2 { letter-spacing: .12em; }
.answer p { font-weight: 700; font-size: 1.08rem; line-height: 1.65; }

.prose { margin-top: 2rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.4rem; font-weight: 900; font-size: clamp(1.25rem, 3.4vw, 1.5rem); line-height: 1.3; }
.prose h3 { margin-top: 1.6rem; font-weight: 800; font-size: 1.12rem; }
.prose h2 + *, .prose h3 + * { margin-top: .6rem; }
.prose p, .prose li { color: var(--ink); }
.zh .prose p, .zh .prose li { line-height: 1.85; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; }
.prose a, .qa a, .lead a { color: var(--sea); font-weight: 700; text-underline-offset: 3px; }
.prose strong { font-weight: 800; }
.prose blockquote {
  margin: 1.4rem 0; padding: .9rem 1.1rem; border-radius: .9rem;
  background: hsl(186 60% 95%); color: var(--sea-deep); font-weight: 700;
}
.prose blockquote p + p { margin-top: .5rem; }
.table { overflow-x: auto; margin: 1.4rem 0; border: 1px solid hsl(186 30% 86%); border-radius: .9rem; background: #fff; }
.table table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .92rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid hsl(186 30% 90%); }
.table th { background: var(--aqua); font-weight: 800; color: var(--sea-deep); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 800; }
/* on a phone each row becomes a small card, every cell under its column's name */
@media (max-width: 640px) {
  .table { border: 0; background: none; overflow: visible; }
  .table table, .table tbody, .table tr, .table td { display: block; min-width: 0; }
  .table thead { display: none; }
  .table tr { background: #fff; border: 1px solid hsl(186 30% 86%); border-radius: .9rem; padding: .75rem 1rem; }
  .table tr + tr { margin-top: .6rem; }
  .table td { border: 0; padding: .15rem 0; }
  .table td:first-child { font-size: 1.02rem; color: var(--sea-deep); padding-bottom: .35rem; }
  .table td:not(:first-child)::before { content: attr(data-l) "："; color: var(--ink-2); font-weight: 700; }
  .en .table td:not(:first-child)::before { content: attr(data-l) ": "; }
}

/* questions at the end, the home page's accordion in one column */
.qa { margin-top: 3rem; border-top: 1px solid hsl(186 30% 86%); }
.qa h2 { font-weight: 900; font-size: 1.3rem; margin: 1.5rem 0 .5rem; }
.qa details { border-bottom: 1px solid hsl(186 30% 86%); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem .25rem; font-weight: 800; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 1.1rem; height: 1.1rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315606a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .3s var(--ease); }
.qa details[open] summary::after { transform: rotate(180deg); }
.qa summary:hover { color: var(--sea); }
.qa details p { padding: 0 .25rem 1.15rem; color: var(--ink-2); }

/* the library */
.lead { margin-top: .8rem; color: var(--ink-2); }
.cards { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.cards a {
  display: grid; gap: .45rem; padding: 1.2rem 1.3rem; border-radius: 1.1rem; text-decoration: none;
  background: #fff; border: 1px solid hsl(186 30% 86%);
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.cards a:hover { border-color: var(--teal); transform: translateY(-2px); }
.cards h3 { font-weight: 900; font-size: 1.2rem; line-height: 1.35; }
/* the core articles: "Start here" in the library, "Read next" under every
   other article. A tinted card and a larger title, so they read first. */
.group { margin-top: 2.25rem; }
.group h2, .next h2 { font-weight: 900; font-size: 1.05rem; color: var(--sea); letter-spacing: .02em; }
.group .cards, .next .cards { margin-top: .9rem; }
.cards.core a { background: var(--aqua); border-color: var(--aqua-3); padding: 1.35rem 1.4rem; }
.cards.core a:hover { border-color: var(--sea); }
.cards.core h3 { font-size: 1.3rem; color: var(--sea-deep); }
.next { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid hsl(186 30% 86%); }
.cards p { color: var(--ink-2); font-size: .95rem; }
.cards time { font-size: .8rem; color: var(--ink-2); }

/* the quiet close: one line, the otters, the stores */
.reading .close-in { gap: 1.5rem; }
.reading .close img { width: min(10rem, 45vw); }
.close-note { text-align: center; font-weight: 800; font-size: 1.1rem; line-height: 1.5; max-width: 26rem; text-wrap: balance; }
