/* TMail · tmail.css
   Komponen dan layout TMail di atas token FUSIONIFY (gaya "tenang").
   Hanya variabel dari tokens.css; tidak ada hex di file ini. */

/* =========== Dasar =========== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-teks)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--text-blue-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--surface-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--inverse-bg); color: var(--inverse-fg); padding: 10px 14px; border-radius: var(--r-s); font-weight: 700; transition: transform var(--dur-2) var(--ease); }
.skip:focus { transform: translateY(76px); }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }

/* Ikon FUSIONIFY: garis 2px, ujung bulat, titik i biru muda */
.ikon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; --ikon-titik: var(--blue-light); }
.ikon.l { width: 24px; height: 24px; }
.ikon.s { width: 16px; height: 16px; }

/* Tipografi */
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 800; letter-spacing: -0.025em; line-height: 0.98; margin: 0; overflow-wrap: anywhere; }
.h-hero { font-size: var(--h-hero); letter-spacing: -0.035em; }
.h-hero .l2 { color: var(--text-blue); display: block; }
.h-sec { font-size: var(--h-sec); }
.dot { display: inline-block; width: 0.2em; height: 0.2em; border-radius: 50%; background: var(--blue-light); margin-left: 0.06em; vertical-align: baseline; }
.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.55; margin: 18px 0 0; max-width: 34ch; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font: 700 var(--fs-label)/1 var(--f-num); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-blue);
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-light); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* =========== Tombol =========== */
.btn {
  --bg: var(--card); --fg: var(--ink); --bd: var(--edge);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch-min); padding: 10px 18px; border-radius: var(--r-pill);
  border: var(--edge-width) solid var(--bd); background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 15px; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-1) var(--ease);
}
.btn:hover { --bd: var(--blue); }
.btn:active { transform: scale(0.97); }
.btn.primary { --bg: var(--blue); --fg: var(--on-dark); --bd: var(--blue); }
.btn.primary:hover { --bg: var(--blue-deep); --bd: var(--blue-deep); }
.btn.ghost { --bg: transparent; --bd: transparent; }
.btn.ghost:hover { --bg: var(--surface); --bd: transparent; }
.btn.danger { --bg: var(--danger-fill); --fg: var(--on-dark); --bd: var(--danger-fill); }
.btn.danger-line { --fg: var(--danger); }
.btn.danger-line:hover { --bd: var(--danger); }
.btn.s { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ikon {
  display: inline-grid; place-items: center; width: var(--touch-min); height: var(--touch-min); flex: none;
  border-radius: var(--r-pill); border: var(--edge-width) solid var(--edge); background: var(--card); color: var(--ink);
  transition: transform var(--dur-1) var(--ease);
}
.btn-ikon:hover { border-color: var(--blue); background: var(--surface); }
.btn-ikon:active { transform: scale(0.94); }
.btn-ikon.plain { border-color: transparent; background: transparent; }
.btn-ikon.plain:hover { background: var(--surface-2); }

/* Chip status */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--r-pill); font: 700 12px/1 var(--f-num); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.go { color: var(--go); background: var(--go-bg); }
.chip.beta { color: var(--beta); background: var(--beta-bg); }
.chip.plan { color: var(--plan); background: var(--plan-bg); }
.chip.go.live::before { background: var(--online); animation: denyut 2s var(--ease) infinite; }
@keyframes denyut { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Kartu */
.card { background: var(--card); border: var(--edge-width) solid var(--edge); border-radius: var(--r-l); box-shadow: var(--shadow); }

/* Wadah ikon */
.ikon-stiker { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: var(--text-blue); border: var(--edge-width) solid var(--line); }
.ikon-segel { position: relative; width: 84px; height: 84px; display: grid; place-items: center; color: var(--text-blue); }
.ikon-segel::before { content: ""; position: absolute; inset: 0; background: var(--seal-tint); -webkit-mask: var(--seal-mask) center / contain no-repeat; mask: var(--seal-mask) center / contain no-repeat; }
.ikon-segel .ikon { position: relative; width: 34px; height: 34px; }
.ikon-segel.error { color: var(--danger); }
.ikon-segel.error::before { background: var(--danger-bg); }
.ikon-segel.ok { color: var(--go); }
.ikon-segel.ok::before { background: var(--go-bg); }

/* Spinner segel */
.spinner { width: 28px; height: 28px; background: var(--blue); -webkit-mask: var(--seal-mask) center / contain no-repeat; mask: var(--seal-mask) center / contain no-repeat; animation: putar 1.1s linear infinite; position: relative; }
.spinner::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--card); }
@keyframes putar { to { transform: rotate(360deg); } }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; border-radius: 6px; animation: kilau 1.4s ease-in-out infinite; }
@keyframes kilau { to { background-position: -200% 0; } }

