/*
 * "Everything in Siby": the whole list of what the app does, by area and sub-section. The words are in index.html;
 * features.js counts them, finds in them, and folds the areas on a phone. Colors are base.css tokens.
 */
.all .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(44px, 6vw, 80px); }

/* The top: the claim, the count, the search */
.all-top { display: grid; gap: clamp(22px, 2.6vw, 34px); align-items: end; }
.all-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.12em; font: 700 clamp(104px, 17vw, 250px)/0.84 var(--sans); letter-spacing: -0.06em; color: var(--ink); }
.all-count small { font: 600 clamp(20px, 2.2vw, 30px)/1.15 var(--sans); letter-spacing: -0.02em; color: var(--fg); max-width: 9em; }
@media (min-width: 900px) {
  .all-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 7vw, 120px); }
  .all-top > .kicker, .all-top > .h2 { grid-column: 1; }
  .all-top > .all-count { grid-column: 1; }
  .all-top > .lead { grid-column: 2; grid-row: 2; padding-bottom: 0.35em; }
  .all-top > .all-tools { grid-column: 2; grid-row: 3; align-self: end; padding-bottom: 1.2em; }
}
.all-tools { display: grid; gap: 10px; }
.all-find { display: flex; align-items: center; gap: 12px; height: 58px; padding-inline: 20px; border-radius: 29px; background: var(--canvas); border: 1.5px solid var(--line-strong); color: var(--text-3); transition: border-color 160ms, background 160ms; }
.all-find:focus-within { border-color: var(--ink); background: var(--surface); }
.all-find svg { flex: none; }
.all-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 17px/1 var(--sans); color: var(--navy); }
.all-find input::placeholder { color: var(--text-3); font-weight: 400; }
.all-found { min-height: 20px; padding-inline: 20px; font: 500 14px/20px var(--sans); color: var(--fg-2); }

/* Jump to an area */
.all-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.all-nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 16px 12px; border-radius: 20px; background: var(--canvas); color: var(--navy); font: 600 14px/1 var(--sans); text-decoration: none; white-space: nowrap; transition: background 140ms, color 140ms; }
.all-nav a:hover { background: var(--navy); color: var(--on-navy); }
.all-nav a i { font: 500 12px/1 var(--mono); font-style: normal; color: var(--ink); }
.all-nav a:hover i { color: var(--cyan-soft); }

/* An area */
.all-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: clamp(40px, 5.4vw, 80px); border-top: 1px solid var(--line-strong); scroll-margin-top: 84px; }
.area-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; row-gap: 10px; align-items: center; text-align: start; }
.area-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: var(--accent-tint); color: var(--ink); }
.area-ico svg { width: 28px; height: 28px; }
.area-head h3 { font: 700 clamp(26px, 2.6vw, 36px)/1.05 var(--sans); letter-spacing: -0.03em; color: var(--navy); }
.area-n { font: 500 13px/18px var(--mono); color: var(--ink); white-space: nowrap; }
.area-say { grid-column: 1 / -1; font: 400 16px/1.55 var(--sans); color: var(--fg-2); max-width: 24em; }
.area-fold { display: none; }
.area-subs { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(34px, 3.6vw, 52px) clamp(32px, 4vw, 64px); align-items: start; min-width: 0; }
.sub h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font: 500 12px/16px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); }
.sub h4 i { font: 400 12px/16px var(--sans); font-style: normal; letter-spacing: 0; text-transform: none; color: var(--text-3); }
/* The first three of a sub-section are said in full. The rest are named, and a tap on a name says the rest. */
.sub li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding-block: 9px; }
.sub li b { font: 600 15px/21px var(--sans); color: var(--navy); }
.sub li span { font: 400 13.5px/20px var(--sans); color: var(--fg-2); }
.sub li:nth-child(n+4) { display: inline; padding: 0; cursor: pointer; }
.sub li:nth-child(4)::before { content: ''; display: block; height: 8px; }
.sub li:nth-child(n+4) b { font: 500 14px/28px var(--sans); color: var(--fg-2); white-space: nowrap; transition: color 120ms; }
.sub li:nth-child(n+4):hover b { color: var(--ink); }
.sub li:nth-child(n+4) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sub li:nth-child(n+4):not(:last-child)::after { content: '·'; margin-inline: 9px 7px; color: var(--line-control); }
.sub li.show, .all.finding .sub li { display: grid; padding-block: 9px; cursor: default; }
.sub li.show::after, .all.finding .sub li::after { content: none; }
.sub li.show b, .all.finding .sub li b { font: 600 15px/21px var(--sans); color: var(--navy); white-space: normal; }
.sub li.show span, .all.finding .sub li span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
.all.finding .sub li:nth-child(4)::before { display: none; }
.sub li.only b::after { content: ''; display: inline-block; width: 13px; height: 13px; margin-inline-start: 7px; vertical-align: -1px; background: var(--ink); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.all { --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z'/%3E%3C/svg%3E"); }
.sub li mark { background: color-mix(in srgb, var(--cyan) 30%, transparent); color: inherit; border-radius: 3px; }
.all [hidden] { display: none !important; }
.all-legend { display: flex; align-items: center; gap: 10px; font: 400 14px/20px var(--sans); color: var(--fg-2); }
.all-legend i { flex: none; width: 15px; height: 15px; background: var(--ink); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.all-none { padding-block: 40px; font: 600 20px/1.4 var(--sans); color: var(--navy); }

@media (min-width: 1100px) { .area-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 899px) { .area-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  /* Wide: the area's name stays in view at the start while its list runs beside it. */
  .area { grid-template-columns: minmax(0, 290px) minmax(0, 1fr); column-gap: clamp(48px, 7vw, 110px); }
  .area-head { position: sticky; top: 100px; align-self: start; grid-template-columns: minmax(0, 1fr); row-gap: 14px; pointer-events: none; }
}
@media (max-width: 899px) {
  /* A phone: an area is a row to open. Without the script every area is open. */
  .js .all-nav { display: none; }   /* the folded areas are the index there */
  .js .area-head { cursor: pointer; }
  .js .area-fold { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--canvas); color: var(--navy); transition: transform 240ms var(--ease-spring); }
  .js .area-fold::before { content: ''; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
  .js .area:not(.shut) .area-fold { transform: rotate(180deg); }
  .js .area.shut .area-subs, .js .area.shut .area-say { display: none; }
  .js .all.finding .area.shut .area-subs { display: grid; }
  .area { gap: 22px; padding-block: 26px; }
  .area-n { grid-column: 2; grid-row: 2; }
  .area-head h3 { grid-column: 2; }
  .area-ico { grid-row: 1 / span 2; }
  .area-fold { grid-column: 3; grid-row: 1 / span 2; }
}
