/* Bring your own storage: page-only blocks (hero checks, data-flow diagram, uses grid) */

/* ───── Hero checks ───── */
.byos-hero { padding-bottom: 8px; }
.byos-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; max-width: 860px; margin: 36px auto 0; list-style: none; padding: 0; }
.byos-checks li { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(var(--ink) / .03); font-size: 14.5px; color: var(--fg); }
.byos-checks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none; background: rgba(19,233,137,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5.5 9.2 2.3 2.3 4.7-4.9' fill='none' stroke='%2386FFC9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: inset 0 0 0 1px rgba(19,233,137,.35); }

.byos-inline { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(19,233,137,.4); text-underline-offset: 3px; }
.byos-inline:hover { text-decoration-color: var(--accent); }

/* ───── Data-flow diagram ───── */
.flow {
  display: grid; align-items: center; margin-top: 64px;
  grid-template-columns: minmax(0, .78fr) 36px minmax(0, 1fr) 36px minmax(0, 1.75fr) 36px minmax(0, 1fr);
}
.flow-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.flow-col.card { padding: 22px; gap: 14px; }
.flow-label { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

.flow-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.flow-chips a { display: flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-1); font-size: 14.5px; transition: border-color .2s, color .2s; }
.flow-chips a:hover { border-color: rgba(19,233,137,.5); color: var(--mint); }

.flow-cx { border-color: rgba(19,233,137,.3); background: radial-gradient(120% 80% at 50% 0%, rgba(19,233,137,.1), transparent 70%), var(--bg-1); }
.flow-step { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgb(0 0 0 / calc(.35 * var(--sh))); }
.flow-name { display: inline-block; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); transition: color .2s; }
.flow-name:hover { color: var(--mint); }
.flow-step p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }
.flow-note { font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }

.flow-arrow { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; }
.flow-arrow::before { content: ""; position: absolute; left: 6px; right: 10px; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(19,233,137,.2), var(--accent)); }
.flow-arrow::after { content: ""; position: absolute; right: 6px; top: calc(50% - 4px); border: 4px solid transparent; border-left: 6px solid var(--accent); border-right: 0; }
.flow-arrow span { position: absolute; top: 50%; left: 50%; z-index: 1; writing-mode: vertical-rl; transform: translate(-50%, -50%) rotate(180deg); padding: 10px 0; background: var(--bg); font-family: var(--mono); font-size: 12px; color: var(--fg-3); white-space: nowrap; }

.bucket { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; border: 1px dashed rgba(19,233,137,.35); background: rgba(19,233,137,.03); }
.bucket-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.bucket-head b { font-size: 16px; font-weight: 600; }
.bucket-legend { display: flex; gap: 14px; font-family: var(--mono); font-size: 12.5px; }
.bucket-legend a { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); transition: color .2s; }
.bucket-legend a:hover { color: var(--mint); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-space { border: 1px solid var(--accent); }
.sw-set { background: rgba(134,255,201,.55); }
.bucket > p { font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }
.spaces { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.space { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid rgba(19,233,137,.35); background: var(--bg-1); min-width: 0; }
.space b { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--accent); margin-bottom: 2px; }
.space span { padding: 6px 9px; border-radius: 6px; background: rgba(134,255,201,.08); border: 1px solid rgba(134,255,201,.16); font-size: 12.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.out { padding: 16px 18px; }
.out b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.out p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }
.out-link { display: block; border-color: rgba(19,233,137,.3); }
.out-link .link { margin-top: 10px; font-size: 13.5px; }

/* ───── Owned / Open / Organized icons ───── */
.byos-ic { display: block; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 24px; }

/* ───── Uses grid ───── */
.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.use { padding: 28px; display: flex; flex-direction: column; }
.use-k { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--accent); margin-bottom: 36px; }
.use h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.use p { font-size: 14.5px; line-height: 1.6; color: var(--fg-2); }

/* ───── Final ───── */
.byos-final-ic { display: block; width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 28px; }

/* ───── Responsive ───── */
@media (max-width: 1120px) {
  .flow { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-left: auto; margin-right: auto; }
  .flow-arrow { height: 52px; }
  .flow-arrow::before { left: 50%; right: auto; top: 6px; bottom: 12px; width: 1px; height: auto; background: linear-gradient(180deg, rgba(19,233,137,.2), var(--accent)); }
  .flow-arrow::after { left: calc(50% - 4px); right: auto; top: auto; bottom: 6px; border: 4px solid transparent; border-top: 6px solid var(--accent); border-bottom: 0; }
  .flow-arrow span { position: relative; top: auto; left: auto; writing-mode: horizontal-tb; transform: none; padding: 4px 10px; }
  .flow-chips { flex-direction: row; flex-wrap: wrap; }
  .flow-chips li { flex: 1 1 calc(33.333% - 8px); }
  .flow-chips a { justify-content: center; }
  .flow-sources .flow-label, .flow-out .flow-label { text-align: center; }
  .uses { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .quote-stats { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .byos-checks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; max-width: 360px; }
  .byos-checks li { height: auto; min-height: 38px; padding: 8px 10px; font-size: 13.5px; border-radius: 12px; }
  .flow { margin-top: 48px; }
  .flow-col.card { padding: 18px; }
  .flow-chips li { flex-basis: calc(50% - 8px); }
  .bucket { padding: 12px; }
  .spaces { gap: 8px; }
  .space { padding: 10px; }
  .uses { grid-template-columns: minmax(0, 1fr); }
  .use { padding: 26px; }
  .use-k { margin-bottom: 20px; }
}

/* Light skin: small green text uses --mint (≥4.5:1 on the light surfaces); --accent stays for dots, fills,
   borders and large numbers. Light only, so the dark skin is unchanged. */
:root[data-theme="light"] .byos-inline,
:root[data-theme="light"] .flow-label,
:root[data-theme="light"] .space b,
:root[data-theme="light"] .use-k { color: var(--mint); }
