:root {
  color-scheme: light;
  --ink: #202020;
  --muted: #686868;
  --line: #e4e4e4;
  --paper: #f6f6f6;
  --panel: #ffffff;
  --harbor: #ca000e;
  --harbor-dark: #94000a;
  --reed: #f4d7da;
  --warning: #a34f00;
  --danger: #ca000e;
  --ok: #2e7d4f;
  --shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  --soft-red: #fff2f3;
  --red-line: #f0b8bd;
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid var(--harbor);
  outline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border: 2px solid var(--harbor);
  background: #fff;
  color: var(--harbor);
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
}

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

.is-locked {
  display: none;
}

.is-hidden,
[hidden] {
  display: none !important;
}

.login-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: 100vh;
  background: #fff;
}

.login-gate.is-hidden {
  display: none;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.02));
}

.login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px);
  border-left: 5px solid var(--harbor);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}

.login-brand {
  margin-bottom: 0;
}

.login-language-select {
  flex: 0 0 auto;
}

.login-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 56px);
}

.login-copy {
  max-width: 460px;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.login-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 440px;
  margin-bottom: 18px;
}

.login-choice-card {
  display: grid;
  gap: 8px;
  min-height: 154px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--harbor);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 16px;
  text-align: left;
}

.login-choice-card:hover {
  background: var(--soft-red);
}

.login-choice-card span {
  color: var(--harbor);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-choice-card strong {
  font-size: 20px;
}

.login-choice-card small {
  color: var(--muted);
  line-height: 1.45;
}

.login-role-hint {
  max-width: 440px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-form h2 {
  margin: 0;
  font-size: 24px;
}

.welcome-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome-line {
  margin: 0 0 14px;
}

.wave-hand {
  display: inline-block;
  color: var(--harbor);
  font-size: 34px;
  transform-origin: 70% 70%;
  animation: wave-hand 1.7s ease-in-out infinite;
}


.typewriter {
  display: inline-block;
  overflow: hidden;
  width: 5ch;
  border-right: 2px solid var(--harbor);
  color: var(--harbor);
  font-family: "Courier New", Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  white-space: nowrap;
  animation: typewriter 1.2s steps(5, end) both, caret-blink 0.8s step-end infinite;
}


@keyframes wave-hand {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(16deg); }
  36% { transform: rotate(-8deg); }
  54% { transform: rotate(14deg); }
  72% { transform: rotate(0deg); }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 5ch; }
}

@keyframes caret-blink {
  50% { border-color: transparent; }
}

.login-form {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  padding: 0 12px;
}

.human-check {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink) !important;
  line-height: 1.45;
}

.human-check input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.robot-trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.login-protection {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.login-protection span {
  border: 1px solid var(--red-line);
  background: var(--soft-red);
  color: var(--harbor-dark);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.two-factor-step {
  display: grid;
  gap: 8px;
  border: 1px solid var(--red-line);
  border-left: 4px solid var(--harbor);
  background: var(--soft-red);
  padding: 12px;
}

.two-factor-step small {
  color: var(--muted);
  line-height: 1.45;
}

.security-actions {
  display: grid;
  gap: 10px;
}

.two-factor-setup {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.qr-box {
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.qr-box img {
  display: block;
  width: 180px;
  height: 180px;
}

.secret-key {
  display: inline-block;
  overflow-wrap: anywhere;
  border: 1px solid var(--red-line);
  background: var(--soft-red);
  color: var(--harbor-dark);
  padding: 8px 10px;
  font-family: "Courier New", Consolas, monospace;
  font-weight: 800;
}

.bar-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.bar-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.data-progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eee9;
}

.data-progress::-webkit-progress-bar {
  background: #e8eee9;
}

.data-progress::-webkit-progress-value {
  background: var(--harbor);
  border-radius: 999px;
}

.data-progress::-moz-progress-bar {
  background: var(--harbor);
  border-radius: 999px;
}

.login-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--harbor);
  font-weight: 700;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.site-menu {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--harbor);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-brand strong,
.site-brand small {
  display: block;
}

.site-brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.site-brand small {
  margin-top: 4px;
  color: var(--muted);
}

.site-brand:hover strong {
  color: var(--harbor);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-nav-link {
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
}

.site-nav-link:hover,
.site-nav-link.active {
  border-bottom-color: var(--harbor);
  color: var(--harbor);
}

.site-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tenant-mode .site-nav-link:not([data-jump-view="portal"]),
.tenant-mode .nav-item:not([data-view="portal"]),
.tenant-mode #apiLogin,
.tenant-mode #apiLoginTop {
  display: none;
}

.language-select {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
}

.language-select span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.language-select select {
  border: 0;
  background: transparent;
  color: var(--harbor);
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  color: var(--ink);
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.cockpit-mark {
  display: grid;
  min-width: 70px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--harbor);
  color: var(--harbor);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-height: 42px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0 12px;
}

.nav-item:hover,
.nav-item.active {
  border-left-color: var(--harbor);
  color: var(--harbor-dark);
  background: var(--soft-red);
}

.source-box {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--red-line);
  border-radius: 0;
  background: var(--soft-red);
}

.security-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--harbor);
  background: #fff;
}

.security-box span,
.security-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.security-box strong {
  display: block;
  margin: 6px 0;
  color: var(--harbor);
}

.source-box span,
.source-box small,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.source-box span,
.source-box small {
  color: var(--muted);
  text-transform: none;
}

.source-box strong {
  display: block;
  margin: 6px 0;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.compact-actions {
  align-items: center;
}

.file-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 0;
  cursor: pointer;
  padding: 0 14px;
}

