/* ==========================================================================
   Newstore — Editorial layer
   Loaded after app.css. Composition, typography and surfaces only.
   ========================================================================== */

:root {
  --paper: #f4f7fc;
  --paper-deep: #e8eef9;
  --paper-soft: #ffffff;
  --ink: #0b1220;
  --ink-soft: #2b3648;
  --muted: #637086;
  --line: #d8e1ef;
  --line-soft: #e8eef7;
  --blue: #1557ff;
  --blue-deep: #0b3fd1;
  --blue-wash: #e7efff;
  --blue-solid: #1557ff;
  --primary: #1557ff;
  --primary-wash: #e7efff;
  --surface-inverse: #0a1736;
  --footer-bg: #101319;
  --footer-fg: #f4f3ee;
  --footer-muted: #a7a9b2;
  --footer-line: rgba(255, 255, 255, .13);
  --accent: #cfe0ff;
  --accent-ink: #061a4a;
  --danger: #c0392b;
  --ok: #1557ff;
  --green: #1557ff;
  --green-wash: #e7efff;
  --mint: #dbe7ff;
  --yellow-wash: #fff6df;
  --yellow-ink: #7a5300;
  --font-heading: "Manrope", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow-none: none;
  --shadow-lift: 0 18px 44px -26px rgba(13, 30, 65, .22);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --paper: #0b1018;
  --paper-deep: #121a26;
  --paper-soft: #101722;
  --ink: #f3f6fb;
  --ink-soft: #c9d3e3;
  --muted: #8c9ab0;
  --line: #243146;
  --line-soft: #1a2537;
  --blue: #5b8cff;
  --blue-deep: #82a8ff;
  --blue-wash: #16233c;
  --blue-solid: #1d5bff;
  --primary: #5b8cff;
  --primary-wash: #16233c;
  --surface-inverse: #060c18;
  --footer-bg: #0c1017;
  --footer-fg: #f4f3ee;
  --footer-muted: #a7a9b2;
  --footer-line: rgba(255, 255, 255, .13);
  --ok: #82a8ff;
  --green: #5b8cff;
  --green-wash: #16233c;
  --mint: #1b2c4d;
  --accent: #cfe0ff;
  --shadow-lift: 0 22px 50px -34px rgba(0, 0, 0, .8);
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }

h1, h2, h3, h4, h5, .brand-word, .btn, .price, .hp-sec-head h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -.035em;
}

h1 { font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: .96; }
h2 { font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.02; }
h3 { font-size: 1.15rem; line-height: 1.25; }

p { color: var(--ink-soft); }
.muted, .text-muted, .hp-sub, .sec-sub { color: var(--muted); }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.eyebrow, .hp-sec-label, .foot-col h3, .field label, .summary-label,
.spec-label, .detail-label, .product-cat, .store-rail-title {
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 19px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .015em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: none; box-shadow: none; }
.btn svg { flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 36px; padding: 8px 13px; font-size: 11.5px; }
.btn-lg { min-height: 50px; padding: 14px 24px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.link-arrow:hover { border-color: var(--ink); color: var(--blue); }

/* ---------- Forms -------------------------------------------------------- */

.field { display: grid; gap: 7px; }
.field label { color: var(--muted); }
.input, .field input, .field select, .field textarea,
.head-search input, .store-sort select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  box-shadow: none;
}
select.input, .field select, .store-sort select, .adm-form select, .adm-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236d695e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
[data-theme="dark"] select.input, [data-theme="dark"] .field select, [data-theme="dark"] .store-sort select, [data-theme="dark"] .adm-form select, [data-theme="dark"] .adm-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%239c978a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select.input:hover, .field select:hover, .store-sort select:hover { border-color: var(--ink-soft); }
.upload-field { display: grid; gap: 8px; }
.upload-field input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-pick { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 7px; background: var(--paper-soft); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.upload-pick:hover, .upload-field input[type="file"]:focus-visible + .upload-pick { border-color: var(--blue); background: var(--blue-wash); }
.upload-pick-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 6px; background: var(--blue); color: #fff; }
.upload-pick-copy { min-width: 0; }
.upload-pick-copy strong { display: block; color: var(--ink); font-size: 11.5px; font-weight: 650; }
.upload-pick-copy small, .upload-field .adm-hint { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.upload-zone { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px dashed var(--line); border-radius: 7px; background: var(--paper-soft); cursor: pointer; }
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--blue); background: var(--blue-wash); }
.upload-zone-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 6px; background: var(--blue); color: #fff; }
.upload-zone-copy strong { display: block; font-size: 12px; }
.upload-zone-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.upload-file-name { display: none; margin: 7px 2px; color: var(--blue); font-size: 11px; font-weight: 650; }
.upload-file-name.is-visible { display: block; }
.upload-current { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font: 500 10px ui-monospace, monospace; overflow-wrap: anywhere; }
.upload-current svg { flex: none; color: var(--blue); }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash);
  outline: none;
}
.field-hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.check-row input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--blue); }

