.layout,
.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.layout.layout-compact {
  width: min(760px, 100%);
}

.layout.layout-compact .topbar {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.layout.layout-compact .primary-nav,
.layout.layout-compact .lang-switch {
  display: none;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  color: #152f4d;
}

.brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.primary-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.primary-nav a {
  color: #324d69;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.primary-nav a.current {
  color: #ea4159;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475d79;
}

.lang-switch a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.lang-switch a.current {
  color: #0e4d91;
}

.hero,
.hero-card {
  padding: 22px 22px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hero h1,
.hero-card h1 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #162f4f;
  font-size: clamp(24px, 4.2vw, 42px);
}

.hero p,
.hero-card p {
  margin: 10px 0 0;
  color: #445c77;
  line-height: 1.62;
  font-size: 14px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0f5ea7;
  background: rgba(15, 99, 186, 0.1);
  border: 1px solid rgba(15, 99, 186, 0.24);
  margin-bottom: 10px;
}

.actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button.primary {
  color: #fff;
  background: #ea4159;
}

.button.primary:hover {
  background: #d23248;
  text-decoration: none;
}

.button.secondary {
  color: #0e5a9f;
  background: #eef6ff;
  border-color: rgba(15, 99, 186, 0.24);
}

.button.secondary:hover {
  background: #e6f1ff;
  text-decoration: none;
}

.button.ghost {
  color: #324d69;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
}

.button.ghost:hover {
  text-decoration: none;
}

.button.disabled,
.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}

.hero-grid,
.panel-grid,
.feature-grid,
.grid,
.download-showcase {
  display: grid;
  gap: 12px;
}

.home-hero-grid {
  display: grid;
  gap: 12px;
}

.home-hero-image {
  border-radius: 8px;
  min-height: 210px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(114deg, rgba(5, 17, 38, 0.5), rgba(5, 17, 38, 0.06)),
    url("/shared/media/hero-home.jpg") center / cover no-repeat;
}

.feature-grid {
  padding: 16px 20px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.feature-card,
.panel,
.panel-card,
.doc-card,
.doc-nav {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 14px;
}

.feature-card h2,
.panel h2,
.panel-card h2,
.doc-card h2 {
  margin: 0;
  font-size: 18px;
  color: #16314f;
}

.feature-card p,
.panel p,
.panel-card p,
.panel li,
.doc-card p,
.doc-card li {
  margin: 8px 0 0;
  color: #4a607c;
  line-height: 1.62;
  font-size: 13px;
}

.panel ul,
.panel-card ul,
.doc-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(15, 99, 186, 0.1);
  color: #0f5ea7;
  margin-bottom: 8px;
}

.hero-badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-badges span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #3a5472;
  background: #f3f7fc;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.hero-visual {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #f7fbff;
}

.hero-visual h2 {
  margin: 0;
  font-size: 14px;
  color: #1b3a5b;
}

.hero-visual p {
  margin: 8px 0 0;
  font-size: 12px;
  color: #4d6480;
}

.download-hero {
  padding-bottom: 18px;
}

.store-stack {
  display: grid;
  gap: 8px;
}

.store-button {
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.qr-panel {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fbff;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.qr-code {
  width: 86px;
  height: 86px;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background:
    linear-gradient(90deg, rgba(4, 17, 38, 0.9) 0 22%, transparent 22% 30%, rgba(4, 17, 38, 0.9) 30% 46%, transparent 46% 54%, rgba(4, 17, 38, 0.9) 54% 74%, transparent 74% 82%, rgba(4, 17, 38, 0.9) 82% 100%),
    linear-gradient(0deg, rgba(4, 17, 38, 0.9) 0 18%, transparent 18% 28%, rgba(4, 17, 38, 0.9) 28% 40%, transparent 40% 52%, rgba(4, 17, 38, 0.9) 52% 64%, transparent 64% 74%, rgba(4, 17, 38, 0.9) 74% 86%, transparent 86% 100%),
    #fff;
}

.preview-phone {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.device-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.device {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  min-height: 144px;
  background: #ffffff;
  position: relative;
}

.device::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 18px;
  bottom: 9px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: repeating-linear-gradient(180deg, rgba(15, 99, 186, 0.17), rgba(15, 99, 186, 0.17) 8px, transparent 8px, transparent 16px);
}

.status-board {
  display: grid;
  gap: 8px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

.status-label {
  font-weight: 700;
  color: #233d5d;
  font-size: 13px;
}

.status-chip {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.status-chip.ok {
  color: var(--success);
  background: var(--success-bg);
}

.status-chip.warn {
  color: var(--warn);
  background: var(--warn-bg);
}

.status-chip.down {
  color: var(--danger);
  background: var(--danger-bg);
}

.state-box {
  margin-top: 12px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fbff;
}

.state-box strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.state-box p {
  margin: 0;
  font-size: 12px;
  color: #4b617c;
  line-height: 1.5;
}

.state-box.info {
  background: rgba(15, 99, 186, 0.1);
  border-color: rgba(15, 99, 186, 0.24);
}

.state-box.warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.25);
}

.state-box.error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(159, 18, 57, 0.25);
}

.doc-shell {
  display: grid;
  gap: 12px;
  padding: 16px 20px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.doc-nav h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #1c3c5e;
}

.doc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.doc-nav a {
  color: #1f406a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.doc-card h3 {
  margin: 16px 0 0;
  font-size: 15px;
  color: #1e3b5d;
}

.doc-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-meta span {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #1d4776;
  border: 1px solid rgba(15, 99, 186, 0.22);
  background: rgba(15, 99, 186, 0.08);
  padding: 5px 8px;
}

.platform-note,
.mono {
  margin-top: 10px;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(15, 99, 186, 0.08);
  border: 1px solid rgba(15, 99, 186, 0.22);
  color: #0d4d90;
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.notice {
  margin-top: 8px;
  color: #4a607c;
  font-size: 12px;
  line-height: 1.58;
}

.route-list,
#route-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.route-list li,
#route-list li {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: #4a607c;
  line-height: 1.5;
  font-size: 12px;
}

.footer {
  padding: 14px 18px;
  color: #506783;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.footer a {
  color: #0c4f95;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Home page mock-aligned pass */
body.home-page {
  background: #ffffff;
}

.page-home.layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-home .home-topbar {
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  padding: 10px 16px;
}

.home-brand a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: block;
}

.page-home .home-nav {
  justify-content: center;
  gap: 20px;
}

.page-home .home-nav a {
  position: relative;
  padding: 6px 0 8px;
  font-size: 11px;
  color: #253d5b;
}

.page-home .home-nav a.current {
  color: #253d5b;
}

.page-home .home-nav a.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 2px;
  border-radius: 2px;
  background: #ef445c;
}

