/* ================================================================
   Зерновой рынок — стили
   Палитра и типографика из otchet-obrazec.html
   ================================================================ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IBMPlexSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/IBMPlexSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
}

/* Шрифт логотипа: Unbounded (OFL), подмножество только из букв «ГРАНОЛЮКС». */
@font-face {
  font-family: 'Unbounded Logo';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url('fonts/Unbounded-logo.woff2') format('woff2');
}

:root {
  --bg:         #ECEEF0;
  --sheet:      #FFFFFF;
  --ink:        #15191C;
  --muted:      #606B73;
  --line:       #D8DDE0;
  --line2:      #EEF1F3;
  --up:         #197138;
  --down:       #B3261E;
  --accent:     #163344;
  --warn:       #FFF6E5;
  --warn-ink:   #8A5510;
  --nav-bg:     #163344;
  --nav-ink:    #BDCDD6;
  --nav-active: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Доступность и фокус клавиатуры ────────────────────────────── */
:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

.nav a:focus-visible,
.nav__links a:focus-visible,
.nav__brand:focus-visible,
.nav__link-btn:focus-visible {
  outline: 2px solid #e5b357;
  outline-offset: 2px;
}

.btn:focus-visible,
.btn-sm:focus-visible,
.btn-danger-outline:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

.quick-tile:focus-visible,
.home-today-card__link:focus-visible,
.post-feed__more a:focus-visible {
  outline: 2px solid #c48a37;
  outline-offset: 2px;
}

.form-control:focus-visible {
  border-color: #0284c7;
  outline: 2px solid #0284c7;
  outline-offset: 1px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Навигация ─────────────────────────────────────────────────── */
/* ── Ссылка перехода к содержимому (доступность) ─────────────── */

.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 2px;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid #c48a37;
  outline-offset: 2px;
}

.nav {
  background: var(--nav-bg);
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

.nav__top {
  display: flex;
  align-items: center;
  padding: .65rem 0 .5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav__brand {
  color: var(--nav-active);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* Логотип «Гранолюкс»: золотая эмблема + надпись Unbounded. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  text-decoration: none;
  line-height: 1;
}
.brand__mark {
  width: 1.9em;
  height: 1.9em;
  flex: none;
}
.brand__word {
  font-family: 'Unbounded Logo', "IBM Plex Sans", sans-serif;
  font-weight: 400;
  letter-spacing: .14em;
  color: #EBC977;
}
.nav__brand.brand { font-size: .95rem; padding: .35rem 0; }
.brand--hero { font-size: 2.1rem; gap: .5em; margin-bottom: .9rem; }
.brand--hero .brand__mark { width: 2.4em; height: 2.4em; }
.brand--hero .brand__word { letter-spacing: .12em; }

.nav__badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: #D2DEE5;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: .15rem 0;
}

.nav__links a,
.nav a {
  color: var(--nav-ink);
  text-decoration: none;
  font-size: 13px;
  padding: .55rem .75rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.nav__links a:hover,
.nav a:hover {
  color: var(--nav-active);
}

.nav__links a.active,
.nav a.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-active);
  font-weight: 600;
}

/* ── Контент ───────────────────────────────────────────────────── */

.page {
  flex: 1;
  padding: 1.5rem;
}

.site-footer {
  max-width: 86rem;
  margin: 0 auto;
  padding: 1rem 0 .5rem;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}

.sheet {
  max-width: 86rem;
  width: 100%;
  margin: 0 auto;
  background: var(--sheet);
  padding: 2.2rem 2.4rem 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: .85rem;
  color: var(--muted);
}

.divider {
  border: none;
  border-bottom: 2px solid var(--ink);
  margin: .4rem 0 1.8rem;
}

h2 {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 .7rem;
}

h2:first-of-type { margin-top: 0; }

p { margin-bottom: .7rem; max-width: 40rem; }

/* ── Таблицы ───────────────────────────────────────────────────── */

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.table-container:focus-visible {
  outline: 2px solid #c48a37;
  outline-offset: -2px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .84rem;
  margin-bottom: 1.5rem;
}

.table-container table {
  margin-bottom: 0;
}

th {
  text-align: left;
  font-weight: 600;
  font-size: .73rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .3rem .4rem;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

td {
  padding: .4rem .4rem;
  border-bottom: 1px solid var(--line2);
  vertical-align: middle;
}

.num {
  font-family: "IBM Plex Mono", monospace;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th.num { text-align: right; }

.up   { color: var(--up);   font-weight: 500; }
.down { color: var(--down); font-weight: 500; }
.flat { color: var(--muted); }

/* ── Топ-показатели курсов (Этап 11 / Редизайн) ─────────────────── */
.rates-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
  margin-bottom: 2rem;
}

.rate-hero-card {
  border: 1px solid var(--line);
  background: #FFFFFF;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.rate-hero-card__pair {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .35rem;
}

.rate-hero-card__symbol {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--ink);
}

.rate-hero-card__name {
  font-size: .75rem;
  color: var(--muted);
}

.rate-hero-card__value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--ink);
}