/* =========== Nav =========== */
.nav { position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav); padding: 12px 0; transition: transform var(--dur-3) var(--ease); }
.nav.hide { transform: translateY(-110%); }
.nav-in { position: relative; display: flex; align-items: center; gap: 16px; padding: 8px 10px 8px 14px; }
.nav-in::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-pill);
  background: var(--nav-glass); border: var(--edge-width) solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(6px); transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
.nav.solid .nav-in::before { opacity: 1; transform: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 26px/1 var(--f-head); letter-spacing: -0.03em; }
.brand img { width: 38px; height: 38px; }
.nav-links { display: none; gap: 4px; margin-left: 18px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: var(--r-pill); }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-end .chip { display: none; }
@media (min-width: 600px) { .nav-end .chip { display: inline-flex; } }
@media (min-width: 961px) { .nav-links { display: flex; } }
.theme-btn .ikon-terang { display: none; }
:root[data-theme="dark"] .theme-btn .ikon-terang { display: block; }
:root[data-theme="dark"] .theme-btn .ikon-gelap { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .ikon-terang { display: block; }
  :root:not([data-theme="light"]) .theme-btn .ikon-gelap { display: none; }
}

/* =========== Hero (pola pratinjau) =========== */
.hero { position: relative; padding: 128px 0 var(--sec-y); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; right: -240px; top: -300px;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 72%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 840px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; } }

.addr-card { margin-top: 30px; padding: 18px; max-width: 580px; }
.addr-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font: 700 var(--fs-label)/1 var(--f-num); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.input-group { display: flex; align-items: stretch; border: var(--edge-width) solid var(--edge); border-radius: var(--r-m); background: var(--field); overflow: hidden; transition: border-color var(--dur-1); }
.input-group:hover, .input-group:focus-within { border-color: var(--blue); }
.addr-value {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  font: 600 clamp(15px, 2.2vw, 19px)/1.25 var(--f-mono); color: var(--ink); background: none; border: 0; text-align: left; cursor: copy;
}
.addr-value span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon { display: flex; align-items: center; padding: 6px; background: var(--surface); border-left: var(--edge-width) solid var(--line); }
.addr-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
@media (min-width: 600px) { .addr-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.addr-actions .btn { width: 100%; padding-inline: 10px; }
.addr-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 14px; padding-top: 12px; border-top: var(--edge-width) solid var(--line); font-size: var(--fs-kecil); color: var(--ink-3); }
.addr-meta b { color: var(--ink); font-weight: 700; }
.addr-meta .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--online); margin-right: 6px; animation: denyut 2s var(--ease) infinite; }
.addr-meta .live-dot.off { background: var(--placeholder); animation: none; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 580px; padding: 0; list-style: none; }
.facts li { padding-top: 14px; border-top: var(--edge-width) solid var(--line); }
.facts b { display: block; font: 800 clamp(22px, 3vw, 30px)/1 var(--f-head); letter-spacing: -0.02em; }
.facts span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
@media (max-width: 599px) {
  .hero { padding-top: 104px; }
  .facts { gap: 10px; }
  .facts b { font-size: 19px; }
  .facts span { font-size: 12.5px; }
}

