:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-deep: #e9e9ed;
  --surface: #ffffff;
  --surface-2: #f8f8fa;
  --surface-3: #efeff2;
  --ink: #17231f;
  --ink-2: #32413c;
  --muted: #66736e;
  --muted-2: #88928e;
  --line: rgba(23, 35, 31, 0.09);
  --line-strong: rgba(23, 35, 31, 0.16);
  --primary: #0c6957;
  --primary-strong: #084d40;
  --primary-soft: #dfeee8;
  --primary-wash: #edf5f1;
  --accent: #b88a50;
  --accent-soft: #f3e8d7;
  --danger: #a54338;
  --danger-soft: #fae9e6;
  --warning: #8b651e;
  --warning-soft: #fbf2df;
  --success: #146a4f;
  --success-soft: #e1f1e9;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(18, 39, 31, 0.03), 0 10px 30px rgba(18, 39, 31, 0.045);
  --shadow-md: 0 22px 70px rgba(18, 39, 31, 0.1);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --app-width: 520px;
  --nav-height: 66px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --focus-ring: 0 0 0 4px rgba(12, 105, 87, 0.2);
  --ease: cubic-bezier(0.22, 0.8, 0.25, 1);
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.025em;
  line-height: 1.28;
}

button,
[role="button"],
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

::selection {
  color: var(--white);
  background: var(--primary);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.small {
  font-size: 12px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

[data-icon] svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Public shell */

.public-page {
  background:
    radial-gradient(circle at 27% 15%, rgba(255, 255, 255, 0.95), transparent 35%),
    linear-gradient(120deg, #e5eae4, #f2f3ed 52%, #dde4de);
}

.public-shell {
  position: relative;
  width: min(100%, var(--app-width));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 100px rgba(21, 42, 34, 0.11);
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: calc(5px + env(safe-area-inset-top, 0px)) 16px 5px;
  background: rgba(245, 245, 247, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-header:empty {
  display: none;
}

.brand {
  display: inline-flex;
  gap: 0;
  align-items: center;
  color: var(--ink);
}

.brand-seal {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--surface);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.15), transparent 32%),
    var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.header-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.header-chip.is-vip {
  color: #6f4c16;
  background: var(--accent-soft);
  border-color: #e7d1ac;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease),
    transform 160ms var(--ease);
}

.icon-button:hover {
  color: var(--primary);
  background: var(--primary-wash);
}

.icon-button:active {
  transform: scale(0.96);
}

.app-main {
  min-height: calc(100vh - 46px);
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 22px);
}

.page {
  padding: 12px 12px 28px;
  animation: page-in 360ms var(--ease);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.view-heading h1 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: clamp(29px, 7vw, 37px);
  font-weight: 650;
}

.view-heading p:not(.eyebrow) {
  max-width: 270px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.view-aside {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, var(--app-width));
  min-height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 5px 10px calc(5px + var(--safe-bottom));
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 254, 250, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.bottom-nav a {
  position: relative;
  display: flex;
  min-height: 54px;
  gap: 3px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted-2);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 650;
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease);
}

.bottom-nav a[aria-current="page"] {
  color: var(--primary);
}

.bottom-nav a[aria-current="page"]::before {
  position: absolute;
  top: 0;
  width: 18px;
  height: 2px;
  content: "";
  background: var(--primary);
  border-radius: 2px;
}

.desktop-context {
  position: fixed;
  top: 50%;
  left: max(48px, calc(50% - 550px));
  display: none;
  width: 310px;
  color: var(--ink-2);
  transform: translateY(-50%);
}

.context-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.desktop-context > p {
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.75;
}

.context-ring {
  display: flex;
  width: 190px;
  height: 190px;
  margin-top: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--primary);
  border: 1px solid rgba(12, 105, 87, 0.28);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgba(255, 255, 255, 0.26),
    inset 0 0 0 20px rgba(12, 105, 87, 0.08);
  transform: rotate(-8deg);
}

.context-ring span,
.context-ring small {
  font-size: 10px;
  letter-spacing: 0.18em;
}

.context-ring strong {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 25px;
}

/* Common components */