.rate-hero-card__delta {
  font-family: "IBM Plex Mono", monospace;
  font-size: .84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: .25rem;
}

.rate-hero-card__close {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .75rem;
  color: var(--muted);
}

.rate-hero-card__close-num {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}

/* ── Таблицы погоды в портах (Этап 11 / Редизайн) ────────────────── */
.table-weather {
  margin-bottom: 2rem;
}

.table-weather th,
.table-weather td {
  padding: .4rem .45rem;
}

.table-weather .th-day-group {
  text-align: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line2);
  font-weight: 600;
  font-size: .78rem;
  color: var(--ink);
  letter-spacing: .02em;
}

.table-weather .th-subcol {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding: .25rem .45rem;
}

.table-weather td.num {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-weather td.cell-wind-danger {
  background-color: #FDE8E8 !important;
  color: var(--down) !important;
  font-weight: 600;
}

/* ── Карточки (погода) ─────────────────────────────────────────── */

.cards {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.card {
  border: 1px solid var(--line);
  padding: .9rem 1rem;
  min-width: 12rem;
  flex: 1;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.card h3 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .6rem;
}

.card table { font-size: .82rem; margin-bottom: 0; }

.card td {
  border-bottom: 1px solid var(--line2);
  padding: .3rem .25rem;
}

.card tr:last-child td { border-bottom: none; }

.gusty { color: var(--down); font-weight: 600; }

.card-hint {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .4rem;
}

/* ── Плашки ────────────────────────────────────────────────────── */

.alert-box {
  background: #FFF5F5;
  color: #7A1A15;
  border-left: 4px solid var(--down);
  padding: .85rem 1.1rem;
  margin: .6rem 0 1.5rem;
}

.alert-box__badge {
  display: inline-block;
  background: var(--down);
  color: #FFFFFF;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 2px;
  margin-right: .5rem;
}

.alert-box__title {
  display: inline;
  font-weight: 600;
  font-size: .88rem;
}

.alert-box__list {
  margin: .5rem 0 0 1.2rem;
  padding: 0;
  font-size: .84rem;
  line-height: 1.55;
}

.alert-box__list li {
  margin-bottom: .2rem;
}

.error-box {
  background: #FFF6F5;
  color: var(--down);
  padding: .8rem 1rem;
  font-weight: 600;
  font-size: .9rem;
  margin: .5rem 0 1rem;
  max-width: 48rem;
  border-left: 4px solid var(--down);
}

.ok-box {
  border-left: 3px solid var(--up);
  background: #F4FAF6;
  padding: .65rem .9rem;
  color: #1E4620;
  font-size: .85rem;
  margin: .6rem 0 1.5rem;
}

.no-data {
  background: #FFF6F5;
  color: var(--down);
  padding: .7rem .9rem;
  font-size: .87rem;
  margin-bottom: 1rem;
  max-width: 40rem;
}

.autorefresh-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--warn);
  color: #4a2d00;
  border: 1px solid #ebd29f;
  border-left: 4px solid #c48a37;
  padding: .65rem .95rem;
  margin-bottom: 1.2rem;
  font-size: .88rem;
  font-weight: 500;
  border-radius: 4px;
}

.autorefresh-banner[hidden] {
  display: none !important;
}

.autorefresh-banner__text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.autorefresh-banner__icon {
  font-size: 1rem;
}

/* ── Бейджи и метки ────────────────────────────────────────────── */

