/* store.nazmulrobin.com: the one stylesheet. Colours follow the blog's theme. */

:root {
  --bg: #ffffff;
  --surface: #f3f6f4;
  --line: #e3e7ea;
  --field: #8a96a1;
  --ink: #1f2d3a;
  --muted: #55626e;
  --accent: #2c7a12;
  --on-accent: #ffffff;
  --dot: #62cb31;
  --danger: #b42318;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c;
    --surface: #182029;
    --line: #2a3440;
    --field: #6f7c89;
    --ink: #e8edf2;
    --muted: #a3afbb;
    --accent: #7bdb4f;
    --on-accent: #11161c;
    --danger: #ff8a7a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #11161c;
  --surface: #182029;
  --line: #2a3440;
  --field: #6f7c89;
  --ink: #e8edf2;
  --muted: #a3afbb;
  --accent: #7bdb4f;
  --on-accent: #11161c;
  --danger: #ff8a7a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner, .wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .site-header__inner, .wrap { padding: 0 24px; }
}
.site-header__inner {
  min-height: 68px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; min-height: 44px; }
.brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.brand__store { font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 13px; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; font-size: 15px; }
.site-nav a, .site-nav .linklike { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.site-nav .who { color: var(--muted); overflow-wrap: anywhere; }

.icon-button {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
}
.linklike { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }

main { padding: 40px 0 80px; }

/* Buttons and fields */
.button {
  min-height: 48px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.button:hover { text-decoration: none; border-color: var(--field); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.button--primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.button--block { width: 100%; }
.button--small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.button[disabled] { opacity: 0.55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 500; }
.input {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--field); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; width: 100%;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: var(--danger); font-size: 14px; }
.notice {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 14px 16px; font-size: 15px;
}

.eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: 0.08em; color: var(--accent); }
.label { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.pill {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.pill--ok { border-color: var(--accent); color: var(--accent); }

.card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card__head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.card__body { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.card__body + .card__body { border-top: 1px solid var(--line); }
.mark {
  width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-family: "IBM Plex Mono", monospace;
  font-weight: 500; font-size: 14px; color: var(--accent);
}

/* Checkout */
.checkout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.checkout__main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.checkout__summary { flex: 1 1 300px; min-width: 0; max-width: 420px; }
.step { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.step legend, .step h2 { padding: 0; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.switch { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch label { min-height: 40px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; cursor: pointer; font-size: 15px; }
.switch input:checked + label { background: var(--ink); color: var(--bg); }
.switch input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan { position: relative; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan label {
  min-height: 72px; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; cursor: pointer;
}
.plan__dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--field); }
.plan__name { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.plan__name strong { font-size: 17px; }
.plan input:checked + label { border: 2px solid var(--accent); background: var(--surface); padding: 13px 17px; }
.plan input:checked + label .plan__dot { border: 6px solid var(--accent); }
.plan input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan[hidden] { display: none; }
.summary-list { margin: 0; padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; font-size: 15px; }
.summary-list dd { margin: 0; }
.summary-list .total { font-weight: 600; border-top: 1px solid var(--line); padding-top: 12px; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.ticks li { display: flex; gap: 10px; }
.ticks svg { flex: none; margin-top: 3px; color: var(--accent); }

/* Account */
.account { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; }
.account__nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.account__nav a { min-height: 44px; padding: 0 12px; border-radius: 8px; display: flex; align-items: center; font-size: 15px; }
.account__nav a[aria-current="page"] { background: var(--surface); color: var(--accent); font-weight: 600; }
.account__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 640px) {
  .account__nav { max-width: none; flex-direction: row; flex-wrap: wrap; flex-basis: 100%; }
}
.key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.key {
  flex: 1 1 260px; min-width: 0; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); overflow-x: auto; white-space: nowrap;
}
.site-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.links a.strong { color: var(--accent); font-weight: 600; }
.table-box { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
th { text-align: left; background: var(--surface); padding: 14px 20px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
td { padding: 16px 20px; border-top: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Small centred card: sign in, coming soon, thanks */
.narrow { max-width: 440px; margin: 56px auto 0; border: 1px solid var(--line); border-radius: 12px; padding: 32px 24px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 640px) { .narrow { padding: 36px; } }
.stack { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 640px) {
  .site-nav .who { display: none; }
}
