/* SoftMarket components — works with any theme. The SoftMarket theme overrides the variables. */
.sm {
  --sm-ink: #15171a; --sm-ink-2: #3b3f45; --sm-muted: #6b6f76; --sm-line: #e1ddd3; --sm-paper: #f5f3ee; --sm-paper-2: #ece9e1;
  --sm-card: #fff; --sm-accent: #c6f432; --sm-accent-ink: #1b2400; --sm-green: #127a55; --sm-amber: #a15c07; --sm-radius: 14px;
  --sm-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--sm-ink); line-height: 1.6;
}
.sm *, .sm *::before, .sm *::after { box-sizing: border-box; }
.sm h2, .sm h3, .sm h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .4em; }
.sm-narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
.sm-muted { color: var(--sm-muted); }
.sm-small { font-size: .875rem; }
.sm-right { text-align: right; }
.sm-mt { margin-top: 18px !important; }
.sm-warn { color: var(--sm-amber); }
.sm-mono, .sm code { font-family: var(--sm-mono); font-size: .92em; }
.sm-eyebrow { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sm-green); margin-bottom: 6px; }
.sm-card { background: var(--sm-card); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); }
.sm-empty { padding: 26px; border: 1px dashed var(--sm-line); border-radius: var(--sm-radius); color: var(--sm-muted); text-align: center; }
.sm-flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.sm-flash-success { background: #eaf7ef; border-color: #b8e2c8; color: #0d5c3f; }
.sm-flash-error { background: #fdeeec; border-color: #f4c3bd; color: #8f1d13; }

/* buttons */
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; font-weight: 600; font-size: .95rem; font-family: inherit; line-height: 1.3; text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.sm-btn-lg { padding: 14px 22px; font-size: 1rem; }
.sm-btn-sm { padding: 8px 14px; font-size: .875rem; }
.sm-btn-xs { padding: 4px 10px; font-size: .78rem; border-radius: 8px; }
.sm-btn-block { display: flex; width: 100%; }
.sm-btn-accent { background: var(--sm-accent); color: var(--sm-accent-ink) !important; }
.sm-btn-accent:hover { background: #b5e61f; }
.sm-btn-dark { background: var(--sm-ink); color: #fff !important; }
.sm-btn-dark:hover { background: #2a2e33; }
.sm-btn-ghost { background: transparent; border-color: var(--sm-line); color: var(--sm-ink) !important; }
.sm-btn-ghost:hover { border-color: var(--sm-ink); }
.sm-callout .sm-btn { display: flex; width: fit-content; }

/* product grid */
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.sm-product-card { display: flex; flex-direction: column; text-decoration: none !important; color: inherit !important; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.sm-product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(21,23,26,.09); }
.sm-pc-media { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #1b1e21, #2b3036); display: grid; place-items: center; overflow: hidden; }
.sm-pc-media img { width: 100%; height: 100%; object-fit: cover; }
.sm-monogram { font-size: 3rem; font-weight: 800; color: var(--sm-accent); letter-spacing: -0.04em; }
.sm-type-chip { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--sm-ink); font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.sm-pc-body { padding: 18px 20px 6px; flex: 1; }
.sm-pc-body h3 { font-size: 1.2rem; }
.sm-pc-body p { font-size: .95rem; margin: 0; }
.sm-pc-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 18px; }
.sm-price { font-weight: 800; font-size: 1.05rem; }
.sm-price small { font-weight: 500; color: var(--sm-muted); font-size: .8rem; }
.sm-ver { font-family: var(--sm-mono); font-size: .78rem; background: var(--sm-paper-2); border: 1px solid var(--sm-line); padding: 3px 8px; border-radius: 6px; color: var(--sm-ink-2); }

/* plans */
.sm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.sm-plan { padding: 28px; position: relative; display: flex; flex-direction: column; }
.sm-plan ul { list-style: none; padding: 0; margin: 20px 0 26px; flex: 1; }
.sm-plan li { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: var(--sm-ink-2); }
.sm-plan-price { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.sm-plan-per { font-size: .9rem; }
.sm-plan-featured { border: 2px solid var(--sm-ink); box-shadow: 0 20px 50px rgba(21,23,26,.1); }
.sm-badge-pop { position: absolute; top: -12px; left: 28px; background: var(--sm-accent); color: var(--sm-accent-ink); font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.sm-tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sm-accent); color: var(--sm-accent-ink); font-size: .7rem; font-weight: 800; flex: none; }

/* changelog */
.sm-cl-item { border-left: 2px solid var(--sm-line); padding: 0 0 24px 22px; position: relative; }
.sm-cl-item::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--sm-ink); }
.sm-cl-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.sm-prose { color: var(--sm-ink-2); }
.sm-prose ul { padding-left: 1.2em; }

/* forms */
.sm-form-card { padding: 30px; }
.sm label { display: block; font-weight: 600; font-size: .9rem; margin-top: 16px; }
.sm input:not([type=radio]):not([type=checkbox]), .sm select, .sm textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--sm-line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--sm-ink); }
.sm input:focus, .sm select:focus { outline: 2px solid var(--sm-ink); border-color: var(--sm-ink); }
.sm-checkout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.sm-auth { max-width: 460px; margin: 0 auto; }
.sm-methods { display: grid; gap: 8px; }
.sm label.sm-method { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--sm-line); border-radius: 10px; cursor: pointer; font-weight: 500; }
.sm-method:has(input:checked) { border-color: var(--sm-ink); background: #fafaf7; }
.sm-method input { accent-color: var(--sm-ink); margin: 0; }
.sm-summary { padding: 26px; position: sticky; top: 100px; }
.sm-dl { margin: 18px 0 0; }
.sm-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sm-paper-2); }
.sm-dl dt { color: var(--sm-muted); }
.sm-dl dd { margin: 0; font-weight: 600; text-align: right; }
.sm-dl .sm-total { border: 0; padding-top: 16px; font-size: 1.15rem; }
.sm-dl .sm-total dt { color: var(--sm-ink); font-weight: 700; }