.badge {
  display: inline-block;
  background: #E8EAEB;
  color: var(--ink);
  padding: .15rem .45rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 2px;
}

.badge-manual {
  background: #F0F2F3;
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge-deal {
  display: inline-block;
  background: #1b5e20;
  color: #ffffff;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.badge-offer {
  display: inline-block;
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
  padding: 1px 6px;
  font-size: 0.72rem;
  border-radius: 2px;
  font-weight: 500;
}

.badge-indication {
  display: inline-block;
  background: #f5f5f5;
  color: #616161;
  border: 1px solid #e0e0e0;
  padding: 1px 6px;
  font-size: 0.72rem;
  border-radius: 2px;
  font-weight: 500;
}

.deal-row {
  background-color: #f7fbf7;
}

.badge-stale {
  display: inline-block;
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  padding: 1px 5px;
  font-size: 0.7rem;
  border-radius: 2px;
  margin-left: 5px;
  font-weight: 500;
  text-transform: lowercase;
}

.stale-row {
  background-color: #f6f7f9;
  color: var(--muted);
}

.stale-row td strong {
  color: var(--muted);
}

.estimate-date {
  font-size: 0.7rem;
  color: #64748b;
}

/* ── График фрахта ─────────────────────────────────────────────── */

.freight-chart-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.2rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.freight-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.freight-chart-svg {
  width: 100%;
  height: auto;
  max-height: 260px;
  display: block;
}

.freight-route-form {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 100%;
}

.freight-route-form label {
  font-size: 0.82rem;
  font-weight: 600;
}

.freight-route-form select {
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .freight-route-form {
    width: 100%;
  }
  .freight-route-form select {
    width: 100%;
  }
}

/* ── Кнопки ────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: .45rem 1.1rem;
  background: var(--accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
}

.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: default; }

.btn-sm {
  padding: .25rem .6rem;
  font-size: .78rem;
}

.btn-danger-outline {
  background: transparent;
  color: var(--down);
  border: 1px solid var(--down);
  padding: .2rem .55rem;
  font-size: .75rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background .15s, color .15s;
}

.btn-danger-outline:hover {
  background: var(--down);
  color: #fff;
}


/* ── Формы (ручной ввод) ───────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.2rem 1.5rem;
  max-width: 48rem;
  margin-bottom: 1.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
}

.form-group .hint {
  font-size: .75rem;
  color: var(--muted);
}

.form-control {
  font-family: inherit;
  font-size: .9rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}

.form-control:focus {
  border-color: var(--accent);
}

/* ── Заглушка ──────────────────────────────────────────────────── */

.stub {
  color: var(--muted);
  font-size: .9rem;
  padding: 2rem 0;
}

/* ── Источники ─────────────────────────────────────────────────── */

.sources {
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Адаптив ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .sheet { padding: 1.2rem 1rem; }
  h1 { font-size: 1.2rem; }
  table { font-size: .8rem; }
  td, th { padding: .32rem .25rem; }
  .nav { padding: 0 .8rem; }
  .form-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff !important; color: #000 !important; font-size: 8.5pt !important; line-height: 1.35 !important; }
  .sheet { margin: 0 !important; padding: 0 !important; max-width: none !important; width: 100% !important; box-shadow: none !important; }
  .nav, form, .btn, .btn-sm, [data-autorefresh], .autorefresh-banner, .tag-stale, .tag { display: none !important; }

  /* Три плитки курсов строго в одну строку */
  .rates-hero {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: .5rem !important;
    margin-top: .6rem !important;
    margin-bottom: 1rem !important;
    page-break-inside: avoid;
  }
  .rate-hero-card {
    padding: .5rem .7rem !important;
    border: 1px solid var(--line) !important;
  }
  .rate-hero-card__symbol { font-size: .75rem !important; }
  .rate-hero-card__name { font-size: .65rem !important; }
  .rate-hero-card__value { font-size: 1.25rem !important; line-height: 1.15 !important; }
  .rate-hero-card__delta { font-size: .72rem !important; margin-top: .15rem !important; }
  .rate-hero-card__close { margin-top: .4rem !important; padding-top: .3rem !important; font-size: .65rem !important; }

  /* Описание пары в кросс-курсах скрываем при печати */
  .cross-desc {
    display: none !important;
  }

  /* Шрифты и отступы таблиц для печати */
  table {
    font-size: 7.5pt !important;
    margin-bottom: .8rem !important;
    page-break-inside: avoid;
  }
  th {
    font-size: 6.8pt !important;
    padding: .2rem .25rem !important;
  }
  td {
    padding: .22rem .25rem !important;
  }

  .table-weather th,
  .table-weather td {
    padding: .2rem .25rem !important;
    font-size: 7.2pt !important;
  }
  .table-weather .th-day-group {
    font-size: 6.8pt !important;
    padding: .15rem .25rem !important;
  }
  .table-weather .th-subcol {
    font-size: 6.2pt !important;
    padding: .12rem .25rem !important;
  }

  h1 { font-size: 1.15rem !important; margin-bottom: .2rem !important; }
  h2 { font-size: .7rem !important; margin: 1rem 0 .3rem !important; }
  .divider { margin: .2rem 0 .8rem !important; border-bottom-width: 1.5px !important; }

  .alert-box, .ok-box {
    page-break-inside: avoid;
    padding: .4rem .6rem !important;
    margin: .4rem 0 .8rem !important;
    font-size: .75rem !important;
  }
  .alert-box__list { margin-top: .25rem !important; font-size: .72rem !important; }
  .alert-box__list li { margin-bottom: .1rem !important; }

  .sources {
    margin-top: 1rem !important;
    padding-top: .5rem !important;
    font-size: 6.5pt !important;
    line-height: 1.35 !important;
  }

  @page {
    margin: 0.8cm 1cm;
    size: A4 portrait;
  }
}

/* Этап 11: карточки портов — не уже 15 rem, чтобы колонка ветра не обрезалась */
.cards--ports .card { min-width: 15rem; flex: 1 1 15rem; max-width: 24rem; overflow: visible; }
.cards--ports .card td { white-space: nowrap; padding: .3rem .2rem; }
.cards--ports .card th { white-space: normal; padding: .3rem .2rem; line-height: 1.2; }

/* Пометка порта со старым сбором погоды */
.port-stale { font-size: .72rem; color: var(--muted); font-weight: 400; white-space: nowrap; }
tr.port-stale td { color: #64748b; }
@media print { .port-stale { font-size: 6.5pt; } }

/* Пометка автообновления под заголовком страниц «Курсы» и «Погода» */
.autorefresh-note { margin-top: .2rem; font-size: .78rem; color: var(--muted); }
@media print { .autorefresh-note { display: none; } }

/* ── Новостной портал (главная) ────────────────────────────────── */

/* Баннер-шапка (Hero) */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(135deg, #091521 0%, #13273a 55%, #2c2012 100%);
  border: 1px solid #1a334d;
  margin-bottom: 1.5rem;
  min-height: 220px;
  display: flex;
  align-items: stretch;
}

.hero-banner__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(8, 18, 28, 0.94) 0%, rgba(12, 27, 44, 0.85) 45%, rgba(12, 27, 44, 0.45) 75%, rgba(12, 27, 44, 0.1) 100%);
  pointer-events: none;
}