.file-button {
  border: 1px solid var(--harbor);
  color: #fff;
  background: var(--harbor);
}

.file-button input {
  display: none;
}

.ghost-button,
.small-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.ghost-button:hover,
.small-button:hover {
  border-color: var(--harbor);
  color: var(--harbor);
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 28px 18px;
  padding: 12px 14px;
  border: 1px solid var(--red-line);
  border-radius: 0;
  background: var(--soft-red);
  color: var(--harbor-dark);
}

.project-visual {
  position: relative;
  margin: 0 28px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--harbor);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-visual img {
  display: block;
  width: 100%;
  height: clamp(230px, 34vw, 390px);
  object-fit: cover;
  object-position: center;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.02));
  pointer-events: none;
}

.project-visual-copy {
  position: absolute;
  z-index: 1;
  left: clamp(22px, 4vw, 58px);
  bottom: clamp(22px, 4vw, 48px);
  width: min(620px, calc(100% - 44px));
  color: #fff;
}

.project-visual-copy p {
  margin: 0 0 8px;
  color: #ffd8db;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-visual-copy h2 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ghost-button.light {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button.light:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.content {
  padding: 0 28px 32px;
}

.kpi-grid,
.split-grid,
.table-grid {
  display: grid;
  gap: 14px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.split-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.panel,
.kpi,
.record-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi {
  padding: 16px;
  border-top: 3px solid var(--harbor);
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-body {
  padding: 16px;
}

.dashboard-panel {
  margin-top: 14px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px;
  gap: 10px;
  margin-bottom: 12px;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  text-decoration: none;
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  border-left-color: var(--harbor);
  color: var(--harbor);
  background: var(--soft-red);
}

.filters input,
.filters select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 0 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr[data-selectable="true"] {
  cursor: pointer;
}

tr[data-selectable="true"]:hover {
  background: var(--soft-red);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 0;
  padding: 0 9px;
  color: #17302b;
  background: #e6eeea;
  font-size: 12px;
}

.text-link {
  color: var(--harbor);
  font-weight: 700;
  text-decoration: none;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.ticket-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ticket-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.portal-grid {
  margin-top: 16px;
}

.badge.ok {
  color: #0c4228;
  background: #e1f1e8;
}

.badge.warn {
  color: #6f3300;
  background: #fff1df;
}

.badge.danger {
  color: var(--harbor-dark);
  background: var(--soft-red);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
}

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

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

.berth-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}

.berth-cell {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 8px;
}

.berth-cell strong,
.berth-cell span {
  display: block;
}

.berth-cell span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.berth-cell.conflict {
  border-color: var(--harbor);
  background: var(--soft-red);
}

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
  padding: 28px;
}

.panel-actions,
.detail-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.detail-actions {
  margin-bottom: 12px;
  justify-content: flex-start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  padding: 24px;
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 4px solid var(--harbor);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal.wide {
  width: min(860px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--harbor);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.edit-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.edit-form input,
.edit-form select,
.edit-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.edit-form textarea {
  padding: 10px;
  resize: vertical;
}

.checkbox-field {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.save-hint {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-left: 280px;
  border-top: 5px solid var(--harbor);
  background: #fff;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.04);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.footer-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 24px;
}

.footer-brand span {
  margin-top: 6px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.footer-grid section {
  min-height: 190px;
  background: #fff;
  padding: 24px 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--harbor);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-grid p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.footer-link {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
  text-align: left;
}

.footer-link:hover {
  color: var(--harbor);
}

.footer-link input {
  display: none;
}

.danger-link {
  color: var(--harbor);
}

.scroll-top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--harbor);
  background: var(--harbor);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.scroll-top-button.is-visible {
  display: grid;
  place-items: center;
}

.scroll-top-button:hover {
  background: var(--harbor-dark);
}

.footer-recommendations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: #fafafa;
}

.footer-recommendations h2 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recommendation-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.recommendation-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--harbor);
  background: #fff;
  color: inherit;
  padding: 0 10px;
  text-decoration: none;
}

.recommendation-card:hover {
  border-color: var(--red-line);
  color: var(--harbor);
  background: var(--soft-red);
}

.recommendation-card strong {
  display: inline;
  margin: 0;
  line-height: 1.2;
}

.recommendation-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

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

  .typewriter {
    width: auto;
    border-right: 0;
  }
}

@media (max-width: 960px) {
  .login-gate {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
  }

  .login-panel {
    border-left: 0;
    border-top: 5px solid var(--harbor);
  }

  .login-top-row {
    display: grid;
    gap: 14px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .menu-toggle {
    display: block;
  }

  .site-menu {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }

  .site-menu.is-open {
    display: grid;
  }

  .site-nav,
  .site-tools {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-left: 0;
  }

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

  .recommendation-grid {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
    gap: 14px;
  }

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

  .source-box {
    margin-top: 0;
  }

  .topbar,
  .split-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: flex-start;
  }

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

@media (max-width: 620px) {
  .site-header {
    padding: 12px 16px;
  }

  .site-nav-link {
    padding: 0 8px;
  }

  .topbar,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notice {
    margin-left: 16px;
    margin-right: 16px;
  }

  .project-visual {
    margin-left: 16px;
    margin-right: 16px;
  }

  .project-visual img {
    height: 340px;
  }

  nav,
  .kpi-grid,
  .filters,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    align-items: flex-start;
    padding: 22px 16px;
  }

  .footer-grid section {
    min-height: 0;
    padding: 20px 16px;
  }

  .footer-recommendations {
    display: grid;
    padding: 22px 16px;
  }

  table {
    font-size: 13px;
  }
}