/* Pratinjau: tersusun rapi, tidak saling menutupi. Hanya di layar lebar */
.preview { display: none; }
@media (min-width: 840px) {
  .preview { display: grid; gap: 14px; justify-items: end; max-width: 500px; justify-self: end; width: 100%; }
}
.pv-inbox { width: 100%; padding: 16px; }
.pv-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: var(--edge-width) solid var(--line); font-weight: 700; font-size: 15px; }
.pv-head .chip { margin-left: auto; }
.pv-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; padding: 12px 4px; border-bottom: var(--edge-width) solid var(--line); align-items: center; }
.pv-row:last-child { border-bottom: 0; }
.pv-row b { display: block; font-size: 14.5px; }
.pv-row small { display: block; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-row time { font: 600 12px var(--f-num); color: var(--ink-3); }
.pv-row.baru b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 6px; vertical-align: middle; }
.pv-otp { width: min(320px, 80%); padding: 18px; }
.pv-otp p { margin: 6px 0 12px; font-size: 14px; color: var(--ink-2); }
.otp-digits { display: flex; gap: 6px; align-items: center; }
.otp-digits i { font-style: normal; width: 36px; height: 44px; display: grid; place-items: center; border: var(--edge-width) solid var(--edge); border-radius: var(--r-s); font: 700 20px var(--f-num); background: var(--field); }
.otp-digits em { width: 8px; height: 2px; background: var(--ink-3); }
.cover-note { justify-self: start; font: 700 11px/1 var(--f-num); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.preview .card { animation: masuk var(--dur-5) var(--ease) both; }
.preview .pv-otp { animation-delay: 0.12s; }
@keyframes masuk { from { opacity: 0; transform: translateY(16px); } }

/* =========== Seksi =========== */
.sec { padding: var(--sec-y) 0; }
.sec.alt { background: var(--surface); }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head p { color: var(--ink-2); margin: 14px 0 0; font-size: 18px; }
.wave { display: block; width: 100%; height: 36px; color: var(--surface); }
.wave.flip { transform: scaleY(-1); }

/* =========== Dashboard kotak masuk ===========
   Struktur: .app-bar (judul, alamat aktif, muat ulang)
             .app-body = .mail-col (alat + daftar) | .read-pane (pembaca)
   Tinggi dashboard pas satu layar; daftar dan pembaca menggulir di dalam. */
.inbox-sec { padding-top: 0; }
.app { overflow: hidden; display: flex; flex-direction: column; }

/* Baris atas */
.app-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: var(--edge-width) solid var(--line); background: var(--card); }
.app-title { display: flex; align-items: center; gap: 10px; }
.app-title h2 { font-size: 24px; white-space: nowrap; }
.badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill); background: var(--danger-fill); color: var(--on-dark); font: 700 12px/1 var(--f-num); }
.badge.zero { background: var(--surface-2); color: var(--ink-2); }
.app-addr { justify-self: center; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 520px; width: 100%; padding: 4px 4px 4px 14px; border: var(--edge-width) solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.app-addr .live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--online); animation: denyut 2s var(--ease) infinite; }
.app-addr .live-dot.off { background: var(--placeholder); animation: none; }
.app-addr-text { flex: 1; min-width: 0; font: 600 14.5px/1.2 var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-addr-timer { flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.btn-ikon.sm { width: 36px; height: 36px; }
@media (max-width: 599px) {
  .app-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .app-addr { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}

/* Tubuh dashboard */
.app-body { display: grid; min-height: 0; height: clamp(500px, calc(100vh - 150px), 760px); }
@media (min-width: 840px) { .app-body { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); } .mail-col { border-right: var(--edge-width) solid var(--line); } }
@media (max-width: 839px) {
  .app-body { height: min(720px, calc(100svh - 120px)); }
  .app.reading .mail-col { display: none; }
  .app:not(.reading) .read-pane { display: none; }
}

/* Kotak masuk kosong: satu kolom, tinggi menyesuaikan isi */
.app.is-empty .app-body { grid-template-columns: 1fr; height: auto; min-height: 340px; }
.app.is-empty .read-pane, .app.is-empty .list-tools { display: none; }
.app.is-empty .mail-col { border-right: 0; }

/* Kolom kiri */
.mail-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.list-tools { display: grid; gap: 10px; padding: 12px; border-bottom: var(--edge-width) solid var(--line); }
.list-filter { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-filter .seg { margin: 0; }
.list-filter .seg button { min-height: 32px; padding: 6px 14px; font-size: 13.5px; }
.search { position: relative; display: block; }
.search .ikon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; min-height: 40px; padding: 8px 12px 8px 38px; border: var(--edge-width) solid var(--edge); border-radius: var(--r-pill); background: var(--field); font-size: 15px; }
.search input::placeholder { color: var(--placeholder); }
.search input:focus { outline: none; border-color: var(--blue); }
.timer { font: 600 13px var(--f-num); color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mail-pane { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.mail-pane > .state { flex: 1; }

/* Daftar email */
.mail-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.mail-item {
  position: relative; width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; text-align: left;
  padding: 12px 12px 12px 18px; border: var(--edge-width) solid transparent; border-radius: var(--r-m); background: none;
  transition: background-color var(--dur-1);
}
.mail-item:hover { background: var(--surface); }
.mail-item.active { background: var(--surface-2); border-color: var(--line); }
.mail-item > div { min-width: 0; }
.unread::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--blue); }
.avatar { --av: 0; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 17px/1 var(--f-head); border: var(--edge-width) solid var(--line); background: var(--surface-2); color: var(--text-blue); }
.avatar[style*="--av:1"] { background: var(--blue); color: var(--on-dark); border-color: var(--blue); }
.avatar[style*="--av:2"] { background: var(--blue-light); color: var(--on-dark); border-color: var(--blue-light); }
.avatar[style*="--av:3"] { background: var(--plan-bg); color: var(--plan); }
.avatar.l { width: 44px; height: 44px; font-size: 19px; }
.mi-from { font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.mi-subj { font-size: 14.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); margin-top: 1px; }
.mi-intro { font-size: 13.5px; line-height: 1.35; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 2px; font: 600 12px var(--f-num); color: var(--ink-3); white-space: nowrap; }
.unread .mi-from, .unread .mi-subj { color: var(--ink); }
.unread .mi-side time { color: var(--text-blue); }
.mail-new { animation: masuk var(--dur-5) var(--ease) both; }
.skel-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 12px 12px 18px; }
.skel-item .skel.c { width: 40px; height: 40px; border-radius: 50%; }

/* Keadaan kosong / error / memuat */
.state { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.state > div { max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.state h3 { font-size: var(--fs-judul-s); margin: 16px 0 8px; }
.state p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; }
.state.error > div { border: 2px dashed var(--danger); background: var(--danger-bg); border-radius: var(--r-l); padding: 26px 22px; }
.state.small { padding: 28px 16px; }
.state.small .ikon-segel { width: 68px; height: 68px; }
.state.small .ikon-segel .ikon { width: 28px; height: 28px; }

/* Pembaca: kepala tetap, isi email mengisi sisa tinggi */
.read-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.reader { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; }
.r-head { padding: 18px 22px 14px; border-bottom: var(--edge-width) solid var(--line); }
.r-head .back { display: inline-flex; margin: -6px 0 10px -10px; }
@media (min-width: 840px) { .r-head .back { display: none; } }
.r-head h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.12; margin-bottom: 14px; }
.r-sender { display: flex; gap: 12px; align-items: center; min-width: 0; }
.r-who { flex: 1; min-width: 0; }
.r-sender .who { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sender .who small { font-weight: 400; color: var(--ink-3); }
.r-sender .meta { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-actions { flex: none; display: flex; gap: 4px; }
.r-note { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 14px 22px 0; padding: 10px 10px 10px 14px; border-radius: var(--r-m); background: var(--plan-bg); color: var(--plan); font-size: 14px; }
.r-note > span { flex: 1; min-width: 160px; display: inline-flex; align-items: center; gap: 8px; }
.r-note .btn { margin-left: auto; }
.r-attach { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 0; }
.att { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: var(--edge-width) solid var(--edge); border-radius: var(--r-m); background: var(--card); font-size: 14px; max-width: 100%; }
.att:hover { border-color: var(--blue); }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.att small { font-family: var(--f-num); color: var(--ink-3); }
.tabs { display: flex; gap: 4px; padding: 4px; margin: 14px 22px 0; border-radius: var(--r-pill); background: var(--surface); width: max-content; max-width: calc(100% - 44px); overflow-x: auto; flex: none; }
.tab { border: 0; background: none; padding: 7px 14px; border-radius: var(--r-pill); font-weight: 700; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; min-height: 34px; }
.tab[aria-selected="true"] { background: var(--card); color: var(--text-blue); box-shadow: var(--shadow); }
.r-body { flex: 1; display: flex; flex-direction: column; padding: 12px 22px 22px; min-height: 280px; }
.r-body iframe { flex: 1; width: 100%; min-height: 260px; border: var(--edge-width) solid var(--line); border-radius: var(--r-m); background: var(--white); }
:root[data-theme="dark"] .r-body iframe { background: var(--on-dark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .r-body iframe { background: var(--on-dark); } }
.r-body pre { margin: 0; flex: 1; white-space: pre-wrap; word-break: break-word; font: 14px/1.65 var(--f-mono); background: var(--surface); border: var(--edge-width) solid var(--line); border-radius: var(--r-m); padding: 16px; overflow: auto; }
@media (max-width: 599px) {
  .r-head, .r-body { padding-left: 16px; padding-right: 16px; }
  .r-note, .tabs { margin-left: 16px; margin-right: 16px; }
  .r-attach { padding-left: 16px; padding-right: 16px; }
}

/* =========== Cara kerja (stepper) =========== */
.steps { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; counter-reset: langkah; }
@media (min-width: 840px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { position: relative; padding: 24px; }
.step-n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--on-dark); font: 700 18px var(--f-num); margin-bottom: 18px; }
.step h3 { font-size: var(--fs-judul-s); margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* =========== Fitur =========== */
.features { display: grid; gap: 18px; }
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 840px) { .features { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.feat { padding: 24px; transition: border-color var(--dur-1); }
.feat:hover { border-color: var(--blue); }
.feat h3 { font-size: 22px; margin: 18px 0 8px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* =========== FAQ =========== */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 840px) { .faq-grid { grid-template-columns: 0.8fr 1.2fr; gap: 56px; } }
.faq { overflow: hidden; }
.faq details { border-bottom: var(--edge-width) solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 700; font-size: 16.5px; min-height: var(--touch-min); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ikon { transition: transform var(--dur-3) var(--spring); color: var(--text-blue); }
.faq details[open] summary .ikon { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--ink-2); font-size: 15.5px; }

/* =========== Footer =========== */
.footer { background: var(--night); color: var(--night-ink); padding: 56px 0 28px; }
.footer .brand { color: var(--on-dark); }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 840px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer p { color: var(--night-ink-2); font-size: 15px; margin: 14px 0 0; max-width: 40ch; }
.footer h4 { font: 700 var(--fs-label)/1 var(--f-num); letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.footer a { color: var(--night-ink); text-decoration: none; font-size: 15px; }
.footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer ul a { display: inline-flex; align-items: center; gap: 8px; }
/* Logo sosmed: satu warna, garis putih tipis tanpa bayangan di footer malam */
.sosmed-row { display: flex; gap: 10px; margin-top: 14px; }
.sosmed { display: grid; place-items: center; width: var(--touch-min); height: var(--touch-min); border-radius: 12px; border: 1px solid var(--night-line); color: var(--night-ink); transition: transform var(--dur-1) var(--ease); }
.sosmed svg { width: 20px; height: 20px; fill: currentColor; }
.footer .sosmed:hover { color: var(--on-dark); border-color: var(--blue-light); text-decoration: none; transform: translateY(-2px); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--night-ink-3); }

/* =========== Modal =========== */
.modal-bg { position: fixed; inset: 0; z-index: var(--z-dialog); display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--night) 55%, transparent); opacity: 0; visibility: hidden; transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2); }
.modal-bg.show { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; transform: translateY(12px) scale(0.98); transition: transform var(--dur-3) var(--ease); }
.modal-bg.show .modal { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal h3 { font-size: 28px; }
.modal .sub { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal hr { border: 0; border-top: var(--edge-width) solid var(--line); margin: 22px 0; }
.modal.confirm { text-align: center; max-width: 420px; }
.modal.confirm .ikon-segel { margin: 4px auto 10px; }
.modal.confirm .modal-actions { justify-content: center; }
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface); margin-bottom: 18px; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--ink-2); min-height: 36px; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--text-blue); box-shadow: var(--shadow); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.field .err { font-size: 13px; color: var(--danger); margin-top: 6px; }
.input, .select { width: 100%; min-height: var(--touch-min); padding: 10px 14px; border: var(--edge-width) solid var(--edge); border-radius: var(--r-m); background: var(--field); font-size: 16px; }
.input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--surface-2); }
.input::placeholder { color: var(--placeholder); }
.input-group .input { border: 0; border-radius: 0; box-shadow: none; }
.input-group .addon.txt { padding: 0 12px; font-weight: 700; color: var(--ink-2); }

.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist li { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border: var(--edge-width) solid var(--line); border-radius: var(--r-m); }
.hist li.cur { border-color: var(--blue); background: var(--surface); }
.hist .a { flex: 1; min-width: 0; font: 600 14px var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .tag { font: 700 11px var(--f-num); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-blue); }

/* =========== Toast & bilah offline =========== */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: var(--z-toast); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-pill); background: var(--inverse-bg); color: var(--inverse-fg); font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 16px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ikon { color: var(--inverse-accent); --ikon-titik: var(--inverse-accent); }
.offline-bar { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; z-index: var(--z-offline); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-pill); background: var(--warn-fill); color: var(--ink); font-weight: 700; font-size: 14px; transform: translate(-50%, -80px); transition: transform var(--dur-3) var(--ease); }
:root[data-theme="dark"] .offline-bar { color: var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .offline-bar { color: var(--night); } }
.offline-bar.show { transform: translate(-50%, 0); }

/* Muncul saat scroll */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-5) var(--ease), transform var(--dur-5) var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Kurangi gerakan: semua langsung tampil */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

.nowrap { white-space: nowrap; }