/* ---------- Header ------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--head-bg, #0b1220);
  color: var(--head-ink, #f3f6fb);
  border-bottom: 1px solid var(--head-line, #1c2637);
  box-shadow: none;
  backdrop-filter: blur(16px);
}
.head-row { display: flex; align-items: center; gap: 26px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark, [data-theme="dark"] .brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.brand-mark svg, [data-theme="dark"] .brand-mark svg { width: 36px; height: 36px; display: block; fill: initial; border: 0; filter: none; }
.brand-word { font-size: 15px; font-weight: 700; letter-spacing: -.035em; color: var(--ink); text-transform: none; }
.brand-tag, .brand-sub { display: block; margin-top: 1px; font-family: var(--font-body); font-size: 9px; font-weight: 500; letter-spacing: .01em; text-transform: none; color: var(--muted); }
.brand-text { display: grid; gap: 0; }

.main-nav { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.nav-link, .main-nav > a {
  position: relative;
  padding: 24px 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -.005em;
  text-transform: none;
  text-decoration: none;
}
.nav-link:hover, .nav-link.is-active, .main-nav > a:hover { color: var(--ink); }
.nav-link.is-active::after, .main-nav > a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue);
}
.head-tools, .head-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.head-search-icon { display: flex; color: var(--muted); flex: none; }
.head-search {
  display: flex; align-items: center; gap: 8px;
  width: 210px; min-height: 38px; padding: 0 11px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 7px;
}
.head-search input { min-height: 0; padding: 0; border: 0; background: transparent; font-size: 12px; }
.head-search input:focus { box-shadow: none; outline: none; }
.head-search svg { color: var(--muted); flex: none; }
.site-head .icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px;
  background: transparent; color: var(--head-ink, #f3f6fb); text-decoration: none; position: relative;
}
.site-head .icon-btn:hover { background: var(--head-hover, rgba(255,255,255,.08)); color: #fff; border-color: rgba(255, 255, 255, .24); }
.icon-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border: 0; border-radius: 20px; background: var(--blue); color: #fff; font: 650 9px/17px var(--font-body); text-align: center; }
.account-trigger { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 10px 4px 5px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--head-ink, #f3f6fb); text-decoration: none; }
.account-trigger:hover { background: var(--head-hover, rgba(255,255,255,.08)); border-color: rgba(255, 255, 255, .28); }
.account-trigger img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.account-trigger:hover { border-color: var(--ink); }
.account-avatar { width: 25px; height: 25px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 10px var(--font-heading); }
.account-name { max-width: 108px; font-size: 11.5px; font-weight: 600; }
.menu-toggle { display: none; }

.head-pop { position: relative; }
.head-pop > summary { list-style: none; cursor: pointer; }
.head-pop > summary::-webkit-details-marker { display: none; }
.head-pop-panel, .pop-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px;
  background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); z-index: 70;
}
.head-pop-panel a, .pop-panel a, .pop-link { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 1px; color: var(--ink-soft); font-size: 12px; text-decoration: none; }
.head-pop-panel a:hover, .pop-panel a:hover, .pop-link:hover { background: var(--paper-deep); color: var(--ink); }
.pop-label { margin: 4px 10px 5px; color: var(--muted); font-size: 8.5px; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.pop-link.is-active { color: var(--blue); }
.pop-panel form { margin: 0; }
.pop-logout { width: 100%; border: 0; background: transparent; cursor: pointer; }

/* ---------- Footer ------------------------------------------------------- */

