/* DaoNao — দাও-নাও. White pages, black text, badami (almond brown) bar. */
:root {
  --bar: #C49A6C;          /* badami: the menu bar */
  --bar-hover: rgba(255, 255, 255, .38);
  --brown: #7B4A22;        /* buttons, accents */
  --brown-600: #8E5A2E;
  --brown-50: #FBF6F0;
  --brown-100: #F3E7D9;
  --line: #E6D6C3;
  --ink: #111111;          /* all text */
  --ink-2: #2B241E;        /* secondary text, still near-black */
  --bg: #FFFFFF;
  --ok: #1E7B3C;
  --ok-bg: #E8F5EC;
  --err: #B3261E;
  --err-bg: #FDECEA;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 35, 10, .06), 0 8px 24px rgba(60, 35, 10, .08);
  --font: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- top bar (badami) ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bar);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 4px 14px rgba(90, 55, 20, .14);
  padding-top: env(safe-area-inset-top);
}
.bar-in {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  height: 64px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.brand-text small { font-size: 13px; font-weight: 600; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: var(--bar-hover); }
.nav a[aria-current="page"] { background: #fff; }
.lang, .menu-btn {
  border: 0; background: rgba(255, 255, 255, .45); color: var(--ink);
  height: 40px; min-width: 44px; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 15px; display: grid; place-items: center; padding: 0 10px;
}
.lang:hover, .menu-btn:hover { background: rgba(255, 255, 255, .7); }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 2px;
    background: var(--bar);
    padding: 8px 12px 14px;
    box-shadow: 0 10px 20px rgba(90, 55, 20, .18);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 12px; padding: 12px 14px; font-size: 17px; }
}

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px 16px 48px; outline: none; }
.view.narrow { max-width: 620px; margin: 0 auto; }
.view.center { text-align: center; }
.page-title { font-size: 30px; line-height: 1.2; margin: 4px 0 18px; font-weight: 700; }
.page-title small { font-size: 20px; font-weight: 600; color: var(--ink-2); margin-left: 4px; }
.section-title { font-size: 22px; margin: 40px 0 14px; font-weight: 700; }
.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 22px; }
.muted { color: var(--ink-2); margin: 0; }
.small { font-size: 14px; }
.eyebrow { font-weight: 700; letter-spacing: .5px; margin: 8px 0 10px; font-size: 16px; }
.spacer { flex: 1; }

