/* Pre-rendered pages (app/seo): the server's copy shows until the live page has drawn, then hides. */
#app:not(:empty) ~ #ssr { display: none; }
#ssr form[inert] { opacity: .85; }

/* Guide pages under /bali */
.guide { max-width: 980px; }
.guide h1 { margin: 0; }
.guide .lead { font-size: 17px; line-height: 1.6; max-width: 72ch; margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 13px; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.crumbs a { color: inherit; }
.guide-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.guide-table caption { text-align: left; font-size: 12px; color: var(--ink-soft); padding-bottom: 6px; }
.guide-table th, .guide-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; }
.guide-table tbody th { font-weight: 500; }
.guide-table td { white-space: nowrap; }
.guide-links { display: grid; gap: 8px; padding-left: 18px; margin: 0; }
.guide-links.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.guide-steps { display: grid; gap: 8px; margin: 0; padding-left: 22px; }
.guide-faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.guide-faq summary { cursor: pointer; font-weight: 600; }
.guide-faq p { margin: 8px 0 0; line-height: 1.6; }
.guide-ctas { margin: 4px 0; }
.guide-footer { max-width: 980px; margin: 0 auto; display: grid; gap: 10px; }
.guide-footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; }
.guide-footer-links a { color: inherit; }
.guide-app { font-weight: 600; }
.guide input[type="search"] { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--r-control, 12px); border: 1px solid var(--line); font: inherit; }
@media (max-width: 640px) {
  .guide-table { font-size: 13.5px; }
  .guide-table td { white-space: normal; }
}
.guide .stat .v { font-size: 19px; line-height: 1.3; }
@media (max-width: 760px) { .topbar .nav-extra { display: none; } }