.page-home .home-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.page-home .home-lang {
  gap: 4px;
  color: #324d69;
}

.page-home .home-lang a.current {
  color: #324d69;
}

.home-lang-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea4159, #0f63ba);
}

.home-lang-arrow {
  font-size: 10px;
  line-height: 1;
  color: #5c738d;
}

.page-home .button.home-start {
  border-radius: 999px;
  padding: 7px 13px;
  background: #0d5ca8;
  color: #ffffff;
  border: 1px solid #0b4e90;
  font-size: 11px;
  font-weight: 800;
}

.page-home .button.home-start:hover {
  background: #0a4d8d;
  text-decoration: none;
}

.page-home .home-hero {
  padding: 0;
}

.page-home .home-hero-panel {
  min-height: 458px;
  padding: 46px 30px;
  color: #ffffff;
  background:
    linear-gradient(98deg, rgba(11, 24, 46, 0.7) 0%, rgba(11, 24, 46, 0.28) 54%, rgba(11, 24, 46, 0.16) 100%),
    url("/shared/media/hero-home.jpg") center 52% / cover no-repeat;
}

.page-home .home-hero-panel h1 {
  margin: 0;
  max-width: 640px;
  color: #ffffff;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-size: clamp(46px, 5.5vw, 68px);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.page-home .home-hero-sub {
  margin-top: 12px;
  max-width: 640px;
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}

.page-home .home-hero-body {
  margin-top: 12px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.36;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.page-home .button.home-download-button {
  margin-top: 20px;
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 16px;
  background: #ef445c;
  border: 1px solid #dc3950;
  box-shadow: 0 8px 22px rgba(220, 57, 80, 0.36);
}

.page-home .button.home-download-button:hover {
  background: #db364e;
}

.page-home .home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 32px 22px 28px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.page-home .home-feature-card {
  text-align: center;
  padding: 0 14px;
}

.home-feature-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf3fc;
  color: #1d66a8;
}

.home-feature-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.page-home .home-feature-card h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.1;
  color: #162f4e;
}

.page-home .home-feature-card p {
  margin: 8px auto 0;
  max-width: 245px;
  color: #5f738a;
  line-height: 1.45;
  font-size: 10px;
}

.home-footer {
  padding: 14px 20px 18px;
}

.home-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.home-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.home-footer-links a {
  color: #2f4764;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.home-footer-links a:hover {
  text-decoration: underline;
}

.home-social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.home-social span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10233a;
}

.home-social svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  display: block;
}

.home-copyright {
  margin: 8px 0 0;
  font-size: 10px;
  color: #566e8b;
}

@media (min-width: 760px) {
  .home-hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: stretch;
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .download-showcase {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .panel-grid,
  .grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .actions {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1040px) {
  .panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-grid .panel:first-child:nth-last-child(2),
  .panel-grid .panel:first-child:nth-last-child(2) ~ .panel {
    grid-column: span 1;
  }
}

@media (max-width: 759px) {
  .layout,
  .page-shell,
  .layout.layout-compact {
    margin: 10px;
    width: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
  }

  .primary-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero,
  .hero-card {
    padding: 16px;
  }

  .feature-grid,
  .doc-shell {
    padding: 12px 14px;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .page-home.layout {
    width: 100%;
    margin: 0;
  }

  .page-home .home-topbar {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  .page-home .home-nav {
    justify-content: flex-start;
    gap: 14px;
  }

  .page-home .home-nav a.current::after {
    bottom: -8px;
  }

  .page-home .home-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .page-home .home-hero-panel {
    min-height: 356px;
    padding: 30px 18px 28px;
  }

  .page-home .home-hero-panel h1 {
    font-size: clamp(30px, 8.8vw, 52px);
  }

  .page-home .home-hero-sub {
    font-size: clamp(20px, 6vw, 34px);
  }

  .page-home .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 16px 20px;
  }

  .page-home .home-feature-card h2 {
    font-size: 28px;
  }

  .home-footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-social {
    gap: 10px;
  }

  .page-home .button.home-start {
    width: auto;
  }

  .page-home .button.home-download-button {
    width: auto;
  }
}