/* invoice */
.sm-invoice { padding: 32px; }
.sm-inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sm-callout { margin-top: 26px; padding: 22px; border-radius: 12px; background: var(--sm-paper); border: 1px solid var(--sm-line); }
.sm-callout-ok { background: #eaf7ef; border-color: #b8e2c8; }
.sm-callout-bad { background: #fdeeec; border-color: #f4c3bd; }
.sm-pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.sm-pill-paid, .sm-pill-active { background: #dcf3e5; color: #0d5c3f; }
.sm-pill-pending, .sm-pill-expired { background: #fdf0d5; color: #8a4b05; }
.sm-pill-cancelled, .sm-pill-revoked, .sm-pill-suspended { background: #fde3e0; color: #8f1d13; }

/* account */
.sm-acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.sm > h3, .sm-acct-cols h3 { font-size: 1.2rem; margin: 28px 0 14px; }
.sm-licenses { display: grid; gap: 16px; }
.sm-lic { padding: 24px; }
.sm-lic-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.sm-lic h4 { font-size: 1.15rem; }
.sm-keyrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sm-key { font-size: 1rem; background: var(--sm-paper); border: 1px solid var(--sm-line); padding: 6px 10px; border-radius: 8px; letter-spacing: .04em; }
.sm-lic-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; margin: 18px 0 0; }
.sm-lic-meta > div { padding: 10px 0; border-bottom: 1px solid var(--sm-paper-2); }
.sm-lic-meta dt { color: var(--sm-muted); font-size: .85rem; }
.sm-lic-meta dd { margin: 0; font-weight: 600; }
.sm-tbl { width: 100%; border-collapse: collapse; margin: 14px 0; }
.sm-tbl th, .sm-tbl td { padding: 10px 12px; text-align: left; border: 0; border-bottom: 1px solid var(--sm-paper-2); }
.sm-tbl th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sm-muted); font-weight: 700; }
.sm-tbl.sm-card { margin: 0; overflow: hidden; }
.sm-acct-cols { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }

@media (max-width: 900px) { .sm-checkout, .sm-acct-cols { grid-template-columns: 1fr; } .sm-summary { position: static; } }
@media (max-width: 560px) {
  .sm-lic-meta { grid-template-columns: 1fr; }
  .sm-tbl { display: block; overflow-x: auto; }
  .sm-form-card, .sm-invoice { padding: 22px; }
}