.hero-banner__content {
  position: relative;
  z-index: 3;
  padding: 2.2rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 48rem;
  width: 100%;
}

.hero-banner__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e5b357;
  background: rgba(229, 179, 87, 0.14);
  border: 1px solid rgba(229, 179, 87, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.hero-banner__title {
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-banner__subtitle {
  margin: 0 0 .3rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: #ffffff;
}

.hero-banner__date {
  font-size: 0.95rem;
  font-weight: 400;
  color: #d6e3ee;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Быстрые ссылки */
.quick-nav {
  margin-bottom: 2rem;
}

.quick-nav__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-top: 3px solid #18334d;
  padding: 0.85rem 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  min-height: 5.2rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quick-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
  border-top-color: #c48a37;
}

.quick-tile:focus-visible {
  outline: 2px solid #c48a37;
  outline-offset: 2px;
}

.quick-tile__title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f2438;
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.quick-tile:hover .quick-tile__title {
  color: #9e6417;
}

.quick-tile__desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

/* ── Главная: основной макет (лента + колонка «Сегодня») ───────── */
.home-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.2rem;
  align-items: start;
}

.home-main-layout__feed {
  min-width: 0;
}

/* Панель редактора */
.editor-panel {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0284c7;
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.2rem;
}

.editor-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.editor-panel__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f2438;
}

