:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #14161c;
  --muted: #5c6478;
  --line: #e4e7f0;
  --brand: #4338ca;
  --brand-ink: #ffffff;
  --accent: #0ea5a4;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,22,28,.06), 0 8px 24px rgba(20,22,28,.06);
  --max: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55;
}
a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.15rem; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Header */
.site-head {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap { display: flex; align-items: center; gap: 1.25rem; height: 66px; }
.logo { font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--ink); letter-spacing: -.03em; white-space: nowrap; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem;
  padding: .45rem .7rem; border-radius: 8px;
}
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); background: #eef2ff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #0ea5a4 140%);
  color: #fff; padding: 3.2rem 0 2.6rem;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { color: #d9dcf7; max-width: 56ch; font-size: 1.05rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-stats div { font-size: .85rem; color: #c7cbf2; text-transform: uppercase; letter-spacing: .06em; }
.hero-stats strong { display: block; font-size: 1.7rem; color: #fff; letter-spacing: -.02em; }

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: var(--brand-ink);
  padding: .65rem 1.15rem; border-radius: 10px; text-decoration: none;
  font-weight: 650; border: 1px solid transparent; cursor: pointer; font-size: .95rem;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-light { background: #fff; color: var(--brand); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Layout blocks */
section.band { padding: 2.6rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.layout { display: grid; grid-template-columns: 274px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow);
}

/* Phone card */
.phone-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .12s ease; }
.phone-card:hover { transform: translateY(-3px); }
.phone-card .thumb {
  height: 150px; display: grid; place-items: center; background: var(--bg);
  border-radius: 10px; margin-bottom: .8rem; font-size: 2.6rem;
}
.phone-card .brand { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.phone-card .name { font-weight: 700; margin: .1rem 0 .5rem; }
.phone-card .from { margin-top: auto; font-size: .85rem; color: var(--muted); }
.phone-card .from b { display: block; font-size: 1.3rem; color: var(--ink); letter-spacing: -.02em; }

/* Deal row */
.deal {
  display: grid; grid-template-columns: 150px 1fr 190px; gap: 1.1rem;
  align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow);
}
@media (max-width: 760px) { .deal { grid-template-columns: 1fr; text-align: left; } }
.deal + .deal { margin-top: .8rem; }
.deal .net { font-weight: 800; letter-spacing: -.01em; }
.deal .net .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }
.deal .allowance { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.deal .allowance div { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.deal .allowance strong { display: block; font-size: 1.05rem; color: var(--ink); text-transform: none; letter-spacing: -.01em; }
.deal .price { text-align: right; }
@media (max-width: 760px) { .deal .price { text-align: left; } }
.deal .price .pm { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.deal .price .pm span { font-size: .9rem; font-weight: 500; color: var(--muted); }

.tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }
.tag {
  font-size: .74rem; background: #eef2ff; color: #3730a3; padding: .2rem .55rem;
  border-radius: 999px; font-weight: 650;
}
.tag-good { background: #ecfdf5; color: #065f46; }
.tag-warn { background: #fffbeb; color: var(--warn); }

/* Forms */
label { display: block; font-weight: 650; font-size: .85rem; margin-bottom: .3rem; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line);
  border-radius: 9px; font: inherit; font-size: .93rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #c7d2fe; outline-offset: 1px; border-color: var(--brand); }
.field + .field { margin-top: .85rem; }
.checkline { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; }
.checkline input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .85rem; }

.filters { position: sticky; top: 82px; }
@media (max-width: 860px) { .filters { position: static; } }

/* Search bar on hero */
.searchbar { display: flex; gap: .5rem; margin-top: 1.5rem; max-width: 520px; }
.searchbar input { flex: 1; padding: .75rem .9rem; border-radius: 10px; border: none; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.notice { background: #eef2ff; border: 1px solid #c7d2fe; color: #312e81; padding: .8rem 1rem; border-radius: 10px; }
.notice-warn { background: #fffbeb; border-color: #fde68a; color: #7c2d12; }

.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .9rem; }
.spec-list div { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.spec-list strong { display: block; font-size: 1.02rem; color: var(--ink); text-transform: none; letter-spacing: -.01em; }

.sortbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.sortbar a {
  font-size: .85rem; text-decoration: none; padding: .3rem .7rem;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 600;
}
.sortbar a[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.site-foot { background: #14161c; color: #9aa2b6; padding: 2.4rem 0 1.6rem; margin-top: 3rem; font-size: .9rem; }
.site-foot a { color: #cdd3e4; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.foot-grid h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .35rem; }
.foot-legal { border-top: 1px solid #262a35; margin-top: 1.8rem; padding-top: 1.2rem; font-size: .82rem; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* Blog */
.post-body h2 { margin-top: 1.8rem; font-size: 1.35rem; }
.post-body p, .post-body li { font-size: 1.02rem; line-height: 1.65; }
.post-body ul, .post-body ol { padding-left: 1.3rem; }
.post-body table { margin: 1rem 0; }
.post-body .callout { background: #eef2ff; border-left: 4px solid var(--brand); padding: .8rem 1rem; border-radius: 8px; }