.site-foot { background: var(--footer-bg); color: var(--footer-fg); margin-top: 0; }
.site-foot p, .site-foot a, .site-foot span, [data-theme="dark"] .site-foot p, [data-theme="dark"] .site-foot a, [data-theme="dark"] .site-foot span { color: var(--footer-muted); }
.foot-top { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 48px; padding: 62px 0 44px; }
.foot-brand .brand-word, [data-theme="dark"] .foot-brand .brand-word { color: var(--footer-fg); }
.foot-brand .brand-sub { color: var(--footer-muted); }
.foot-brand p { max-width: 330px; margin: 18px 0 0; font-size: 13px; line-height: 1.7; }
.foot-col h3 { margin: 0 0 16px; color: var(--footer-muted); font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.foot-col a { display: block; width: fit-content; padding: 4px 0; color: var(--footer-muted); font-size: 12.5px; text-decoration: none; }
.foot-col a:hover { color: #fff; }
.foot-bot, .foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--footer-line); font-size: 10.5px; letter-spacing: .01em; }
.foot-bottom p { margin: 0; font-size: 10.5px; }
.foot-mail { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--footer-fg) !important; font-size: 11.5px; text-decoration: none; }
.foot-social { display: flex; gap: 14px; }
.foot-social a { color: var(--footer-muted); font-size: 10.5px; letter-spacing: .01em; text-decoration: none; }
.foot-social a:hover { color: #fff; }
.foot-currency summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; }
.foot-currency summary::-webkit-details-marker { display: none; }
.foot-currency-pop { position: relative; }
.foot-currency-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 150px; padding: 6px; background: var(--paper-soft); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.foot-currency-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; color: var(--ink-soft); font-size: 10.5px; text-decoration: none; }
.foot-currency-menu a:hover { background: var(--paper-deep); }
.foot-pay { display: flex; align-items: center; gap: 16px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Flatten old surfaces ---------------------------------------- */

.panel, .detail-card, .summary-card, .side-card, .auth-card, .page-article,
.bank-card, .support-card, .order-card, .account-card, .license-card, .download-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.panel { padding: 28px 0; border-top: 1px solid var(--line); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.panel-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.detail-card { padding: 24px 0; border-top: 1px solid var(--line); }
.detail-card h2, .detail-card h3 { letter-spacing: -.03em; }
.auth-card { padding: 0; border: 0; }
.empty-state { padding: 48px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.empty-state h3 { margin: 0 0 6px; }
.empty-state p { max-width: 460px; margin: 0 auto 18px; font-size: 13px; }

/* ---------- Status + price ---------------------------------------------- */

.status-pill, .badge, .order-status {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 22px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 20px;
  background: transparent; font: 650 9.5px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
}
.status-pill.is-paid, .status-pill.is-completed, .status-pill.status-paid, .status-pill.status-completed, .status-pill.status-active, .badge-success, .status-completed, .status-active, .status-paid { border-color: color-mix(in srgb, var(--blue) 35%, transparent); background: var(--blue-wash); color: var(--blue-deep); }
.status-pill.is-pending, .badge-warning { border-color: color-mix(in srgb, #9a6a00 45%, transparent); color: #8a5f00; }
.status-pill.is-failed, .badge-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.price, .price-xl { font-family: var(--font-heading); font-weight: 700; letter-spacing: -.05em; }
.price-old, .price-was { color: var(--muted); text-decoration: line-through; font-size: .72em; }

/* ---------- Natural wrapping (undo silent clamps) ----------------------- */

.product-info, .product-body p, .blog-card h3, .post-card p,
.account-name, .order-item-main strong, .license-title, .license-title h2,
.download-info strong, .mini-license strong, .account-quick-license strong,
.bank-detail-row dd, .bank-detail-row dd > span, .order-item-meta strong, .store-cat, .store-cat span, .hp-cat span, .hp-cat h3,
.detail-card p, .summary-note, .field-hint, .faq-answer, .article-body p, .index-desc,
.post-card p, .blog-card .blog-body p, .hp-product-body p, .download-info small {
  display: block;
  max-height: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  line-clamp: unset !important;
}

/* ---------- Header + footer comfort pass --------------------------------- */

:root {
  --footer-bg: #081329;
  --footer-fg: #f3f6fb;
  --footer-muted: #95a8c8;
  --footer-line: rgba(148, 178, 255, .16);
}

.site-head .brand-word { font-size: 16px; }
.site-head .brand-sub, .site-head .brand-tag { font-size: 10.5px; }
.site-head .main-nav .nav-link { font-size: 14px; padding: 22px 0; }
.site-head .head-search { min-height: 42px; border-radius: 11px; }
.site-head .head-search input { font-size: 13.5px; }
.site-head .icon-btn { width: 40px; height: 40px; border-radius: 11px; }
.site-head .account-trigger { min-height: 42px; border-radius: 999px; }
.site-head .account-name { font-size: 13px; max-width: 128px; }
.head-pop-panel a, .pop-panel a, .pop-link { border-radius: 9px; font-size: 13px; padding: 10px 12px; }
.pop-label { font-size: 10px; }

.site-foot { background: var(--footer-bg); }
.foot-top { gap: 52px; padding: 66px 0 46px; }
.foot-brand p { font-size: 14px; }
.foot-col h3 { font-size: 11.5px; }
.foot-col a { font-size: 13.5px; padding: 5px 0; }
.foot-bot, .foot-bottom { padding: 20px 0; font-size: 12px; }
.foot-bottom p { font-size: 12px; }
.foot-mail { font-size: 13px; }
.foot-social a { font-size: 12px; }

@media (max-width: 760px) {
  .site-head .main-nav .nav-link { font-size: 15px; padding: 14px 0; }
}