.editor-panel__badge {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-form textarea {
  resize: vertical;
  line-height: 1.45;
}

/* Лента новостей */
.news-section {
  margin-top: 0;
  max-width: 100%;
}

.news-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.post-feed__head {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f2438;
}

.news-section__hint {
  font-size: 13px;
  color: var(--muted);
}

.post-feed {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  max-width: 100%;
}

.post {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s ease;
}

/* Выделенная свежая новость (первая в ленте) */
.post-feed > .post:first-child {
  border-color: #e5b357;
  border-left: 4px solid #c48a37;
  background: #fffdf7;
  box-shadow: 0 2px 6px rgba(196, 138, 55, 0.07);
}

.post-feed > .post:first-child .post__title {
  font-size: 1.18rem;
  color: #11263d;
}

.post__lead-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #85530e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.45rem;
}

.post__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.post__title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #111827;
  font-weight: 600;
}

.post__body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
  font-size: 0.92rem;
  color: #374151;
  max-width: 70ch;
}

.post__actions {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--line);
}

.post-feed__more {
  margin-top: 1.2rem;
  font-weight: 500;
  font-size: 0.92rem;
}

.post-feed__more a {
  display: inline-block;
  padding: .35rem 0;
  min-height: 24px;
  box-sizing: border-box;
}

/* Новости рынка на главной (автоматические, под публикациями компании) */
.market-news__head {
  margin: 1.6rem 0 .4rem;
  font-size: 1rem;
  font-weight: 600;
}
.market-news {
  list-style: none;
  margin: 0;
  padding: 0;
}
.market-news__item {
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
}
.market-news__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: .2rem;
}
.market-news__link {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.market-news__link:hover { text-decoration: underline; }

/* ── Блок «Сегодня» (правая колонка) ──────────────────────────── */
.home-today {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.home-today-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.15rem 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.home-today-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.home-today-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: #0f2438;
}

.home-today-card__time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.home-today-card__subhead {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 0.45rem;
}

/* Карточка курсов */
.today-rates-table {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.today-rate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line2);
}

.today-rate-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.today-rate-row__info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.today-rate-row__pair {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.today-rate-row__spot {
  font-size: 13px;
  color: var(--muted);
}

.today-rate-row__values {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  text-align: right;
}

.today-rate-row__cbr {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: #11263d;
}

.today-rate-row__change {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  min-width: 4.2rem;
  text-align: right;
}

.rate-up {
  color: var(--up);
  font-weight: 600;
}

.rate-down {
  color: var(--down);
  font-weight: 600;
}

.rate-flat {
  color: var(--muted);
}

/* Карточка погоды */
.today-weather-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
  margin-bottom: 0.85rem;
  font-size: 13.5px;
}

.today-weather-table th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.today-weather-table th.num {
  text-align: right;
}

.today-weather-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line2);
}

.today-weather-table tr:last-child td {
  border-bottom: none;
}

.today-weather__city {
  font-weight: 500;
  color: var(--ink);
}

.today-weather-table td.num {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
}

/* Ссылка в футере карточки */
.home-today-card__footer {
  margin-top: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
  text-align: right;
}