/* ---------- home ---------- */
.hero { text-align: center; max-width: 760px; margin: 18px auto 30px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.2; margin: 0 0 14px; font-weight: 700; }
.hl { background: linear-gradient(transparent 62%, #EAD3B8 62%); padding: 0 4px; white-space: nowrap; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .choices { grid-template-columns: 1fr; } }
.choice {
  display: flex; align-items: center; gap: 18px;
  padding: 24px; border-radius: 22px;
  border: 1.5px solid var(--line); background: #fff;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.choice:hover { transform: translateY(-2px); border-color: var(--brown-600); box-shadow: 0 12px 30px rgba(90, 55, 20, .14); }
.choice-icon { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; }
.choice-send .choice-icon { background: var(--brown); color: #fff; }
.choice-receive .choice-icon { background: var(--bar); color: var(--ink); }
.choice-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.choice-body b { font-size: 28px; line-height: 1.1; }
.choice-bn { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.choice-desc { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.choice-go { font-size: 26px; font-weight: 700; flex: none; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 680px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--brown-50); border: 1px solid var(--line); }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; font-weight: 700; }
.perks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.perks li { padding: 6px 14px 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.perks li::before { content: "✓"; font-weight: 700; color: var(--brown); margin-right: 6px; }
.app-strip {
  display: flex; align-items: center; gap: 14px; margin-top: 32px;
  padding: 16px 20px; border-radius: 20px; text-decoration: none;
  background: var(--brown-50); border: 1.5px solid var(--line);
}
.app-strip:hover { border-color: var(--brown-600); }
.app-strip img { border-radius: 12px; }
.app-strip > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.app-strip b { font-size: 18px; }
.app-strip small { font-size: 14px; color: var(--ink-2); }

/* ---------- forms ---------- */
.field-label { display: block; font-weight: 700; margin: 18px 0 8px; font-size: 16px; padding: 0; }
.opt { font-weight: 500; color: var(--ink-2); }
.textbox { border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.textbox:focus-within { border-color: var(--brown); box-shadow: 0 0 0 3px rgba(123, 74, 34, .15); }
.textbox textarea {
  display: block; width: 100%; border: 0; outline: none; resize: vertical;
  padding: 14px 16px; min-height: 150px; font-size: 17px; line-height: 1.6; background: transparent;
}
.textbox-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--brown-50); }
.count { font-size: 14px; color: var(--ink-2); }
.link-btn { border: 0; background: transparent; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.link-btn:hover { background: var(--brown-100); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 22px 16px; border: 2px dashed #CDAE8C; border-radius: var(--radius);
  background: var(--brown-50); cursor: pointer; position: relative;
  transition: background .15s, border-color .15s;
}
.drop:hover, .drop.over { background: var(--brown-100); border-color: var(--brown); }
.drop svg { color: var(--brown); margin-bottom: 4px; }
.drop b { font-size: 17px; }
.drop small { font-size: 14px; color: var(--ink-2); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.files { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.file-icon { flex: none; width: 40px; height: 46px; border-radius: 8px; background: #F6E9E7; color: #A2261C; font-size: 11px; font-weight: 700; display: grid; place-items: center; letter-spacing: .5px; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 14px; color: var(--ink-2); }
.file-x { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 22px; line-height: 1; }
.file-x:hover { background: var(--err-bg); color: var(--err); }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.opts { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.opts legend { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: block; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; background: #fff; }
.chip input:checked + span { background: var(--brown); border-color: var(--brown); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--brown); outline-offset: 2px; }
.switch { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 28px; margin: 0; cursor: pointer; }
.switch-ui { flex: none; width: 46px; height: 28px; border-radius: 999px; background: #D9CBBB; position: relative; transition: background .15s; margin-top: 2px; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--brown); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--brown); outline-offset: 2px; }
.switch b { display: block; font-size: 16px; }
.switch small { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.4; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 14px;
  border: 1.5px solid var(--brown); background: #fff; color: var(--ink);
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brown-50); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brown); color: #fff; }
.btn.primary:hover { background: #69401D; }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err-bg); }
.btn.danger.armed { background: var(--err); color: #fff; }
.btn.big { width: 100%; min-height: 56px; font-size: 18px; margin-top: 22px; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.btn-row .btn { flex: 1 1 200px; }

.error { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err); font-weight: 600; text-align: left; }
.active-send { display: block; margin: -4px 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--brown-100); font-weight: 600; text-decoration: none; }
.active-send:hover { background: #EBD9C4; }
.note { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #FFF6E5; border: 1px solid #F0D9A8; font-weight: 500; }

.progress { position: relative; height: 34px; margin-top: 18px; border-radius: 12px; background: var(--brown-100); overflow: hidden; }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bar); transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; font-size: 15px; }

/* ---------- code (sender) ---------- */
.code-big { display: flex; justify-content: center; gap: 12px; margin: 4px 0 16px; }
.code-big span {
  width: 74px; height: 92px; border-radius: 18px;
  display: grid; place-items: center;
  font-size: 50px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--brown-50); border: 2px solid var(--brown); box-shadow: var(--shadow);
}
@media (max-width: 380px) { .code-big span { width: 62px; height: 80px; font-size: 42px; } }
.code-hint { font-size: 17px; margin: 0 auto 16px; max-width: 420px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--brown-50); border: 1px solid var(--line); font-weight: 600; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bar); animation: pulse 1.4s ease-in-out infinite; }
.status.ok { background: var(--ok-bg); border-color: #B9DFC5; color: var(--ok); }
.status.ok .dot { background: var(--ok); animation: none; }
.status.off { background: #F2F2F2; border-color: #E0E0E0; }
.status.off .dot { background: #999; animation: none; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }
.timer { margin: 12px 0 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }

/* ---------- receive ---------- */
.digits { display: flex; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.digit {
  width: 70px; height: 86px; border-radius: 18px; text-align: center;
  font-size: 44px; font-weight: 700; line-height: 1;
  border: 2px solid var(--line); background: var(--brown-50); outline: none;
  caret-color: var(--brown); font-variant-numeric: tabular-nums;
}
.digit:focus { border-color: var(--brown); background: #fff; box-shadow: 0 0 0 4px rgba(123, 74, 34, .15); }
.digits.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-width: 380px) { .digit { width: 60px; height: 76px; font-size: 38px; } .digits { gap: 9px; } }

/* ---------- received ---------- */
.got-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.got-head .page-title { margin: 0; }
.got-tick { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.card { border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; background: #fff; margin-bottom: 16px; box-shadow: var(--shadow); }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head b { font-size: 18px; }
.text-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.65; max-height: 60vh; overflow: auto; padding: 12px 14px; background: var(--brown-50); border-radius: 12px; }
.text-body a { color: var(--brown); font-weight: 600; }

/* ---------- app & help ---------- */
.app-card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.app-card img { border-radius: 16px; }
.app-card .btn.big, .app-card p.small { grid-column: 1 / -1; margin-top: 6px; }
.app-name { font-size: 19px; }
.faq { border: 1.5px solid var(--line); border-radius: 16px; padding: 0 16px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; color: var(--ink-2); }

/* ---------- footer, toast ---------- */
.foot { border-top: 1px solid var(--line); background: var(--brown-50); padding-bottom: env(safe-area-inset-bottom); }
.foot-in { max-width: 1040px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.foot-brand img { border-radius: 6px; }
.foot a { font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #111; color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 60; max-width: calc(100% - 32px); text-align: center;
}
.noscript { text-align: center; padding: 24px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  main { padding-top: 20px; }
  .brand-text b { font-size: 20px; }
  .choice { padding: 18px; gap: 14px; }
  .choice-icon { width: 54px; height: 54px; border-radius: 15px; }
  .choice-body b { font-size: 24px; }
  .page-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