/* Written guides (seo/content) */
.article { max-width: 72ch; display: grid; gap: 10px; }
.article-body { display: block; }
.article-body { line-height: 1.7; font-size: 16.5px; }
.article-body h2 { margin: 34px 0 10px; font-size: 24px; scroll-margin-top: 80px; }
.article-body h3 { margin: 22px 0 6px; font-size: 18px; }
.article-body p { margin: 0 0 14px; }
.article-list { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.article-note { border-left: 3px solid var(--accent, #f5a623); padding: 8px 14px; background: var(--card, rgba(0,0,0,.03)); border-radius: 8px; }
.article-table td { white-space: normal; }
.article-toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 24px; }
.article-toc li { margin: 0 0 6px; break-inside: avoid; }
.area-guides { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.area-guides h3 { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.suburb-directory { display: grid; gap: 16px; }
.suburb-directory > h2 { margin: 18px 0 0; }
@media (max-width: 640px) { .article-body { font-size: 16px; } .article-body h2 { font-size: 21px; } }

/* token top-up guides: drawn phone screens, one per step */
.guide-tips { display: grid; gap: 8px; margin: 0; padding-left: 20px; line-height: 1.55; }
.ph-steps { list-style: none; counter-reset: ph; margin: 8px 0 0; padding: 0; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ph-steps > li { counter-increment: ph; }
.ph-step { margin: 0; display: grid; gap: 8px; align-content: start; }
.ph-step figcaption { font-size: .92rem; line-height: 1.45; }
.ph-step figcaption::before { content: counter(ph); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px;
  border-radius: 50%; background: var(--ink, #222); color: var(--bg, #fff); font-size: .75rem; font-weight: 700; }
.ph, .ph-meter { width: min(176px, 100%); height: 300px; box-sizing: border-box; margin: 0 auto; border-radius: 22px; border: 6px solid #1d1d1f; background: #fff; color: #222;
  overflow: hidden; display: flex; flex-direction: column; font: 11px/1.3 system-ui, sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.ph *, .ph-meter * { box-sizing: border-box; min-width: 0; }
.ph-bar { background: var(--app); height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.ph-bar span { height: 8px; border-radius: 4px; background: rgba(255,255,255,.8); }
.ph-bar span:first-child { width: 14px; } .ph-bar span:last-child { width: 60px; }
.ph-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; padding: 14px 8px; }
.ph-tile { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 9px; color: #555; overflow-wrap: anywhere; line-height: 1.15; }
.ph-tile i { width: 30px; height: 30px; border-radius: 10px; background: #eef0f2; }
.ph-tile.on { color: #111; font-weight: 700; } .ph-tile.on i { background: var(--app); box-shadow: 0 0 0 3px #ffd23f; }
.ph-list { display: grid; padding: 8px 0; }
.ph-row { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #eee; }
.ph-row.on { background: #fff6cf; font-weight: 700; outline: 2px solid #ffd23f; outline-offset: -2px; }
.ph-form { display: grid; gap: 6px; padding: 10px; }
.ph-form label { font-size: 9px; color: #777; }
.ph-tabs { display: flex; border-bottom: 1px solid #ddd; }
.ph-tabs span { flex: 1; text-align: center; padding: 6px 0; color: #777; font-size: 10px; }
.ph-tabs span.on { color: var(--app); font-weight: 700; border-bottom: 2px solid var(--app); }
.ph-input, .ph-token { border: 2px solid #ffd23f; border-radius: 6px; padding: 6px; font-weight: 700; letter-spacing: .5px; }
.ph-token { font-size: 10px; text-align: center; background: #f6fff6; }
.ph-name, .ph-kv { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: #555; }
.ph-name b, .ph-kv b { color: #111; }
.ph-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.ph-amounts span { border: 1px solid #ddd; border-radius: 6px; padding: 6px 0; text-align: center; font-size: 8px; overflow: hidden; }
.ph-amounts span.on { border: 2px solid var(--app); font-weight: 700; }
.ph-method { border: 1px solid #ddd; border-radius: 6px; padding: 6px; margin-top: 6px; }
.ph-btn { margin-top: 8px; background: var(--app); color: #fff; text-align: center; padding: 9px; border-radius: 18px; font-weight: 700;
  box-shadow: 0 0 0 3px #ffd23f; }
.ph-pin { display: grid; gap: 10px; justify-items: center; padding: 16px 10px; }
.ph-dots { letter-spacing: 2px; color: var(--app); }
.ph-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.ph-keys span { background: #f1f2f4; border-radius: 6px; text-align: center; padding: 7px 0; font-weight: 600; min-height: 1em; }
.ph-ok { color: #138a36; font-weight: 700; font-size: 13px; text-align: center; padding: 4px; }
.ph-where { margin-top: 6px; font-size: 9px; color: #777; text-align: center; border-top: 1px dashed #ddd; padding-top: 6px; }
.ph-meter { background: #e9ecef; padding: 14px 12px; gap: 14px; border-color: #8a9099; border-radius: 12px; }
.ph-lcd { background: #b9d8a8; color: #1e3a14; font: 700 9px/1 ui-monospace, monospace; padding: 12px 4px; border-radius: 4px;
  text-align: center; letter-spacing: 0; overflow: hidden; }
.ph-meter .ph-keys span { background: #fff; padding: 10px 0; }
.ph-meter .ph-keys span:last-child { background: #2f6fd6; color: #fff; }

/* Explore Bali Power: the app's tools that fit the guide */
.explore h2 { margin-bottom: 2px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.explore-tile { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 16px; background: var(--paper2);
                color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.explore-tile:hover { border-color: currentColor; transform: translateY(-1px); }
.explore-tile b { font-size: 1.02rem; }
.explore-tile span { font-size: .9rem; line-height: 1.45; opacity: .8; }
.explore-tile em { font-style: normal; font-weight: 600; font-size: .85rem; color: var(--sawah); }
.explore-line { margin: 4px 0 8px; font-size: .95rem; }
.explore-line span { font-weight: 600; }