.home-today-card__link {
  display: inline-block;
  padding: .35rem 0;
  min-height: 24px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.home-today-card__link:hover {
  text-decoration: underline;
}

/* Адаптив для главной страницы */
@media (max-width: 1099px) {
  .home-main-layout {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .home-today {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 1024px) {
  .quick-nav__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .nav__links a,
  .nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 .75rem;
  }
  .nav__top {
    min-height: 44px;
  }
  .nav__link-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .btn,
  .btn-sm,
  .btn-danger-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hero-banner {
    min-height: 170px;
  }
  .hero-banner__content {
    padding: 1.3rem 1.1rem;
  }
  .hero-banner__title {
    font-size: 1.55rem;
  }
  .brand--hero {
    font-size: 1.35rem;
  }
  .hero-banner__subtitle {
    font-size: .95rem;
  }
  .hero-banner__date {
    font-size: 0.88rem;
  }
  .quick-nav__grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .quick-tile {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
    padding: 0.7rem 0.95rem;
    border-top: 1px solid var(--line);
    border-left: 3px solid #18334d;
  }
  .quick-tile:hover {
    border-top-color: var(--line);
    border-left-color: #c48a37;
  }
  .quick-tile__title {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
  }
  .quick-tile__desc {
    font-size: 13px;
  }
  .home-today {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .home-today-card {
    padding: 1rem;
  }
  .today-rate-row__cbr {
    font-size: 0.98rem;
  }
  .today-rate-row__values {
    gap: 0.4rem;
  }
  .today-rate-row__change {
    min-width: 3.5rem;
  }
  .editor-panel {
    padding: 1.1rem 1rem;
  }
  .post {
    padding: 0.85rem 0.95rem;
  }
  .home-today-card__link,
  .post-feed__more a {
    padding: 0.5rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Печать для главной страницы */
@media print {
  .hero-banner,
  .quick-nav,
  .editor-panel,
  .post-form,
  .post__actions,
  .post__lead-tag,
  .post-feed__more,
  .home-today {
    display: none !important;
  }

  .home-main-layout {
    display: block !important;
  }

  .post-feed {
    max-width: none !important;
  }

  .post {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    padding: 0.6rem 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .post-feed > .post:first-child {
    border-left: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .post__title {
    font-size: 11pt !important;
    color: #000 !important;
    margin: 0.15rem 0 0.3rem !important;
  }

  .post__body {
    font-size: 9pt !important;
    color: #222 !important;
    max-width: none !important;
  }

  .post__meta {
    font-size: 8pt !important;
    color: #555 !important;
  }
}

/* ── Роль в шапке ──────────────────────────────────────────────── */

.nav__user { margin-left: auto; display: flex; align-items: center; gap: .7rem; font-size: 13px; }
.nav__role { color: var(--nav-active); font-weight: 600; }
.nav__link-btn {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--nav-ink); text-decoration: underline;
}
.nav__link-btn:hover { color: var(--nav-active); }
@media print { .nav__user { display: none !important; } }

/* ── Строка «Волна, м» на странице портов ─────────────────────── */
.table-weather tr.row-marine td { font-size: .85rem; padding-top: .2rem; padding-bottom: .5rem; }

/* ── Страница «Цены»: блок «Что не показываем» ─────────────────── */
.not-shown { margin: .4rem 0 1.5rem; padding-left: 1.2rem; max-width: 60rem; line-height: 1.5; font-size: .9rem; }
.not-shown li { margin-bottom: .35rem; }


/* ── Верхняя шапка без строки ссылок ───────────────────────────── */
.nav__top { border-bottom: 0; padding: .7rem 0; gap: 1.2rem; flex-wrap: wrap; }
.nav__back { color: var(--nav-ink); font-size: 13px; text-decoration: none; padding: .2rem .5rem; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; }
.nav__back:hover { color: var(--nav-active); border-color: var(--nav-active); }

/* ── Карточка экспортных пошлин (выделена) ─────────────────────── */
.home-today-card--duties { border: 2px solid var(--nav-bg); border-top-width: 5px; background: #FFF; }
.duty-list { display: flex; flex-direction: column; }
.duty-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .1rem .8rem; padding: .6rem 0; border-bottom: 1px solid #E5E7EB; }
.duty-row:last-child { border-bottom: 0; }
.duty-row__crop { font-weight: 600; font-size: 1rem; }
.duty-row__date { display: block; font-size: .78rem; color: #4B5563; }
.duty-row__value { font-size: 1.35rem; font-weight: 700; color: var(--down); text-align: right; }
.duty-row__value small { font-size: .72rem; font-weight: 500; color: #4B5563; }
.duty-row__value--zero { color: var(--up); }
.duty-row__note { grid-column: 1 / -1; font-size: .75rem; color: #4B5563; }

@media (max-width: 640px) {
  .nav { padding: 0 0.8rem; }
  .nav__top { gap: 0.4rem 0.8rem; padding: 0.5rem 0; }
  .nav__user { margin-left: auto; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
  .duty-row { gap: 0.15rem 0.5rem; padding: 0.5rem 0; }
  .duty-row__crop { font-size: 0.95rem; }
  .duty-row__value { font-size: 1.22rem; }
}