.section {
  position: relative;
  padding: 0;
  margin-top: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.section:first-child {
  margin-top: 0;
}

.section-head,
.profile-section-head {
  padding: 15px 16px 14px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  gap: 12px;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
}

.section-head > div {
  min-width: 0;
}

.section-head .eyebrow,
.profile-section-head .eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.section-head h2,
.profile-section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.32;
}

.section-head p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.text-link {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 5px 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.text-link [data-icon] {
  font-size: 14px;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-flex;
  min-height: 46px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    color 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.button:hover {
  color: var(--primary);
  background: var(--primary-wash);
  border-color: #bbcfc6;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.button-primary:hover {
  color: var(--white);
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.button-accent {
  color: #3c2b13;
  background: var(--accent-soft);
  border-color: #e3caa3;
}

.button-danger {
  color: var(--danger);
  background: transparent;
  border-color: #e8c1bc;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 12px;
}

.button-block {
  width: 100%;
}

.button:disabled {
  color: #929b97;
  background: #e9ece8;
  border-color: #dfe3df;
  cursor: not-allowed;
}

.badge,
.pill {
  display: inline-flex;
  min-height: 24px;
  gap: 5px;
  align-items: center;
  padding: 0 9px;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-supply {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge-demand {
  color: #78511b;
  background: var(--accent-soft);
}

.badge-pending {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge-approved {
  color: var(--success);
  background: var(--success-soft);
}

.badge-rejected {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #2ba67d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(43, 166, 125, 0.12);
}

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
  border: 0;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.6;
}

.notice [data-icon] {
  margin-top: 2px;
  color: var(--primary);
  font-size: 16px;
}

.empty-state {
  display: grid;
  min-height: 190px;
  padding: 28px 20px;
  place-items: center;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.empty-state p {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  font-size: 22px;
}

/* Home */

.home-overview {
  margin-top: 0;
}

.hero-module {
  position: relative;
  padding: 0;
  margin-top: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: clamp(168px, 44vw, 208px);
  margin: 12px;
  background: #15372e;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(19, 42, 34, 0.11);
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s linear 650ms,
    opacity 650ms var(--ease);
}

.hero-slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.hero-media,
.hero-media img,
.hero-media video {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}

.hero-media img,
.hero-media video {
  object-fit: cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(7, 21, 17, 0.08) 8%, rgba(7, 21, 17, 0.16) 42%, rgba(7, 21, 17, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 21, 17, 0.72) 0%, rgba(7, 21, 17, 0.42) 46%, transparent 76%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 42px;
  left: 18px;
  color: var(--white);
}

.hero-content .eyebrow {
  margin-bottom: 4px;
  color: #e8cf9f;
  font-size: 8px;
}

.hero-content h1 {
  max-width: 350px;
  font-family: var(--font-display);
  font-size: clamp(22px, 5.8vw, 29px);
  font-weight: 600;
  line-height: 1.16;
  text-wrap: balance;
}

.hero-content h1 span {
  display: block;
}

.hero-content p {
  max-width: 330px;
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.77);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.hero-link {
  display: inline-flex;
  min-height: 36px;
  gap: 7px;
  align-items: center;
  padding: 0 12px;
  margin-top: 8px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.94);
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 0;
  left: 10px;
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: space-between;
}

.hero-dots {
  display: flex;
  gap: 0;
  align-items: center;
}

.hero-dot {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.hero-dot::before {
  width: 7px;
  height: 7px;
  content: "";
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  transition:
    width 260ms var(--ease),
    background 260ms var(--ease);
}

.hero-dot.is-active::before {
  width: 24px;
  background: var(--white);
}

.hero-arrows {
  display: flex;
  gap: 6px;
}

.hero-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-pause {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(10, 28, 23, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.metric-strip {
  display: grid;
  overflow: hidden;
  margin-top: 0;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric {
  position: relative;
  padding: 15px 8px 13px;
  text-align: center;
}

.metric + .metric::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 1px;
  content: "";
  background: var(--line);
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.2;
}

.metric span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 11px;
}

.segmented button {
  min-height: 30px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 9px rgba(17, 36, 29, 0.08);
}

.news-list {
  padding: 0 16px;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
}

.news-item {
  display: grid;
  width: 100%;
  padding: 15px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  grid-template-columns: 1fr 48px;
  gap: 14px;
}

.news-item + .news-item {
  border-top: 1px solid var(--line);
}

.news-item:hover {
  background: var(--surface-2);
}

.news-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.news-item h3 {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-date {
  display: grid;
  height: 42px;
  align-content: center;
  color: var(--primary);
  border-left: 1px solid var(--line);
  text-align: center;
}

.news-date strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
}

.news-date span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.company-strip {
  display: grid;
  padding: 14px 16px 16px;
  overflow-x: auto;
  grid-auto-columns: 68%;
  grid-auto-flow: column;
  gap: 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.company-strip::-webkit-scrollbar {
  display: none;
}

.company-card {
  position: relative;
  min-height: 188px;
  padding: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
}

.company-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.company-card h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
}

.company-card > p {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.company-tags {
  display: flex;
  gap: 5px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.company-stamp {
  position: absolute;
  right: -18px;
  bottom: -22px;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  color: rgba(12, 105, 87, 0.13);
  border: 1px solid rgba(12, 105, 87, 0.13);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  transform: rotate(-12deg);
}

.resource-teaser {
  position: relative;
  width: calc(100% - 24px);
  min-height: 178px;
  padding: 20px;
  margin: 12px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 52%),
    var(--ink);
  border-radius: 18px;
}

.resource-section {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.resource-teaser::before,
.resource-teaser::after {
  position: absolute;
  width: 170px;
  height: 170px;
  content: "";
  border: 1px solid rgba(231, 198, 139, 0.21);
  border-radius: 50%;
}

.resource-teaser::before {
  top: -83px;
  right: -30px;
}

.resource-teaser::after {
  top: -37px;
  right: 16px;
  width: 82px;
  height: 82px;
}

.resource-teaser .eyebrow {
  color: #e4c48a;
}

.resource-teaser h3 {
  max-width: 260px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.32;
}

.resource-teaser > p:not(.eyebrow) {
  max-width: 310px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.resource-teaser .text-link {
  margin-top: 17px;
  color: #f1d6a5;
}

/* Trade */

.trade-switcher {
  position: relative;
  padding: 7px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.trade-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.trade-tab {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: calc(var(--radius-lg) - 7px);
  text-align: center;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.trade-tab strong {
  color: inherit;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.trade-tab[aria-pressed="true"] {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(12, 105, 87, 0.18);
}

.trade-tab:focus-visible {
  outline: 3px solid rgba(12, 105, 87, 0.24);
  outline-offset: 2px;
}

.trade-feed {
  padding: 0 16px;
}

.trade-card {
  position: relative;
  padding: 16px 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.trade-card.is-pending {
  opacity: 0.82;
}

.trade-card + .trade-card {
  border-top: 1px solid var(--line);
}

.trade-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.trade-card h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.42;
}

.trade-card > p {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.trade-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10px;
}

.trade-meta span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.trade-meta [data-icon] {
  font-size: 13px;
}

.trade-media-grid {
  display: grid;
  overflow: hidden;
  height: 112px;
  margin-top: 13px;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 13px;
}

.trade-media-grid > * {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-3);
}

.media-more {
  position: relative;
}

.media-more::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  content: attr(data-more);
  background: rgba(13, 30, 25, 0.48);
  font-size: 13px;
  font-weight: 700;
}

.contact-zone {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.contact-person {
  display: flex;
  gap: 9px;
  min-width: 0;
  align-items: center;
}

.contact-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.contact-info {
  min-width: 0;
}

.contact-info strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-info span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.contact-button {
  flex: 0 0 auto;
}

.vip-tip {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
  color: #8d631f;
  font-size: 9px;
}

.publish-panel {
  display: grid;
  padding: 18px;
  margin-top: 20px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-publish-panel {
  margin-top: 14px;
}

.publish-panel-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--ink);
}

.publish-panel-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.publish-panel-head span {
  color: var(--muted);
  font-size: 9px;
}

.publish-panel .button {
  min-height: 52px;
  justify-content: flex-start;
  padding: 0 15px;
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.publish-panel .button:hover {
  background: var(--primary-strong);
}

.publish-panel .button [data-icon] {
  color: #e5c78f;
  font-size: 19px;
}

.publish-panel .button small {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
  font-weight: 500;
}

/* Resources */

.resource-card-grid {
  display: grid;
  gap: 11px;
}

.resource-card {
  display: grid;
  width: 100%;
  min-height: 78px;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  transition:
    transform 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.resource-card:hover {
  border-color: #b9cec5;
  box-shadow: 0 10px 28px rgba(18, 39, 31, 0.07);
  transform: translateY(-1px);
}

.resource-card:active {
  transform: scale(0.99);
}

.resource-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-wash);
  border-radius: 14px;
  font-size: 22px;
}

.resource-card-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.resource-card > [data-icon] {
  color: var(--muted-2);
  font-size: 17px;
}

/* Profile */

.member-pass {
  position: relative;
  min-height: 228px;
  padding: 22px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 12%, rgba(224, 199, 148, 0.22), transparent 27%),
    linear-gradient(145deg, #174b3e, #0b2a22);
  border-radius: var(--radius-xl);
  box-shadow: 0 22px 55px rgba(9, 47, 38, 0.2);
}

.member-pass::before {
  position: absolute;
  top: -95px;
  right: -70px;
  width: 238px;
  height: 238px;
  content: "";
  border: 1px solid rgba(231, 205, 158, 0.22);
  border-radius: 50%;
  box-shadow: inset 0 0 0 27px rgba(255, 255, 255, 0.025);
}

.pass-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.pass-top .eyebrow {
  color: rgba(232, 207, 159, 0.88);
}

.pass-status {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 9px;
}

.pass-company {
  position: relative;
  z-index: 1;
  margin-top: 29px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
}

.pass-role {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
}

.pass-footer {
  position: absolute;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.pass-meta {
  display: flex;
  gap: 17px;
}

.pass-meta strong {
  display: block;
  font-size: 11px;
}

.pass-meta span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 8px;
}

.pass-seal {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: #e4c48a;
  border: 1px solid rgba(228, 196, 138, 0.42);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-9deg);
}

.vip-banner {
  display: grid;
  padding: 17px;
  margin-top: 13px;
  color: #4a3515;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.5), transparent),
    var(--accent-soft);
  border: 1px solid #e6d0ac;
  border-radius: var(--radius-md);
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.vip-banner h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
}

.vip-banner p {
  margin-top: 3px;
  color: #74582d;
  font-size: 10px;
}

.profile-section {
  padding: 0;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-section-head {
  display: grid;
}

.profile-section-title {
  padding: 0;
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile-menu {
  padding: 0 16px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.profile-menu-item {
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  align-items: center;
}

.profile-menu-item + .profile-menu-item {
  border-top: 1px solid var(--line);
}

.profile-menu-item:hover {
  background: transparent;
}

.profile-menu-item > [data-icon] {
  color: var(--primary);
  font-size: 18px;
}

.profile-menu-item span:nth-child(2) {
  font-size: 13px;
  font-weight: 600;
}

.menu-value {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.menu-value [data-icon] {
  font-size: 14px;
}

.demo-footer {
  padding: 26px 10px 5px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}

/* Dialog */

.app-dialog {
  width: min(calc(100% - 24px), 500px);
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.app-dialog::backdrop {
  background: rgba(8, 18, 15, 0.55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.dialog-panel {
  max-height: min(88vh, 820px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  box-shadow: 0 30px 100px rgba(7, 20, 16, 0.35);
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  background: rgba(255, 254, 250, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dialog-head h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
}

.dialog-head .icon-button {
  width: 36px;
  height: 36px;
}

.dialog-body {
  padding: 20px;
}

.dialog-body > p + p {
  margin-top: 12px;
}

.dialog-lede {
  color: var(--muted);
  font-size: 12px;
}

.detail-summary {
  display: grid;
  padding: 16px;
  gap: 9px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.detail-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  font-size: 12px;
}

.detail-row dt {
  color: var(--muted);
}

.detail-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-copy {
  margin-top: 17px;
  white-space: pre-wrap;
}

.contact-box {
  display: grid;
  padding: 16px;
  margin-top: 15px;
  gap: 10px;
  background: var(--primary-wash);
  border: 1px solid #d5e7e0;
  border-radius: var(--radius-md);
}

.contact-box h3 {
  color: var(--primary);
  font-size: 13px;
}

.contact-line {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.contact-line strong {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.vip-lock {
  display: grid;
  padding: 19px;
  margin-top: 15px;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid #e5cda9;
  border-radius: var(--radius-md);
  text-align: center;
}

.vip-lock-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 9px;
  place-items: center;
  color: #6e4d1d;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 20px;
}

.vip-lock h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
}

.vip-lock p {
  max-width: 280px;
  margin-top: 4px;
  color: #74582d;
  font-size: 10px;
}

.qr-frame {
  position: relative;
  display: grid;
  width: 154px;
  height: 154px;
  padding: 10px;
  margin: 16px auto 10px;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 11px;
  place-items: center;
  color: var(--muted);
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(12, 105, 87, 0.06) 7px 8px),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(12, 105, 87, 0.06) 7px 8px),
    var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-size: 9px;
  text-align: center;
}

.qr-note {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.media-preview-card {
  margin-top: 15px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: var(--radius-md);
}

.media-preview-card img,
.media-preview-card video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.dialog-actions {
  display: grid;
  margin-top: 17px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.dialog-actions .button-block {
  grid-column: 1 / -1;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.form-grid.two-columns {
  grid-template-columns: 1fr 1fr;
}

.form-field {
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-label {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
}

.required {
  color: var(--danger);
}

.field-help {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.field-error {
  display: none;
  margin-top: 5px;
  color: var(--danger);
  font-size: 9px;
}

.form-field.has-error .field-error {
  display: block;
}

.form-field.has-error .input,
.form-field.has-error .select,
.form-field.has-error .textarea {
  border-color: #d79a92;
  background: #fff9f8;
}

.input,
.select,
.textarea {
  width: 100%;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition:
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.input,
.select {
  height: 45px;
  padding: 0 12px;
}

.textarea {
  min-height: 108px;
  padding: 11px 12px;
  line-height: 1.6;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #b7c2bb;
}

.input:focus,
.select:focus,
.textarea:focus {
  background: var(--white);
  border-color: var(--primary);
}

.input::placeholder,
.textarea::placeholder {
  color: #9aa39f;
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.radio-card {
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
}

.radio-card span {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.radio-card input:checked + span {
  color: var(--primary);
  background: var(--primary-wash);
  border-color: #9dc3b5;
  box-shadow: inset 0 0 0 1px #9dc3b5;
}

.radio-card input:focus-visible + span {
  box-shadow: var(--focus-ring);
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 94px;
  padding: 13px;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  text-align: center;
  cursor: pointer;
}

.upload-box:hover {
  color: var(--primary);
  background: var(--primary-wash);
  border-color: #a9c7bb;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-box [data-icon] {
  margin: 0 auto 5px;
  font-size: 21px;
}

.upload-box strong {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
}

.upload-box small {
  display: block;
  margin-top: 2px;
  font-size: 8px;
}

.upload-list {
  display: grid;
  margin-top: 6px;
  gap: 5px;
}

.upload-chip {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 8px;
  font-size: 9px;
}

.upload-chip span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-chip button {
  padding: 0;
  color: var(--danger);
  background: transparent;
  border: 0;
  font-size: 9px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 9px;
  padding-top: 3px;
  grid-column: 1 / -1;
}

.form-actions .button {
  flex: 1;
}

.form-success {
  display: grid;
  min-height: 270px;
  place-items: center;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  font-size: 30px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 22px;
}

.form-success p {
  max-width: 280px;
  margin: 7px auto 18px;
  color: var(--muted);
  font-size: 11px;
}

/* My records */

.record-list {
  display: grid;
  gap: 9px;
}

.record-item {
  display: grid;
  padding: 13px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.record-item h3 {
  font-size: 12px;
}

.record-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.record-amount {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.record-amount small {
  display: block;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 500;
}

.archive-grid {
  display: grid;
  padding: 16px;
  grid-template-columns: 1fr 1fr;
  gap: 15px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.archive-grid dt {
  color: var(--muted);
  font-size: 9px;
}

.archive-grid dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 600;
}

.archive-grid .full {
  grid-column: 1 / -1;
}

.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Toast */

.toast-region {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 18px);
  left: 16px;
  display: grid;
  width: min(calc(100% - 32px), 420px);
  margin: 0 auto;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px 14px;
  color: var(--white);
  background: rgba(20, 42, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  box-shadow: 0 18px 45px rgba(9, 25, 20, 0.24);
  font-size: 11px;
  animation: toast-in 260ms var(--ease);
  backdrop-filter: blur(15px);
}

.toast.is-error {
  background: rgba(126, 43, 35, 0.96);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (min-width: 700px) {
  :root {
    --app-width: 680px;
    --nav-height: 72px;
  }

  .app-header {
    padding-right: 28px;
    padding-left: 28px;
  }

  .page {
    padding: 24px 28px 38px;
  }

  .hero-carousel {
    min-height: 230px;
  }

  .hero-content {
    right: 26px;
    bottom: 38px;
    left: 26px;
  }

  .company-strip {
    grid-auto-columns: calc(50% - 6px);
  }

  .resource-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .resource-card:last-child {
    grid-column: 1 / -1;
  }

  .resource-teaser {
    min-height: 190px;
  }

  .bottom-nav {
    padding-right: 38px;
    padding-left: 38px;
  }
}

@media (min-width: 1120px) {
  :root {
    --app-width: 520px;
  }

  .desktop-context {
    display: block;
  }

  .public-shell {
    margin-right: auto;
    margin-left: calc(50% + 78px);
  }

  .page {
    padding: 20px 18px 34px;
  }

  .app-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero-carousel {
    min-height: 210px;
  }

  .hero-content {
    right: 24px;
    bottom: 36px;
    left: 24px;
  }

  .company-strip {
    grid-auto-columns: 68%;
  }

  .trade-feed,
  .resource-card-grid {
    grid-template-columns: 1fr;
  }

  .resource-card:last-child {
    grid-column: auto;
  }

  .bottom-nav {
    right: auto;
    left: calc(50% + 78px);
    width: 520px;
    padding-right: 10px;
    padding-left: 10px;
    transform: translateX(-50%);
  }

  .toast-region {
    right: auto;
    left: calc(50% + 78px);
    transform: translateX(-50%);
  }
}

@media (max-width: 380px) {
  .page {
    padding-right: 13px;
    padding-left: 13px;
  }

  .section-head,
  .profile-section-head {
    gap: 8px;
    padding: 14px 14px 13px;
  }

  .section-head h2,
  .profile-section-title {
    font-size: 18px;
  }

  .section-head p:not(.eyebrow) {
    font-size: 10px;
  }

  .view-aside {
    padding: 4px 7px;
    font-size: 8px;
  }

  .app-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand-seal {
    width: 28px;
    height: 28px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .header-chip {
    display: none;
  }

  .hero-carousel {
    min-height: 164px;
    margin: 10px;
  }

  .hero-content {
    right: 14px;
    bottom: 40px;
    left: 14px;
  }

  .hero-content h1 {
    font-size: 21px;
  }

  .hero-content p {
    display: none;
  }

  .news-list,
  .trade-feed,
  .profile-menu {
    padding-right: 14px;
    padding-left: 14px;
  }

  .company-strip {
    padding: 12px 14px 14px;
  }

  .resource-teaser {
    width: calc(100% - 28px);
    margin: 14px;
  }

  .trade-switcher {
    padding: 6px;
  }

  .trade-tabs {
    gap: 6px;
  }

  .trade-tab {
    min-height: 50px;
    padding: 8px 10px;
  }

  .trade-tab strong {
    font-size: 15px;
  }

  .publish-panel {
    padding: 14px;
  }

  .resource-card {
    min-height: 72px;
    padding: 12px 14px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .resource-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
  }

  .resource-card-title {
    font-size: 14px;
  }

  .publish-panel .button {
    padding: 0 10px;
    font-size: 11px;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .dialog-body {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
