:root {
  --navy: #111111;
  --brand: #e31b23;
  --brand-pressed: #9e1218;
  --brand-hover: #c91820;
  --chrome: #111111;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --border: #e4e6eb;
  --text: #111111;
  --text-secondary: #65676b;
  --green: #168653;
  --green-deep: #0e6b42;
  --green-soft: #eaf7ef;
  --gold-deep: #8a6410;
  --gold-soft: #fff7e5;
  --gold-border: #edcc7a;
  --border-strong: #d0d5dd;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 18px;
  --header: 76px;
  --safe-top: env(safe-area-inset-top, 0px);
  --header-offset: calc(var(--header) + var(--safe-top));
  --feed: 560px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(17, 17, 17, 0.06);
  --shadow-hover: 0 8px 18px rgba(17, 17, 17, 0.08), 0 22px 48px rgba(17, 17, 17, 0.08);
  --focus: 0 0 0 3px rgba(227, 27, 35, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--chrome);
  overscroll-behavior-y: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  padding-top: var(--header-offset);
  background-color: var(--chrome);
  background-image:
    radial-gradient(900px 280px at 50% 0, rgba(227, 27, 35, 0.07), transparent 62%),
    linear-gradient(var(--bg), var(--bg));
  background-repeat: no-repeat;
  background-position: 0 var(--header-offset);
  background-size: 100% 100%;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus-visible {
  top: 12px;
}

.sr-only,
.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--header-offset);
  padding-top: var(--safe-top);
  overflow: visible;
  background: var(--chrome);
  color: #fff;
  box-shadow: 0 1px 0 #e31b23, 0 -120px 0 0 var(--chrome);
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 100vh;
  background: var(--chrome);
  pointer-events: none;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 20px 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  background: #000;
  object-fit: cover;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(227, 27, 35, 0.35);
}

.nav-cluster {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.14);
}

.site-nav {
  display: inline-flex;
  justify-self: center;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.site-nav a svg {
  width: 14px;
  height: 14px;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(227, 27, 35, 0.38);
}

.site-nav a[aria-current="page"]:hover {
  background: var(--brand-hover);
}

.feed {
  width: min(var(--feed), calc(100% - 32px));
  margin: 28px auto 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feed-intro {
  padding: 4px 4px 2px;
}

.feed-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.feed-title {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.feed-meta {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.post {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(226, 228, 233, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.post:hover {
  box-shadow: var(--shadow-hover);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  object-fit: cover;
  background: #111;
}

.post-identity {
  min-width: 0;
}

.post-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}

.verified svg {
  width: 10px;
  height: 10px;
}

.post-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.post-source {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1f1;
  color: var(--brand-pressed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.post-caption {
  margin: 0;
  padding: 12px 16px 14px;
  font-size: 16px;
  font-weight: 450;
  letter-spacing: -0.01em;
}

.post-caption strong {
  font-weight: 700;
}

.post-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}

.copy-code {
  color: #ffb4b7;
  font-size: 11px;
  font-weight: 700;
}

.copy-code:hover {
  color: #fff;
}

.post-media {
  display: grid;
  place-items: center;
  background: var(--surface);
}

.post-media img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  padding: 12px 28px 8px;
}

.post-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid #f0f1f3;
  background: #fbfbfa;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.post [hidden] {
  display: none !important;
}

.post .promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 4px 0 10px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  overflow: hidden;
}

.post .promo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.post .promo-label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--gold-deep);
}

.post .promo.is-copied .promo-label {
  color: var(--green-deep);
}

.post .promo-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.post .promo--discount {
  justify-content: center;
  padding: 0 12px;
  background: var(--green-soft);
  border-color: #b8e0c8;
}

.post .promo-discount {
  margin: 0;
  color: var(--green-deep);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.post .promo.is-copied {
  background: var(--green-soft);
  border-color: #b8e0c8;
}

.post .copy-btn {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--gold-border);
  font-size: 13px;
  font-weight: 650;
}

.post .copy-btn:hover {
  background: #fff4d6;
}

.post .copy-btn.is-copied {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.post .copy-btn.is-error {
  background: var(--danger-soft);
  border-color: #fecdca;
  color: var(--danger);
}

.post-price {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.price-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.price-was {
  color: #98a2b3;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.price-now {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 18px rgba(227, 27, 35, 0.22);
}

.cta:hover {
  background: var(--brand-hover);
}

.cta:active {
  background: var(--brand-pressed);
}

.cta svg {
  width: 14px;
  height: 14px;
  margin-left: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  :root {
    --header: 64px;
  }

  .brand-name,
  .brand-mark {
    display: none;
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    height: 64px;
    padding: 0 12px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .site-nav {
    justify-self: end;
  }

  .site-nav a {
    min-height: 36px;
    padding: 0 8px;
  }

  .feed {
    width: min(560px, calc(100% - 32px));
    margin: 16px auto 40px;
    gap: 14px;
  }

  .feed-intro {
    padding: 4px 4px 2px;
  }

  .feed-title {
    font-size: 28px;
  }

  .post {
    border-radius: 20px;
  }

  .post-caption {
    font-size: 16px;
  }

  .post-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .post-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
  }

  .post .promo,
  .post .cta {
    width: 100%;
    min-height: 44px;
    height: 44px;
  }
}
